class ROOT::Fit::Fitter


   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

Function Members (Methods)

public:
~Fitter()
const ROOT::Fit::FitConfig&Config() const
ROOT::Fit::FitConfig&Config()
boolFit(const ROOT::Fit::BinData& data)
boolFit(const ROOT::Fit::UnBinData& data)
boolFit(const ROOT::Fit::BinData& data, const ROOT::Math::IParametricFunctionMultiDim& func)
boolFit(const ROOT::Fit::UnBinData& data, const ROOT::Math::IParametricFunctionMultiDim& func)
boolFitFCN(const ROOT::Math::IMultiGenFunction& fcn, const double* params, unsigned int dataSize)
boolFitFCN(const ROOT::Math::IMultiGradFunction& fcn, const double* params, unsigned int dataSize)
ROOT::Fit::FitterFitter()
boolLikelihoodFit(const ROOT::Fit::BinData& data)
boolLikelihoodFit(const ROOT::Fit::UnBinData& data)
boolLikelihoodFit(const ROOT::Fit::BinData& data, const ROOT::Math::IParametricFunctionMultiDim& func)
boolLikelihoodFit(const ROOT::Fit::UnBinData& data, const ROOT::Math::IParametricFunctionMultiDim& func)
boolLinearFit(const ROOT::Fit::BinData& data)
const ROOT::Fit::FitResult&Result() const
voidSetFunction(const ROOT::Fit::Fitter::IModelFunction& func)
voidSetFunction(const ROOT::Fit::Fitter::IModel1DFunction& func)
voidSetFunction(const ROOT::Fit::Fitter::IGradModelFunction& func)
voidSetFunction(const ROOT::Fit::Fitter::IGradModel1DFunction& func)
protected:
boolDoLeastSquareFit(const ROOT::Fit::BinData& data)
boolDoLikelihoodFit(const ROOT::Fit::BinData& data)
boolDoLikelihoodFit(const ROOT::Fit::UnBinData& data)
boolDoLinearFit(const ROOT::Fit::BinData& data)
private:
ROOT::Fit::FitterFitter(const ROOT::Fit::Fitter&)
ROOT::Fit::Fitter&operator=(const ROOT::Fit::Fitter& rhs)

Data Members

private:
ROOT::Fit::FitConfigfConfigfitter configuration (options and parameter settings)
ROOT::Fit::Fitter::IModelFunction*fFunccopy of the fitted function containing on output the fit result
ROOT::Fit::FitResultfResultobject containing the result of the fit
boolfUseGradientflag to indicate if using gradient or not

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Fitter(const ROOT::Fit::Fitter& )
      Default constructor

~Fitter()
      Destructor

Fitter(const ROOT::Fit::Fitter& )
 usually copying is non trivial, so we make this unaccessible

      Copy constructor

bool Fit( const Data & data, const Function & func)
       fit a data set using any  generic model  function
       Pre-requisite on the function:

SetFunction(func)
return Fit(data)
bool Fit(const BinData & data)
       fit a binned data set (default method: use chi2)
       To be implemented option to do likelihood bin fit

return DoLeastSquareFit(const ROOT::Fit::BinData& data)
bool Fit(const UnBinData & data)
       fit an binned data set using loglikelihood method

return DoLikelihoodFit(data)
bool LikelihoodFit(const Data & data)
      Likelihood fit

return DoLikelihoodFit(data)
bool LikelihoodFit( const Data & data, const Function & func)
       fit a data set using any  generic model  function
       Pre-requisite on the function:

SetFunction(func)
bool FitFCN(const ROOT::Math::IMultiGenFunction & fcn, const double * params, unsigned int dataSize )
      fit using the given FCN function. Give also initial parameter values and data size to get  Ndf

bool FitFCN(const ROOT::Math::IMultiGradFunction & fcn, const double * params, unsigned int dataSize )
bool LinearFit(const ROOT::Fit::BinData& data)
      do a linear fit on a set of bin-data

{ return DoLinearFit(data); }
void SetFunction(const IModelFunction & func)
       Set the fitted function (model function) from a parametric function interface

void SetFunction(const IModel1DFunction & func)
bool DoLinearFit(const ROOT::Fit::BinData& data)
 linear least square fit

Author: L. Moneta Wed Aug 30 11:05:19 2006
Last change: root/mathcore:$Id: Fitter.h 24492 2008-06-23 20:40:52Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.