Logo ROOT   6.10/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::IParamMultiGradFunction IGradModelFunction
 
typedef ROOT::Math::IParamMultiFunction IModelFunction
 

Functions

template<class GFunc >
void CalculateGradientIntegral (const GFunc &gfunc, const double *x1, const double *x2, const double *p, double *g)
 
bool CheckValue (double &rval)
 
double CorrectValue (double rval)
 
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 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 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 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 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...
 

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

◆ IGradModelFunction

Definition at line 36 of file FitUtil.h.

◆ IModelFunction

Definition at line 35 of file FitUtil.h.

Function Documentation

◆ CalculateGradientIntegral()

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

Definition at line 313 of file FitUtil.cxx.

◆ CheckValue()

bool ROOT::Fit::FitUtil::CheckValue ( double &  rval)

Definition at line 293 of file FitUtil.cxx.

◆ CorrectValue()

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

Definition at line 282 of file FitUtil.cxx.

◆ EvaluateChi2()

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 337 of file FitUtil.cxx.

◆ EvaluateChi2Effective()

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 473 of file FitUtil.cxx.

◆ EvaluateChi2Gradient()

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 699 of file FitUtil.cxx.

◆ EvaluateChi2Residual()

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 594 of file FitUtil.cxx.

◆ EvaluateLogL()

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 892 of file FitUtil.cxx.

◆ EvaluateLogLGradient()

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 1063 of file FitUtil.cxx.

◆ EvaluatePdf()

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 844 of file FitUtil.cxx.

◆ EvaluatePoissonBinPdf()

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 1105 of file FitUtil.cxx.

◆ EvaluatePoissonLogL()

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 1208 of file FitUtil.cxx.

◆ EvaluatePoissonLogLGradient()

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 1389 of file FitUtil.cxx.