|
|
Go to the documentation of this file.
13 #ifndef ROOT_Minuit2_HybridMinimizer
14 #define ROOT_Minuit2_HybridMinimizer
16 #include "Math/Minimizer.h"
17 #include "Minuit2/MnUserParameterState.h"
18 #include "Math/IFunctionfwd.h"
19 #include "Minuit2/MinosError.h"
20 #include "Minuit2/ModularFunctionMinimizer.h"
21 #include "Minuit2/FumiliMinimizer.h"
27 class ModularFunctionMinimizer;
29 class FunctionMinimum;
79 void Clear()
override;
134 double Edm()
const override {
return fState.Edm(); }
137 const double *
X()
const override;
140 const double *
MinGradient()
const override {
return nullptr; }
143 unsigned int NCalls()
const override {
return fState.NFcn(); }
147 unsigned int NDim()
const override {
return fDim; }
151 unsigned int NFree()
const override {
return fState.VariableParameters(); }
157 const double *
Errors()
const override;
166 double CovMatrix(
unsigned int i,
unsigned int j)
const override;
201 double Correlation(
unsigned int i,
unsigned int j)
const override;
209 double GlobalCC(
unsigned int i)
const override;
223 bool GetMinosError(
unsigned int i,
double &errLow,
double &errUp,
int = 0)
override;
229 bool Scan(
unsigned int i,
unsigned int &nstep,
double *x,
double *y,
double xmin = 0,
double xmax = 0)
override;
235 bool Contour(
unsigned int i,
unsigned int j,
unsigned int &
npoints,
double *
xi,
double *xj)
override;
247 bool Hesse()
override;
256 const ROOT::Minuit2::MnUserParameterState &
State() {
return fState; }
276 ROOT::Minuit2::MnUserParameterState
fState;
282 mutable std::vector<double>
fErrors;
bool SetVariable(unsigned int ivar, const std::string &name, double val, double step) override
set free variable
HybridMinimizer & operator=(const HybridMinimizer &rhs)
void PrintResults() override
print result of minimization
const ROOT::Minuit2::MnUserParameterState & State()
return the minimizer state (containing values, step size , etc..)
bool GetCovMatrix(double *cov) const override
const double * MinGradient() const override
return pointer to gradient values at the minimum
unsigned int NFree() const override
int CovMatrixStatus() const override
~HybridMinimizer() override
std::vector< double > fValues
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
double Correlation(unsigned int i, unsigned int j) const override
unsigned int NCalls() const override
number of function calls to reach the minimum
bool SetUpperLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double upper) override
set upper limit variable (override if minimizer supports them )
bool GetHessianMatrix(double *h) const override
const double * Errors() const override
return errors at the minimum
void SetFunction(const ROOT::Math::IMultiGenFunction &func) override
set the function to minimize
ROOT::Minuit2::FunctionMinimum * fMinimum
ROOT::Minuit2::MnUserParameterState fState
virtual const ROOT::Minuit2::FCNBase * GetFCN() const
double MinValue() const override
return minimum function value
void SetMinimizerType(EMinimizerType type)
const double * X() const override
return pointer to X values at the minimum
bool GetMinosError(unsigned int i, double &errLow, double &errUp, int=0) override
bool SetLowerLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower) override
set lower limit variable (override if minimizer supports them )
virtual void SetMinimizer(ROOT::Minuit2::ModularFunctionMinimizer *m)
bool Scan(unsigned int i, unsigned int &nstep, double *x, double *y, double xmin=0, double xmax=0) override
HybridMinimizer(EMinimizerType type=kMigrad)
bool SetVariableValue(unsigned int ivar, double val) override
set variable
ROOT::Minuit2::FCNBase * fMinuitFCN
std::vector< double > fErrors
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer
bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double, double) override
set upper/lower limited variable (override if minimizer supports them )
bool SetVariableValues(const double *val) override
double CovMatrix(unsigned int i, unsigned int j) const override
double Edm() const override
return expected distance reached from the minimum
std::string VariableName(unsigned int ivar) const override
get name of variables (override if minimizer support storing of variable names)
bool ProvidesError() const override
minimizer provides error and error matrix
int VariableIndex(const std::string &name) const override
unsigned int NDim() const override
bool SetFixedVariable(unsigned int, const std::string &, double) override
set fixed variable (override if minimizer supports them )
double GlobalCC(unsigned int i) const override
bool Contour(unsigned int i, unsigned int j, unsigned int &npoints, double *xi, double *xj) override
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum &min)
examine the minimum result