13 #ifndef ROOT_TFumiliMinimizer
14 #define ROOT_TFumiliMinimizer
16 #ifndef ROOT_Math_Minimizer
20 #ifndef ROOT_Math_FitMethodFunction
84 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
87 virtual bool SetLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double ,
double );
112 virtual const double *
X()
const {
return &
fParams.front(); }
118 virtual unsigned int NCalls()
const {
return 0; }
138 virtual double CovMatrix(
unsigned int i,
unsigned int j)
const {
146 if (
fCovar.size() == 0)
return 0;
157 static void Fcn(
int &,
double * ,
double &
f,
double * ,
int);
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)
set free variable
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
virtual unsigned int NCalls() const
number of function calls to reach the minimum
virtual bool ProvidesError() const
minimizer provides error and error matrix
virtual double CovMatrix(unsigned int i, unsigned int j) const
return covariance matrices elements if the variable is fixed the matrix is zero The ordering of the v...
static double EvaluateFCN(const double *x, double *g)
implementation of FCN for Fumili when user provided gradient is used
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower)
set a new lower limit variable (override if minimizer supports them )
TFumiliMinimizer class: minimizer implementation based on TFumili.
static ROOT::Math::FitMethodFunction * fgFunc
TFumiliMinimizer(int dummy=0)
Default constructor (an argument is needed by plug-in manager)
virtual const double * Errors() const
return errors at the minimum
#define ClassDef(name, id)
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
std::vector< double > fParams
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in's exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
virtual bool SetFixedVariable(unsigned int, const std::string &, double)
set fixed variable (override if minimizer supports them )
virtual bool Minimize()
method to perform the minimization
virtual bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double, double)
set upper/lower limited variable (override if minimizer supports them )
std::vector< double > fCovar
virtual const double * X() const
return pointer to X values at the minimum
~TFumiliMinimizer()
Destructor (no operations)
virtual bool SetUpperLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double upper)
set a new upper limit variable (override if minimizer supports them )
FitMethodFunction class Interface for objective functions (like chi2 and likelihood used in the fit) ...
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
static RooMathCoreReg dummy
double func(double *x, double *p)
virtual int CovMatrixStatus() const
return status of covariance matrix using Minuit convention {0 not calculated 1 approximated 2 made po...
static ROOT::Math::FitMethodGradFunction * fgGradFunc
static TFumili * fgFumili
std::vector< double > fErrors
TFumiliMinimizer & operator=(const TFumiliMinimizer &rhs)
Assignment operator.
Documentation for the abstract class IBaseFunctionMultiDim.
virtual bool SetVariableValue(unsigned int ivar, double val)
set the value of an existing variable
static void Fcn(int &, double *, double &f, double *, int)
implementation of FCN for Fumili
virtual double MinValue() const
return minimum function value
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones) ...
virtual double Edm() const
return expected distance reached from the minimum