CMS 3D CMS Logo

LocalErrorBaseExtended.h
Go to the documentation of this file.
1 #ifndef LocalErrorType_H
2 #define LocalErrorType_H
3 
7 //
8 // Exceptions
9 //
11 
12 template <class T, class ErrorWeightType>
14 public:
16  class NullMatrix {};
17 
19 
20  LocalErrorBaseExtended(const NullMatrix&) {}
21 
23  theCartesianError[0][0] = -9999.e10f;
24  theCartesianError[0][1] = 0;
25  theCartesianError[1][1] = -9999.e10f;
26  theCartesianError[2][2] = -9999.e10f;
27  theCartesianError[1][2] = 0;
28  theCartesianError[1][3] = 0;
29  theCartesianError[2][3] = 0;
30  theCartesianError[3][3] = -9999.e10f;
31  }
32 
33  bool invalid() const { return theCartesianError[0][0] < -1.e10f; }
34  bool valid() const { return !invalid(); }
35 
40  LocalErrorBaseExtended(T c11, T c21, T c31, T c41, T c22, T c32, T c42, T c33, T c43, T c44) {
41  theCartesianError(0, 0) = c11;
42  theCartesianError(1, 0) = c21;
43  theCartesianError(2, 0) = c31;
44  theCartesianError(3, 0) = c41;
45 
46  theCartesianError(1, 1) = c22;
47  theCartesianError(2, 1) = c32;
48  theCartesianError(3, 1) = c42;
49 
50  theCartesianError(2, 2) = c33;
51  theCartesianError(3, 2) = c43;
52 
53  theCartesianError(3, 3) = c44;
54  }
55 
57 
59 
60  T cxx() const { return theCartesianError(0, 0); }
61 
62  T cyx() const { return theCartesianError(1, 0); }
63 
64  T cphixx() const { return theCartesianError(2, 0); }
65 
66  T cphiyx() const { return theCartesianError(3, 0); }
67 
68  T cyy() const { return theCartesianError(1, 1); }
69 
70  T cphixy() const { return theCartesianError(2, 1); }
71 
72  T cphiyy() const { return theCartesianError(3, 1); }
73 
74  T cphixphix() const { return theCartesianError(2, 2); }
75 
76  T cphiyphix() const { return theCartesianError(3, 2); }
77 
78  T cphiyphiy() const { return theCartesianError(3, 3); }
79 
84  const AlgebraicSymMatrix44& matrix() const { return theCartesianError; }
85 
87  return LocalErrorBaseExtended(theCartesianError + err.theCartesianError);
88  }
90  return LocalErrorBaseExtended(theCartesianError - err.theCartesianError);
91  }
92 
93 private:
95 };
96 
97 #endif
LocalErrorBaseExtended::NullMatrix
Tag to request a null error matrix.
Definition: LocalErrorBaseExtended.h:16
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(const NullMatrix &)
Definition: LocalErrorBaseExtended.h:20
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended()
Definition: LocalErrorBaseExtended.h:18
LocalErrorBaseExtended::cphixy
T cphixy() const
Definition: LocalErrorBaseExtended.h:70
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(T c11, T c21, T c31, T c41, T c22, T c32, T c42, T c33, T c43, T c44)
Definition: LocalErrorBaseExtended.h:40
TrivialError.h
LocalErrorBaseExtended::theCartesianError
AlgebraicSymMatrix44 theCartesianError
Definition: LocalErrorBaseExtended.h:94
LocalErrorBaseExtended::cphixphix
T cphixphix() const
Definition: LocalErrorBaseExtended.h:74
LocalErrorBaseExtended::matrix
const AlgebraicSymMatrix44 & matrix() const
Definition: LocalErrorBaseExtended.h:84
LocalErrorBaseExtended::cphiyphiy
T cphiyphiy() const
Definition: LocalErrorBaseExtended.h:78
LocalErrorBaseExtended::operator-
LocalErrorBaseExtended operator-(const LocalErrorBaseExtended &err) const
Definition: LocalErrorBaseExtended.h:89
LocalErrorBaseExtended::cphiyphix
T cphiyphix() const
Definition: LocalErrorBaseExtended.h:76
runTheMatrix.err
err
Definition: runTheMatrix.py:288
LocalErrorBaseExtended::cphiyx
T cphiyx() const
Definition: LocalErrorBaseExtended.h:66
LocalErrorBaseExtended::operator+
LocalErrorBaseExtended operator+(const LocalErrorBaseExtended &err) const
Definition: LocalErrorBaseExtended.h:86
LocalErrorBaseExtended::cphixx
T cphixx() const
Definition: LocalErrorBaseExtended.h:64
LocalErrorBaseExtended
Definition: LocalErrorBaseExtended.h:13
AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
Definition: AlgebraicROOTObjects.h:22
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(InvalidError)
Definition: LocalErrorBaseExtended.h:22
LocalErrorBaseExtended::invalid
bool invalid() const
Definition: LocalErrorBaseExtended.h:33
T
long double T
Definition: Basic3DVectorLD.h:48
LocalErrorBaseExtended::~LocalErrorBaseExtended
~LocalErrorBaseExtended()
Definition: LocalErrorBaseExtended.h:58
LocalErrorBaseExtended::cphiyy
T cphiyy() const
Definition: LocalErrorBaseExtended.h:72
LocalErrorBaseExtended::cyx
T cyx() const
Definition: LocalErrorBaseExtended.h:62
LocalErrorBaseExtended::cyy
T cyy() const
Definition: LocalErrorBaseExtended.h:68
Exception.h
DeepCopyPointer.h
LocalErrorBaseExtended::valid
bool valid() const
Definition: LocalErrorBaseExtended.h:34
AlgebraicROOTObjects.h
LocalErrorBaseExtended::cxx
T cxx() const
Definition: LocalErrorBaseExtended.h:60
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(const AlgebraicSymMatrix44 &err)
Definition: LocalErrorBaseExtended.h:56
InvalidError
Definition: TrivialError.h:8