CMS 3D CMS Logo

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

AlgebraicSymMatrix33 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  }
AlgebraicSymMatrix33 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 60 of file GlobalErrorBase.h.

60  :
61  theCartesianError(err) { }
AlgebraicSymMatrix33 theCartesianError
template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::~GlobalErrorBase ( )
inline

Definition at line 63 of file GlobalErrorBase.h.

63 {}

Member Function Documentation

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
template<class T, class ErrorWeightType>
const AlgebraicSymMatrix33& GlobalErrorBase< T, ErrorWeightType >::matrix_new ( ) const
inline
template<class T, class ErrorWeightType>
GlobalErrorBase GlobalErrorBase< T, ErrorWeightType >::operator+ ( const GlobalErrorBase< T, ErrorWeightType > &  err) const
inline

Definition at line 123 of file GlobalErrorBase.h.

123  {
125  }
AlgebraicSymMatrix33 theCartesianError
template<class T, class ErrorWeightType>
GlobalErrorBase GlobalErrorBase< T, ErrorWeightType >::operator- ( const GlobalErrorBase< T, ErrorWeightType > &  err) const
inline

Definition at line 126 of file GlobalErrorBase.h.

126  {
128  }
AlgebraicSymMatrix33 theCartesianError
template<class T, class ErrorWeightType>
T GlobalErrorBase< T, ErrorWeightType >::phierr ( const GlobalPoint aPoint) const
inline

Definition at line 112 of file GlobalErrorBase.h.

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

112  {
113  T r2 = aPoint.perp2();
114  T x2 = aPoint.x()*aPoint.x();
115  T y2 = aPoint.y()*aPoint.y();
116  T xy = aPoint.x()*aPoint.y();
117  if (r2 != 0)
118  return std::max<T>(0, (1./(r2*r2))*(y2*cxx() - 2.*xy*cyx() + x2*cyy()));
119  else
120  return 0;
121  }
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 101 of file GlobalErrorBase.h.

Referenced by TValidTrackingRecHit::globalState(), HLTmmkkFilter::hltFilter(), HLTmmkFilter::hltFilter(), and PixelFitterByConformalMappingAndLine::run().

101  {
102  T r2 = aPoint.perp2();
103  T x2 = aPoint.x()*aPoint.x();
104  T y2 = aPoint.y()*aPoint.y();
105  T xy = aPoint.x()*aPoint.y();
106  if(r2 != 0)
107  return std::max<T>(0, (1./r2)*(x2*cxx() + 2.*xy*cyx() + y2*cyy()));
108  else
109  return 0.5*(cxx() + cyy());
110  }
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>
AlgebraicSymMatrix33 GlobalErrorBase< T, ErrorWeightType >::theCartesianError
private