ROOT  6.06/09
Reference Guide
BasicMinimumError.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_BasicMinimumError
11 #define ROOT_Minuit2_BasicMinimumError
12 
13 #ifndef ROOT_Minuit2_MnConfig
14 #include "Minuit2/MnConfig.h"
15 #endif
16 #ifndef ROOT_Minuit2_MnMatrix
17 #include "Minuit2/MnMatrix.h"
18 #endif
19 #ifndef ROOT_Minuit2_LaSum
20 #include "Minuit2/LaSum.h"
21 #endif
22 #ifndef ROOT_Minuit2_StackAllocator
23 #include "Minuit2/StackAllocator.h"
24 #endif
25 
26 namespace ROOT {
27 
28  namespace Minuit2 {
29 
30 //extern StackAllocator gStackAllocator;
31 
32 /**
33  Internal Class containing the error information on the
34  estimated minimum :
35  Error matrix + dcovar + additional flags for quality and validity checks
36  */
37 
39 
40 public:
41 
42  class MnNotPosDef {};
43  class MnMadePosDef {};
44  class MnHesseFailed {};
45  class MnInvertFailed {};
46 
47 public:
48 
49  BasicMinimumError(unsigned int n) :
51 
52  BasicMinimumError(const MnAlgebraicSymMatrix& mat, double dcov) :
54 
57 
60 
63 
66 
68 
70 
72  fMatrix = err.fMatrix;
73  fDCovar = err.fDCovar;
74  fValid = err.fValid;
75  fPosDef = err.fPosDef;
79  fAvailable = err.fAvailable;
80  return *this;
81  }
82 
83  void* operator new(size_t nbytes) {
84  return StackAllocatorHolder::Get().Allocate(nbytes);
85  }
86 
87  void operator delete(void* p, size_t /*nbytes */) {
89  }
90 
91  MnAlgebraicSymMatrix Matrix() const {return 2.*fMatrix;}
92 
93  const MnAlgebraicSymMatrix& InvHessian() const {return fMatrix;}
94 
96 
97  double Dcovar() const {return fDCovar;}
98  bool IsAccurate() const {return fDCovar < 0.1;}
99  bool IsValid() const {return fValid;}
100  bool IsPosDef() const {return fPosDef;}
101  bool IsMadePosDef() const {return fMadePosDef;}
102  bool HesseFailed() const {return fHesseFailed;}
103  bool InvertFailed() const {return fInvertFailed;}
104  bool IsAvailable() const {return fAvailable;}
105 
106 private:
107 
109  double fDCovar;
110  bool fValid;
111  bool fPosDef;
116 };
117 
118  } // namespace Minuit2
119 
120 } // namespace ROOT
121 
122 #endif // ROOT_Minuit2_BasicMinimumError
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
MnAlgebraicSymMatrix Hessian() const
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
Internal Class containing the error information on the estimated minimum : Error matrix + dcovar + ad...
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
Definition: TIterator.cxx:20
MnAlgebraicSymMatrix Matrix() const
BasicMinimumError(const BasicMinimumError &e)
BasicMinimumError(const MnAlgebraicSymMatrix &mat, MnNotPosDef)
void * Allocate(size_t nBytes)
const MnAlgebraicSymMatrix & InvHessian() const
BasicMinimumError(const MnAlgebraicSymMatrix &mat, MnHesseFailed)
BasicMinimumError & operator=(const BasicMinimumError &err)
BasicMinimumError(const MnAlgebraicSymMatrix &mat, double dcov)
BasicMinimumError(const MnAlgebraicSymMatrix &mat, MnInvertFailed)
static StackAllocator & Get()
const Int_t n
Definition: legend1.C:16
BasicMinimumError(const MnAlgebraicSymMatrix &mat, MnMadePosDef)