TFcnAdapter Class Reference

#include <TFcnAdapter.h>

Inheritance diagram for TFcnAdapter:

ROOT::Minuit2::FCNGradientBase ROOT::Minuit2::FCNGradientBase ROOT::Minuit2::FCNBase ROOT::Minuit2::FCNBase ROOT::Minuit2::FCNBase ROOT::Minuit2::FCNBase ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction ROOT::Minuit2::GenericFunction List of all members.

Public Member Functions

 TFcnAdapter (void(*fcn)(int &, double *, double &, double *, int))
virtual ~TFcnAdapter ()
const ROOT::Minuit2::FCNBaseBase () const
double operator() (const std::vector< double > &) const
double Up () const
void SetErrorDef (double up)
std::vector< doubleGradient (const std::vector< double > &) const
double operator() (int npar, double *params, int iflag=4) const
 TFcnAdapter (void(*fcn)(int &, double *, double &, double *, int))
virtual ~TFcnAdapter ()
const ROOT::Minuit2::FCNBaseBase () const
double operator() (const std::vector< double > &) const
double Up () const
void SetErrorDef (double up)
std::vector< doubleGradient (const std::vector< double > &) const
double operator() (int npar, double *params, int iflag=4) const

Private Attributes

void(* fFCN )(int &, double *, double &, double *, int)
double fUp
std::vector< doublefGradCache
std::vector< doublefGradCache

Detailed Description

Definition at line 28 of file TFcnAdapter.h.


Constructor & Destructor Documentation

TFcnAdapter::TFcnAdapter ( void(*)(int &, double *, double &, double *, int)  fcn  )  [inline]

Definition at line 32 of file TFcnAdapter.h.

virtual TFcnAdapter::~TFcnAdapter (  )  [inline, virtual]

Definition at line 34 of file TFcnAdapter.h.

TFcnAdapter::TFcnAdapter ( void(*)(int &, double *, double &, double *, int)  fcn  )  [inline]

Definition at line 32 of file TFcnAdapter.h.

virtual TFcnAdapter::~TFcnAdapter (  )  [inline, virtual]

Definition at line 34 of file TFcnAdapter.h.


Member Function Documentation

const ROOT::Minuit2::FCNBase& TFcnAdapter::Base (  )  const [inline]

Definition at line 36 of file TFcnAdapter.h.

double TFcnAdapter::operator() ( const std::vector< double > &   )  const [virtual]

The meaning of the vector of parameters is of course defined by the user, who uses the values of those parameters to calculate his function Value. The order and the position of these parameters is strictly the one specified by the user when supplying the starting values for minimization. The starting values must be specified by the user, either via an std::vector<double> or the MnUserParameters supplied as input to the MINUIT minimizers such as VariableMetricMinimizer or MnMigrad. Later values are determined by MINUIT as it searches for the Minimum or performs whatever analysis is requested by the user.

Parameters:
par function parameters as defined by the user.
Returns:
the Value of the function.
See also:
MnUserParameters

VariableMetricMinimizer

MnMigrad

Implements ROOT::Minuit2::FCNBase.

Definition at line 15 of file TFcnAdapter.cxx.

References fFCN.

double TFcnAdapter::Up (  )  const [inline, virtual]

Error definition of the function. MINUIT defines Parameter errors as the change in Parameter Value required to change the function Value by up. Normally, for chisquared fits it is 1, and for negative log likelihood, its Value is 0.5. If the user wants instead the 2-sigma errors for chisquared fits, it becomes 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.

Todo:
Comment a little bit better with links!!!!!!!!!!!!!!!!! Idem for ErrorDef()

Implements ROOT::Minuit2::FCNBase.

Definition at line 39 of file TFcnAdapter.h.

References fUp.

void TFcnAdapter::SetErrorDef ( double  up  )  [inline, virtual]

add interface to set dynamically a new error definition Re-implement this function if needed.

Reimplemented from ROOT::Minuit2::FCNBase.

Definition at line 41 of file TFcnAdapter.h.

References fUp.

std::vector< double > TFcnAdapter::Gradient ( const std::vector< double > &   )  const [virtual]

Implements ROOT::Minuit2::FCNGradientBase.

Definition at line 33 of file TFcnAdapter.cxx.

References fFCN, fGradCache, and i.

double TFcnAdapter::operator() ( int  npar,
double params,
int  iflag = 4 
) const

Definition at line 53 of file TFcnAdapter.cxx.

References fFCN.

const ROOT::Minuit2::FCNBase& TFcnAdapter::Base (  )  const [inline]

Definition at line 36 of file TFcnAdapter.h.

double TFcnAdapter::operator() ( const std::vector< double > &   )  const [virtual]

The meaning of the vector of parameters is of course defined by the user, who uses the values of those parameters to calculate his function Value. The order and the position of these parameters is strictly the one specified by the user when supplying the starting values for minimization. The starting values must be specified by the user, either via an std::vector<double> or the MnUserParameters supplied as input to the MINUIT minimizers such as VariableMetricMinimizer or MnMigrad. Later values are determined by MINUIT as it searches for the Minimum or performs whatever analysis is requested by the user.

Parameters:
par function parameters as defined by the user.
Returns:
the Value of the function.
See also:
MnUserParameters

VariableMetricMinimizer

MnMigrad

Implements ROOT::Minuit2::FCNBase.

double TFcnAdapter::Up (  )  const [inline, virtual]

Error definition of the function. MINUIT defines Parameter errors as the change in Parameter Value required to change the function Value by up. Normally, for chisquared fits it is 1, and for negative log likelihood, its Value is 0.5. If the user wants instead the 2-sigma errors for chisquared fits, it becomes 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.

Todo:
Comment a little bit better with links!!!!!!!!!!!!!!!!! Idem for ErrorDef()

Implements ROOT::Minuit2::FCNBase.

Definition at line 39 of file TFcnAdapter.h.

References fUp.

void TFcnAdapter::SetErrorDef ( double  up  )  [inline, virtual]

add interface to set dynamically a new error definition Re-implement this function if needed.

Reimplemented from ROOT::Minuit2::FCNBase.

Definition at line 41 of file TFcnAdapter.h.

References fUp.

std::vector<double> TFcnAdapter::Gradient ( const std::vector< double > &   )  const [virtual]

Implements ROOT::Minuit2::FCNGradientBase.

double TFcnAdapter::operator() ( int  npar,
double params,
int  iflag = 4 
) const


Member Data Documentation

void(* TFcnAdapter::fFCN)(int &, double *, double &, double *, int) [private]

Referenced by Gradient(), and operator()().

double TFcnAdapter::fUp [private]

Definition at line 51 of file TFcnAdapter.h.

Referenced by SetErrorDef(), and Up().

std::vector<double> TFcnAdapter::fGradCache [mutable, private]

Definition at line 52 of file TFcnAdapter.h.

Referenced by Gradient().

std::vector<double> TFcnAdapter::fGradCache [mutable, private]

Definition at line 52 of file TFcnAdapter.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:37:31 2011 for ROOT_528-00b_version by  doxygen 1.5.1