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
LocalErrorBaseExtended::NullMatrix
Tag to request a null error matrix.
Definition: LocalErrorBaseExtended.h:15
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(const NullMatrix &)
Definition: LocalErrorBaseExtended.h:19
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended()
Definition: LocalErrorBaseExtended.h:17
LocalErrorBaseExtended::cphixy
T cphixy() const
Definition: LocalErrorBaseExtended.h:69
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:39
TrivialError.h
LocalErrorBaseExtended::theCartesianError
AlgebraicSymMatrix44 theCartesianError
Definition: LocalErrorBaseExtended.h:93
LocalErrorBaseExtended::cphixphix
T cphixphix() const
Definition: LocalErrorBaseExtended.h:73
LocalErrorBaseExtended::matrix
const AlgebraicSymMatrix44 & matrix() const
Definition: LocalErrorBaseExtended.h:83
LocalErrorBaseExtended::cphiyphiy
T cphiyphiy() const
Definition: LocalErrorBaseExtended.h:77
LocalErrorBaseExtended::operator-
LocalErrorBaseExtended operator-(const LocalErrorBaseExtended &err) const
Definition: LocalErrorBaseExtended.h:88
LocalErrorBaseExtended::cphiyphix
T cphiyphix() const
Definition: LocalErrorBaseExtended.h:75
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
LocalErrorBaseExtended::cphiyx
T cphiyx() const
Definition: LocalErrorBaseExtended.h:65
LocalErrorBaseExtended::operator+
LocalErrorBaseExtended operator+(const LocalErrorBaseExtended &err) const
Definition: LocalErrorBaseExtended.h:85
LocalErrorBaseExtended::cphixx
T cphixx() const
Definition: LocalErrorBaseExtended.h:63
LocalErrorBaseExtended
Definition: LocalErrorBaseExtended.h:12
AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
Definition: AlgebraicROOTObjects.h:22
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(InvalidError)
Definition: LocalErrorBaseExtended.h:21
LocalErrorBaseExtended::invalid
bool invalid() const
Definition: LocalErrorBaseExtended.h:32
T
long double T
Definition: Basic3DVectorLD.h:48
LocalErrorBaseExtended::~LocalErrorBaseExtended
~LocalErrorBaseExtended()
Definition: LocalErrorBaseExtended.h:57
LocalErrorBaseExtended::cphiyy
T cphiyy() const
Definition: LocalErrorBaseExtended.h:71
LocalErrorBaseExtended::cyx
T cyx() const
Definition: LocalErrorBaseExtended.h:61
LocalErrorBaseExtended::cyy
T cyy() const
Definition: LocalErrorBaseExtended.h:67
Exception.h
LocalErrorBaseExtended::valid
bool valid() const
Definition: LocalErrorBaseExtended.h:33
AlgebraicROOTObjects.h
LocalErrorBaseExtended::cxx
T cxx() const
Definition: LocalErrorBaseExtended.h:59
LocalErrorBaseExtended::LocalErrorBaseExtended
LocalErrorBaseExtended(const AlgebraicSymMatrix44 &err)
Definition: LocalErrorBaseExtended.h:55
InvalidError
Definition: TrivialError.h:8