CMS 3D CMS Logo

LocalErrorBaseExtended.h
Go to the documentation of this file.
1 #ifndef DataFormats_GeometryCommonDetAlgo_LocalErrorBaseExtended_h
2 #define DataFormats_GeometryCommonDetAlgo_LocalErrorBaseExtended_h
3 
6 //
7 // Exceptions
8 //
10 
11 template <class T, class ErrorWeightType>
13 public:
15  class NullMatrix {};
16 
18 
19  LocalErrorBaseExtended(const NullMatrix&) {}
20 
22  theCartesianError[0][0] = -9999.e10f;
23  theCartesianError[0][1] = 0;
24  theCartesianError[1][1] = -9999.e10f;
25  theCartesianError[2][2] = -9999.e10f;
26  theCartesianError[1][2] = 0;
27  theCartesianError[1][3] = 0;
28  theCartesianError[2][3] = 0;
29  theCartesianError[3][3] = -9999.e10f;
30  }
31 
32  bool invalid() const { return theCartesianError[0][0] < -1.e10f; }
33  bool valid() const { return !invalid(); }
34 
39  LocalErrorBaseExtended(T c11, T c21, T c31, T c41, T c22, T c32, T c42, T c33, T c43, T c44) {
40  theCartesianError(0, 0) = c11;
41  theCartesianError(1, 0) = c21;
42  theCartesianError(2, 0) = c31;
43  theCartesianError(3, 0) = c41;
44 
45  theCartesianError(1, 1) = c22;
46  theCartesianError(2, 1) = c32;
47  theCartesianError(3, 1) = c42;
48 
49  theCartesianError(2, 2) = c33;
50  theCartesianError(3, 2) = c43;
51 
52  theCartesianError(3, 3) = c44;
53  }
54 
56 
58 
59  T cxx() const { return theCartesianError(0, 0); }
60 
61  T cyx() const { return theCartesianError(1, 0); }
62 
63  T cphixx() const { return theCartesianError(2, 0); }
64 
65  T cphiyx() const { return theCartesianError(3, 0); }
66 
67  T cyy() const { return theCartesianError(1, 1); }
68 
69  T cphixy() const { return theCartesianError(2, 1); }
70 
71  T cphiyy() const { return theCartesianError(3, 1); }
72 
73  T cphixphix() const { return theCartesianError(2, 2); }
74 
75  T cphiyphix() const { return theCartesianError(3, 2); }
76 
77  T cphiyphiy() const { return theCartesianError(3, 3); }
78 
83  const AlgebraicSymMatrix44& matrix() const { return theCartesianError; }
84 
86  return LocalErrorBaseExtended(theCartesianError + err.theCartesianError);
87  }
89  return LocalErrorBaseExtended(theCartesianError - err.theCartesianError);
90  }
91 
92 private:
94 };
95 
96 #endif
AlgebraicSymMatrix44 theCartesianError
LocalErrorBaseExtended operator+(const LocalErrorBaseExtended &err) const
const AlgebraicSymMatrix44 & matrix() 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
Tag to request a null error matrix.
LocalErrorBaseExtended operator-(const LocalErrorBaseExtended &err) const
long double T