ROOT » MATH » MINUIT » TFitter

class TFitter: public TVirtualFitter

Function Members (Methods)

public:
virtual~TFitter()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual Double_tChisquare(Int_t npar, Double_t* params) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual Int_tExecuteCommand(const char* command, Double_t* args, Int_t nargs)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidFitChisquare(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
virtual voidFitChisquareI(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
virtual voidFitLikelihood(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
virtual voidFitLikelihoodI(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
static TVirtualFitter*TVirtualFitter::Fitter(TObject* obj, Int_t maxpar = 25)
virtual voidFixParameter(Int_t ipar)
virtual voidGetConfidenceIntervals(TObject* obj, Double_t cl = 0.94999999999999996)
virtual voidGetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t* x, Double_t* ci, Double_t cl = 0.94999999999999996)
virtual Double_t*GetCovarianceMatrix() const
virtual Double_tGetCovarianceMatrixElement(Int_t i, Int_t j) const
static const char*TVirtualFitter::GetDefaultFitter()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
static Double_tTVirtualFitter::GetErrorDef()
virtual Int_tGetErrors(Int_t ipar, Double_t& eplus, Double_t& eminus, Double_t& eparab, Double_t& globcc) const
virtual TVirtualFitter::FCNFunc_tTVirtualFitter::GetFCN()
virtual Foption_tTVirtualFitter::GetFitOption() const
static TVirtualFitter*TVirtualFitter::GetFitter()
virtual const char*TObject::GetIconName() const
static Int_tTVirtualFitter::GetMaxIterations()
TMethodCall*TVirtualFitter::GetMethodCall() const
TMinuit*GetMinuit() const
virtual const char*TNamed::GetName() const
virtual Int_tGetNumberFreeParameters() const
virtual Int_tGetNumberTotalParameters() const
virtual TObject*TVirtualFitter::GetObjectFit() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Double_tGetParameter(Int_t ipar) const
virtual Int_tGetParameter(Int_t ipar, char* name, Double_t& value, Double_t& verr, Double_t& vlow, Double_t& vhigh) const
virtual Double_tGetParError(Int_t ipar) const
virtual const char*GetParName(Int_t ipar) const
static Double_tTVirtualFitter::GetPrecision()
virtual Int_tGetStats(Double_t& amin, Double_t& edm, Double_t& errdef, Int_t& nvpar, Int_t& nparx) const
virtual Double_tGetSumLog(Int_t i)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual TObject*TVirtualFitter::GetUserFunc() const
virtual Int_tTVirtualFitter::GetXfirst() const
virtual Int_tTVirtualFitter::GetXlast() const
virtual Int_tTVirtualFitter::GetYfirst() const
virtual Int_tTVirtualFitter::GetYlast() const
virtual Int_tTVirtualFitter::GetZfirst() const
virtual Int_tTVirtualFitter::GetZlast() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsFixed(Int_t ipar) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidPrintResults(Int_t level, Double_t amin) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidReleaseParameter(Int_t ipar)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual Double_t*TVirtualFitter::SetCache(Int_t npoints, Int_t psize)
static voidTVirtualFitter::SetDefaultFitter(const char* name = "")
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTVirtualFitter::SetErrorDef(Double_t errdef = 1)
virtual voidSetFCN(void* fcn)
virtual voidSetFCN(void(*)(Int_t&,Double_t*,Double_t&,Double_t*,Int_t) fcn)
virtual voidSetFitMethod(const char* name)
virtual voidTVirtualFitter::SetFitOption(Foption_t option)
static voidTVirtualFitter::SetFitter(TVirtualFitter* fitter, Int_t maxpar = 25)
static voidTVirtualFitter::SetMaxIterations(Int_t niter = 5000)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidTVirtualFitter::SetObjectFit(TObject* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual Int_tSetParameter(Int_t ipar, const char* parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
static voidTVirtualFitter::SetPrecision(Double_t prec = 9.9999999999999995E-7)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTVirtualFitter::SetUserFunc(TObject* userfunc)
virtual voidTVirtualFitter::SetXfirst(Int_t first)
virtual voidTVirtualFitter::SetXlast(Int_t last)
virtual voidTVirtualFitter::SetYfirst(Int_t first)
virtual voidTVirtualFitter::SetYlast(Int_t last)
virtual voidTVirtualFitter::SetZfirst(Int_t first)
virtual voidTVirtualFitter::SetZlast(Int_t last)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TFitter(Int_t maxpar = 25)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TFitter&operator=(const TFitter&)
TFitter(const TFitter&)

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Double_t*TVirtualFitter::fCache[fCacheSize] array of points data (fNpoints*fPointSize < fCacheSize words)
Int_tTVirtualFitter::fCacheSizeSize of the fCache array
void(*)(Int_t&,Double_t*,Double_t&,Double_t*,Int_t)TVirtualFitter::fFCN
TMethodCall*TVirtualFitter::fMethodCallPointer to MethodCall in case of interpreted function
TStringTNamed::fNameobject identifier
Int_tTVirtualFitter::fNpointsNumber of points to fit
TObject*TVirtualFitter::fObjectFitpointer to object being fitted
Foption_tTVirtualFitter::fOptionstruct with the fit options
Int_tTVirtualFitter::fPointSizeNumber of words per point in the cache
TStringTNamed::fTitleobject title
TObject*TVirtualFitter::fUserFuncpointer to user theoretical function (a TF1*)
Int_tTVirtualFitter::fXfirstfirst bin on X axis
Int_tTVirtualFitter::fXlastlast bin on X axis
Int_tTVirtualFitter::fYfirstfirst bin on Y axis
Int_tTVirtualFitter::fYlastlast bin on Y axis
Int_tTVirtualFitter::fZfirstfirst bin on Z axis
Int_tTVirtualFitter::fZlastlast bin on Z axis
static TStringTVirtualFitter::fgDefaultname of the default fitter ("Minuit","Fumili",etc)
static Double_tTVirtualFitter::fgErrorDefError definition (default=1)
static TVirtualFitter*TVirtualFitter::fgFitterCurrent fitter (default TFitter)
static Int_tTVirtualFitter::fgMaxiterMaximum number of iterations
static Int_tTVirtualFitter::fgMaxparMaximum number of fit parameters for current fitter
static Double_tTVirtualFitter::fgPrecisionmaximum precision
private:
Double_t*fCovarCovariance matrix
TMinuit*fMinuitpointer to the TMinuit object
Int_tfNlogNumber of elements in fSunLog
Double_t*fSumLogSum of logs (array of fNlog elements)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TFitter(Int_t maxpar = 25)
default constructor*-*-
*-*                  ===================
~TFitter()
default destructor*-*-*-
*-*                  ==================
Double_t Chisquare(Int_t npar, Double_t* params) const
 return a chisquare equivalent
void Clear(Option_t* option = "")
 reset the fitter environment
Int_t ExecuteCommand(const char* command, Double_t* args, Int_t nargs)
 Execute a fitter command;
   command : command string
   args    : list of nargs command arguments
void FixParameter(Int_t ipar)
 Fix parameter ipar.
void GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t* x, Double_t* ci, Double_t cl = 0.94999999999999996)
Computes point-by-point confidence intervals for the fitted function
Parameters:
n - number of points
ndim - dimensions of points
x - points, at which to compute the intervals, for ndim > 1
    should be in order: (x0,y0, x1, y1, ... xn, yn)
ci - computed intervals are returned in this array
cl - confidence level, default=0.95
NOTE, that the intervals are approximate for nonlinear(in parameters) models
void GetConfidenceIntervals(TObject* obj, Double_t cl = 0.94999999999999996)
Computes confidence intervals at level cl. Default is 0.95
The TObject parameter can be a TGraphErrors, a TGraph2DErrors or a TH1,2,3.
For Graphs, confidence intervals are computed for each point,
the value of the graph at that point is set to the function value at that
point, and the graph y-errors (or z-errors) are set to the value of
the confidence interval at that point.
For Histograms, confidence intervals are computed for each bin center
The bin content of this bin is then set to the function value at the bin
center, and the bin error is set to the confidence interval value.
NOTE: confidence intervals are approximate for nonlinear models!

Allowed combinations:
Fitted object               Passed object
TGraph                      TGraphErrors, TH1
TGraphErrors, AsymmErrors   TGraphErrors, TH1
TH1                         TGraphErrors, TH1
TGraph2D                    TGraph2DErrors, TH2
TGraph2DErrors              TGraph2DErrors, TH2
TH2                         TGraph2DErrors, TH2
TH3                         TH3
Double_t * GetCovarianceMatrix() const
 return a pointer to the covariance matrix
Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const
 return element i,j from the covariance matrix
Int_t GetErrors(Int_t ipar, Double_t& eplus, Double_t& eminus, Double_t& eparab, Double_t& globcc) const
 return current errors for a parameter
   ipar     : parameter number
   eplus    : upper error
   eminus   : lower error
   eparab   : parabolic error
   globcc   : global correlation coefficient
Int_t GetNumberTotalParameters() const
 return the total number of parameters (free + fixed)
Int_t GetNumberFreeParameters() const
 return the number of free parameters
Double_t GetParError(Int_t ipar) const
 return error of parameter ipar
Double_t GetParameter(Int_t ipar) const
 return current value of parameter ipar
Int_t GetParameter(Int_t ipar, char* name, Double_t& value, Double_t& verr, Double_t& vlow, Double_t& vhigh) const
 return current values for a parameter
   ipar     : parameter number
   parname  : parameter name
   value    : initial parameter value
   verr     : initial error for this parameter
   vlow     : lower value for the parameter
   vhigh    : upper value for the parameter
  WARNING! parname must be suitably dimensionned in the calling function.
const char * GetParName(Int_t ipar) const
 return name of parameter ipar
Int_t GetStats(Double_t& amin, Double_t& edm, Double_t& errdef, Int_t& nvpar, Int_t& nparx) const
 return global fit parameters
   amin     : chisquare
   edm      : estimated distance to minimum
   errdef
   nvpar    : number of variable parameters
   nparx    : total number of parameters
Double_t GetSumLog(Int_t i)
 return Sum(log(i) i=0,n
 used by log likelihood fits
Bool_t IsFixed(Int_t ipar) const
return kTRUE if parameter ipar is fixed, kFALSE othersise)
void PrintResults(Int_t level, Double_t amin) const
 Print fit results
void ReleaseParameter(Int_t ipar)
 Release parameter ipar.
void SetFCN(void* fcn)
 Specify the address of the fitting algorithm (from the interpreter)
void SetFCN(void(*)(Int_t&,Double_t*,Double_t&,Double_t*,Int_t) fcn)
 Specify the address of the fitting algorithm
void SetFitMethod(const char* name)
 ret fit method (chisquare or loglikelihood)
Int_t SetParameter(Int_t ipar, const char* parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
 set initial values for a parameter
   ipar     : parameter number
   parname  : parameter name
   value    : initial parameter value
   verr     : initial error for this parameter
   vlow     : lower value for the parameter
   vhigh    : upper value for the parameter
void FitChisquare(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
  Minimization function for H1s using a Chisquare method
  Default method (function evaluated at center of bin)
  for each point the cache contains the following info
    -1D : bc,e, xc  (bin content, error, x of center of bin)
    -2D : bc,e, xc,yc
    -3D : bc,e, xc,yc,zc
void FitChisquareI(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
  Minimization function for H1s using a Chisquare method
  The "I"ntegral method is used
  for each point the cache contains the following info
    -1D : bc,e, xc,xw  (bin content, error, x of center of bin, x bin width of bin)
    -2D : bc,e, xc,xw,yc,yw
    -3D : bc,e, xc,xw,yc,yw,zc,zw
void FitLikelihood(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
  Minimization function for H1s using a Likelihood method*-*-*-*-*-*
     Basically, it forms the likelihood by determining the Poisson
     probability that given a number of entries in a particular bin,
     the fit would predict it's value.  This is then done for each bin,
     and the sum of the logs is taken as the likelihood.
  Default method (function evaluated at center of bin)
  for each point the cache contains the following info
    -1D : bc,e, xc  (bin content, error, x of center of bin)
    -2D : bc,e, xc,yc
    -3D : bc,e, xc,yc,zc
void FitLikelihoodI(Int_t& npar, Double_t* gin, Double_t& f, Double_t* u, Int_t flag)
  Minimization function for H1s using a Likelihood method*-*-*-*-*-*
     Basically, it forms the likelihood by determining the Poisson
     probability that given a number of entries in a particular bin,
     the fit would predict it's value.  This is then done for each bin,
     and the sum of the logs is taken as the likelihood.
  The "I"ntegral method is used
  for each point the cache contains the following info
    -1D : bc,e, xc,xw  (bin content, error, x of center of bin, x bin width of bin)
    -2D : bc,e, xc,xw,yc,yw
    -3D : bc,e, xc,xw,yc,yw,zc,zw
TFitter(const TFitter& )
TFitter& operator=(const TFitter& )
TMinuit * GetMinuit() const
{return fMinuit;}