ROOT 6.14/05 Reference Guide |
Namespace for the fitting classes. More...
Namespaces | |
FitUtil | |
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 | |
HFitInterface | |
Classes | |
class | BasicFCN |
BasicFCN class: base class for the objective functions used in the fits It has a reference to the data and th emodel function used in the fit. More... | |
class | BinData |
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y values and error on coordinates The dimension of the coordinate is free There are 4 different options: More... | |
class | Chi2FCN |
Chi2FCN class for binnned fits using the least square methods. More... | |
struct | DataOptions |
DataOptions : simple structure holding the options on how the data are filled. More... | |
class | DataRange |
class describing the range in the coordinates it supports multiple range in a coordinate. More... | |
struct | DummyDeleter |
class | FcnAdapter |
class | FitConfig |
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::ParameterSettings class. More... | |
class | FitData |
Base class for all the fit data types: Stores the coordinates and the DataOptions. More... | |
class | FitResult |
class containg the result of the fit and all the related information (fitted parameter values, error, covariance matrix and minimizer result information) Contains a pointer also to the fitted (model) function, modified with the fit parameter values. More... | |
class | Fitter |
Fitter class, entry point for performing all type of fits. More... | |
class | LogLikelihoodFCN |
LogLikelihoodFCN class for likelihood fits. More... | |
class | ParameterSettings |
Class, describing value, limits and step size of the parameters Provides functionality also to set/retrieve values, step sizes, limits and fix the parameters. More... | |
class | PoissonLikelihoodFCN |
class evaluating the log likelihood for binned Poisson likelihood fits it is template to distinguish gradient and non-gradient case More... | |
class | SparseData |
class | UnBinData |
Class describing the unbinned data sets (just x coordinates values) of any dimensions. More... | |
Enumerations | |
enum | EFitObjectType { kHistogram, kGraph } |
enum | ExecutionPolicy { ExecutionPolicy::kSerial, ExecutionPolicy::kMultithread, ExecutionPolicy::kMultiprocess } |
Functions | |
double | Chisquare (const TH1 &h1, TF1 &f1, bool useRange, bool usePL=false) |
compute the chi2 value for an histogram given a function (see TH1::Chisquare for the documentation) More... | |
double | Chisquare (const TGraph &h1, TF1 &f1, bool useRange) |
compute the chi2 value for a graph given a function (see TGraph::Chisquare) More... | |
void | DivideBox (const vector< double > &min, const vector< double > &max, const vector< double > &bmin, const vector< double > &bmax, const unsigned int size, const unsigned int n, list< Box > &l, const double val, const double error) |
void | DoFillData (BinData &dv, const TGraph *gr, BinData::ErrorType type, TF1 *func) |
void | FillData (BinData &dv, const TH1 *hist, TF1 *func=0) |
fill the data vector from a TH1. More... | |
void | FillData (SparseData &dv, const TH1 *hist, TF1 *func=0) |
fill the data vector from a TH1 with sparse data. More... | |
void | FillData (SparseData &dv, const THnBase *hist, TF1 *func=0) |
fill the data vector from a THnBase. More... | |
void | FillData (BinData &dv, const THnBase *hist, TF1 *func=0) |
fill the data vector from a THnBase. More... | |
void | FillData (BinData &dv, const TGraph2D *gr, TF1 *func=0) |
fill the data vector from a TGraph2D. More... | |
void | FillData (BinData &dv, const TGraph *gr, TF1 *func=0) |
fill the data vector from a TGraph. More... | |
void | FillData (BinData &dv, const TMultiGraph *gr, TF1 *func=0) |
fill the data vector from a TMultiGraph. More... | |
TFitResultPtr | FitObject (TH1 *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range) |
fitting function for a TH1 (called from TH1::Fit) More... | |
TFitResultPtr | FitObject (TGraph *gr, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range) |
fitting function for a TGraph (called from TGraph::Fit) More... | |
TFitResultPtr | FitObject (TMultiGraph *mg, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range) |
fitting function for a MultiGraph (called from TMultiGraph::Fit) More... | |
TFitResultPtr | FitObject (TGraph2D *gr, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range) |
fitting function for a TGraph2D (called from TGraph2D::Fit) More... | |
TFitResultPtr | FitObject (THnBase *s1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range) |
fitting function for a THn / THnSparse (called from THnBase::Fit) More... | |
void | FitOptionsMake (EFitObjectType type, const char *option, Foption_t &fitOption) |
Decode list of options into fitOption. More... | |
bool | GetConfidenceIntervals (const TH1 *h1, const ROOT::Fit::FitResult &r, TGraphErrors *gr, double cl=0.95) |
compute confidence intervals at level cl for a fitted histogram h1 in a TGraphErrors gr More... | |
BinData::ErrorType | GetDataType (const TGraph *gr, DataOptions &fitOpt) |
BinData::ErrorType | GetDataType (const TGraph2D *gr, const DataOptions &fitOpt) |
void | Init2DGaus (const ROOT::Fit::BinData &data, TF1 *f1) |
compute initial parameter for 2D gaussian function given the fit data Set the sigma limits for zero top 10* initial rms values Set the initial parameter values in the TF1 More... | |
void | InitExpo (const ROOT::Fit::BinData &data, TF1 *f1) |
compute initial parameter for an exponential function given the fit data Set the constant and slope assuming a simple exponential going through xmin and xmax of the data set More... | |
void | InitGaus (const ROOT::Fit::BinData &data, TF1 *f1) |
compute initial parameter for gaussian function given the fit data Set the sigma limits for zero top 10* initial rms values Set the initial parameter values in the TF1 More... | |
bool | lessRange (const std::pair< double, double > &r1, const std::pair< double, double > &r2) |
ostream & | operator<< (ostream &os, const ROOT::Fit::Box &b) |
TFitResultPtr | UnBinFit (ROOT::Fit::UnBinData *data, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption) |
fit an unbin data set (from tree or from histogram buffer) using a TF1 pointer and fit options. More... | |
Variables | |
double | gDefaultErrorDef = ROOT::Math::MinimizerOptions::DefaultErrorDef() |
const int | gInitialResultStatus = -99 |
Namespace for the fitting classes.
typedef LogLikelihoodFCN<ROOT::Math::IMultiGenFunction, ROOT::Math::IParamMultiFunction> ROOT::Fit::LogLikelihoodFunction |
Definition at line 180 of file LogLikelihoodFCN.h.
typedef LogLikelihoodFCN<ROOT::Math::IMultiGradFunction, ROOT::Math::IParamMultiFunction> ROOT::Fit::LogLikelihoodGradFunction |
Definition at line 181 of file LogLikelihoodFCN.h.
typedef PoissonLikelihoodFCN<ROOT::Math::IMultiGenFunction, ROOT::Math::IParamMultiFunction> ROOT::Fit::PoissonLLFunction |
Definition at line 190 of file PoissonLikelihoodFCN.h.
typedef PoissonLikelihoodFCN<ROOT::Math::IMultiGradFunction, ROOT::Math::IParamMultiFunction> ROOT::Fit::PoissonLLGradFunction |
Definition at line 191 of file PoissonLikelihoodFCN.h.
Enumerator | |
---|---|
kHistogram | |
kGraph |
Definition at line 48 of file HFitInterface.h.
|
strong |
Enumerator | |
---|---|
kSerial | |
kMultithread | |
kMultiprocess |
Definition at line 5 of file FitExecutionPolicy.h.
compute the chi2 value for an histogram given a function (see TH1::Chisquare for the documentation)
Definition at line 1018 of file HFitImpl.cxx.
compute the chi2 value for a graph given a function (see TGraph::Chisquare)
Definition at line 1022 of file HFitImpl.cxx.
void ROOT::Fit::DivideBox | ( | const vector< double > & | min, |
const vector< double > & | max, | ||
const vector< double > & | bmin, | ||
const vector< double > & | bmax, | ||
const unsigned int | size, | ||
const unsigned int | n, | ||
list< Box > & | l, | ||
const double | val, | ||
const double | error | ||
) |
Definition at line 152 of file SparseData.cxx.
void ROOT::Fit::DoFillData | ( | BinData & | dv, |
const TGraph * | gr, | ||
BinData::ErrorType | type, | ||
TF1 * | func | ||
) |
Definition at line 573 of file HFitInterface.cxx.
fill the data vector from a TH1.
Pass also the TF1 function which is needed in case of integral option and to reject points rejected by the function
Definition at line 107 of file HFitInterface.cxx.
void ROOT::Fit::FillData | ( | SparseData & | dv, |
const TH1 * | hist, | ||
TF1 * | func = 0 |
||
) |
fill the data vector from a TH1 with sparse data.
Pass also the TF1 function which is needed in case of integral option and to reject points rejected by the function
Definition at line 670 of file HFitInterface.cxx.
void ROOT::Fit::FillData | ( | SparseData & | dv, |
const THnBase * | hist, | ||
TF1 * | func = 0 |
||
) |
fill the data vector from a THnBase.
Pass also the TF1 function which is needed in case of integral option and to reject points rejected by the function
Definition at line 714 of file HFitInterface.cxx.
fill the data vector from a THnBase.
Pass also the TF1 function which is needed in case of integral option and to reject points rejected by the function
Definition at line 757 of file HFitInterface.cxx.
fill the data vector from a TGraph2D.
Pass also the TF1 function which is needed in case of integral option and to reject points rejected by the function
Definition at line 874 of file HFitInterface.cxx.
fill the data vector from a TGraph.
Pass also the TF1 function which is needed in case to exclude points rejected by the function
Definition at line 789 of file HFitInterface.cxx.
void ROOT::Fit::FillData | ( | BinData & | dv, |
const TMultiGraph * | gr, | ||
TF1 * | func = 0 |
||
) |
fill the data vector from a TMultiGraph.
Pass also the TF1 function which is needed in case to exclude points rejected by the function
Definition at line 821 of file HFitInterface.cxx.
TFitResultPtr ROOT::Fit::FitObject | ( | TH1 * | h1, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption, | ||
const char * | goption, | ||
ROOT::Fit::DataRange & | range | ||
) |
fitting function for a TH1 (called from TH1::Fit)
Definition at line 964 of file HFitImpl.cxx.
TFitResultPtr ROOT::Fit::FitObject | ( | TGraph * | gr, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption, | ||
const char * | goption, | ||
ROOT::Fit::DataRange & | range | ||
) |
fitting function for a TGraph (called from TGraph::Fit)
Definition at line 976 of file HFitImpl.cxx.
TFitResultPtr ROOT::Fit::FitObject | ( | TMultiGraph * | mg, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption, | ||
const char * | goption, | ||
ROOT::Fit::DataRange & | range | ||
) |
fitting function for a MultiGraph (called from TMultiGraph::Fit)
Definition at line 983 of file HFitImpl.cxx.
TFitResultPtr ROOT::Fit::FitObject | ( | TGraph2D * | gr, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption, | ||
const char * | goption, | ||
ROOT::Fit::DataRange & | range | ||
) |
fitting function for a TGraph2D (called from TGraph2D::Fit)
Definition at line 990 of file HFitImpl.cxx.
TFitResultPtr ROOT::Fit::FitObject | ( | THnBase * | s1, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption, | ||
const char * | goption, | ||
ROOT::Fit::DataRange & | range | ||
) |
fitting function for a THn / THnSparse (called from THnBase::Fit)
Definition at line 997 of file HFitImpl.cxx.
void ROOT::Fit::FitOptionsMake | ( | EFitObjectType | type, |
const char * | option, | ||
Foption_t & | fitOption | ||
) |
Decode list of options into fitOption.
Definition at line 681 of file HFitImpl.cxx.
bool ROOT::Fit::GetConfidenceIntervals | ( | const TH1 * | h1, |
const ROOT::Fit::FitResult & | r, | ||
TGraphErrors * | gr, | ||
double | cl = 0.95 |
||
) |
compute confidence intervals at level cl for a fitted histogram h1 in a TGraphErrors gr
Definition at line 961 of file HFitInterface.cxx.
BinData::ErrorType ROOT::Fit::GetDataType | ( | const TGraph * | gr, |
DataOptions & | fitOpt | ||
) |
Definition at line 473 of file HFitInterface.cxx.
BinData::ErrorType ROOT::Fit::GetDataType | ( | const TGraph2D * | gr, |
const DataOptions & | fitOpt | ||
) |
Definition at line 542 of file HFitInterface.cxx.
void ROOT::Fit::Init2DGaus | ( | const ROOT::Fit::BinData & | data, |
TF1 * | f1 | ||
) |
compute initial parameter for 2D gaussian function given the fit data Set the sigma limits for zero top 10* initial rms values Set the initial parameter values in the TF1
Compute Initial values of parameters for a gaussian derived from function H1InitGaus defined in TH1.cxx.
Definition at line 385 of file HFitInterface.cxx.
void ROOT::Fit::InitExpo | ( | const ROOT::Fit::BinData & | data, |
TF1 * | f1 | ||
) |
compute initial parameter for an exponential function given the fit data Set the constant and slope assuming a simple exponential going through xmin and xmax of the data set
Compute rough values of parameters for an exponential.
Definition at line 264 of file HFitInterface.cxx.
void ROOT::Fit::InitGaus | ( | const ROOT::Fit::BinData & | data, |
TF1 * | f1 | ||
) |
compute initial parameter for gaussian function given the fit data Set the sigma limits for zero top 10* initial rms values Set the initial parameter values in the TF1
Compute Initial values of parameters for a gaussian derived from function H1InitGaus defined in TH1.cxx.
Definition at line 303 of file HFitInterface.cxx.
bool ROOT::Fit::lessRange | ( | const std::pair< double, double > & | r1, |
const std::pair< double, double > & | r2 | ||
) |
Definition at line 73 of file DataRange.cxx.
ostream& ROOT::Fit::operator<< | ( | ostream & | os, |
const ROOT::Fit::Box & | b | ||
) |
Definition at line 364 of file SparseData.cxx.
TFitResultPtr ROOT::Fit::UnBinFit | ( | ROOT::Fit::UnBinData * | data, |
TF1 * | f1, | ||
Foption_t & | option, | ||
const ROOT::Math::MinimizerOptions & | moption | ||
) |
fit an unbin data set (from tree or from histogram buffer) using a TF1 pointer and fit options.
N.B. ownership of fit data is passed to the UnBinFit function which will be responsible of deleting the data after the fit. User calling this function MUST NOT delete UnBinData after calling it.
Definition at line 809 of file HFitImpl.cxx.
double ROOT::Fit::gDefaultErrorDef = ROOT::Math::MinimizerOptions::DefaultErrorDef() |
Definition at line 49 of file Fitter.cxx.
const int ROOT::Fit::gInitialResultStatus = -99 |
Definition at line 43 of file FitResult.cxx.