class ROOT::Fit::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.
   When the fit is valid, it is constructed from a  Minimizer and a model function pointer

   @ingroup FitMain

Function Members (Methods)

public:
~FitResult()
doubleChi2() const
doubleCorrelation(unsigned int i, unsigned int j) const
doubleCovMatrix(unsigned int i, unsigned int j) const
doubleEdm() const
doubleError(unsigned int i) const
const vector<double>&Errors() const
ROOT::Fit::FitResultFitResult()
ROOT::Fit::FitResultFitResult(const ROOT::Fit::FitResult&)
ROOT::Fit::FitResultFitResult(ROOT::Math::Minimizer& min, const ROOT::Fit::FitConfig& fconfig, const ROOT::Fit::FitResult::IModelFunction& f, bool isValid, unsigned int sizeOfData = 0, const ROOT::Math::IMultiGenFunction* chi2func = 0, bool minosErr = false, unsigned int ncalls = 0)
const ROOT::Fit::FitResult::IModelFunction*FittedFunction() const
intIndex(const string& name) const
boolIsValid() const
doubleLowerError(unsigned int i) const
doubleMinFcnValue() const
const string&MinimizerType() const
unsigned intNCalls() const
unsigned intNdf() const
boolNormalizedErrors()
voidNormalizeErrors()
const vector<double>&Parameters() const
voidPrint(ostream& os, bool covmat = false) const
voidPrintCovMatrix(ostream& os) const
doubleProb() const
doubleUpperError(unsigned int i) const
doubleValue(unsigned int i) const

Data Members

private:
doublefChi2
vector<double>fCov
vector<double>fCovMatrix
unsigned intfDataSize
doublefEdm
vector<double>fErrors
const ROOT::Fit::FitResult::IModelFunction*fFitFunc
stringfMinimType
vector<std::pair<double,double> >fMinosErrors
unsigned intfNCalls
unsigned intfNdf
boolfNormalized
vector<double>fParams
doublefVal
boolfValid

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

FitResult(const ROOT::Fit::FitResult& )
      Default constructor for an empty (non valid) fit result

FitResult(ROOT::Math::Minimizer& min, const ROOT::Fit::FitConfig& fconfig, const ROOT::Fit::FitResult::IModelFunction& f, bool isValid, unsigned int sizeOfData = 0, const ROOT::Math::IMultiGenFunction* chi2func = 0, bool minosErr = false, unsigned int ncalls = 0)
      Construct from a Minimizer instance

~FitResult()
 use default copy constructor and assignment operator

      Destructor (no operations)

{}
const std::string & MinimizerType()
 minimization quantities 
 minimizer type
{ return fMinimType; }
bool IsValid()
 True if fit successful, otherwise false.
{ return fValid; }
double MinFcnValue()
 Return value of the objective function (chi2 or likelihood) used in the fit
{ return fVal; }
unsigned int NCalls()
Number of function calls to find minimum
{ return fNCalls; }
double Edm()
Expected distance from minimum
{ return fEdm; }
const IModelFunction * FittedFunction()
 fitting quantities 
 Return pointer to model (fit) function with fitted parameter values.
{ return fFitFunc; }
double Chi2()
 Chi2 fit value
 in case of likelihood must be computed ?
{ return fChi2; }
unsigned int Ndf()
 Number of degree of freedom
{ return fNdf; }
double Prob()
 p value of the fit (chi2 probability)
const std::vector<double> & Errors()
 parameter errors
{ return fErrors; }
const std::vector<double> & Parameters()
 parameter values
{ return fParams; }
double Value(unsigned int i) const
 parameter value by index
{ return fParams[i]; }
double Error(unsigned int i) const
 parameter error by index
{ return fErrors[i]; }
double LowerError(unsigned int i) const
    /// Minos  Errors
    const std::vector<std::pair<double, double> > MinosErrors() const;
 lower Minos error
{ return fMinosErrors[i].first; }
double UpperError(unsigned int i) const
 upper Minos error
{ return fMinosErrors[i].second; }
double CovMatrix(unsigned int i, unsigned int j) const
 retrieve covariance matrix element
double Correlation(unsigned int i, unsigned int j) const
 retrieve correlation elements
int Index(const string& name) const
 get index for parameter name (return -1 if not found)
void NormalizeErrors()
normalize errors using chi2/ndf for chi2 fits
bool NormalizedErrors()
 flag to chek if errors are normalized
{ return fNormalized; }
void Print(ostream& os, bool covmat = false) const
 print the result and optionaly covariance matrix and correlations
void PrintCovMatrix(ostream& os) const
print error matrix and correlations

Author: L. Moneta Wed Aug 30 11:05:34 2006
Last change: root/mathcore:$Id: FitResult.h 24477 2008-06-23 12:58:47Z 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.