ROOT  6.06/09
Reference Guide
Public Member Functions | List of all members
ROOT::Minuit2::GaussianModelFunction Class Reference

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.

Author
Andras Zsenei and Lorenzo Moneta, Creation date: 26 Oct 2004
See also
Definition of the Normal/Gaussian distribution (note: this Gaussian is normalized).
ParametricFunction
FumiliFCNBase
FumiliMaximumLikelihoodFCN

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 > &params)
 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 > &param) 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< doubleGetGradient (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 > &params)
 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 > &params) 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< doublepar
 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...
 

#include </mnt/vdb/lsf/workspace/root-makedoc-v606/rootspi/rdoc/src/v6-06-00-patches/math/minuit2/test/MnSim/GaussianModelFunction.h>

+ Inheritance diagram for ROOT::Minuit2::GaussianModelFunction:
+ Collaboration diagram for ROOT::Minuit2::GaussianModelFunction:

Constructor & Destructor Documentation

ROOT::Minuit2::GaussianModelFunction::GaussianModelFunction ( )
inline

Constructor which initializes the normalized Gaussian with x = 0.0.

Definition at line 73 of file GaussianModelFunction.h.

ROOT::Minuit2::GaussianModelFunction::GaussianModelFunction ( const std::vector< double > &  params)
inline

Constructor which initializes the ParametricFunction with the parameters given as input.

Parameters
paramsvector containing the initial Parameter Value.

Definition at line 92 of file GaussianModelFunction.h.

ROOT::Minuit2::GaussianModelFunction::~GaussianModelFunction ( )
inline

Definition at line 101 of file GaussianModelFunction.h.

Member Function Documentation

std::vector<double> ROOT::Minuit2::GaussianModelFunction::GetGradient ( const std::vector< double > &  x) const
inlinevirtual

Member function returning the Gradient of the function with respect to its variables (but without including gradients with respect to its internal parameters).

Parameters
xvector containing the coordinates of the point where the Gradient is to be calculated.
Returns
the Gradient vector of the function at the given point.

Reimplemented from ROOT::Minuit2::ParametricFunction.

Definition at line 167 of file GaussianModelFunction.h.

double ROOT::Minuit2::GaussianModelFunction::operator() ( const std::vector< double > &  x) const
inlinevirtual

Calculates the Gaussian as a function of the given input.

Parameters
xvector containing the mean, standard deviation and amplitude.
Returns
the Value of the Gaussian for the given input.
See also
Definition of the Normal/Gaussian distribution (note: this Gaussian is normalized).

Implements ROOT::Minuit2::ParametricFunction.

Definition at line 118 of file GaussianModelFunction.h.

double ROOT::Minuit2::GaussianModelFunction::operator() ( const std::vector< double > &  x,
const std::vector< double > &  param 
) const
inlinevirtual

Calculates the Gaussian as a function of the given input.

Parameters
xvector containing the mean, the standard deviation and the constant describing the Gaussian.
parvector containing the x coordinate (which is the Parameter in the case of a minimization).
Returns
the Value of the Gaussian for the given input.
See also
Definition of the Normal/Gaussian distribution (note: this Gaussian is normalized).

Reimplemented from ROOT::Minuit2::ParametricFunction.

Definition at line 147 of file GaussianModelFunction.h.

virtual double ROOT::Minuit2::GaussianModelFunction::Up ( ) const
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.


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