13 #ifndef ROOT_Minuit2_Minuit2Minimizer
14 #define ROOT_Minuit2_Minuit2Minimizer
16 #ifndef ROOT_Math_Minimizer
20 #ifndef ROOT_Minuit2_MnUserParameterState
24 #ifndef ROOT_Math_IFunctionfwd
34 class ModularFunctionMinimizer;
36 class FunctionMinimum;
105 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
112 virtual bool SetLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double ,
double );
114 virtual bool SetFixedVariable(
unsigned int ,
const std::string & ,
double );
137 virtual std::string
VariableName(
unsigned int ivar)
const;
163 virtual const double *
X()
const;
183 virtual const double *
Errors()
const;
192 virtual double CovMatrix(
unsigned int i,
unsigned int j)
const;
229 virtual double Correlation(
unsigned int i,
unsigned int j )
const;
237 virtual double GlobalCC(
unsigned int i)
const;
251 virtual bool GetMinosError(
unsigned int i,
double & errLow,
double & errUp,
int = 0);
257 virtual bool Scan(
unsigned int i,
unsigned int & nstep,
double *
x,
double *
y,
double xmin = 0,
double xmax = 0);
263 virtual bool Contour(
unsigned int i,
unsigned int j,
unsigned int & npoints,
double *xi,
double *xj);
276 virtual bool Hesse();
virtual bool Scan(unsigned int i, unsigned int &nstep, double *x, double *y, double xmin=0, double xmax=0)
scan a parameter i around the minimum.
Minuit2Minimizer & operator=(const Minuit2Minimizer &rhs)
Assignment operator.
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 SetUpperLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double upper)
set upper limit variable (override if minimizer supports them )
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
virtual bool GetCovMatrix(double *cov) const
Fill the passed array with the covariance matrix elements if the variable is fixed or const the value...
unsigned int VariableParameters() const
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones) ...
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
set the limits of an already existing variable
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
ROOT::Minuit2::FunctionMinimum * fMinimum
virtual const double * X() const
return pointer to X values at the minimum
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 )
virtual int CovMatrixStatus() const
return the status of the covariance matrix status = -1 : not available (inversion failed or Hesse fai...
virtual bool Contour(unsigned int i, unsigned int j, unsigned int &npoints, double *xi, double *xj)
find the contour points (xi,xj) of the function for parameter i and j around the minimum The contour ...
virtual void SetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer *m)
unsigned int NFcn() const
virtual bool SetVariableValue(unsigned int ivar, double val)
set variable
virtual bool ProvidesError() const
minimizer provides error and error matrix
virtual int VariableIndex(const std::string &name) const
get index of variable given a variable given a name return -1 if variable is not found ...
ROOT::Minuit2::MnUserParameterState fState
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.
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
virtual double GlobalCC(unsigned int i) const
get global correlation coefficient for the variable i.
virtual double Correlation(unsigned int i, unsigned int j) const
return correlation coefficient between variable i and j.
virtual bool ReleaseVariable(unsigned int ivar)
release an existing variable
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
virtual ~Minuit2Minimizer()
Destructor (no operations)
virtual bool FixVariable(unsigned int ivar)
fix an existing variable
virtual double Edm() const
return expected distance reached from the minimum
virtual bool GetHessianMatrix(double *h) const
Fill the passed array with the Hessian matrix elements The Hessian matrix is the matrix of the second...
virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower)
set lower limit variable (override if minimizer supports them )
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
class which holds the external user and/or internal Minuit representation of the parameters and error...
virtual bool SetFixedVariable(unsigned int, const std::string &, double)
set fixed variable (override if minimizer supports them )
virtual bool SetVariableValues(const double *val)
set the values of all existing variables (array must be dimensioned to the size of the existing param...
virtual void PrintResults()
return reference to the objective function virtual const ROOT::Math::IGenFunction & Function() const;...
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
virtual double CovMatrix(unsigned int i, unsigned int j) const
return covariance matrix elements if the variable is fixed or const the value is zero The ordering of...
Minuit2Minimizer class implementing the ROOT::Math::Minimizer interface for Minuit2 minimization algo...
std::vector< double > fValues
std::vector< double > fErrors
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower)
set the lower-limit of an already existing variable
double func(double *x, double *p)
virtual void Clear()
reset for consecutive minimizations - implement if needed
void SetMinimizerType(ROOT::Minuit2::EMinimizerType type)
Minuit2Minimizer(ROOT::Minuit2::EMinimizerType type=ROOT::Minuit2::kMigrad)
Default constructor.
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)
set free variable
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer
void SetTraceObject(MnTraceObject &obj)
set an object to trace operation for each iteration The object muust implement operator() (unsigned i...
virtual bool Minimize()
method to perform the minimization.
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum &min)
examine the minimum result
virtual double MinValue() const
return minimum function value
void SetStorageLevel(int level)
set storage level = 1 : store all iteration states (default) = 0 : store only first and last state to...
ROOT::Minuit2::FCNBase * fMinuitFCN
virtual const ROOT::Minuit2::FCNBase * GetFCN() const
virtual bool Hesse()
perform a full calculation of the Hessian matrix for error calculation If a valid minimum exists the ...
virtual std::string VariableName(unsigned int ivar) const
get name of variables (override if minimizer support storing of variable names)
const ROOT::Minuit2::MnUserParameterState & State()
return the minimizer state (containing values, step size , etc..)
virtual bool GetMinosError(unsigned int i, double &errLow, double &errUp, int=0)
get the minos error for parameter i, return false if Minos failed A minimizaiton must be performed be...
virtual bool IsFixedVariable(unsigned int ivar) const
query if an existing variable is fixed (i.e.
Documentation for the abstract class IBaseFunctionMultiDim.
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
virtual const double * Errors() const
return errors at the minimum
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper)
set the upper-limit of an already existing variable
virtual bool SetVariableStepSize(unsigned int ivar, double step)
set the step size of an already existing variable
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...