Logo ROOT   6.16/01
Reference Guide
FunctionMinimum.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_FunctionMinimum
11#define ROOT_Minuit2_FunctionMinimum
12
14
15#ifdef G__DICTIONARY
16typedef ROOT::Minuit2::MinimumState MinimumState;
17#endif
18
19namespace ROOT {
20
21 namespace Minuit2 {
22
23//______________________________________________________________________________________________
24/**
25 class holding the full result of the minimization;
26 both internal and external (MnUserParameterState) representation available
27 for the parameters at the Minimum
28 */
29
31
32public:
33
35 class MnAboveMaxEdm {};
36
37public:
38
39
40 /// constructor from only MinimumSeed. Minimum is only from seed result not full minimization
42
43 /// constructor at the end of a successfull minimization from seed and vector of states
44 FunctionMinimum(const MinimumSeed& seed, const std::vector<MinimumState>& states, double up) : fData(MnRefCountedPointer<BasicFunctionMinimum>(new BasicFunctionMinimum(seed, states, up))) {}
45
46 /// constructor at the end of a failed minimization due to exceeding function call limit
47 FunctionMinimum(const MinimumSeed& seed, const std::vector<MinimumState>& states, double up, MnReachedCallLimit) : fData(MnRefCountedPointer<BasicFunctionMinimum>(new BasicFunctionMinimum(seed, states, up, BasicFunctionMinimum::MnReachedCallLimit()))) {}
48
49 /// constructor at the end of a failed minimization due to edm above maximum value
50 FunctionMinimum(const MinimumSeed& seed, const std::vector<MinimumState>& states, double up, MnAboveMaxEdm) : fData(MnRefCountedPointer<BasicFunctionMinimum>(new BasicFunctionMinimum(seed, states, up, BasicFunctionMinimum::MnAboveMaxEdm()))) {}
51
52 /// copy constructo
54
56 fData = min.fData;
57 return *this;
58 }
59
61
62 // add new state
63 void Add(const MinimumState& state) {fData->Add(state);}
64
65 // add new state
67
68 const MinimumSeed& Seed() const {return fData->Seed();}
69 const std::vector<ROOT::Minuit2::MinimumState>& States() const {return fData->States();}
70
71// user representation of state at Minimum
73 return fData->UserState();
74 }
76 return fData->UserParameters();
77 }
79 return fData->UserCovariance();
80 }
81
82// forward interface of last state
83 const MinimumState& State() const {return fData->State();}
84 const MinimumParameters& Parameters() const {return fData->Parameters();}
85 const MinimumError& Error() const {return fData->Error();}
86 const FunctionGradient& Grad() const {return fData->Grad();}
87 double Fval() const {return fData->Fval();}
88 double Edm() const {return fData->Edm();}
89 int NFcn() const {return fData->NFcn();}
90
91 double Up() const {return fData->Up();}
92 bool IsValid() const {return fData->IsValid();}
93 bool HasValidParameters() const {return fData->HasValidParameters();}
94 bool HasValidCovariance() const {return fData->HasValidCovariance();}
95 bool HasAccurateCovar() const {return fData->HasAccurateCovar();}
96 bool HasPosDefCovar() const {return fData->HasPosDefCovar();}
97 bool HasMadePosDefCovar() const {return fData->HasMadePosDefCovar();}
98 bool HesseFailed() const {return fData->HesseFailed();}
99 bool HasCovariance() const {return fData->HasCovariance();}
100 bool IsAboveMaxEdm() const {return fData->IsAboveMaxEdm();}
101 bool HasReachedCallLimit() const {return fData->HasReachedCallLimit();}
102
103 void SetErrorDef( double up) { return fData->SetErrorDef(up);}
104
105private:
106
108};
109
110 } // namespace Minuit2
111
112} // namespace ROOT
113
114#endif // ROOT_Minuit2_FunctionMinimum
result of the minimization; both internal and external (MnUserParameterState) representation availabl...
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
FunctionMinimum(const MinimumSeed &seed, const std::vector< MinimumState > &states, double up)
constructor at the end of a successfull minimization from seed and vector of states
void Add(const MinimumState &state)
const MinimumParameters & Parameters() const
const std::vector< ROOT::Minuit2::MinimumState > & States() const
const MinimumError & Error() const
const FunctionGradient & Grad() const
void Add(const MinimumState &state, MnAboveMaxEdm)
const MnUserParameterState & UserState() const
FunctionMinimum(const MinimumSeed &seed, const std::vector< MinimumState > &states, double up, MnAboveMaxEdm)
constructor at the end of a failed minimization due to edm above maximum value
const MnUserCovariance & UserCovariance() const
const MinimumState & State() const
FunctionMinimum(const FunctionMinimum &min)
copy constructo
const MnUserParameters & UserParameters() const
FunctionMinimum(const MinimumSeed &seed, double up)
constructor from only MinimumSeed. Minimum is only from seed result not full minimization
MnRefCountedPointer< BasicFunctionMinimum > fData
FunctionMinimum(const MinimumSeed &seed, const std::vector< MinimumState > &states, double up, MnReachedCallLimit)
constructor at the end of a failed minimization due to exceeding function call limit
FunctionMinimum & operator=(const FunctionMinimum &min)
const MinimumSeed & Seed() const
MinimumError keeps the inv.
Definition: MinimumError.h:26
MinimumSeed contains the starting values for the minimization produced by the SeedGenerator.
Definition: MinimumSeed.h:31
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
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...
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21