Fitter class, entry point for performing all type of fits. Fits are performed using the generic ROOT::Fit::Fitter::Fit method. The inputs are the data points and a model function (using a ROOT::Math::IParamFunction) The result of the fit is returned and kept internally in the ROOT::Fit::FitResult class. The configuration of the fit (parameters, options, etc...) are specified in the ROOT::Math::FitConfig class. @ingroup FitMain
~Fitter() | |
bool | CalculateHessErrors() |
bool | CalculateMinosErrors() |
const ROOT::Fit::FitConfig& | Config() const |
ROOT::Fit::FitConfig& | Config() |
bool | Fit(const ROOT::Fit::BinData& data) |
bool | Fit(const ROOT::Fit::UnBinData& data) |
bool | Fit(const ROOT::Fit::BinData& data, const ROOT::Math::IParametricFunctionMultiDim& func) |
bool | Fit(const ROOT::Fit::UnBinData& data, const ROOT::Math::IParametricFunctionMultiDim& func) |
bool | FitFCN(const ROOT::Math::IMultiGenFunction& fcn, const double* params = 0, unsigned int dataSize = 0, bool chi2fit = false) |
bool | FitFCN(const ROOT::Math::IMultiGradFunction& fcn, const double* params = 0, unsigned int dataSize = 0, bool chi2fit = false) |
bool | FitFCN(ROOT::Fit::Fitter::MinuitFCN_t fcn, int npar = 0, const double* params = 0, unsigned int dataSize = 0, bool chi2fit = false) |
ROOT::Fit::Fitter | Fitter() |
ROOT::Math::IMultiGenFunction* | GetFCN() const |
ROOT::Math::Minimizer* | GetMinimizer() const |
bool | IsBinFit() const |
bool | LikelihoodFit(const ROOT::Fit::BinData& data) |
bool | LikelihoodFit(const ROOT::Fit::UnBinData& data) |
bool | LikelihoodFit(const ROOT::Fit::BinData& data, const ROOT::Math::IParametricFunctionMultiDim& func) |
bool | LikelihoodFit(const ROOT::Fit::UnBinData& data, const ROOT::Math::IParametricFunctionMultiDim& func) |
bool | LinearFit(const ROOT::Fit::BinData& data) |
const ROOT::Fit::FitResult& | Result() const |
void | SetFunction(const ROOT::Fit::Fitter::IModelFunction& func) |
void | SetFunction(const ROOT::Fit::Fitter::IModel1DFunction& func) |
void | SetFunction(const ROOT::Fit::Fitter::IGradModelFunction& func) |
void | SetFunction(const ROOT::Fit::Fitter::IGradModel1DFunction& func) |
bool | DoLeastSquareFit(const ROOT::Fit::BinData& data) |
bool | DoLikelihoodFit(const ROOT::Fit::BinData& data) |
bool | DoLikelihoodFit(const ROOT::Fit::UnBinData& data) |
bool | DoLinearFit(const ROOT::Fit::BinData& data) |
bool | fBinFit | flag to indicate if fit is binned (in case of false the fit is unbinned or undefined) |
ROOT::Fit::FitConfig | fConfig | fitter configuration (options and parameter settings) |
ROOT::Fit::Fitter::IModelFunction* | fFunc | copy of the fitted function containing on output the fit result (managed by FitResult) |
auto_ptr<ROOT::Math::Minimizer> | fMinimizer | ! pointer to used minimizer |
auto_ptr<ROOT::Math::IMultiGenFunction> | fObjFunction | ! pointer to used objective function |
auto_ptr<ROOT::Fit::FitResult> | fResult | ! pointer to the object containing the result of the fit |
bool | fUseGradient | flag to indicate if using gradient or not |
fit a data set using any generic model function Pre-requisite on the function:
fit a binned data set (default method: use chi2) To be implemented option to do likelihood bin fit
fit a data set using any generic model function Pre-requisite on the function:
Fit using the given FCN function represented by a multi-dimensional function interface (ROOT::Math::IMultiGenFunction). Give optionally the initial arameter values, data size to have the fit Ndf correctly set in the FitResult and flag specifying if it is a chi2 fit. Note that if the parameters values are not given (params=0) the current parameter settings are used. The parameter settings can be created before by using the FitConfig::SetParamsSetting. If they have not been created they are created automatically when the params pointer is not zero. Note that passing a params != 0 will set the parameter settings to the new value AND also the step sizes to some pre-defined value (stepsize = 0.3 * abs(parameter_value) )
do a linear fit on a set of bin-data
{ return DoLinearFit(data); }
Set the fitted function (model function) from a parametric function interface
Set the fitted function from a parametric 1D function interface
perform an error analysis on the result using the Hessian Errors are obtaied from the inverse of the Hessian matrix To be called only after fitting and when a minimizer supporting the Hessian calculations is used otherwise an error (false) is returned. A new FitResult with the Hessian result will be produced
perform an error analysis on the result using MINOS To be called only after fitting and when a minimizer supporting MINOS is used otherwise an error (false) is returned. The result will be appended in the fit result class Optionally a vector of parameter indeces can be passed for selecting the parameters to analyse using FitConfig::SetMinosErrors
query if fit is binned. In cse of false teh fit can be unbinned or is not defined (like in case of fitting through a ::FitFCN)
{ return fBinFit; }
return pointer to last used minimizer (is NULL in case fit is not yet done) This pointer will be valid as far as the data, the objective function and the fitter class have not been deleted. To be used only after fitting. The pointer should not be stored and will be invalided after performing a new fitting. In this case a new instance of ROOT::Math::Minimizer will be re-created and can be obtained calling again GetMinimizer()
{ return fMinimizer.get(); }
return pointer to last used objective function (is NULL in case fit is not yet done) This pointer will be valid as far as the data and the fitter class have not been deleted. To be used after the fitting. The pointer should not be stored and will be invalided after performing a new fitting. In this case a new instance of the function pointer will be re-created and can be obtained calling again GetFCN()
{ return fObjFunction.get(); }