Logo ROOT  
Reference Guide
MinimumError.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_MinimumError
11 #define ROOT_Minuit2_MinimumError
12 
14 
15 #include <memory>
16 
17 namespace ROOT {
18 
19 namespace Minuit2 {
20 
21 /** MinimumError keeps the inv. 2nd derivative (inv. Hessian) used for
22  calculating the Parameter step size (-V*g) and for the covariance Update
23  (ErrorUpdator). The covariance matrix is equal to twice the inv. Hessian.
24  */
25 
26 class MinimumError {
27 
28 public:
33 
34 public:
35  MinimumError(unsigned int n) : fData(std::make_shared<BasicMinimumError>(n)) {}
36 
37  MinimumError(const MnAlgebraicSymMatrix &mat, double dcov) : fData(std::make_shared<BasicMinimumError>(mat, dcov)) {}
38 
40  : fData(std::make_shared<BasicMinimumError>(mat, MnHesseFailed{}))
41  {
42  }
43 
45  : fData(std::make_shared<BasicMinimumError>(mat, MnMadePosDef{}))
46  {
47  }
48 
50  : fData(std::make_shared<BasicMinimumError>(mat, MnInvertFailed{}))
51  {
52  }
53 
55  : fData(std::make_shared<BasicMinimumError>(mat, MnNotPosDef{}))
56  {
57  }
58 
59  MnAlgebraicSymMatrix Matrix() const { return fData->Matrix(); }
60 
61  const MnAlgebraicSymMatrix &InvHessian() const { return fData->InvHessian(); }
62 
63  MnAlgebraicSymMatrix Hessian() const { return fData->Hessian(); }
64 
65  double Dcovar() const { return fData->Dcovar(); }
66  bool IsAccurate() const { return fData->IsAccurate(); }
67  bool IsValid() const { return fData->IsValid(); }
68  bool IsPosDef() const { return fData->IsPosDef(); }
69  bool IsMadePosDef() const { return fData->IsMadePosDef(); }
70  bool HesseFailed() const { return fData->HesseFailed(); }
71  bool InvertFailed() const { return fData->InvertFailed(); }
72  bool IsAvailable() const { return fData->IsAvailable(); }
73 
74 private:
75  std::shared_ptr<BasicMinimumError> fData;
76 };
77 
78 } // namespace Minuit2
79 
80 } // namespace ROOT
81 
82 #endif // ROOT_Minuit2_MinimumError
n
const Int_t n
Definition: legend1.C:16
ROOT::Minuit2::MinimumError::Hessian
MnAlgebraicSymMatrix Hessian() const
Definition: MinimumError.h:63
ROOT::Minuit2::BasicMinimumError::MnMadePosDef
Definition: BasicMinimumError.h:35
ROOT::Minuit2::MinimumError::fData
std::shared_ptr< BasicMinimumError > fData
Definition: MinimumError.h:75
ROOT::Minuit2::MinimumError::Matrix
MnAlgebraicSymMatrix Matrix() const
Definition: MinimumError.h:59
ROOT::Minuit2::LASymMatrix
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:45
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(unsigned int n)
Definition: MinimumError.h:35
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(const MnAlgebraicSymMatrix &mat, MnHesseFailed)
Definition: MinimumError.h:39
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(const MnAlgebraicSymMatrix &mat, double dcov)
Definition: MinimumError.h:37
ROOT::Minuit2::MinimumError::IsValid
bool IsValid() const
Definition: MinimumError.h:67
ROOT::Minuit2::BasicMinimumError::MnNotPosDef
Definition: BasicMinimumError.h:33
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(const MnAlgebraicSymMatrix &mat, MnNotPosDef)
Definition: MinimumError.h:54
ROOT::Minuit2::MinimumError::HesseFailed
bool HesseFailed() const
Definition: MinimumError.h:70
ROOT::Minuit2::MinimumError::Dcovar
double Dcovar() const
Definition: MinimumError.h:65
BasicMinimumError.h
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(const MnAlgebraicSymMatrix &mat, MnInvertFailed)
Definition: MinimumError.h:49
ROOT::Minuit2::MinimumError::InvertFailed
bool InvertFailed() const
Definition: MinimumError.h:71
ROOT::Minuit2::MinimumError
MinimumError keeps the inv.
Definition: MinimumError.h:26
ROOT::Minuit2::MinimumError::IsMadePosDef
bool IsMadePosDef() const
Definition: MinimumError.h:69
ROOT::Minuit2::MinimumError::MinimumError
MinimumError(const MnAlgebraicSymMatrix &mat, MnMadePosDef)
Definition: MinimumError.h:44
ROOT::Minuit2::BasicMinimumError::MnHesseFailed
Definition: BasicMinimumError.h:37
ROOT::Minuit2::BasicMinimumError::MnInvertFailed
Definition: BasicMinimumError.h:39
ROOT::Minuit2::MinimumError::InvHessian
const MnAlgebraicSymMatrix & InvHessian() const
Definition: MinimumError.h:61
ROOT::Minuit2::MinimumError::IsAvailable
bool IsAvailable() const
Definition: MinimumError.h:72
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Minuit2::MinimumError::IsPosDef
bool IsPosDef() const
Definition: MinimumError.h:68
ROOT::Minuit2::BasicMinimumError
Internal Class containing the error information on the estimated minimum : Error matrix + dcovar + ad...
Definition: BasicMinimumError.h:30
ROOT::Minuit2::MinimumError::IsAccurate
bool IsAccurate() const
Definition: MinimumError.h:66