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 
88  }
91  }
92 
93 private:
95 };
96 
97 #endif
AlgebraicSymMatrix44 theCartesianError
LocalErrorBaseExtended operator+(const LocalErrorBaseExtended &err) const
LocalErrorBaseExtended(const AlgebraicSymMatrix44 &err)
LocalErrorBaseExtended(const NullMatrix &)
LocalErrorBaseExtended(T c11, T c21, T c31, T c41, T c22, T c32, T c42, T c33, T c43, T c44)
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
LocalErrorBaseExtended operator-(const LocalErrorBaseExtended &err) const
const AlgebraicSymMatrix44 & matrix() const
Tag to request a null error matrix.
long double T