10#ifndef ROOT_Minuit2_FunctionMinimum
11#define ROOT_Minuit2_FunctionMinimum
65 fPtr->fStates.push_back(state);
69 fPtr->fAboveMaxEdm = status == MnAboveMaxEdm;
70 fPtr->fReachedCallLimit = status == MnReachedCallLimit;
74 const std::vector<MinimumState> &
States()
const {
return fPtr->fStates; }
79 if (!fPtr->fUserState.IsValid())
81 return fPtr->fUserState;
91 double Fval()
const {
return States().back().Fval(); }
92 double Edm()
const {
return States().back().Edm(); }
93 int NFcn()
const {
return States().back().NFcn(); }
95 double Up()
const {
return fPtr->fErrorDef; }
96 bool IsValid()
const {
return State().IsValid() && !IsAboveMaxEdm() && !HasReachedCallLimit(); }
102 bool HesseFailed()
const {
return State().Error().HesseFailed(); }
104 bool IsAboveMaxEdm()
const {
return fPtr->fAboveMaxEdm || std::isnan(Edm()); }
109 fPtr->fErrorDef = up;
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const std::vector< MinimumState > & States() const
FunctionMinimum(const MinimumSeed &seed, const std::vector< MinimumState > &states, double up, Status status=MnValid)
Constructor at the end of a minimization from seed and vector of states.
void Add(const MinimumState &state, Status status=MnValid)
add latest minimization state (for example add Hesse result after Migrad)
const MinimumParameters & Parameters() const
const MinimumError & Error() const
const FunctionGradient & Grad() const
std::shared_ptr< Data > fPtr
bool HasAccurateCovar() const
bool HasReachedCallLimit() const
const MnUserParameterState & UserState() const
bool HasValidParameters() const
const MnUserCovariance & UserCovariance() const
const MinimumState & State() const
bool HasMadePosDefCovar() const
const MnUserParameters & UserParameters() const
FunctionMinimum(const MinimumSeed &seed, double up)
Constructor from only MinimumSeed. Minimum is only from seed result not the full minimization.
bool IsAboveMaxEdm() const
bool HasValidCovariance() const
bool HasPosDefCovar() const
bool HasCovariance() const
void SetErrorDef(double up)
const MinimumSeed & Seed() const
MinimumError keeps the inv.
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
class which holds the external user and/or internal Minuit representation of the parameters and error...
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
const std::vector< ROOT::Minuit2::MinuitParameter > & Parameters() const
access to parameters (row-wise)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
MnUserParameterState fUserState
std::vector< MinimumState > fStates