ROOT  6.06/09
Reference Guide
Typedefs | Functions
ROOT::Fit::FitUtil Namespace Reference

namespace defining utility free functions using in Fit for evaluating the various fit method functions (chi2, likelihood, etc..) given the data and the model function More...

Typedefs

typedef ROOT::Math::IParamMultiFunction IModelFunction
 
typedef ROOT::Math::IParamMultiGradFunction IGradModelFunction
 

Functions

double EvaluateChi2 (const IModelFunction &func, const BinData &data, const double *x, unsigned int &nPoints)
 Chi2 Functions. More...
 
double EvaluateChi2Effective (const IModelFunction &func, const BinData &data, const double *x, unsigned int &nPoints)
 evaluate the effective Chi2 given a model function and the data at the point x. More...
 
void EvaluateChi2Gradient (const IModelFunction &func, const BinData &data, const double *x, double *grad, unsigned int &nPoints)
 evaluate the Chi2 gradient given a model function and the data at the point x. More...
 
double EvaluateLogL (const IModelFunction &func, const UnBinData &data, const double *x, int iWeight, bool extended, unsigned int &nPoints)
 evaluate the LogL given a model function and the data at the point x. More...
 
void EvaluateLogLGradient (const IModelFunction &func, const UnBinData &data, const double *x, double *grad, unsigned int &nPoints)
 evaluate the LogL gradient given a model function and the data at the point x. More...
 
double EvaluatePoissonLogL (const IModelFunction &func, const BinData &data, const double *x, int iWeight, bool extended, unsigned int &nPoints)
 evaluate the Poisson LogL given a model function and the data at the point x. More...
 
void EvaluatePoissonLogLGradient (const IModelFunction &func, const BinData &data, const double *x, double *grad)
 evaluate the Poisson LogL given a model function and the data at the point x. More...
 
double EvaluateChi2Residual (const IModelFunction &func, const BinData &data, const double *x, unsigned int ipoint, double *g=0)
 Parallel evaluate the Chi2 given a model function and the data at the point x. More...
 
double EvaluatePdf (const IModelFunction &func, const UnBinData &data, const double *x, unsigned int ipoint, double *g=0)
 evaluate the pdf contribution to the LogL given a model function and the BinPoint data. More...
 
double EvaluatePoissonBinPdf (const IModelFunction &func, const BinData &data, const double *x, unsigned int ipoint, double *g=0)
 evaluate the pdf contribution to the Poisson LogL given a model function and the BinPoint data. More...
 
double CorrectValue (double rval)
 
bool CheckValue (double &rval)
 
template<class GFunc >
void CalculateGradientIntegral (const GFunc &gfunc, const double *x1, const double *x2, const double *p, double *g)
 

Detailed Description

namespace defining utility free functions using in Fit for evaluating the various fit method functions (chi2, likelihood, etc..) given the data and the model function

Typedef Documentation

Definition at line 41 of file FitUtil.h.

Definition at line 40 of file FitUtil.h.

Function Documentation

template<class GFunc >
void ROOT::Fit::FitUtil::CalculateGradientIntegral ( const GFunc &  gfunc,
const double x1,
const double x2,
const double p,
double g 
)
bool ROOT::Fit::FitUtil::CheckValue ( double rval)

Definition at line 292 of file FitUtil.cxx.

Referenced by EvaluateChi2Gradient().

double ROOT::Fit::FitUtil::CorrectValue ( double  rval)

Definition at line 281 of file FitUtil.cxx.

Referenced by EvaluateChi2Residual().

double ROOT::Fit::FitUtil::EvaluateChi2 ( const IModelFunction func,
const BinData data,
const double x,
unsigned int &  nPoints 
)

Chi2 Functions.

evaluate the Chi2 given a model function and the data at the point x. return also nPoints as the effective number of used points in the Chi2 evaluation

Definition at line 336 of file FitUtil.cxx.

Referenced by ROOT::Fit::Chi2FCN< FunType >::DoEval().

double ROOT::Fit::FitUtil::EvaluateChi2Effective ( const IModelFunction func,
const BinData data,
const double x,
unsigned int &  nPoints 
)

evaluate the effective Chi2 given a model function and the data at the point x.

The effective chi2 uses the errors on the coordinates : W = 1/(sigma_y**2 + ( sigma_x_i * df/dx_i )**2 ) return also nPoints as the effective number of used points in the Chi2 evaluation

Definition at line 472 of file FitUtil.cxx.

Referenced by ROOT::Fit::Chi2FCN< FunType >::DoEval().

void ROOT::Fit::FitUtil::EvaluateChi2Gradient ( const IModelFunction func,
const BinData data,
const double x,
double grad,
unsigned int &  nPoints 
)

evaluate the Chi2 gradient given a model function and the data at the point x.

return also nPoints as the effective number of used points in the Chi2 evaluation

Definition at line 698 of file FitUtil.cxx.

Referenced by ROOT::Fit::Chi2FCN< FunType >::Gradient().

double ROOT::Fit::FitUtil::EvaluateChi2Residual ( const IModelFunction func,
const BinData data,
const double p,
unsigned int  i,
double g = 0 
)

Parallel evaluate the Chi2 given a model function and the data at the point x.

evaluate the chi2 contribution (residual term) only for data with no coord-errors This function is used in the specialized least square algorithms like FUMILI or L.M.

return also nPoints as the effective number of used points in the Chi2 evaluation evaluate the residual contribution to the Chi2 given a model function and the BinPoint data and if the pointer g is not null evaluate also the gradient of the residual. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used

if we have error on the coordinates the method is not yet implemented integral option is also not yet implemented one can use in that case normal chi2 method

Definition at line 593 of file FitUtil.cxx.

Referenced by ROOT::Fit::Chi2FCN< FunType >::DataElement().

double ROOT::Fit::FitUtil::EvaluateLogL ( const IModelFunction func,
const UnBinData data,
const double x,
int  iWeight,
bool  extended,
unsigned int &  nPoints 
)

evaluate the LogL given a model function and the data at the point x.

return also nPoints as the effective number of used points in the LogL evaluation

Definition at line 891 of file FitUtil.cxx.

Referenced by ROOT::Fit::LogLikelihoodFCN< FunType >::DoEval().

void ROOT::Fit::FitUtil::EvaluateLogLGradient ( const IModelFunction func,
const UnBinData data,
const double x,
double grad,
unsigned int &  nPoints 
)

evaluate the LogL gradient given a model function and the data at the point x.

return also nPoints as the effective number of used points in the LogL evaluation

Definition at line 1016 of file FitUtil.cxx.

Referenced by ROOT::Fit::LogLikelihoodFCN< FunType >::Gradient().

double ROOT::Fit::FitUtil::EvaluatePdf ( const IModelFunction func,
const UnBinData data,
const double x,
unsigned int  ipoint,
double g = 0 
)

evaluate the pdf contribution to the LogL given a model function and the BinPoint data.

If the pointer g is not null evaluate also the gradient of the pdf. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used

Definition at line 843 of file FitUtil.cxx.

Referenced by ROOT::Fit::LogLikelihoodFCN< FunType >::DataElement().

double ROOT::Fit::FitUtil::EvaluatePoissonBinPdf ( const IModelFunction func,
const BinData data,
const double x,
unsigned int  ipoint,
double g = 0 
)

evaluate the pdf contribution to the Poisson LogL given a model function and the BinPoint data.

evaluate the pdf (Poisson) contribution to the logl (return actually log of pdf) and its gradient

If the pointer g is not null evaluate also the gradient of the Poisson pdf. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used

Definition at line 1058 of file FitUtil.cxx.

Referenced by ROOT::Fit::PoissonLikelihoodFCN< FunType >::DataElement().

double ROOT::Fit::FitUtil::EvaluatePoissonLogL ( const IModelFunction func,
const BinData data,
const double x,
int  iWeight,
bool  extended,
unsigned int &  nPoints 
)

evaluate the Poisson LogL given a model function and the data at the point x.

return also nPoints as the effective number of used points in the LogL evaluation By default is extended, pass extedend to false if want to be not extended (MultiNomial)

Definition at line 1161 of file FitUtil.cxx.

Referenced by ROOT::Fit::PoissonLikelihoodFCN< FunType >::DoEval().

void ROOT::Fit::FitUtil::EvaluatePoissonLogLGradient ( const IModelFunction func,
const BinData data,
const double x,
double grad 
)

evaluate the Poisson LogL given a model function and the data at the point x.

return also nPoints as the effective number of used points in the LogL evaluation

Definition at line 1342 of file FitUtil.cxx.

Referenced by ROOT::Fit::PoissonLikelihoodFCN< FunType >::Gradient().