21 std::map<int, std::string> statusDescription()
23 std::map<int, std::string> result;
24 result[0] =
"OK, valid minimum";
25 result[1] =
"Didn't converge, covariance was made pos defined";
26 result[2] =
"Didn't converge, Hessian is invalid";
27 result[3] =
"Didn't converge, Edm is above max";
28 result[4] =
"Didn't converge, reached call limit";
29 result[5] =
"Didn't converge, unknown failure";
33 std::map<int, std::string> covmatrixStatusDescription()
35 std::map<int, std::string> result;
36 result[-1] =
"Not available (inversion failed or Hessian failed)";
37 result[0] =
"Available but not positive defined";
38 result[1] =
"Covariance only approximate";
39 result[2] =
"Full matrix but forced pos def";
40 result[3] =
"Full accurate";
50 addOption(
"Strategy", 1,
"Minimization strategy (0-low, 1-medium, 2-high quality)");
51 addOption(
"ErrorDef", 1.0,
"Error definition factor for parameter error calculation");
52 addOption(
"Tolerance", 0.01,
"Tolerance on the function value at the minimum");
53 addOption(
"Precision", -1.0,
"Relative floating point arithmetic precision");
54 addOption(
"PrintLevel", 0,
"Minimizer internal print level");
55 addOption(
"MaxFunctionCalls", 0,
"Maximum number of function calls");
67 return optionValue<int>(
"Strategy");
77 return optionValue<double>(
"ErrorDef");
87 return optionValue<double>(
"Tolerance");
97 return optionValue<double>(
"Precision");
107 return optionValue<int>(
"PrintLevel");
117 return optionValue<int>(
"MaxFunctionCalls");
130 result[
"functionCalls"] = std::to_string(
rootMinimizer()->NCalls());
Declares class Minuit2Minimizer.
Abstract base class that adapts the CERN ROOT minimizer to our IMinimizer.
std::string algorithmName() const override
Returns name of the minimization algorithm.
virtual std::map< std::string, std::string > statusMap() const
Returns map of string representing different minimizer statuses.
OptionContainer::option_t addOption(const std::string &optionName, T value, const std::string &description="")
void setOptionValue(const std::string &optionName, T value)
Info about a minimizer, including list of defined minimization algorithms.
Wrapper for the CERN ROOT facade of the Minuit2 minimizer. See Minuit2 user manual https://root....
void setPrecision(double value)
Sets relative floating point arithmetic precision. Should be adjusted when the user knows that object...
void propagateOptions() override
Propagate options down to ROOT's Minuit2Minimizer.
Minuit2Minimizer(const std::string &algorithmName="Migrad")
void setMaxFunctionCalls(int value)
Sets maximum number of objective function calls.
std::unique_ptr< ROOT::Minuit2::Minuit2Minimizer > m_minuit2_minimizer
void setPrintLevel(int value)
Sets minimizer internal print level. Default value is 0 (silent).
void setStrategy(int value)
Sets minimization strategy (0-low, 1-medium, 2-high minimization quality). At low quality number of f...
int maxFunctionCalls() const
std::string statusToString() const override
Returns string representation of current minimizer status.
void setTolerance(double value)
Sets tolerance on the function value at the minimum. Minimization will stop when the estimated vertic...
void setErrorDefinition(double value)
Sets error definition factor for parameter error calculation. If objective function (OF) is the usual...
std::map< std::string, std::string > statusMap() const override
Returns map of string representing different minimizer statuses.
bool requiresResiduals() override
Returns true if minimizer computations are residual-based, false otherwise.
double errorDefinition() const
const root_minimizer_t * rootMinimizer() const override
~Minuit2Minimizer() override
virtual int CovMatrixStatus() const
return status of covariance matrix using Minuit convention {0 not calculated 1 approximated 2 made po...
int Status() const
status code of minimizer
std::string scientific(T value, int n=10)
Returns scientific string representing given value of any numeric type.