CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
GlobalErrorBase< T, ErrorWeightType > Class Template Reference

#include <GlobalErrorBase.h>

Classes

class  NullMatrix
 Tag to request a null error matrix. More...
 

Public Member Functions

T ctt () const
 
T ctx () const
 
T cty () const
 
T ctz () const
 
T cxx () const
 
T cyx () const
 
T cyy () const
 
T czx () const
 
T czy () const
 
T czz () const
 
 GlobalErrorBase ()
 
 GlobalErrorBase (const AlgebraicSymMatrix33 &err)
 
 GlobalErrorBase (const AlgebraicSymMatrix44 &err)
 
 GlobalErrorBase (const NullMatrix &)
 
 GlobalErrorBase (T c11, T c21, T c22, T c31, T c32, T c33)
 
 GlobalErrorBase (T c11, T c21, T c22, T c31, T c32, T c33, T c41, T c42, T c43, T c44)
 
const AlgebraicSymMatrix33 matrix () const
 
const AlgebraicSymMatrix44matrix4D () const
 
GlobalErrorBase operator+ (const GlobalErrorBase &err) const
 
GlobalErrorBase operator- (const GlobalErrorBase &err) const
 
T phierr (const GlobalPoint &aPoint) const
 
T rerr (const GlobalPoint &aPoint) const
 
 ~GlobalErrorBase ()
 

Private Attributes

AlgebraicSymMatrix44 theCartesianError
 

Detailed Description

template<class T, class ErrorWeightType>
class GlobalErrorBase< T, ErrorWeightType >

Templated class representing a symmetric 3*3 matrix describing, according to the ErrorWeightType tag, a (cartesian) covariance matrix or the weight matrix (the inverse of the covariance matrix).

The typedefs should be used in the code.

Definition at line 25 of file GlobalErrorBase.h.

Constructor & Destructor Documentation

◆ GlobalErrorBase() [1/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( )
inline

Default constructor, creating a null 3*3 matrix (all values are 0)

Definition at line 33 of file GlobalErrorBase.h.

33 {}

Referenced by GlobalErrorBase< double, ErrorMatrixTag >::operator+(), and GlobalErrorBase< double, ErrorMatrixTag >::operator-().

◆ GlobalErrorBase() [2/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( const NullMatrix )
inline

Obsolete Constructor that allocates a null GlobalErrorBase (it does not create the error matrix at all)

Definition at line 38 of file GlobalErrorBase.h.

38 {}

◆ GlobalErrorBase() [3/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( T  c11,
T  c21,
T  c22,
T  c31,
T  c32,
T  c33 
)
inline

Constructor. The symmetric matrix stored as a lower triangular matrix

Definition at line 44 of file GlobalErrorBase.h.

44  {
45  theCartesianError(0, 0) = c11;
46  theCartesianError(1, 0) = c21;
47  theCartesianError(1, 1) = c22;
48  theCartesianError(2, 0) = c31;
49  theCartesianError(2, 1) = c32;
50  theCartesianError(2, 2) = c33;
51  theCartesianError(3, 0) = 0.;
52  theCartesianError(3, 1) = 0.;
53  theCartesianError(3, 2) = 0.;
54  theCartesianError(3, 3) = 0.;
55  }

◆ GlobalErrorBase() [4/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( T  c11,
T  c21,
T  c22,
T  c31,
T  c32,
T  c33,
T  c41,
T  c42,
T  c43,
T  c44 
)
inline

Constructor. The symmetric matrix stored as a lower triangular matrix (4D)

Definition at line 61 of file GlobalErrorBase.h.

61  {
62  theCartesianError(0, 0) = c11;
63  theCartesianError(1, 0) = c21;
64  theCartesianError(1, 1) = c22;
65  theCartesianError(2, 0) = c31;
66  theCartesianError(2, 1) = c32;
67  theCartesianError(2, 2) = c33;
68  theCartesianError(3, 0) = c41;
69  theCartesianError(3, 1) = c42;
70  theCartesianError(3, 2) = c43;
71  theCartesianError(3, 3) = c44;
72  }

◆ GlobalErrorBase() [5/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( const AlgebraicSymMatrix33 err)
inline

Constructor from SymMatrix. The original matrix has to be a 3*3 matrix.

Definition at line 77 of file GlobalErrorBase.h.

77  {
78  theCartesianError(0, 0) = err(0, 0);
79  theCartesianError(1, 0) = err(1, 0);
80  theCartesianError(1, 1) = err(1, 1);
81  theCartesianError(2, 0) = err(2, 0);
82  theCartesianError(2, 1) = err(2, 1);
83  theCartesianError(2, 2) = err(2, 2);
84  theCartesianError(3, 0) = 0.;
85  theCartesianError(3, 1) = 0.;
86  theCartesianError(3, 2) = 0.;
87  theCartesianError(3, 3) = 0.;
88  }

◆ GlobalErrorBase() [6/6]

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::GlobalErrorBase ( const AlgebraicSymMatrix44 err)
inline

Constructor from SymMatrix. The original matrix has to be a 4*4 matrix.

Definition at line 93 of file GlobalErrorBase.h.

◆ ~GlobalErrorBase()

template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::~GlobalErrorBase ( )
inline

Definition at line 95 of file GlobalErrorBase.h.

95 {}

Member Function Documentation

◆ ctt()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::ctt ( ) const
inline

Definition at line 115 of file GlobalErrorBase.h.

115 { return theCartesianError(3, 3); }

◆ ctx()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::ctx ( ) const
inline

Definition at line 109 of file GlobalErrorBase.h.

109 { return theCartesianError(3, 0); }

◆ cty()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cty ( ) const
inline

Definition at line 111 of file GlobalErrorBase.h.

111 { return theCartesianError(3, 1); }

◆ ctz()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::ctz ( ) const
inline

Definition at line 113 of file GlobalErrorBase.h.

113 { return theCartesianError(3, 2); }

◆ cxx()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cxx ( ) const
inline

◆ cyx()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cyx ( ) const
inline

◆ cyy()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cyy ( ) const
inline

◆ czx()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czx ( ) const
inline

◆ czy()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czy ( ) const
inline

◆ czz()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czz ( ) const
inline

◆ matrix()

template<class T, class ErrorWeightType>
const AlgebraicSymMatrix33 GlobalErrorBase< T, ErrorWeightType >::matrix ( void  ) const
inline

◆ matrix4D()

template<class T, class ErrorWeightType>
const AlgebraicSymMatrix44& GlobalErrorBase< T, ErrorWeightType >::matrix4D ( ) const
inline

◆ operator+()

template<class T, class ErrorWeightType>
GlobalErrorBase GlobalErrorBase< T, ErrorWeightType >::operator+ ( const GlobalErrorBase< T, ErrorWeightType > &  err) const
inline

Definition at line 160 of file GlobalErrorBase.h.

160  {
161  return GlobalErrorBase(theCartesianError + err.theCartesianError);
162  }

◆ operator-()

template<class T, class ErrorWeightType>
GlobalErrorBase GlobalErrorBase< T, ErrorWeightType >::operator- ( const GlobalErrorBase< T, ErrorWeightType > &  err) const
inline

Definition at line 163 of file GlobalErrorBase.h.

163  {
164  return GlobalErrorBase(theCartesianError - err.theCartesianError);
165  }

◆ phierr()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::phierr ( const GlobalPoint aPoint) const
inline

Definition at line 149 of file GlobalErrorBase.h.

149  {
150  T r2 = aPoint.perp2();
151  T x2 = aPoint.x() * aPoint.x();
152  T y2 = aPoint.y() * aPoint.y();
153  T xy = aPoint.x() * aPoint.y();
154  if (r2 != 0)
155  return std::max<T>(0, (1. / (r2 * r2)) * (y2 * cxx() - 2. * xy * cyx() + x2 * cyy()));
156  else
157  return 0;
158  }

Referenced by GEMEfficiencyAnalyzer::analyze(), TValidTrackingRecHit::globalState(), BaseTrackerRecHit::globalState(), and GlobalTrackQualityProducer::kink().

◆ rerr()

template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::rerr ( const GlobalPoint aPoint) const
inline

Definition at line 138 of file GlobalErrorBase.h.

138  {
139  T r2 = aPoint.perp2();
140  T x2 = aPoint.x() * aPoint.x();
141  T y2 = aPoint.y() * aPoint.y();
142  T xy = aPoint.x() * aPoint.y();
143  if (r2 != 0)
144  return std::max<T>(0, (1. / r2) * (x2 * cxx() + 2. * xy * cyx() + y2 * cyy()));
145  else
146  return 0.5 * (cxx() + cyy());
147  }

Referenced by GEMEfficiencyAnalyzer::analyze(), BPHMonitor::analyze(), TValidTrackingRecHit::globalState(), and BaseTrackerRecHit::globalState().

Member Data Documentation

◆ theCartesianError

template<class T, class ErrorWeightType>
AlgebraicSymMatrix44 GlobalErrorBase< T, ErrorWeightType >::theCartesianError
private
GlobalErrorBase::theCartesianError
AlgebraicSymMatrix44 theCartesianError
Definition: GlobalErrorBase.h:168
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition: AlgebraicROOTObjects.h:21
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
GlobalErrorBase::cyy
T cyy() const
Definition: GlobalErrorBase.h:101
GlobalErrorBase::GlobalErrorBase
GlobalErrorBase()
Definition: GlobalErrorBase.h:33
GlobalErrorBase::cxx
T cxx() const
Definition: GlobalErrorBase.h:97
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
GlobalErrorBase::cyx
T cyx() const
Definition: GlobalErrorBase.h:99
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
T
long double T
Definition: Basic3DVectorLD.h:48
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PV3DBase::perp2
T perp2() const
Definition: PV3DBase.h:68