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 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 26 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 36 of file GlobalErrorBase.h.

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

36 {}
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 41 of file GlobalErrorBase.h.

41 {}
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 48 of file GlobalErrorBase.h.

48  {
49  theCartesianError(0,0)=c11;
50  theCartesianError(1,0)=c21;
51  theCartesianError(1,1)=c22;
52  theCartesianError(2,0)=c31;
53  theCartesianError(2,1)=c32;
54  theCartesianError(2,2)=c33;
55  theCartesianError(3,0) = 0.;
56  theCartesianError(3,1) = 0.;
57  theCartesianError(3,2) = 0.;
58  theCartesianError(3,3) = 0.;
59  }
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 65 of file GlobalErrorBase.h.

65  {
66  theCartesianError(0,0)=c11;
67  theCartesianError(1,0)=c21;
68  theCartesianError(1,1)=c22;
69  theCartesianError(2,0)=c31;
70  theCartesianError(2,1)=c32;
71  theCartesianError(2,2)=c33;
72  theCartesianError(3,0)=c41;
73  theCartesianError(3,1)=c42;
74  theCartesianError(3,2)=c43;
75  theCartesianError(3,3)=c44;
76  }
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 81 of file GlobalErrorBase.h.

81  {
82  theCartesianError(0,0) = err(0,0);
83  theCartesianError(1,0) = err(1,0);
84  theCartesianError(1,1) = err(1,1);
85  theCartesianError(2,0) = err(2,0);
86  theCartesianError(2,1) = err(2,1);
87  theCartesianError(2,2) = err(2,2);
88  theCartesianError(3,0) = 0.;
89  theCartesianError(3,1) = 0.;
90  theCartesianError(3,2) = 0.;
91  theCartesianError(3,3) = 0.;
92  }
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 97 of file GlobalErrorBase.h.

97  :
98  theCartesianError(err) { }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::~GlobalErrorBase ( )
inline

Definition at line 101 of file GlobalErrorBase.h.

101 {}

Member Function Documentation

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

Definition at line 139 of file GlobalErrorBase.h.

139  {
140  return theCartesianError(3,3);
141  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::ctx ( ) const
inline

Definition at line 127 of file GlobalErrorBase.h.

127  {
128  return theCartesianError(3,0);
129  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::cty ( ) const
inline

Definition at line 131 of file GlobalErrorBase.h.

131  {
132  return theCartesianError(3,1);
133  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::ctz ( ) const
inline

Definition at line 135 of file GlobalErrorBase.h.

135  {
136  return theCartesianError(3,2);
137  }
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 147 of file GlobalErrorBase.h.

Referenced by BPHCompositeVertexSelect::accept(), BPHFittedVertexSelect::accept(), GsfVertexWeightCalculator::calculate(), VertexDistance3D::compatibility(), VertexDistanceXY::compatibility(), BasicSingleVertexState::computeError(), BasicSingleVertexState::computeWeight(), VertexDistance3D::distance(), VertexDistanceXY::distance(), BasicSingleVertexState::error(), HIPTwoBodyDecayAnalyzer::fitDimuonVertex(), CocoaDBMgr::GetAlignInfoErrorFromOptO(), reco::GhostTrackPrediction::init(), reco::GhostTrackState::lambdaError(), KinematicVertex::operator reco::Vertex(), 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().

147  {
149  out(0,0) = theCartesianError(0,0);
150  out(1,0) = theCartesianError(1,0);
151  out(1,1) = theCartesianError(1,1);
152  out(2,0) = theCartesianError(2,0);
153  out(2,1) = theCartesianError(2,1);
154  out(2,2) = theCartesianError(2,2);
155  return out;
156  }
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 188 of file GlobalErrorBase.h.

188  {
190  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
GlobalErrorBase GlobalErrorBase< T, ErrorWeightType >::operator- ( const GlobalErrorBase< T, ErrorWeightType > &  err) const
inline

Definition at line 191 of file GlobalErrorBase.h.

191  {
193  }
AlgebraicSymMatrix44 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::phierr ( const GlobalPoint aPoint) const
inline

Definition at line 177 of file GlobalErrorBase.h.

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

177  {
178  T r2 = aPoint.perp2();
179  T x2 = aPoint.x()*aPoint.x();
180  T y2 = aPoint.y()*aPoint.y();
181  T xy = aPoint.x()*aPoint.y();
182  if (r2 != 0)
183  return std::max<T>(0, (1./(r2*r2))*(y2*cxx() - 2.*xy*cyx() + x2*cyy()));
184  else
185  return 0;
186  }
T y() const
Definition: PV3DBase.h:63
T perp2() const
Definition: PV3DBase.h:71
long double T
T x() const
Definition: PV3DBase.h:62
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::rerr ( const GlobalPoint aPoint) const
inline

Definition at line 166 of file GlobalErrorBase.h.

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

166  {
167  T r2 = aPoint.perp2();
168  T x2 = aPoint.x()*aPoint.x();
169  T y2 = aPoint.y()*aPoint.y();
170  T xy = aPoint.x()*aPoint.y();
171  if(r2 != 0)
172  return std::max<T>(0, (1./r2)*(x2*cxx() + 2.*xy*cyx() + y2*cyy()));
173  else
174  return 0.5*(cxx() + cyy());
175  }
T y() const
Definition: PV3DBase.h:63
T perp2() const
Definition: PV3DBase.h:71
long double T
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

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