Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Private Attributes | List of all members
ROOT::Minuit2::FumiliStandardChi2FCN Class Reference

Class implementing the standard chi square function, which is the sum of the squares of the figures-of-merit calculated for each measurement point, the individual figures-of-merit being: (the Value predicted by the model-measured Value)/standard deviation.

Author
Andras Zsenei and Lorenzo Moneta, Creation date: 31 Aug 2004
See also
FumiliChi2FCN

Definition at line 43 of file FumiliStandardChi2FCN.h.

Public Member Functions

 FumiliStandardChi2FCN (const ParametricFunction &modelFCN, const std::vector< double > &meas, const std::vector< double > &pos, const std::vector< double > &mvar)
 Constructor which initializes chi square function for one-dimensional model function. More...
 
 FumiliStandardChi2FCN (const ParametricFunction &modelFCN, const std::vector< double > &meas, const std::vector< std::vector< double > > &pos, const std::vector< double > &mvar)
 Constructor which initializes the multi-dimensional model function. More...
 
 ~FumiliStandardChi2FCN ()
 
std::vector< double > Elements (const std::vector< double > &par) const
 Evaluates the model function for the different measurement points and the Parameter values supplied, calculates a figure-of-merit for each measurement and returns a vector containing the result of this evaluation. More...
 
virtual void EvaluateAll (const std::vector< double > &par)
 Evaluate function Value, Gradient and Hessian using Fumili approximation, for values of parameters p The resul is cached inside and is return from the FumiliFCNBase::Value , FumiliFCNBase::Gradient and FumiliFCNBase::Hessian methods. More...
 
virtual const std::vector< double > & GetMeasurement (int Index) const
 Accessor to the position of the measurement (x coordinate). More...
 
virtual int GetNumberOfMeasurements () const
 Accessor to the number of measurements used for calculating the chi-square. More...
 
- Public Member Functions inherited from ROOT::Minuit2::FumiliChi2FCN
 FumiliChi2FCN ()
 
virtual ~FumiliChi2FCN ()
 
const ParametricFunctionModelFunction () const
 Returns the model function used for the data. More...
 
double operator() (const std::vector< double > &par) const
 Calculates the sum of Elements squared, ie the chi-square. More...
 
void SetModelFunction (const ParametricFunction &modelFCN)
 Sets the model function for the data (for example gaussian+linear for a peak) More...
 
virtual double Up () const
 !!!!!!!!!!!! to be commented More...
 
- Public Member Functions inherited from ROOT::Minuit2::FumiliFCNBase
 FumiliFCNBase ()
 Default Constructor. More...
 
 FumiliFCNBase (unsigned int npar)
 Constructor which initializes the class with the function provided by the user for modeling the data. More...
 
virtual ~FumiliFCNBase ()
 
virtual unsigned int Dimension ()
 return number of function variable (parameters) , i.e. More...
 
virtual const std::vector< double > & Gradient () const
 Return cached Value of function Gradient estimated previously using the FumiliFCNBase::EvaluateAll method. More...
 
virtual double Hessian (unsigned int row, unsigned int col) const
 Return Value of the i-th j-th element of the Hessian matrix estimated previously using the FumiliFCNBase::EvaluateAll method. More...
 
virtual double Value () const
 Return cached Value of objective function estimated previously using the FumiliFCNBase::EvaluateAll method. More...
 
- Public Member Functions inherited from ROOT::Minuit2::FCNBase
virtual ~FCNBase ()
 
virtual double ErrorDef () const
 Error definition of the function. More...
 
virtual void SetErrorDef (double)
 add interface to set dynamically a new error definition Re-implement this function if needed. More...
 
- Public Member Functions inherited from ROOT::Minuit2::GenericFunction
virtual ~GenericFunction ()
 

Private Attributes

std::vector< double > fInvErrors
 
std::vector< double > fMeasurements
 
std::vector< std::vector< double > > fPositions
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Minuit2::FumiliFCNBase
std::vector< double > & Gradient ()
 
std::vector< double > & Hessian ()
 
virtual void InitAndReset (unsigned int npar)
 initialize and reset values of gradien and Hessian More...
 
void SetFCNValue (double value)
 

#include <Minuit2/FumiliStandardChi2FCN.h>

Inheritance diagram for ROOT::Minuit2::FumiliStandardChi2FCN:
[legend]

Constructor & Destructor Documentation

◆ FumiliStandardChi2FCN() [1/2]

ROOT::Minuit2::FumiliStandardChi2FCN::FumiliStandardChi2FCN ( const ParametricFunction modelFCN,
const std::vector< double > &  meas,
const std::vector< double > &  pos,
const std::vector< double > &  mvar 
)
inline

Constructor which initializes chi square function for one-dimensional model function.

Parameters
modelFCNthe model function used for describing the data.
measvector containing the measured values.
posvector containing the x values corresponding to the measurements
mvarvector containing the variances corresponding to each measurement (where the variance equals the standard deviation squared). If the variances are zero, a Value of 1 is used (as it is done in ROOT/PAW)

Definition at line 65 of file FumiliStandardChi2FCN.h.

◆ FumiliStandardChi2FCN() [2/2]

ROOT::Minuit2::FumiliStandardChi2FCN::FumiliStandardChi2FCN ( const ParametricFunction modelFCN,
const std::vector< double > &  meas,
const std::vector< std::vector< double > > &  pos,
const std::vector< double > &  mvar 
)
inline

Constructor which initializes the multi-dimensional model function.

Parameters
modelFCNthe model function used for describing the data.
measvector containing the measured values.
posvector containing the x values corresponding to the measurements
mvarvector containing the variances corresponding to each measurement (where the variance equals the standard deviation squared). If the variances are zero, a Value of 1 is used (as it is done in ROOT/PAW)

Definition at line 110 of file FumiliStandardChi2FCN.h.

◆ ~FumiliStandardChi2FCN()

ROOT::Minuit2::FumiliStandardChi2FCN::~FumiliStandardChi2FCN ( )
inline

Definition at line 137 of file FumiliStandardChi2FCN.h.

Member Function Documentation

◆ Elements()

std::vector< double > ROOT::Minuit2::FumiliStandardChi2FCN::Elements ( const std::vector< double > &  par) const
virtual

Evaluates the model function for the different measurement points and the Parameter values supplied, calculates a figure-of-merit for each measurement and returns a vector containing the result of this evaluation.

The figure-of-merit is (Value predicted by the model function-measured Value)/standard deviation.

Parameters
parvector of Parameter values to feed to the model function.
Returns
A vector containing the figures-of-merit for the model function evaluated for each set of measurements.

Implements ROOT::Minuit2::FumiliChi2FCN.

Definition at line 23 of file FumiliStandardChi2FCN.cxx.

◆ EvaluateAll()

void ROOT::Minuit2::FumiliStandardChi2FCN::EvaluateAll ( const std::vector< double > &  par)
virtual

Evaluate function Value, Gradient and Hessian using Fumili approximation, for values of parameters p The resul is cached inside and is return from the FumiliFCNBase::Value , FumiliFCNBase::Gradient and FumiliFCNBase::Hessian methods.

Parameters
parvector of parameters

Implements ROOT::Minuit2::FumiliFCNBase.

Definition at line 68 of file FumiliStandardChi2FCN.cxx.

◆ GetMeasurement()

const std::vector< double > & ROOT::Minuit2::FumiliStandardChi2FCN::GetMeasurement ( int  Index) const
virtual

Accessor to the position of the measurement (x coordinate).

Parameters
IndexIndex of the measuerement the position of which to return.
Returns
the position of the measurement.

Implements ROOT::Minuit2::FumiliChi2FCN.

Definition at line 53 of file FumiliStandardChi2FCN.cxx.

◆ GetNumberOfMeasurements()

int ROOT::Minuit2::FumiliStandardChi2FCN::GetNumberOfMeasurements ( ) const
virtual

Accessor to the number of measurements used for calculating the chi-square.

Returns
the number of measurements.

Implements ROOT::Minuit2::FumiliChi2FCN.

Definition at line 60 of file FumiliStandardChi2FCN.cxx.

Member Data Documentation

◆ fInvErrors

std::vector<double> ROOT::Minuit2::FumiliStandardChi2FCN::fInvErrors
private

Definition at line 208 of file FumiliStandardChi2FCN.h.

◆ fMeasurements

std::vector<double> ROOT::Minuit2::FumiliStandardChi2FCN::fMeasurements
private

Definition at line 205 of file FumiliStandardChi2FCN.h.

◆ fPositions

std::vector<std::vector<double> > ROOT::Minuit2::FumiliStandardChi2FCN::fPositions
private

Definition at line 207 of file FumiliStandardChi2FCN.h.

Libraries for ROOT::Minuit2::FumiliStandardChi2FCN:
[legend]

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