36 maxfcn = 200 + 100 * npar + 5 * npar * npar;
42 double fval = fcn(
fState.Params());
43 print.
Info(
"Function has zero parameters - returning current function value - ",fval);
55 const std::vector<ROOT::Minuit2::MinimumState> &iterationStates = min.
States();
56 print.
Debug(
"State resulting from Migrad after", iterationStates.size(),
"iterations:",
fState);
58 print.
Debug([&](std::ostream &os) {
59 for (
unsigned int i = 0; i < iterationStates.size(); ++i) {
62 os <<
"\n----------> Iteration " << i <<
'\n';
63 int pr = os.precision(18);
64 os <<
" FVAL = " << st.
Fval() <<
" Edm = " << st.
Edm() <<
" Nfcn = " << st.
NFcn() <<
'\n';
66 os <<
" Error matrix change = " << st.
Error().
Dcovar() <<
'\n';
67 os <<
" Internal parameters : ";
68 for (
int j = 0; j < st.
size(); ++j)
69 os <<
" p" << j <<
" = " << st.
Vec()(j);
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
virtual double Up() const =0
Error definition of the function.
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const std::vector< MinimumState > & States() const
const MnUserParameterState & UserState() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
const MinimumError & Error() const
const MnAlgebraicVector & Vec() const
MnUserParameterState fState
virtual ModularFunctionMinimizer & Minimizer()=0
virtual FunctionMinimum operator()(unsigned int maxfcn=0, double tolerance=0.1)
Minimize the function.
virtual const FCNBase & Fcnbase() const
MnUserParameterState & State()
MnApplication(const FCNBase &fcn, const MnUserParameterState &state, const MnStrategy &stra, unsigned int nfcn=0)
constructor from non-gradient functions
void Debug(const Ts &... args)
void Info(const Ts &... args)
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
class which holds the external user and/or internal Minuit representation of the parameters and error...
unsigned int VariableParameters() const
virtual FunctionMinimum Minimize(const FCNBase &, const MnUserParameterState &, const MnStrategy &=MnStrategy{1}, unsigned int maxfcn=0, double toler=0.1) const