#include <TFcnAdapter.h>
Inheritance diagram for TFcnAdapter:
Public Member Functions | |
TFcnAdapter (void(*fcn)(int &, double *, double &, double *, int)) | |
virtual | ~TFcnAdapter () |
const ROOT::Minuit2::FCNBase & | Base () const |
double | operator() (const std::vector< double > &) const |
double | Up () const |
void | SetErrorDef (double up) |
std::vector< double > | Gradient (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::FCNBase & | Base () const |
double | operator() (const std::vector< double > &) const |
double | Up () const |
void | SetErrorDef (double up) |
std::vector< double > | Gradient (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< double > | fGradCache |
std::vector< double > | fGradCache |
Definition at line 28 of file TFcnAdapter.h.
Definition at line 32 of file TFcnAdapter.h.
virtual TFcnAdapter::~TFcnAdapter | ( | ) | [inline, virtual] |
Definition at line 34 of file TFcnAdapter.h.
Definition at line 32 of file TFcnAdapter.h.
virtual TFcnAdapter::~TFcnAdapter | ( | ) | [inline, virtual] |
Definition at line 34 of file TFcnAdapter.h.
const ROOT::Minuit2::FCNBase& TFcnAdapter::Base | ( | ) | const [inline] |
Definition at line 36 of file TFcnAdapter.h.
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.
par | function parameters as defined by the user. |
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.
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.
Implements ROOT::Minuit2::FCNGradientBase.
Definition at line 33 of file TFcnAdapter.cxx.
References fFCN, fGradCache, and i.
const ROOT::Minuit2::FCNBase& TFcnAdapter::Base | ( | ) | const [inline] |
Definition at line 36 of file TFcnAdapter.h.
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.
par | function parameters as defined by the user. |
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.
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.
Implements ROOT::Minuit2::FCNGradientBase.
void(* TFcnAdapter::fFCN)(int &, double *, double &, double *, int) [private] |
Referenced by Gradient(), and operator()().
double TFcnAdapter::fUp [private] |
std::vector<double> TFcnAdapter::fGradCache [mutable, private] |
std::vector<double> TFcnAdapter::fGradCache [mutable, private] |
Definition at line 52 of file TFcnAdapter.h.