13 #ifndef ROOT_Minuit2_Minuit2Minimizer 14 #define ROOT_Minuit2_Minuit2Minimizer 28 class ModularFunctionMinimizer;
30 class FunctionMinimum;
99 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
102 virtual bool SetLowerLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double lower );
104 virtual bool SetUpperLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double upper );
106 virtual bool SetLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double ,
double );
108 virtual bool SetFixedVariable(
unsigned int ,
const std::string & ,
double );
110 virtual bool SetVariableValue(
unsigned int ivar,
double val);
112 virtual bool SetVariableValues(
const double * val);
114 virtual bool SetVariableStepSize(
unsigned int ivar,
double step );
116 virtual bool SetVariableLowerLimit(
unsigned int ivar,
double lower);
118 virtual bool SetVariableUpperLimit(
unsigned int ivar,
double upper);
120 virtual bool SetVariableLimits(
unsigned int ivar,
double lower,
double upper);
122 virtual bool FixVariable(
unsigned int ivar);
124 virtual bool ReleaseVariable(
unsigned int ivar);
127 virtual bool IsFixedVariable(
unsigned int ivar)
const;
131 virtual std::string VariableName(
unsigned int ivar)
const;
134 virtual int VariableIndex(
const std::string & name)
const;
148 virtual bool Minimize();
151 virtual double MinValue()
const {
return fState.Fval(); }
154 virtual double Edm()
const {
return fState.Edm(); }
157 virtual const double * X()
const;
163 virtual unsigned int NCalls()
const {
return fState.NFcn(); }
167 virtual unsigned int NDim()
const {
return fDim; }
171 virtual unsigned int NFree()
const {
return fState.VariableParameters(); }
177 virtual const double * Errors()
const;
186 virtual double CovMatrix(
unsigned int i,
unsigned int j)
const;
197 virtual bool GetCovMatrix(
double * cov)
const;
206 virtual bool GetHessianMatrix(
double *
h)
const;
218 virtual int CovMatrixStatus()
const;
223 virtual double Correlation(
unsigned int i,
unsigned int j )
const;
231 virtual double GlobalCC(
unsigned int i)
const;
245 virtual bool GetMinosError(
unsigned int i,
double & errLow,
double & errUp,
int = 0);
251 virtual bool Scan(
unsigned int i,
unsigned int & nstep,
double *
x,
double *
y,
double xmin = 0,
double xmax = 0);
257 virtual bool Contour(
unsigned int i,
unsigned int j,
unsigned int & npoints,
double *xi,
double *xj);
270 virtual bool Hesse();
277 virtual void PrintResults();
285 void SetStorageLevel(
int level);
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
Namespace for new ROOT classes and functions.
virtual double MinValue() const
return minimum function value
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
ROOT::Minuit2::FunctionMinimum * fMinimum
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
virtual bool ProvidesError() const
minimizer provides error and error matrix
virtual void SetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer *m)
virtual unsigned int NCalls() const
number of function calls to reach the minimum
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 const double * MinGradient() const
return pointer to gradient values at the minimum
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
virtual double Edm() const
return expected distance reached from the minimum
Documentation for the abstract class IBaseFunctionMultiDim.
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones) ...
class which holds the external user and/or internal Minuit representation of the parameters and error...
RooCmdArg Hesse(Bool_t flag=kTRUE)
Minuit2Minimizer class implementing the ROOT::Math::Minimizer interface for Minuit2 minimization algo...
std::vector< double > fValues
std::vector< double > fErrors
Binding & operator=(OUT(*fun)(void))
virtual const ROOT::Minuit2::FCNBase * GetFCN() const
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer
ROOT::Minuit2::FCNBase * fMinuitFCN
const ROOT::Minuit2::MnUserParameterState & State()
return the minimizer state (containing values, step size , etc..)
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...