CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

GlobalErrorBase< T, ErrorWeightType > Class Template Reference

#include <GlobalErrorBase.h>

List of all members.

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 (const AlgebraicSymMatrix33 &err)
 GlobalErrorBase (const NullMatrix &)
 GlobalErrorBase (T c11, T c21, T c22, T c31, T c32, T c33)
 GlobalErrorBase ()
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-().

{}
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.

{}
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.

                                                            {
    theCartesianError(0,0)=c11;
    theCartesianError(1,0)=c21;
    theCartesianError(1,1)=c22;
    theCartesianError(2,0)=c31;
    theCartesianError(2,1)=c32;
    theCartesianError(2,2)=c33;
  }
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.

                                                      : 
      theCartesianError(err) { }
template<class T, class ErrorWeightType>
GlobalErrorBase< T, ErrorWeightType >::~GlobalErrorBase ( ) [inline]

Definition at line 63 of file GlobalErrorBase.h.

{}

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.

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.

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 GlobalTrackQualityProducer::kink(), and TransientTrackingRecHit::setPositionErrors().

                                            {
    T r2 = aPoint.perp2();
    T x2 = aPoint.x()*aPoint.x();
    T y2 = aPoint.y()*aPoint.y();
    T xy = aPoint.x()*aPoint.y();
    if (r2 != 0) 
      return std::max<T>(0, (1./(r2*r2))*(y2*cxx() - 2.*xy*cyx() + x2*cyy()));
    else
      return 0;
  }
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 HLTmmkFilter::hltFilter(), HLTmmkkFilter::hltFilter(), PixelFitterByConformalMappingAndLine::run(), and TransientTrackingRecHit::setPositionErrors().

                                          {
    T r2 = aPoint.perp2();
    T x2 = aPoint.x()*aPoint.x();
    T y2 = aPoint.y()*aPoint.y();
    T xy = aPoint.x()*aPoint.y();
    if(r2 != 0) 
      return std::max<T>(0, (1./r2)*(x2*cxx() + 2.*xy*cyx() + y2*cyy()));
    else 
      return 0.5*(cxx() + cyy());  
  }

Member Data Documentation

template<class T, class ErrorWeightType>
AlgebraicSymMatrix33 GlobalErrorBase< T, ErrorWeightType >::theCartesianError [private]