CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
LocalTrajectoryError Class Reference

#include <LocalTrajectoryError.h>

Public Member Functions

bool invalid () const
 
 LocalTrajectoryError ()
 
 LocalTrajectoryError (InvalidError)
 
 LocalTrajectoryError (const AlgebraicSymMatrix55 &aCovarianceMatrix)
 
 LocalTrajectoryError (float dx, float dy, float dxdir, float dydir, float dpinv)
 
const AlgebraicSymMatrix55matrix () const
 
LocalTrajectoryErroroperator*= (double factor)
 
bool posDef () const
 
LocalError positionError () const
 
bool valid () const
 
const AlgebraicSymMatrix55weightMatrix () const
 
 ~LocalTrajectoryError ()
 

Private Attributes

AlgebraicSymMatrix55 theCovarianceMatrix
 
boost::shared_ptr
< AlgebraicSymMatrix55
theWeightMatrixPtr
 

Detailed Description

Class providing access to the covariance matrix of a set of relevant parameters of a trajectory in a local, Cartesian frame. The errors provided are:

sigma^2(q/p) : charge (plus or minus one) divided by magnitude of momentum
sigma^2(dxdz) : direction tangent in local xz-plane
sigma^2(dydz) : direction tangent in local yz-plane
sigma^2(x) : local x-coordinate
sigma^2(y) : local y-coordinate

plus the relevant correlation terms.

Definition at line 21 of file LocalTrajectoryError.h.

Constructor & Destructor Documentation

LocalTrajectoryError::LocalTrajectoryError ( )
inline

Definition at line 24 of file LocalTrajectoryError.h.

24 {}
LocalTrajectoryError::LocalTrajectoryError ( InvalidError  )
inline

Definition at line 26 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

26 : theCovarianceMatrix(ROOT::Math::SMatrixNoInit()) {theCovarianceMatrix(0,0)=-99999.e10;}
AlgebraicSymMatrix55 theCovarianceMatrix
LocalTrajectoryError::~LocalTrajectoryError ( )
inline

Definition at line 28 of file LocalTrajectoryError.h.

28 {}
LocalTrajectoryError::LocalTrajectoryError ( const AlgebraicSymMatrix55 aCovarianceMatrix)
inline

Constructing class from a full covariance matrix. The sequence of the parameters is the same as the one described above.

Definition at line 44 of file LocalTrajectoryError.h.

44  :
45  theCovarianceMatrix(aCovarianceMatrix), theWeightMatrixPtr() { }
AlgebraicSymMatrix55 theCovarianceMatrix
boost::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
LocalTrajectoryError::LocalTrajectoryError ( float  dx,
float  dy,
float  dxdir,
float  dydir,
float  dpinv 
)

Constructing class from standard deviations of the individual parameters, making the covariance matrix diagonal. The sequence of the input parameters is sigma(x), sigma(y), sigma(dxdz), sigma(dydz), sigma(q/p), but the resulting covariance matrix has the same structure as the one described above.

Definition at line 7 of file LocalTrajectoryError.cc.

References theCovarianceMatrix.

9 {
10  theCovarianceMatrix(3,3) = dx*dx;
11  theCovarianceMatrix(4,4) = dy*dy;
12  theCovarianceMatrix(1,1) = dxdir*dxdir;
13  theCovarianceMatrix(2,2) = dydir*dydir;
14  theCovarianceMatrix(0,0) = dpinv*dpinv;
15 
16 }
AlgebraicSymMatrix55 theCovarianceMatrix
boost::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr

Member Function Documentation

bool LocalTrajectoryError::invalid ( ) const
inline

Definition at line 30 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

Referenced by valid().

30 { return theCovarianceMatrix(0,0)<-1.e10;}
AlgebraicSymMatrix55 theCovarianceMatrix
const AlgebraicSymMatrix55& LocalTrajectoryError::matrix ( void  ) const
inline
LocalTrajectoryError& LocalTrajectoryError::operator*= ( double  factor)
inline

Enables the multiplication of the covariance matrix with the scalar "factor".

Definition at line 73 of file LocalTrajectoryError.h.

References V0MonitoringClient_cfi::factor, theCovarianceMatrix, and theWeightMatrixPtr.

73  {
75  if ((theWeightMatrixPtr.get() != 0) && (factor != 0.0)) { (*theWeightMatrixPtr) /= factor; }
76  return *this;
77  }
AlgebraicSymMatrix55 theCovarianceMatrix
boost::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
bool LocalTrajectoryError::posDef ( ) const
inline

Definition at line 34 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

34  {
35  return (theCovarianceMatrix(0,0)>=0) && (theCovarianceMatrix(1,1)>=0) &&
36  (theCovarianceMatrix(2,2)>=0) && (theCovarianceMatrix(3,3)>=0) && (theCovarianceMatrix(4,4)>=0);
37  }
AlgebraicSymMatrix55 theCovarianceMatrix
LocalError LocalTrajectoryError::positionError ( ) const
inline
bool LocalTrajectoryError::valid ( ) const
inline

Definition at line 31 of file LocalTrajectoryError.h.

References invalid().

31 { return !invalid();}
const AlgebraicSymMatrix55 & LocalTrajectoryError::weightMatrix ( void  ) const

Returns the inverse of covariance matrix.

Definition at line 18 of file LocalTrajectoryError.cc.

References invertPosDefMatrix(), theCovarianceMatrix, theWeightMatrixPtr, and unlikely.

18  {
19  if unlikely(theWeightMatrixPtr.get() == 0) {
22  }
23  return *theWeightMatrixPtr;
24 }
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
#define unlikely(x)
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
AlgebraicSymMatrix55 theCovarianceMatrix
boost::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr

Member Data Documentation

AlgebraicSymMatrix55 LocalTrajectoryError::theCovarianceMatrix
private
boost::shared_ptr<AlgebraicSymMatrix55> LocalTrajectoryError::theWeightMatrixPtr
mutableprivate

Definition at line 90 of file LocalTrajectoryError.h.

Referenced by operator*=(), and weightMatrix().