ROOT
6.06/09
Reference Guide
|
Sample implementation of a parametric function.
It can be used for example for the Fumili method when minimizing with Minuit. In the present case the function is a one-dimensional Gaussian, which is described by its mean, standard deviation and the constant term describing the amplitude. As it is used for function minimization, the role of the variables (or coordinates) and parameters is inversed! I.e. in the case of a one-dimensional Gaussian it is x that will be the Parameter and the mean, standard deviation etc will be the variables.
Definition at line 62 of file GaussianModelFunction.h.
Public Member Functions | |
GaussianModelFunction () | |
Constructor which initializes the normalized Gaussian with x = 0.0. More... | |
GaussianModelFunction (const std::vector< double > ¶ms) | |
Constructor which initializes the ParametricFunction with the parameters given as input. More... | |
~GaussianModelFunction () | |
double | operator() (const std::vector< double > &x) const |
Calculates the Gaussian as a function of the given input. More... | |
double | operator() (const std::vector< double > &x, const std::vector< double > ¶m) const |
Calculates the Gaussian as a function of the given input. More... | |
virtual double | Up () const |
THAT SHOULD BE REMOVED, IT IS ONLY HERE, BECAUSE AT PRESENT FOR GRADIENT CALCULATION ONE NEEDS TO INHERIT FROM FCNBASE WHICH NEEDS THIS METHOD. More... | |
std::vector< double > | GetGradient (const std::vector< double > &x) const |
Member function returning the Gradient of the function with respect to its variables (but without including gradients with respect to its internal parameters). More... | |
Public Member Functions inherited from ROOT::Minuit2::ParametricFunction | |
ParametricFunction (const std::vector< double > ¶ms) | |
Constructor which initializes the ParametricFunction with the parameters given as input. More... | |
ParametricFunction (int nparams) | |
Constructor which initializes the ParametricFunction by setting the number of parameters. More... | |
virtual | ~ParametricFunction () |
virtual void | SetParameters (const std::vector< double > ¶ms) const |
Sets the parameters of the ParametricFunction. More... | |
virtual const std::vector< double > & | GetParameters () const |
Accessor for the state of the parameters. More... | |
virtual unsigned int | NumberOfParameters () const |
Accessor for the number of parameters. 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 () |
Additional Inherited Members | |
Protected Attributes inherited from ROOT::Minuit2::ParametricFunction | |
std::vector< double > | par |
The vector containing the parameters of the function It is mutable for "historical reasons" as in the hierarchy methods and classes are const and all the implications of changing them back to non-const are not clear. More... | |
|
inline |
Constructor which initializes the normalized Gaussian with x = 0.0.
Definition at line 73 of file GaussianModelFunction.h.
|
inline |
Constructor which initializes the ParametricFunction with the parameters given as input.
params | vector containing the initial Parameter Value. |
Definition at line 92 of file GaussianModelFunction.h.
|
inline |
Definition at line 101 of file GaussianModelFunction.h.
|
inlinevirtual |
Member function returning the Gradient of the function with respect to its variables (but without including gradients with respect to its internal parameters).
x | vector containing the coordinates of the point where the Gradient is to be calculated. |
Reimplemented from ROOT::Minuit2::ParametricFunction.
Definition at line 167 of file GaussianModelFunction.h.
|
inlinevirtual |
Calculates the Gaussian as a function of the given input.
x | vector containing the mean, standard deviation and amplitude. |
Implements ROOT::Minuit2::ParametricFunction.
Definition at line 118 of file GaussianModelFunction.h.
|
inlinevirtual |
Calculates the Gaussian as a function of the given input.
x | vector containing the mean, the standard deviation and the constant describing the Gaussian. |
par | vector containing the x coordinate (which is the Parameter in the case of a minimization). |
Reimplemented from ROOT::Minuit2::ParametricFunction.
Definition at line 147 of file GaussianModelFunction.h.
|
inlinevirtual |
THAT SHOULD BE REMOVED, IT IS ONLY HERE, BECAUSE AT PRESENT FOR GRADIENT CALCULATION ONE NEEDS TO INHERIT FROM FCNBASE WHICH NEEDS THIS METHOD.
Implements ROOT::Minuit2::FCNBase.
Definition at line 163 of file GaussianModelFunction.h.