13 #ifndef ROOT_TMinuitMinimizer 14 #define ROOT_TMinuitMinimizer 16 #ifndef ROOT_Math_Minimizer 95 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
98 virtual bool SetLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double ,
double );
101 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 );
107 virtual bool SetFixedVariable(
unsigned int ,
const std::string & ,
double );
110 virtual bool SetVariableValue(
unsigned int ,
double );
113 virtual bool SetVariableStepSize(
unsigned int ,
double );
115 virtual bool SetVariableLowerLimit(
unsigned int ,
double );
117 virtual bool SetVariableUpperLimit(
unsigned int ,
double );
119 virtual bool SetVariableLimits(
unsigned int ivar,
double lower,
double upper);
121 virtual bool FixVariable(
unsigned int);
123 virtual bool ReleaseVariable(
unsigned int);
126 virtual bool IsFixedVariable(
unsigned int)
const;
132 virtual bool Minimize();
135 virtual double MinValue()
const;
138 virtual double Edm()
const;
141 virtual const double *
X()
const {
return &fParams.front(); }
147 virtual unsigned int NCalls()
const;
151 virtual unsigned int NDim()
const {
return fDim; }
155 virtual unsigned int NFree()
const;
161 virtual const double *
Errors()
const {
return &fErrors.front(); }
167 virtual double CovMatrix(
unsigned int i,
unsigned int j)
const {
168 return ( fCovar.size() > (i + fDim* j) ) ? fCovar[i + fDim* j] : 0;
179 virtual bool GetCovMatrix(
double * cov)
const;
188 virtual bool GetHessianMatrix(
double *
h)
const;
191 virtual int CovMatrixStatus()
const;
194 virtual double GlobalCC(
unsigned int )
const;
197 virtual bool GetMinosError(
unsigned int i,
double & errLow,
double & errUp,
int = 0);
202 virtual bool Hesse();
208 virtual bool Scan(
unsigned int i,
unsigned int &nstep,
double *
x,
double *
y,
double xmin = 0,
double xmax = 0);
214 virtual bool Contour(
unsigned int i,
unsigned int j,
unsigned int & npoints,
double *xi,
double *xj);
217 virtual void PrintResults();
223 virtual std::string VariableName(
unsigned int ivar)
const;
227 virtual int VariableIndex(
const std::string & name)
const;
231 bool static UseStaticMinuit(
bool on =
true);
235 void SuppressMinuitWarnings(
bool nowarn=
true);
240 static void Fcn(
int &,
double * ,
double &
f,
double * ,
int);
242 static void FcnGrad(
int &,
double * g,
double & f,
double * ,
int);
245 void InitTMinuit(
int ndim);
251 void DoReleaseFixParameter(
int ivar);
254 void RetrieveParams();
257 void RetrieveErrorMatrix();
260 bool CheckMinuitInstance()
const;
263 bool CheckVarIndex(
unsigned int ivar)
const;
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
virtual const double * Errors() const
return errors at the minimum
static TMinuit * fgMinuit
Implementation in C++ of the Minuit package written by Fred James.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
std::vector< double > fParams
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
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...
#define ClassDef(name, id)
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 const double * X() const
return pointer to X values at the minimum
static bool fgUseStaticMinuit
RooCmdArg Hesse(Bool_t flag=kTRUE)
ROOT::Minuit::EMinimizerType fType
double func(double *x, double *p)
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones) ...
TMinuitMinimizer class: ROOT::Math::Minimizer implementation based on TMinuit.
std::vector< double > fCovar
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
Documentation for the abstract class IBaseFunctionMultiDim.
virtual bool ProvidesError() const
minimizer provides error and error matrix
std::vector< double > fErrors