ROOT logo
ROOT » MATH » MINUIT2 » ROOT::Minuit2::Minuit2Minimizer

class ROOT::Minuit2::Minuit2Minimizer: public ROOT::Math::Minimizer

   Minuit2Minimizer class implementing the ROOT::Math::Minimizer interface for
   Minuit2 minimization algorithm.
   In ROOT it can be instantiated using the plug-in manager (plug-in "Minuit2")
   Using a string  (used by the plugin manager) or via an enumeration
   an one can set all the possible minimization algorithms (Migrad, Simplex, Combined, Scan and Fumili).

Function Members (Methods)

virtual voidClear()
virtual voidROOT::Math::Minimizer::Clear()
virtual boolContour(unsigned int i, unsigned int j, unsigned int& npoints, double* xi, double* xj)
virtual boolROOT::Math::Minimizer::Contour(unsigned int, unsigned int, unsigned int&, double*, double*)
virtual doubleCorrelation(unsigned int i, unsigned int j) const
virtual doubleROOT::Math::Minimizer::Correlation(unsigned int i, unsigned int j) const
virtual doubleCovMatrix(unsigned int i, unsigned int j) const
virtual doubleROOT::Math::Minimizer::CovMatrix(unsigned int i, unsigned int j) const
virtual intCovMatrixStatus() const
virtual intROOT::Math::Minimizer::CovMatrixStatus() const
virtual doubleEdm() const
virtual doubleROOT::Math::Minimizer::Edm() const
doubleROOT::Math::Minimizer::ErrorDef() const
virtual const double*Errors() const
virtual const double*ROOT::Math::Minimizer::Errors() const
virtual boolGetMinosError(unsigned int i, double& errLow, double& errUp)
virtual boolROOT::Math::Minimizer::GetMinosError(unsigned int, double& errLow, double& errUp)
virtual doubleGlobalCC(unsigned int i) const
virtual doubleROOT::Math::Minimizer::GlobalCC(unsigned int) const
virtual boolHesse()
virtual boolROOT::Math::Minimizer::Hesse()
boolROOT::Math::Minimizer::IsValidError() const
unsigned intROOT::Math::Minimizer::MaxFunctionCalls()
unsigned intROOT::Math::Minimizer::MaxIterations()
virtual const double*MinGradient() const
virtual const double*ROOT::Math::Minimizer::MinGradient() const
virtual boolMinimize()
ROOT::Minuit2::Minuit2MinimizerMinuit2Minimizer(ROOT::Minuit2::EMinimizerType type = ROOT::Minuit2::kMigrad)
ROOT::Minuit2::Minuit2MinimizerMinuit2Minimizer(const char* type)
virtual doubleMinValue() const
virtual doubleROOT::Math::Minimizer::MinValue() const
virtual unsigned intNCalls() const
virtual unsigned intROOT::Math::Minimizer::NCalls() const
virtual unsigned intNDim() const
virtual unsigned intROOT::Math::Minimizer::NDim() const
virtual unsigned intNFree() const
virtual unsigned intROOT::Math::Minimizer::NFree() const
intROOT::Math::Minimizer::PrintLevel() const
virtual voidROOT::Math::Minimizer::PrintResults()
virtual boolProvidesError() const
virtual boolROOT::Math::Minimizer::ProvidesError() const
virtual boolScan(unsigned int i, unsigned int& nstep, double* x, double* y, double xmin = 0, double xmax = 0)
virtual boolROOT::Math::Minimizer::Scan(unsigned int, unsigned int&, double*, double*, double = 0, double = 0)
voidROOT::Math::Minimizer::SetErrorDef(double up)
virtual boolSetFixedVariable(unsigned int, const string&, double)
virtual boolROOT::Math::Minimizer::SetFixedVariable(unsigned int, const string&, double)
virtual voidSetFunction(const ROOT::Math::IMultiGenFunction& func)
virtual voidSetFunction(const ROOT::Math::IMultiGradFunction& func)
virtual voidROOT::Math::Minimizer::SetFunction(const ROOT::Math::IMultiGenFunction& func)
virtual voidROOT::Math::Minimizer::SetFunction(const ROOT::Math::IMultiGradFunction& func)
virtual boolSetLimitedVariable(unsigned int ivar, const string& name, double val, double step, double, double)
virtual boolROOT::Math::Minimizer::SetLimitedVariable(unsigned int, const string&, double, double, double, double)
virtual boolSetLowerLimitedVariable(unsigned int ivar, const string& name, double val, double step, double lower)
virtual boolROOT::Math::Minimizer::SetLowerLimitedVariable(unsigned int ivar, const string& name, double val, double step, double lower)
voidROOT::Math::Minimizer::SetMaxFunctionCalls(unsigned int maxfcn)
voidROOT::Math::Minimizer::SetMaxIterations(unsigned int maxiter)
voidROOT::Math::Minimizer::SetPrintLevel(int level)
voidROOT::Math::Minimizer::SetStrategy(int strategyLevel)
voidROOT::Math::Minimizer::SetTolerance(double tol)
virtual boolSetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
virtual boolROOT::Math::Minimizer::SetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
voidROOT::Math::Minimizer::SetValidError(bool on)
virtual boolSetVariable(unsigned int ivar, const string& name, double val, double step)
virtual boolROOT::Math::Minimizer::SetVariable(unsigned int ivar, const string& name, double val, double step)
virtual boolSetVariableValue(unsigned int ivar, double val)
virtual boolROOT::Math::Minimizer::SetVariableValue(unsigned int, double)
virtual boolSetVariableValues(const double* val)
virtual boolROOT::Math::Minimizer::SetVariableValues(const double* x)
intROOT::Math::Minimizer::Status() const
intROOT::Math::Minimizer::Strategy() const
doubleROOT::Math::Minimizer::Tolerance() const
virtual stringVariableName(unsigned int ivar) const
virtual const double*X() const
virtual const double*ROOT::Math::Minimizer::X() const
boolExamineMinimum(const ROOT::Minuit2::FunctionMinimum& min)
virtual const ROOT::Minuit2::FCNBase*GetFCN() const
virtual const ROOT::Minuit2::ModularFunctionMinimizer*GetMinimizer() const
virtual voidSetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer* m)
voidSetMinimizerType(ROOT::Minuit2::EMinimizerType type)
ROOT::Minuit2::Minuit2MinimizerMinuit2Minimizer(const ROOT::Minuit2::Minuit2Minimizer&)
ROOT::Minuit2::Minuit2Minimizer&operator=(const ROOT::Minuit2::Minuit2Minimizer& rhs)

Data Members

intROOT::Math::Minimizer::fDebugprint level
unsigned intROOT::Math::Minimizer::fMaxCallsmax number of funciton calls
unsigned intROOT::Math::Minimizer::fMaxItermax number or iterations used to find the minimum
intROOT::Math::Minimizer::fStatusstatus of minimizer
intROOT::Math::Minimizer::fStrategyminimizer strategy
doubleROOT::Math::Minimizer::fToltolerance (absolute)
doubleROOT::Math::Minimizer::fUperror scale
boolROOT::Math::Minimizer::fValidErrorflag to control if errors have been validated (Hesse has been run in case of Minuit)
unsigned intfDim

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Minuit2Minimizer(ROOT::Minuit2::EMinimizerType type = ROOT::Minuit2::kMigrad)
      Default constructor

Minuit2Minimizer(const char * type)
      Constructor with a char (used by PM)

virtual ~Minuit2Minimizer()
      Destructor (no operations)

Minuit2Minimizer(const Minuit2Minimizer &)
 usually copying is non trivial, so we make this unaccessible

      Copy constructor

void Clear()
 clear resources (parameters) for consecutives minimizations
void SetFunction(const ROOT::Math::IMultiGenFunction & func)
 set the function to minimize
void SetFunction(const ROOT::Math::IMultiGradFunction & func)
 set gradient the function to minimize
bool SetVariable(unsigned int ivar, const string& name, double val, double step)
 set free variable
bool SetLowerLimitedVariable(unsigned int ivar, const string& name, double val, double step, double lower)
 set lower limit variable  (override if minimizer supports them )
bool SetUpperLimitedVariable(unsigned int ivar, const string& name, double val, double step, double upper)
 set upper/lower limited variable (override if minimizer supports them )
bool SetLimitedVariable(unsigned int ivar, const string& name, double val, double step, double , double )
 set fixed variable (override if minimizer supports them )
bool SetFixedVariable(unsigned int , const string& , double )
 set variable
bool SetVariableValue(unsigned int ivar, double val)
bool SetVariableValues(const double* val)
std::string VariableName(unsigned int ivar) const
 get name of variables (override if minimizer support storing of variable names)
bool Minimize()
 method to perform the minimization
double MinValue() const
 return minimum function value
{ return fState.Fval(); }
double Edm() const
 return expected distance reached from the minimum
{ return fState.Edm(); }
const double * X() const
 return  pointer to X values at the minimum
const double * MinGradient() const
 return pointer to gradient values at the minimum
{ return 0; }
unsigned int NCalls() const
 number of function calls to reach the minimum
{ return fState.NFcn(); }
unsigned int NDim() const
 this is <= Function().NDim() which is the total
 number of variables (free+ constrained ones)
{ return fDim; }
unsigned int NFree() const
 number of free variables (real dimension of the problem)
 this is <= Function().NDim() which is the total
{ return fState.VariableParameters(); }
bool ProvidesError() const
 minimizer provides error and error matrix
{ return true; }
const double * Errors() const
 return errors at the minimum
double CovMatrix(unsigned int i, unsigned int j) const
       return covariance matrices elements
       if the variable is fixed or const the value is zero
       The ordering of the variables is the same as in errors and parameter value.
       This is different from the direct interface of Minuit2 or TMinuit where the
       values were obtained only to variable parameters

int CovMatrixStatus() const
      return the status of the covariance matrix

double Correlation(unsigned int i, unsigned int j) const
double GlobalCC(unsigned int i) const
      get global correlation coefficient for the variable i. This is a number between zero and one which gives
      the correlation between the i-th variable  and that linear combination of all other variables which
      is most strongly correlated with i.
      If the variable is fixed or const the return value is zero

bool GetMinosError(unsigned int i, double& errLow, double& errUp)
      get the minos error for parameter i, return false if Minos failed
      A minimizaiton must be performed befre, return false if no minimization has been done

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. A minimization must have been done before,
      return false if it is not the case

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 will be find for value of the function = Min + ErrorUp();

bool Hesse()
      perform a full calculation of the Hessian matrix for error calculation
      If a valid minimum exists the calculation is done on theminimum point otherwise is performed
      in the current set values of parameters

const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
 return reference to the objective function
virtual const ROOT::Math::IGenFunction & Function() const;
 protected function for accessing the internal Minuit2 object. Needed for derived classes
{ return fMinimizer; }
void SetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer* m)
{ fMinimizer = m; }
void SetMinimizerType(ROOT::Minuit2::EMinimizerType type)
const ROOT::Minuit2::FCNBase * GetFCN() const
{ return fMinuitFCN; }
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum& min)
 examine the minimum result