Logo ROOT   6.13/01
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TFitter Class Reference

Definition at line 28 of file TFitter.h.

Public Member Functions

 TFitter (Int_t maxpar=25)
 Default constructor. More...
 
virtual ~TFitter ()
 Default destructor. More...
 
virtual Double_t Chisquare (Int_t npar, Double_t *params) const
 
virtual void Clear (Option_t *option="")
 reset the fitter environment More...
 
virtual 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. More...
 
virtual void FixParameter (Int_t ipar)
 Fix parameter ipar. More...
 
virtual void GetConfidenceIntervals (Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95)
 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, ... More...
 
virtual void GetConfidenceIntervals (TObject *obj, Double_t cl=0.95)
 Computes confidence intervals at level cl. More...
 
virtual Double_t * GetCovarianceMatrix () const
 return a pointer to the covariance matrix More...
 
virtual Double_t GetCovarianceMatrixElement (Int_t i, Int_t j) const
 return element i,j from the covariance matrix More...
 
virtual 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 More...
 
TMinuitGetMinuit () const
 
virtual Int_t GetNumberFreeParameters () const
 return the number of free parameters More...
 
virtual Int_t GetNumberTotalParameters () const
 return the total number of parameters (free + fixed) More...
 
virtual Double_t GetParameter (Int_t ipar) const
 return current value of parameter ipar More...
 
virtual 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. More...
 
virtual Double_t GetParError (Int_t ipar) const
 return error of parameter ipar More...
 
virtual const char * GetParName (Int_t ipar) const
 return name of parameter ipar More...
 
virtual 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 More...
 
virtual Double_t GetSumLog (Int_t i)
 return Sum(log(i) i=0,n used by log likelihood fits More...
 
virtual Bool_t IsFixed (Int_t ipar) const
 return kTRUE if parameter ipar is fixed, kFALSE othersise) More...
 
virtual void PrintResults (Int_t level, Double_t amin) const
 Print fit results. More...
 
virtual void ReleaseParameter (Int_t ipar)
 Release parameter ipar. More...
 
virtual void SetFCN (void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
 Specify the address of the fitting algorithm. More...
 
virtual void SetFitMethod (const char *name)
 ret fit method (chisquare or loglikelihood) More...
 
virtual 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 More...
 

Private Member Functions

 TFitter (const TFitter &)
 
TFitteroperator= (const TFitter &)
 

Private Attributes

Double_t * fCovar
 
TMinuitfMinuit
 
Int_t fNlog
 
Double_t * fSumLog
 

#include <TFitter.h>

Inheritance diagram for TFitter:
[legend]

Constructor & Destructor Documentation

◆ TFitter() [1/2]

TFitter::TFitter ( const TFitter )
private

◆ TFitter() [2/2]

TFitter::TFitter ( Int_t  maxpar = 25)

Default constructor.

Definition at line 36 of file TFitter.cxx.

◆ ~TFitter()

TFitter::~TFitter ( )
virtual

Default destructor.

Definition at line 48 of file TFitter.cxx.

Member Function Documentation

◆ Chisquare()

Double_t TFitter::Chisquare ( Int_t  npar,
Double_t *  params 
) const
virtual

Definition at line 58 of file TFitter.cxx.

◆ Clear()

void TFitter::Clear ( Option_t *  option = "")
virtual

reset the fitter environment

Definition at line 69 of file TFitter.cxx.

◆ ExecuteCommand()

Int_t TFitter::ExecuteCommand ( const char *  command,
Double_t *  args,
Int_t  nargs 
)
virtual

Execute a fitter command; command : command string args : list of nargs command arguments.

Definition at line 85 of file TFitter.cxx.

◆ FixParameter()

void TFitter::FixParameter ( Int_t  ipar)
virtual

Fix parameter ipar.

Definition at line 96 of file TFitter.cxx.

◆ GetConfidenceIntervals() [1/2]

void TFitter::GetConfidenceIntervals ( Int_t  n,
Int_t  ndim,
const Double_t *  x,
Double_t *  ci,
Double_t  cl = 0.95 
)
virtual

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

Definition at line 113 of file TFitter.cxx.

◆ GetConfidenceIntervals() [2/2]

void TFitter::GetConfidenceIntervals ( TObject *  obj,
Double_t  cl = 0.95 
)
virtual

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

Definition at line 221 of file TFitter.cxx.

◆ GetCovarianceMatrix()

Double_t * TFitter::GetCovarianceMatrix ( ) const
virtual

return a pointer to the covariance matrix

Definition at line 371 of file TFitter.cxx.

◆ GetCovarianceMatrixElement()

Double_t TFitter::GetCovarianceMatrixElement ( Int_t  i,
Int_t  j 
) const
virtual

return element i,j from the covariance matrix

Definition at line 383 of file TFitter.cxx.

◆ GetErrors()

Int_t TFitter::GetErrors ( Int_t  ipar,
Double_t &  eplus,
Double_t &  eminus,
Double_t &  eparab,
Double_t &  globcc 
) const
virtual

return current errors for a parameter ipar : parameter number eplus : upper error eminus : lower error eparab : parabolic error globcc : global correlation coefficient

Definition at line 402 of file TFitter.cxx.

◆ GetMinuit()

TMinuit* TFitter::GetMinuit ( ) const
inline

Definition at line 55 of file TFitter.h.

◆ GetNumberFreeParameters()

Int_t TFitter::GetNumberFreeParameters ( ) const
virtual

return the number of free parameters

Definition at line 422 of file TFitter.cxx.

◆ GetNumberTotalParameters()

Int_t TFitter::GetNumberTotalParameters ( ) const
virtual

return the total number of parameters (free + fixed)

Definition at line 414 of file TFitter.cxx.

◆ GetParameter() [1/2]

Double_t TFitter::GetParameter ( Int_t  ipar) const
virtual

return current value of parameter ipar

Definition at line 445 of file TFitter.cxx.

◆ GetParameter() [2/2]

Int_t TFitter::GetParameter ( Int_t  ipar,
char *  parname,
Double_t &  value,
Double_t &  verr,
Double_t &  vlow,
Double_t &  vhigh 
) const
virtual

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.

Definition at line 465 of file TFitter.cxx.

◆ GetParError()

Double_t TFitter::GetParError ( Int_t  ipar) const
virtual

return error of parameter ipar

Definition at line 431 of file TFitter.cxx.

◆ GetParName()

const char * TFitter::GetParName ( Int_t  ipar) const
virtual

return name of parameter ipar

Definition at line 477 of file TFitter.cxx.

◆ GetStats()

Int_t TFitter::GetStats ( Double_t &  amin,
Double_t &  edm,
Double_t &  errdef,
Int_t &  nvpar,
Int_t &  nparx 
) const
virtual

return global fit parameters amin : chisquare edm : estimated distance to minimum errdef nvpar : number of variable parameters nparx : total number of parameters

Definition at line 491 of file TFitter.cxx.

◆ GetSumLog()

Double_t TFitter::GetSumLog ( Int_t  i)
virtual

return Sum(log(i) i=0,n used by log likelihood fits

Definition at line 502 of file TFitter.cxx.

◆ IsFixed()

Bool_t TFitter::IsFixed ( Int_t  ipar) const
virtual

return kTRUE if parameter ipar is fixed, kFALSE othersise)

Definition at line 523 of file TFitter.cxx.

◆ operator=()

TFitter& TFitter::operator= ( const TFitter )
private

◆ PrintResults()

void TFitter::PrintResults ( Int_t  level,
Double_t  amin 
) const
virtual

Print fit results.

Definition at line 533 of file TFitter.cxx.

◆ ReleaseParameter()

void TFitter::ReleaseParameter ( Int_t  ipar)
virtual

Release parameter ipar.

Definition at line 541 of file TFitter.cxx.

◆ SetFCN()

void TFitter::SetFCN ( void(*)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t)  fcn)
virtual

Specify the address of the fitting algorithm.

Definition at line 550 of file TFitter.cxx.

◆ SetFitMethod()

void TFitter::SetFitMethod ( const char *  name)
virtual

ret fit method (chisquare or loglikelihood)

Definition at line 560 of file TFitter.cxx.

◆ SetParameter()

Int_t TFitter::SetParameter ( Int_t  ipar,
const char *  parname,
Double_t  value,
Double_t  verr,
Double_t  vlow,
Double_t  vhigh 
)
virtual

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

Definition at line 581 of file TFitter.cxx.

Member Data Documentation

◆ fCovar

Double_t* TFitter::fCovar
private

Definition at line 32 of file TFitter.h.

◆ fMinuit

TMinuit* TFitter::fMinuit
private

Definition at line 34 of file TFitter.h.

◆ fNlog

Int_t TFitter::fNlog
private

Definition at line 31 of file TFitter.h.

◆ fSumLog

Double_t* TFitter::fSumLog
private

Definition at line 33 of file TFitter.h.

Libraries for TFitter:
[legend]

The documentation for this class was generated from the following files: