54 double edm = seed.
State().Edm();
59 print.
Warn(
"Initial matrix not pos.def.");
63 std::vector<MinimumState>
result;
90 print.
Warn(
"FunctionMinimum is invalid");
99 print.
Debug(
"Approximate Edm", edm,
"npass",
ipass);
103 print.
Debug(
"FumiliBuilder will verify convergence and Error matrix; "
105 min.Error().Dcovar());
116 print.
Info(
"After Hessian");
123 print.
Debug(
"Edm", edm,
"State",
st);
127 print.
Warn(
"Stop iterations, no improvements after Hesse; current Edm", edm,
"previous value",
edmprev);
131 print.
Debug(
"Tolerance not sufficient, continue minimization; Edm", edm,
"Requested",
edmval);
135 if (min.IsAboveMaxEdm()) {
200 MnPrint print(
"FumiliBuilder");
211 double lambda = 0.001;
218 step = -1. *
s0.Error().InvHessian() *
s0.Gradient().Vec();
220 print.
Debug(
"Iteration -",
result.size(),
"\n Fval",
s0.Fval(),
"numOfCall",
fcn.NumOfCalls(),
221 "\n Internal Parameter values",
s0.Vec(),
"\n Newton step", step);
225 print.
Warn(
"Matrix not pos.def, gdel =",
gdel,
" > 0");
229 step = -1. *
s0.Error().InvHessian() *
s0.Gradient().Vec();
232 print.
Warn(
"After correction, gdel =",
gdel);
257 if (
p.Fval() >=
s0.Fval()) {
261 if (std::fabs(pp.
Y() -
s0.Fval()) <
prec.Eps()) {
268 print.
Debug(
"Before Gradient - NCalls = ",
fcn.NumOfCalls());
272 print.
Debug(
"After Gradient - NCalls = ",
fcn.NumOfCalls());
281 print.
Debug(
"Updated new point:",
"\n FVAL ",
p.Fval(),
"\n Parameter",
p.Vec(),
"\n Gradient",
g.Vec(),
282 "\n InvHessian",
e.InvHessian(),
"\n Hessian",
e.Hessian(),
"\n Edm", edm);
285 print.
Warn(
"Matrix not pos.def., Edm < 0");
299 if (
p.Fval() <
s0.Fval())
309 print.
Debug(
"finish iteration -",
result.size(),
"lambda =", lambda,
"f1 =",
p.Fval(),
"f0 =",
s0.Fval(),
310 "num of calls =",
fcn.NumOfCalls(),
"edm =", edm);
318 edm *= (1. + 3. *
e.Dcovar());
323 print.
Warn(
"Call limit exceeded");
329 if (edm < std::fabs(
prec.Eps2() *
result.back().Fval())) {
330 print.
Warn(
"Machine accuracy limits further improvement");
333 }
else if (edm < 10 *
edmval) {
337 print.
Warn(
"No convergence; Edm", edm,
"is above tolerance", 10 *
edmval);
344 print.
Debug(
"Exiting successfully",
"Ncalls",
fcn.NumOfCalls(),
"FCN",
result.back().Fval(),
"Edm", edm,
"Requested",
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
FunctionMinimum Minimum(const MnFcn &fMnFcn, const GradientCalculator &fGradienCalculator, const MinimumSeed &fMinimumSeed, const MnStrategy &fMnStrategy, unsigned int maxfcn, double edmval) const override
Class the member function calculating the Minimum and verifies the result depending on the strategy.
const FumiliErrorUpdator & ErrorUpdator() const
Accessor to the Error updator of the builder.
const VariableMetricEDMEstimator & Estimator() const
Accessor to the EDM (expected vertical distance to the Minimum) estimator.
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
interface class for gradient calculators
void TraceIteration(int iter, const MinimumState &state) const
MinimumError keeps the inv.
const MinimumParameters & Parameters() const
const MnMachinePrecision & Precision() const
const MinimumState & State() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Wrapper class to FCNBase interface used internally by Minuit.
API class for calculating the numerical covariance matrix (== 2x Inverse Hessian == 2x Inverse 2nd de...
Implements a 1-dimensional minimization along a given direction (i.e.
Sets the relative floating point (double) arithmetic precision.
double Y() const
Accessor to the y (second) coordinate.
double X() const
Accessor to the x (first) coordinate.
Force the covariance matrix to be positive defined by adding extra terms in the diagonal.
void Debug(const Ts &... args)
void Info(const Ts &... args)
void Warn(const Ts &... args)
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
double inner_product(const LAVector &, const LAVector &)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...