Logo ROOT   6.14/05
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
16 typedef ROOT::Minuit2::MinimumState MinimumState;
17 #endif
18 
19 namespace 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 
32 public:
33 
35  class MnAboveMaxEdm {};
36 
37 public:
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 
105 private:
106 
108 };
109 
110  } // namespace Minuit2
111 
112 } // namespace ROOT
113 
114 #endif // ROOT_Minuit2_FunctionMinimum
void Add(const MinimumState &state)
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
const FunctionGradient & Grad() const
MinimumSeed contains the starting values for the minimization produced by the SeedGenerator.
Definition: MinimumSeed.h:31
const MnUserCovariance & UserCovariance() const
void Add(const MinimumState &state, MnAboveMaxEdm)
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 ...
FunctionMinimum & operator=(const FunctionMinimum &min)
MnRefCountedPointer< BasicFunctionMinimum > fData
FunctionMinimum(const MinimumSeed &seed, double up)
constructor from only MinimumSeed. Minimum is only from seed result not full minimization ...
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const MinimumParameters & Parameters() const
const MinimumState & State() const
result of the minimization; both internal and external (MnUserParameterState) representation availabl...
const std::vector< ROOT::Minuit2::MinimumState > & States() const
const MnUserParameters & UserParameters() const
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 MinimumSeed & Seed() 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
MinimumError keeps the inv.
Definition: MinimumError.h:26
FunctionMinimum(const FunctionMinimum &min)
copy constructo
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 ...
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
const MnUserParameterState & UserState() const
const MinimumError & Error() const
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...