60 if (prevErrorIgnoreLevel < 1001) {
62 return prevErrorIgnoreLevel;
94 std::string algoname(
type);
96 std::transform(algoname.begin(), algoname.end(), algoname.begin(), (
int (*)(
int))tolower);
99 if (algoname ==
"simplex")
101 if (algoname ==
"minimize")
103 if (algoname ==
"scan")
105 if (algoname ==
"fumili" || algoname ==
"fumili2")
107 if (algoname ==
"bfgs")
126 fMinimizer = std::make_unique<ROOT::Minuit2::FumiliMinimizer>();
131 fMinimizer = std::make_unique<ROOT::Minuit2::VariableMetricMinimizer>();
159 print.
Info(
"Parameter",
name,
"has zero or invalid step size - consider it as constant");
164 unsigned int minuit2Index =
fState.Index(
name);
165 if (minuit2Index != ivar) {
166 print.
Warn(
"Wrong index", minuit2Index,
"used for the variable",
name);
170 fState.RemoveLimits(ivar);
181 std::vector<double> cov(
n * (
n + 1) / 2);
183 for (
unsigned int i = 0; i <
n; i++) {
184 for (
unsigned int j = i; j <
n; j++)
185 cov[i + j * (j + 1) / 2] = (i == j) ? d2[i] : 0.;
195 fState.AddCovariance({cov, nrow});
206 fState.SetLowerLimit(ivar, lower);
216 fState.SetUpperLimit(ivar, upper);
221 double lower,
double upper)
226 fState.SetLimits(ivar, lower, upper);
235 double step = (val != 0) ? 0.1 * std::abs(val) : 0.1;
246 if (ivar >=
fState.MinuitParameters().size())
247 return std::string();
248 return fState.GetName(ivar);
261 if (ivar >=
fState.MinuitParameters().size())
263 fState.SetValue(ivar, val);
270 unsigned int n =
fState.MinuitParameters().size();
273 for (
unsigned int ivar = 0; ivar <
n; ++ivar)
274 fState.SetValue(ivar,
x[ivar]);
282 if (ivar >=
fState.MinuitParameters().size())
284 fState.SetError(ivar, step);
292 if (ivar >=
fState.MinuitParameters().size())
294 fState.SetLowerLimit(ivar, lower);
301 if (ivar >=
fState.MinuitParameters().size())
303 fState.SetUpperLimit(ivar, upper);
311 if (ivar >=
fState.MinuitParameters().size())
313 fState.SetLimits(ivar, lower, upper);
320 if (ivar >=
fState.MinuitParameters().size())
329 if (ivar >=
fState.MinuitParameters().size())
338 if (ivar >=
fState.MinuitParameters().size()) {
340 print.
Error(
"Wrong variable index");
343 return (
fState.Parameter(ivar).IsFixed() ||
fState.Parameter(ivar).IsConst());
349 if (ivar >=
fState.MinuitParameters().size()) {
351 print.
Error(
"Wrong variable index");
377 auto lambdaFunc = [&func](
double const *params) {
return func(params); };
378 auto adapter = std::make_unique<ROOT::Minuit2::FCNAdapter>(lambdaFunc,
ErrorDef());
381 auto lambdaGrad = [&gradFunc](
double const *params,
double *grad) {
return gradFunc.Gradient(params, grad); };
382 adapter->SetGradientFunction(lambdaGrad);
392 print.
Error(
"Wrong Fit method function for Fumili");
395 fMinuitFCN = std::make_unique<ROOT::Minuit2::FumiliFCNAdapter<ROOT::Math::FitMethodGradFunction>>(*fcnfunc,
fDim,
402 print.
Error(
"Wrong Fit method function for Fumili");
406 std::make_unique<ROOT::Minuit2::FumiliFCNAdapter<ROOT::Math::FitMethodFunction>>(*fcnfunc,
fDim,
ErrorDef());
432 auto customize = [&minuit2Opt](
const char *
name,
auto val) {
465 print.
Error(
"FCN function has not been set");
476 const int strategyLevel =
Strategy();
480 print.
Debug(
"Minuit print level is", printLevel);
483 int maxfcn_used = maxfcn;
484 if (maxfcn_used == 0) {
485 int nvar =
fState.VariableParameters();
486 maxfcn_used = 200 + 100 * nvar + 5 * nvar * nvar;
488 std::cout <<
"Minuit2Minimizer: Minimize with max-calls " << maxfcn_used <<
" convergence for edm < " << tol
489 <<
" strategy " << strategyLevel << std::endl;
493 fMinimizer->Builder().SetPrintLevel(printLevel);
510 int storageLevel = 1;
511 bool ret = minuit2Opt->
GetValue(
"StorageLevel", storageLevel);
517 std::string fumiliMethod;
518 ret = minuit2Opt->
GetValue(
"FumiliMethod", fumiliMethod);
522 fumiliMinimizer->
SetMethod(fumiliMethod);
526 if (printLevel > 0) {
527 std::cout <<
"Minuit2Minimizer::Minuit - Changing default options" << std::endl;
536 if (printLevel == 10 &&
gROOT) {
544 if (printLevel == 20 || printLevel == 30 || printLevel == 40 || (printLevel >= 20000 && printLevel < 30000)) {
545 int parNumber = printLevel - 20000;
546 if (printLevel == 20)
548 if (printLevel == 30)
550 if (printLevel == 40)
555 if (printLevel == 100 || (printLevel >= 10000 && printLevel < 20000)) {
556 int parNumber = printLevel - 10000;
567 fMinimum = std::make_unique<ROOT::Minuit2::FunctionMinimum>(min);
602 if (debugLevel >= 3) {
604 std::span<const ROOT::Minuit2::MinimumState> iterationStates = min.
States();
605 std::cout <<
"Number of iterations " << iterationStates.size() << std::endl;
606 for (
unsigned int i = 0; i < iterationStates.size(); ++i) {
609 std::cout <<
"----------> Iteration " << i << std::endl;
610 int pr = std::cout.precision(12);
611 std::cout <<
" FVAL = " << st.
Fval() <<
" Edm = " << st.
Edm() <<
" Nfcn = " << st.
NFcn()
613 std::cout.precision(pr);
615 std::cout <<
" Error matrix change = " << st.
Error().
Dcovar() << std::endl;
617 std::cout <<
" Parameters : ";
619 for (
int j = 0; j < st.
size(); ++j)
620 std::cout <<
" p" << j <<
" = " <<
fState.Int2ext(j, st.
Vec()(j));
621 std::cout << std::endl;
631 txt =
"Covar is not pos def";
635 txt =
"Covar was made pos def";
639 txt =
"Hesse is not valid";
643 txt =
"Edm is above max";
647 txt =
"Reached call limit";
651 MnPrint print(
"Minuit2Minimizer::Minimize", debugLevel);
652 bool validMinimum = min.
IsValid();
656 if (
fStatus != 0 && debugLevel > 0)
662 txt =
"unknown failure";
665 print.
Warn(
"Minimization did NOT converge,", txt);
672 std::span<const MinuitParameter> paramsObj =
fState.MinuitParameters();
673 if (paramsObj.empty())
675 assert(
fDim == paramsObj.size());
679 for (
unsigned int i = 0; i <
fDim; ++i) {
680 fValues[i] = paramsObj[i].Value();
693 std::cout <<
"Minuit2Minimizer : Valid minimum - status = " <<
fStatus << std::endl;
694 int pr = std::cout.precision(18);
695 std::cout <<
"FVAL = " <<
fState.Fval() << std::endl;
696 std::cout <<
"Edm = " <<
fState.Edm() << std::endl;
697 std::cout.precision(pr);
698 std::cout <<
"Nfcn = " <<
fState.NFcn() << std::endl;
699 for (
unsigned int i = 0; i <
fState.MinuitParameters().
size(); ++i) {
701 std::cout << par.
Name() <<
"\t = " << par.
Value() <<
"\t ";
703 std::cout <<
"(fixed)" << std::endl;
705 std::cout <<
"(const)" << std::endl;
707 std::cout <<
"+/- " << par.
Error() <<
"\t(limited)" << std::endl;
709 std::cout <<
"+/- " << par.
Error() << std::endl;
712 std::cout <<
"Minuit2Minimizer : Invalid minimum - status = " <<
fStatus << std::endl;
713 std::cout <<
"FVAL = " <<
fState.Fval() << std::endl;
714 std::cout <<
"Edm = " <<
fState.Edm() << std::endl;
715 std::cout <<
"Nfcn = " <<
fState.NFcn() << std::endl;
722 std::span<const MinuitParameter> paramsObj =
fState.MinuitParameters();
723 if (paramsObj.empty())
725 assert(
fDim == paramsObj.size());
730 for (
unsigned int i = 0; i <
fDim; ++i) {
746 if (!
fState.HasCovariance())
748 if (
fState.Parameter(i).IsFixed() ||
fState.Parameter(i).IsConst())
750 if (
fState.Parameter(j).IsFixed() ||
fState.Parameter(j).IsConst())
752 unsigned int k =
fState.IntOfExt(i);
753 unsigned int l =
fState.IntOfExt(j);
754 return fState.Covariance()(k,
l);
760 if (!
fState.HasCovariance())
762 for (
unsigned int i = 0; i <
fDim; ++i) {
763 if (
fState.Parameter(i).IsFixed() ||
fState.Parameter(i).IsConst()) {
764 for (
unsigned int j = 0; j <
fDim; ++j) {
765 cov[i *
fDim + j] = 0;
768 unsigned int l =
fState.IntOfExt(i);
769 for (
unsigned int j = 0; j <
fDim; ++j) {
771 int k = i *
fDim + j;
772 if (
fState.Parameter(j).IsFixed() ||
fState.Parameter(j).IsConst())
777 unsigned int m =
fState.IntOfExt(j);
790 if (!
fState.HasCovariance())
792 for (
unsigned int i = 0; i <
fDim; ++i) {
793 if (
fState.Parameter(i).IsFixed() ||
fState.Parameter(i).IsConst()) {
794 for (
unsigned int j = 0; j <
fDim; ++j) {
795 hess[i *
fDim + j] = 0;
798 unsigned int l =
fState.IntOfExt(i);
799 for (
unsigned int j = 0; j <
fDim; ++j) {
801 int k = i *
fDim + j;
802 if (
fState.Parameter(j).IsFixed() ||
fState.Parameter(j).IsConst())
807 unsigned int m =
fState.IntOfExt(j);
822 if (!
fState.HasCovariance())
824 if (
fState.Parameter(i).IsFixed() ||
fState.Parameter(i).IsConst())
826 if (
fState.Parameter(j).IsFixed() ||
fState.Parameter(j).IsConst())
828 unsigned int k =
fState.IntOfExt(i);
829 unsigned int l =
fState.IntOfExt(j);
830 double cij =
fState.IntCovariance()(k,
l);
831 double tmp = std::sqrt(std::abs(
fState.IntCovariance()(k, k) *
fState.IntCovariance()(
l,
l)));
843 std::vector<double> out;
849 for (
unsigned int i = 0; i <
fDim; ++i) {
850 if (
fState.Parameter(i).IsFixed() ||
fState.Parameter(i).IsConst())
853 unsigned int k =
fState.IntOfExt(i);
872 if (
fState.Parameter(i).IsConst() ||
fState.Parameter(i).IsFixed()) {
885 print.
Error(
"Failed - no function minimum existing");
890 print.
Error(
"Failed - invalid function minimum");
903 if ((mstatus & 8) != 0) {
904 print.
Info([&](std::ostream &os) {
905 os <<
"Found a new minimum: run again the Minimization starting from the new point";
906 os <<
"\nFVAL = " <<
fState.Fval();
907 for (
auto &par :
fState.MinuitParameters()) {
908 os <<
'\n' << par.Name() <<
"\t = " << par.Value();
917 print.
Info(
"Run now again Minos from the new found Minimum");
927 bool isValid = ((mstatus & 1) == 0) && ((mstatus & 2) == 0);
934 bool runLower = runopt != 2;
935 bool runUpper = runopt != 1;
954 const char *par_name =
fState.Name(i);
959 tol = std::max(tol, 0.01);
962 int maxfcn_used = maxfcn;
963 if (maxfcn_used == 0) {
964 int nvar =
fState.VariableParameters();
965 maxfcn_used = 2 * (nvar + 1) * (200 + 100 * nvar + 5 * nvar * nvar);
969 if (debugLevel >= 1) {
970 std::cout <<
"************************************************************************************************"
972 std::cout <<
"Minuit2Minimizer::GetMinosError - Run MINOS LOWER error for parameter #" << i <<
" : "
973 << par_name <<
" using max-calls " << maxfcn_used <<
", tolerance " << tol << std::endl;
975 low = minos.
Loval(i, maxfcn, tol);
978 if (debugLevel >= 1) {
979 std::cout <<
"************************************************************************************************"
981 std::cout <<
"Minuit2Minimizer::GetMinosError - Run MINOS UPPER error for parameter #" << i <<
" : "
982 << par_name <<
" using max-calls " << maxfcn_used <<
", tolerance " << tol << std::endl;
984 up = minos.
Upval(i, maxfcn, tol);
1001 if (debugLevel > 0) {
1004 std::cout <<
"Minos: Invalid lower error for parameter " << par_name << std::endl;
1006 std::cout <<
"Minos: Parameter : " << par_name <<
" is at Lower limit; error is " << me.
Lower()
1009 std::cout <<
"Minos: Maximum number of function calls exceeded when running for lower error for parameter "
1010 << par_name << std::endl;
1012 std::cout <<
"Minos: New Minimum found while running Minos for lower error for parameter " << par_name
1016 std::cout <<
"Minos: Lower error for parameter " << par_name <<
" : " << me.
Lower() << std::endl;
1020 std::cout <<
"Minos: Invalid upper error for parameter " << par_name << std::endl;
1022 std::cout <<
"Minos: Parameter " << par_name <<
" is at Upper limit; error is " << me.
Upper() << std::endl;
1024 std::cout <<
"Minos: Maximum number of function calls exceeded when running for upper error for parameter "
1025 << par_name << std::endl;
1027 std::cout <<
"Minos: New Minimum found while running Minos for upper error for parameter " << par_name
1031 std::cout <<
"Minos: Upper error for parameter " << par_name <<
" : " << me.
Upper() << std::endl;
1036 bool lowerInvalid = (runLower && !me.
LowerValid());
1037 bool upperInvalid = (runUpper && !me.
UpperValid());
1040 print.
Warn(
"Invalid lower error for parameter",
fMinimum->UserState().Name(i));
1043 print.
Warn(
"Invalid upper error for parameter",
fMinimum->UserState().Name(i));
1047 print.
Warn(
"Lower error for parameter",
fMinimum->UserState().Name(i),
"is at the Lower limit!");
1050 print.
Warn(
"Upper error for parameter",
fMinimum->UserState().Name(i),
"is at the Upper limit!");
1054 if (lowerInvalid || upperInvalid) {
1080 errLow = me.
Lower();
1106 print.
Error(
"Function must be set before using Scan");
1110 if (ipar >
fState.MinuitParameters().size()) {
1111 print.
Error(
"Invalid number; minimizer variables must be set before using Scan");
1124 double amin = scan.
Fval();
1127 std::vector<std::pair<double, double>> result = scan(ipar, nstep - 1,
xmin,
xmax);
1130 if (prev_level > -2)
1134 if (result.size() != nstep) {
1135 print.
Error(
"Invalid result from MnParameterScan");
1139 std::sort(result.begin(), result.end());
1141 for (
unsigned int i = 0; i < nstep; ++i) {
1142 x[i] = result[i].first;
1143 y[i] = result[i].second;
1148 if (scan.
Fval() < amin) {
1149 print.
Info(
"A new minimum has been found");
1164 print.
Error(
"No function minimum existing; must minimize function before");
1169 print.
Error(
"Invalid function minimum");
1180 print.
Info(
"Computing contours at level -",
ErrorDef());
1194 if (prev_level > -2)
1199 std::vector<std::pair<double, double>> result = contour(ipar, jpar, npoints);
1200 if (result.size() != npoints) {
1201 print.
Error(
"Invalid result from MnContours");
1204 for (
unsigned int i = 0; i < npoints; ++i) {
1205 x[i] = result[i].first;
1206 y[i] = result[i].second;
1208 print.
Info([&](std::ostream &os) {
1209 os <<
" Computed " << npoints <<
" points at level " <<
ErrorDef();
1210 for (
unsigned int i = 0; i < npoints; i++) {
1211 if (i %5 == 0) os << std::endl;
1212 os <<
"( " <<
x[i] <<
", " <<
y[i] <<
") ";
1214 os << std::endl << std::endl;
1230 print.
Error(
"FCN function has not been set");
1235 print.
Info(
"Using max-calls", maxfcn);
1268 if (prev_level > -2)
1273 std::cout <<
"Minuit2Minimizer::Hesse - State returned from Hesse " << std::endl;
1274 std::cout <<
fState << std::endl;
1277 int covStatus =
fState.CovarianceStatus();
1278 std::string covStatusType =
"not valid";
1280 covStatusType =
"approximate";
1282 covStatusType =
"full but made positive defined";
1284 covStatusType =
"accurate";
1286 covStatusType =
"full but not positive defined";
1288 if (!
fState.HasCovariance()) {
1294 if (
fMinimum->Error().HesseFailed())
1296 if (
fMinimum->Error().InvertFailed())
1298 else if (!(
fMinimum->Error().IsPosDef()))
1302 print.
Warn(
"Hesse failed - matrix is", covStatusType);
1303 print.
Warn(hstatus);
1309 print.
Info(
"Hesse is valid - matrix is", covStatusType);
1327 else if (
fMinimum->HasMadePosDefCovar())
1329 else if (
fMinimum->HasValidCovariance())
1331 else if (
fMinimum->HasCovariance())
1336 return fState.CovarianceStatus();
1352 fMinimizer->Builder().SetStorageLevel(level);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
externInt_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
void Set(const std::string &name, double value, double step)
set value and name (unlimited parameter)
void SetLimits(double low, double up)
set a double side limit, if low == up the parameter is fixed if low > up the limits are removed The c...
void SetUpperLimit(double up)
set a single upper limit
void Fix()
fix the parameter
void SetLowerLimit(double low)
set a single lower limit
virtual bool HasGradient() const
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
Generic interface for defining configuration options of a numerical algorithm.
bool GetValue(const char *name, T &t) const
virtual void Print(std::ostream &=std::cout) const
print options
const IOptions * ExtraOptions() const
return extra options (NULL pointer if they are not present)
static ROOT::Math::IOptions * FindDefault(const char *name)
Find an extra options and return a nullptr if it is not existing.
double Tolerance() const
Absolute tolerance.
unsigned int MaxFunctionCalls() const
Max number of function calls.
double Precision() const
Precision of minimizer in the evaluation of the objective function.
int fStatus
status of minimizer
int Strategy() const
Strategy.
MinimizerOptions fOptions
minimizer options
bool IsValidError() const
int PrintLevel() const
Set print level.
Adapter class to wrap user-provided functions into the FCNBase interface.
void SetHessianFunction(std::function< bool(std::vector< double > const &, double *)> f)
Set the function providing the full Hessian matrix.
Instantiates the seed generator and Minimum builder for the Fumili minimization method.
void SetMethod(const std::string &method)
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const std::vector< MinimumState > & States() const
bool HasReachedCallLimit() const
bool HasMadePosDefCovar() const
bool IsAboveMaxEdm() const
bool HasPosDefCovar() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
bool HasParameters() const
const MinimumError & Error() const
const MnAlgebraicVector & Vec() const
bool HasCovariance() const
Class holding the result of Minos (lower and upper values) for a specific parameter.
bool AtUpperLimit() const
bool AtLowerMaxFcn() const
bool AtUpperMaxFcn() const
bool AtLowerLimit() const
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum &min)
examine the minimum result
Minuit2Minimizer(ROOT::Minuit2::EMinimizerType type=ROOT::Minuit2::kMigrad)
Default constructor.
void SetStorageLevel(int level)
set storage level = 1 : store all iteration states (default) = 0 : store only first and last state to...
std::vector< double > fValues
bool SetCovariance(std::span< const double > cov, unsigned int nrow) override
set initial covariance matrix
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 Contour(unsigned int i, unsigned int j, unsigned int &npoints, double *xi, double *xj) override
find the contour points (xi,xj) of the function for parameter i and j around the minimum The contour ...
virtual bool SetCovarianceDiag(std::span< const double > d2, unsigned int n) override
set initial second derivatives
bool IsFixedVariable(unsigned int ivar) const override
query if an existing variable is fixed (i.e.
bool SetVariableUpperLimit(unsigned int ivar, double upper) override
set the upper-limit of an already existing variable
bool SetVariableValues(const double *val) override
Set the values of all existing variables (array must be dimensioned to the size of the existing param...
bool SetVariable(unsigned int ivar, const std::string &name, double val, double step) override
set free variable
const double * Errors() const override
return errors at the minimum
void SetFunction(const ROOT::Math::IMultiGenFunction &func) override
set the function to minimize
bool SetVariableStepSize(unsigned int ivar, double step) override
set the step size of an already existing variable
bool GetCovMatrix(double *cov) const override
Fill the passed array with the covariance matrix elements if the variable is fixed or const the value...
bool ReleaseVariable(unsigned int ivar) override
release an existing variable
bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const override
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
bool Hesse() override
perform a full calculation of the Hessian matrix for error calculation If a valid minimum exists the ...
std::vector< double > fErrors
bool GetMinosError(unsigned int i, double &errLow, double &errUp, int=0) override
get the minos error for parameter i, return false if Minos failed A minimizaiton must be performed be...
std::string VariableName(unsigned int ivar) const override
get name of variables (override if minimizer support storing of variable names)
int RunMinosError(unsigned int i, double &errLow, double &errUp, int runopt)
bool SetVariableLimits(unsigned int ivar, double lower, double upper) override
set the limits of an already existing variable
double Correlation(unsigned int i, unsigned int j) const override
return correlation coefficient between variable i and j.
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 )
void SetTraceObject(MnTraceObject &obj)
set an object to trace operation for each iteration The object must be a (or inherit from) ROOT::Minu...
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const
double CovMatrix(unsigned int i, unsigned int j) const override
return covariance matrix elements if the variable is fixed or const the value is zero The ordering of...
void SetMinimizerType(ROOT::Minuit2::EMinimizerType type)
std::unique_ptr< ROOT::Minuit2::ModularFunctionMinimizer > fMinimizer
bool SetVariableValue(unsigned int ivar, double val) override
set variable
bool Scan(unsigned int i, unsigned int &nstep, double *x, double *y, double xmin=0, double xmax=0) override
scan a parameter i around the minimum.
int VariableIndex(const std::string &name) const override
get index of variable given a variable given a name return -1 if variable is not found
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 )
ROOT::Minuit2::MnUserParameterState fState
bool SetVariableLowerLimit(unsigned int ivar, double lower) override
set the lower-limit of an already existing variable
bool FixVariable(unsigned int ivar) override
fix an existing variable
void SetHessianFunction(std::function< bool(std::span< const double >, double *)> hfunc) override
set the function implementing Hessian computation
bool Minimize() override
method to perform the minimization.
bool SetFixedVariable(unsigned int, const std::string &, double) override
set fixed variable (override if minimizer supports them )
bool GetHessianMatrix(double *h) const override
Fill the passed array with the Hessian matrix elements The Hessian matrix is the matrix of the second...
void PrintResults() override
return reference to the objective function virtual const ROOT::Math::IGenFunction & Function() const;
void Clear() override
Reset for consecutive minimization - implement if needed.
~Minuit2Minimizer() override
Destructor (no operations).
std::vector< double > GlobalCC() const override
get global correlation coefficient for the variable i.
void SetFCN(unsigned int nDim, std::unique_ptr< ROOT::Minuit2::FCNBase > fcn)
To set the function directly to a Minuit 2 function.
int CovMatrixStatus() const override
return the status of the covariance matrix status = -1 : not available (inversion failed or Hesse fai...
std::unique_ptr< ROOT::Minuit2::FCNBase > fMinuitFCN
std::unique_ptr< ROOT::Minuit2::FunctionMinimum > fMinimum
class for the individual Minuit Parameter with Name and number; contains the input numbers for the mi...
double LowerLimit() const
double UpperLimit() const
const char * Name() const
bool HasLowerLimit() const
bool HasUpperLimit() const
API class for Contours Error analysis (2-dim errors); minimization has to be done before and Minimum ...
const MnUserParameterState & State() const
class for global correlation coefficient
const std::vector< double > & GlobalCC() const
API class for calculating the numerical covariance matrix (== 2x Inverse Hessian == 2x Inverse 2nd de...
API class for Minos Error analysis (asymmetric errors); minimization has to be done before and Minimu...
MnCross Loval(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
MnCross Upval(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
Scans the values of FCN as a function of one Parameter and retains the best function and Parameter va...
const MnUserParameters & Parameters() const
void Debug(const Ts &... args)
void Error(const Ts &... args)
void Info(const Ts &... args)
static int SetGlobalLevel(int level)
void Warn(const Ts &... args)
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
double HessianG2Tolerance() const
unsigned int HessianGradientNCycles() const
double GradientStepTolerance() const
void SetHessianNCycles(unsigned int n)
void SetHessianStepTolerance(double stp)
double GradientTolerance() const
void SetGradientTolerance(double toler)
double HessianStepTolerance() const
unsigned int HessianNCycles() const
unsigned int GradientNCycles() const
void SetGradientNCycles(unsigned int n)
void SetGradientStepTolerance(double stp)
void SetHessianGradientNCycles(unsigned int n)
void SetHessianG2Tolerance(double toler)
virtual void Init(const MnUserParameterState &state)
class which holds the external user and/or internal Minuit representation of the parameters and error...
double Value(unsigned int) const
virtual FunctionMinimum Minimize(const FCNBase &, const MnUserParameterState &, const MnStrategy &=MnStrategy{1}, unsigned int maxfcn=0, double toler=0.1) const
Mother of all ROOT objects.
IGradientFunctionMultiDim IMultiGradFunction
IMultiGenFunctionTempl< double > IMultiGenFunction
BasicFitMethodFunction< ROOT::Math::IMultiGenFunction > FitMethodFunction
BasicFitMethodFunction< ROOT::Math::IMultiGradFunction > FitMethodGradFunction
void RestoreGlobalPrintLevel(int)
int TurnOffPrintInfoLevel()