ROOT
6.07/01
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 | BinPoint |
Obsolete class, no more in use. 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 | FitData |
Base class for all the fit data types. More... | |
class | DataVector |
class holding the fit data points. More... | |
class | DataWrapper |
class maintaining a pointer to external data Using this class avoids copying the data when performing a fit NOTE: this class is not thread-safe and should not be used in parallel fits More... | |
class | FcnAdapter |
class | FitConfig |
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::ParameterSettings class. 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... | |
Typedefs | |
typedef Chi2FCN < ROOT::Math::IMultiGenFunction > | Chi2Function |
typedef Chi2FCN < ROOT::Math::IMultiGradFunction > | Chi2GradFunction |
typedef LogLikelihoodFCN < ROOT::Math::IMultiGenFunction > | LogLikelihoodFunction |
typedef LogLikelihoodFCN < ROOT::Math::IMultiGradFunction > | LogLikelihoodGradFunction |
typedef PoissonLikelihoodFCN < ROOT::Math::IMultiGenFunction > | PoissonLLFunction |
typedef PoissonLikelihoodFCN < ROOT::Math::IMultiGradFunction > | PoissonLLGradFunction |
Enumerations | |
enum | EFitObjectType { kHistogram, kGraph } |
Functions | |
void | FitOptionsMake (EFitObjectType type, const char *option, Foption_t &fitOption) |
Decode list of options into fitOption. 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... | |
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... | |
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... | |
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... | |
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... | |
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... | |
double | Chisquare (const TH1 &h1, TF1 &f1, bool useRange) |
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... | |
BinData::ErrorType | GetDataType (const TGraph *gr, DataOptions &fitOpt) |
BinData::ErrorType | GetDataType (const TGraph2D *gr, const DataOptions &fitOpt) |
void | DoFillData (BinData &dv, const TGraph *gr, BinData::ErrorType type, TF1 *func) |
bool | lessRange (const std::pair< double, double > &r1, const std::pair< double, double > &r2) |
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) |
ostream & | operator<< (ostream &os, const ROOT::Fit::Box &b) |
Variables | |
const int | gInitialResultStatus = -99 |
double | gDefaultErrorDef = ROOT::Math::MinimizerOptions::DefaultErrorDef() |
Namespace for the fitting classes.
Definition at line 193 of file LogLikelihoodFCN.h.
Definition at line 194 of file LogLikelihoodFCN.h.
Definition at line 190 of file PoissonLikelihoodFCN.h.
Definition at line 191 of file PoissonLikelihoodFCN.h.
Enumerator | |
---|---|
kHistogram | |
kGraph |
Definition at line 48 of file HFitInterface.h.
compute the chi2 value for an histogram given a function (see TH1::Chisquare for the documentation)
Definition at line 990 of file HFitImpl.cxx.
Referenced by chi2FromFit(), TGraph::Chisquare(), and TH1::Chisquare().
compute the chi2 value for a graph given a function (see TGraph::Chisquare)
Definition at line 994 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.
Referenced by ROOT::Fit::SparseData::Add().
Definition at line 576 of file HFitInterface.cxx.
Referenced by FillData().
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.
Referenced by TH1::AndersonDarlingTest(), combinedFit(), HFit::ComputeChi2(), DoBinFit(), DoFit(), FillData(), HFit::Fit(), fit2DHist(), fit3DHist(), fitSparse1D(), GAMinTutorial(), TBackCompFitter::GetConfidenceIntervals(), GetConfidenceIntervals(), InitParameters(), OneDimension(), testGraphFit(), testHisto1DFit(), testHisto1DPolFit(), testHisto2DFit(), and TwoDimensions().
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 673 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 717 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 760 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 889 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 792 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 836 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 936 of file HFitImpl.cxx.
Referenced by TFitEditor::DoFit(), TMultiGraph::Fit(), TGraph2D::Fit(), TGraph::Fit(), THnBase::Fit(), and TH1::Fit().
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 948 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 955 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 962 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 969 of file HFitImpl.cxx.
Decode list of options into fitOption.
Definition at line 674 of file HFitImpl.cxx.
Referenced by TMultiGraph::Fit(), TGraph2D::Fit(), TGraph::Fit(), TH1::Fit(), and TH1::FitOptionsMake().
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 976 of file HFitInterface.cxx.
Referenced by ConfidenceIntervals().
BinData::ErrorType ROOT::Fit::GetDataType | ( | const TGraph * | gr, |
DataOptions & | fitOpt | ||
) |
Definition at line 476 of file HFitInterface.cxx.
Referenced by FillData().
BinData::ErrorType ROOT::Fit::GetDataType | ( | const TGraph2D * | gr, |
const DataOptions & | fitOpt | ||
) |
Definition at line 545 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
Definition at line 388 of file HFitInterface.cxx.
Referenced by HFit::Fit(), and InitParameters().
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
Definition at line 265 of file HFitInterface.cxx.
Referenced by HFit::Fit().
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
Definition at line 305 of file HFitInterface.cxx.
Referenced by HFit::Fit(), and InitParameters().
bool ROOT::Fit::lessRange | ( | const std::pair< double, double > & | r1, |
const std::pair< double, double > & | r2 | ||
) |
Definition at line 73 of file DataRange.cxx.
Referenced by ROOT::Fit::DataRange::AddRange().
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 784 of file HFitImpl.cxx.
Referenced by TFitEditor::DoFit().
double ROOT::Fit::gDefaultErrorDef = ROOT::Math::MinimizerOptions::DefaultErrorDef() |
Definition at line 49 of file Fitter.cxx.
Referenced by ROOT::Fit::Fitter::DoBinnedLikelihoodFit(), and ROOT::Fit::Fitter::DoUnbinnedLikelihoodFit().
const int ROOT::Fit::gInitialResultStatus = -99 |
Definition at line 43 of file FitResult.cxx.
Referenced by ROOT::Fit::FitResult::Print().