CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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)
 
 GlobalErrorBase (const AlgebraicSymMatrix33 &err)
 
 GlobalErrorBase (const AlgebraicSymMatrix44 &err)
 
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

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.

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

33 {}
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 {}
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  }
AlgebraicSymMatrix44 theCartesianError
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  }
AlgebraicSymMatrix44 theCartesianError
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  }
AlgebraicSymMatrix44 theCartesianError
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.

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

Definition at line 95 of file GlobalErrorBase.h.

95 {}

Member Function Documentation

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); }
AlgebraicSymMatrix44 theCartesianError
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); }
AlgebraicSymMatrix44 theCartesianError
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); }
AlgebraicSymMatrix44 theCartesianError
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); }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cxx ( ) const
inline
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cyx ( ) const
inline
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cyy ( ) const
inline
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czx ( ) const
inline
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czy ( ) const
inline
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::czz ( ) const
inline
template<class T, class ErrorWeightType>
const AlgebraicSymMatrix33 GlobalErrorBase< T, ErrorWeightType >::matrix ( void  ) const
inline

Access method to the matrix, /return The SymMatrix

Definition at line 121 of file GlobalErrorBase.h.

Referenced by GsfVertexWeightCalculator::calculate(), VertexDistanceXY::compatibility(), VertexDistance3D::compatibility(), BasicSingleVertexState::computeError(), BasicSingleVertexState::computeWeight(), VertexAnalysis::dist2D(), VertexDistanceXY::distance(), VertexDistance3D::distance(), BasicSingleVertexState::error(), CocoaDBMgr::GetAlignInfoErrorFromOptO(), reco::GhostTrackPrediction::init(), reco::GhostTrackState::lambdaError(), KalmanTrackToTrackCovCalculator< N >::operator()(), TemplatedSecondaryVertexProducer< IPTI, VTX >::SVBuilder::operator()(), KinematicVertex::operator==(), KalmanVertexUpdator< N >::positionUpdate(), Onia2MuMuPAT::produce(), PrimaryVertexProducer::produce(), KalmanVertexTrackUpdator< N >::trackRefit(), trackVertexCompat(), vertexAtState(), KVFHelper< N >::vertexChi2(), reco::GhostTrackVertexFinder::vertexCompat(), PrimaryVertexProducerAlgorithm::vertices(), vtxErrorLong(), and BasicSingleVertexState::weight().

121  {
123  out(0, 0) = theCartesianError(0, 0);
124  out(1, 0) = theCartesianError(1, 0);
125  out(1, 1) = theCartesianError(1, 1);
126  out(2, 0) = theCartesianError(2, 0);
127  out(2, 1) = theCartesianError(2, 1);
128  out(2, 2) = theCartesianError(2, 2);
129  return out;
130  }
AlgebraicSymMatrix44 theCartesianError
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
template<class T, class ErrorWeightType>
const AlgebraicSymMatrix44& GlobalErrorBase< T, ErrorWeightType >::matrix4D ( ) const
inline
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  {
162  }
AlgebraicSymMatrix44 theCartesianError
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  {
165  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::phierr ( const GlobalPoint aPoint) const
inline

Definition at line 149 of file GlobalErrorBase.h.

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

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  }
T y() const
Definition: PV3DBase.h:60
T perp2() const
Definition: PV3DBase.h:68
Basic2DVector< T > xy() const
long double T
T x() const
Definition: PV3DBase.h:59
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::rerr ( const GlobalPoint aPoint) const
inline

Definition at line 138 of file GlobalErrorBase.h.

Referenced by GEMEfficiencyAnalyzer::analyze(), BPHMonitor::analyze(), LeptonSkimming::filter(), TValidTrackingRecHit::globalState(), BaseTrackerRecHit::globalState(), CAHitTripletGenerator::hitNtuplets(), CAHitQuadrupletGenerator::hitNtuplets(), HLTmmkFilter::hltFilter(), HLTmmkkFilter::hltFilter(), and PixelFitterByConformalMappingAndLine::run().

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  }
T y() const
Definition: PV3DBase.h:60
T perp2() const
Definition: PV3DBase.h:68
Basic2DVector< T > xy() const
long double T
T x() const
Definition: PV3DBase.h:59

Member Data Documentation

template<class T, class ErrorWeightType>
AlgebraicSymMatrix44 GlobalErrorBase< T, ErrorWeightType >::theCartesianError
private