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.
Definition at line 40 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. | |
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. | |
~FumiliStandardChi2FCN () override | |
std::vector< double > | Elements (const std::vector< double > &par) const override |
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. | |
void | EvaluateAll (const std::vector< double > &par) override |
Evaluate function Value, Gradient and Hessian using Fumili approximation, for values of parameters p The result is cached inside and is return from the FumiliFCNBase::Value , FumiliFCNBase::Gradient and FumiliFCNBase::Hessian methods. | |
const std::vector< double > & | GetMeasurement (int Index) const override |
Accessor to the position of the measurement (x coordinate). | |
int | GetNumberOfMeasurements () const override |
Accessor to the number of measurements used for calculating the chi-square. | |
![]() | |
FumiliChi2FCN () | |
~FumiliChi2FCN () override | |
const ParametricFunction * | ModelFunction () const |
Returns the model function used for the data. | |
double | operator() (const std::vector< double > &par) const override |
Calculates the sum of Elements squared, ie the chi-square. | |
void | SetModelFunction (const ParametricFunction &modelFCN) |
Sets the model function for the data (for example gaussian+linear for a peak) | |
double | Up () const override |
!!!!!!!!!!!! to be commented | |
![]() | |
FumiliFCNBase () | |
Default Constructor. | |
FumiliFCNBase (unsigned int npar) | |
Constructor which initializes the class with the function provided by the user for modeling the data. | |
~FumiliFCNBase () override | |
virtual unsigned int | Dimension () |
return number of function variable (parameters) , i.e. | |
virtual const std::vector< double > & | Gradient () const |
Return cached Value of function Gradient estimated previously using the FumiliFCNBase::EvaluateAll method. | |
std::vector< double > | Gradient (const std::vector< double > &) const override |
std::vector< double > | Hessian (const std::vector< double > &) const override |
Return Value of the i-th j-th element of the Hessian matrix estimated previously using the FumiliFCNBase::EvaluateAll method. | |
virtual double | Hessian (unsigned int row, unsigned int col) const |
virtual double | Value () const |
Return cached Value of objective function estimated previously using the FumiliFCNBase::EvaluateAll method. | |
![]() | |
~FCNGradientBase () override | |
virtual bool | CheckGradient () const |
virtual std::vector< double > | G2 (const std::vector< double > &) const |
return second derivatives (diagonal of the Hessian matrix) | |
virtual std::vector< double > | GradientWithPrevResult (const std::vector< double > ¶meters, double *, double *, double *) const |
virtual GradientParameterSpace | gradParameterSpace () const |
virtual bool | HasG2 () const |
virtual bool | HasHessian () const |
![]() | |
~FCNBase () override | |
virtual double | ErrorDef () const |
Error definition of the function. | |
virtual void | SetErrorDef (double) |
add interface to set dynamically a new error definition Re-implement this function if needed. | |
![]() | |
virtual | ~GenericFunction () |
Private Attributes | |
std::vector< double > | fInvErrors |
std::vector< double > | fMeasurements |
std::vector< std::vector< double > > | fPositions |
Additional Inherited Members | |
![]() | |
std::vector< double > & | Gradient () |
std::vector< double > & | Hessian () |
virtual void | InitAndReset (unsigned int npar) |
initialize and reset values of gradien and Hessian | |
void | SetFCNValue (double value) |
#include <Minuit2/FumiliStandardChi2FCN.h>
|
inline |
Constructor which initializes chi square function for one-dimensional model function.
modelFCN | the model function used for describing the data. |
meas | vector containing the measured values. |
pos | vector containing the x values corresponding to the measurements |
mvar | vector 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 60 of file FumiliStandardChi2FCN.h.
|
inline |
Constructor which initializes the multi-dimensional model function.
modelFCN | the model function used for describing the data. |
meas | vector containing the measured values. |
pos | vector containing the x values corresponding to the measurements |
mvar | vector 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 101 of file FumiliStandardChi2FCN.h.
|
inlineoverride |
Definition at line 122 of file FumiliStandardChi2FCN.h.
|
overridevirtual |
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.
par | vector of Parameter values to feed to the model function. |
Implements ROOT::Minuit2::FumiliChi2FCN.
Definition at line 19 of file FumiliStandardChi2FCN.cxx.
|
overridevirtual |
Evaluate function Value, Gradient and Hessian using Fumili approximation, for values of parameters p The result is cached inside and is return from the FumiliFCNBase::Value , FumiliFCNBase::Gradient and FumiliFCNBase::Hessian methods.
par | vector of parameters |
Implements ROOT::Minuit2::FumiliFCNBase.
Definition at line 57 of file FumiliStandardChi2FCN.cxx.
|
overridevirtual |
Accessor to the position of the measurement (x coordinate).
Index | Index of the measuerement the position of which to return. |
Implements ROOT::Minuit2::FumiliChi2FCN.
Definition at line 45 of file FumiliStandardChi2FCN.cxx.
|
overridevirtual |
Accessor to the number of measurements used for calculating the chi-square.
Implements ROOT::Minuit2::FumiliChi2FCN.
Definition at line 51 of file FumiliStandardChi2FCN.cxx.
|
private |
Definition at line 182 of file FumiliStandardChi2FCN.h.
|
private |
Definition at line 179 of file FumiliStandardChi2FCN.h.
|
private |
Definition at line 181 of file FumiliStandardChi2FCN.h.