|
ROOT
Reference Guide |
|
Go to the documentation of this file.
13 #ifndef ROOT_Minuit2_Minuit2Minimizer
14 #define ROOT_Minuit2_Minuit2Minimizer
29 class ModularFunctionMinimizer;
31 class FunctionMinimum;
95 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
107 virtual bool SetFixedVariable(
unsigned int ,
const std::string & ,
double );
130 virtual std::string
VariableName(
unsigned int ivar)
const;
156 virtual const double *
X()
const {
return &
fValues.front(); }
176 virtual const double *
Errors()
const;
185 virtual double CovMatrix(
unsigned int i,
unsigned int j)
const;
220 virtual double Correlation(
unsigned int i,
unsigned int j)
const;
228 virtual double GlobalCC(
unsigned int i)
const;
237 virtual bool GetMinosError(
unsigned int i,
double &errLow,
double &errUp,
int = 0);
253 virtual bool Scan(
unsigned int i,
unsigned int &nstep,
double *
x,
double *
y,
double xmin = 0,
double xmax = 0);
259 virtual bool Contour(
unsigned int i,
unsigned int j,
unsigned int &npoints,
double *xi,
double *xj);
271 virtual bool Hesse();
306 int RunMinosError(
unsigned int i,
double &errLow,
double &errUp,
int runopt);
ROOT::Minuit2::FunctionMinimum * fMinimum
virtual bool ProvidesError() const
minimizer provides error and error matrix
const ROOT::Minuit2::MnUserParameterState & State()
return the minimizer state (containing values, step size , etc..)
virtual void SetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer *m)
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 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 NCalls() const
number of function calls to reach the minimum
virtual const double * Errors() const
return errors at the minimum
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 double GlobalCC(unsigned int i) const
get global correlation coefficient for the variable i.
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
virtual double MinValue() const
return minimum function value
unsigned int NFcn() const
virtual const double * X() const
return pointer to X values at the minimum
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
unsigned int VariableParameters() const
virtual bool ReleaseVariable(unsigned int ivar)
release an existing variable
virtual std::string VariableName(unsigned int ivar) const
get name of variables (override if minimizer support storing of variable names)
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 int MinosStatus() const
MINOS status code of last Minos run status & 1 > 0 : invalid lower error status & 2 > 0 : invalid upp...
virtual bool SetVariableValue(unsigned int ivar, double val)
set variable
virtual double Correlation(unsigned int i, unsigned int j) const
return correlation coefficient between variable i and j.
ROOT::Minuit2::MnUserParameterState fState
virtual ~Minuit2Minimizer()
Destructor (no operations)
virtual double Edm() const
return expected distance reached from the minimum
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones)
Minuit2Minimizer class implementing the ROOT::Math::Minimizer interface for Minuit2 minimization algo...
virtual void PrintResults()
return reference to the objective function virtual const ROOT::Math::IGenFunction & Function() const;
virtual bool FixVariable(unsigned int ivar)
fix an existing variable
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
virtual int CovMatrixStatus() const
return the status of the covariance matrix status = -1 : not available (inversion failed or Hesse fai...
void SetStorageLevel(int level)
set storage level = 1 : store all iteration states (default) = 0 : store only first and last state to...
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
class which holds the external user and/or internal Minuit representation of the parameters and error...
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
virtual const ROOT::Minuit2::FCNBase * GetFCN() const
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 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...
std::vector< double > fValues
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 SetVariable(unsigned int ivar, const std::string &name, double val, double step)
set free variable
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower)
set the lower-limit of an already existing variable
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
virtual bool IsFixedVariable(unsigned int ivar) const
query if an existing variable is fixed (i.e.
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
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...
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum &min)
examine the minimum result
int RunMinosError(unsigned int i, double &errLow, double &errUp, int runopt)
virtual bool Hesse()
perform a full calculation of the Hessian matrix for error calculation If a valid minimum exists the ...
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.
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
std::vector< double > fErrors
Documentation for the abstract class IBaseFunctionMultiDim.
virtual void Clear()
reset for consecutive minimizations - implement if needed
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer
void SetMinimizerType(ROOT::Minuit2::EMinimizerType type)
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
ROOT::Minuit2::FCNBase * fMinuitFCN
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Minuit2Minimizer & operator=(const Minuit2Minimizer &rhs)
Assignment operator.
virtual bool GetCovMatrix(double *cov) const
Fill the passed array with the covariance matrix elements if the variable is fixed or const the value...
Minuit2Minimizer(ROOT::Minuit2::EMinimizerType type=ROOT::Minuit2::kMigrad)
Default constructor.
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
set the limits of an already existing variable
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 )
void SetTraceObject(MnTraceObject &obj)
set an object to trace operation for each iteration The object must be a (or inherit from) ROOT::Minu...
virtual bool Minimize()
method to perform the minimization.