CMS 3D CMS Logo

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< AlgebraicSymMatrix55theWeightMatrixPtr
 

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.

Referenced by LocalTrajectoryError().

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.

References LocalTrajectoryError().

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

Returns the covariance matrix.

Definition at line 61 of file LocalTrajectoryError.h.

References theCovarianceMatrix, and weightMatrix().

Referenced by MuonResidualsFromTrack::addTrkCovMatrix(), GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), SiTrackerMultiRecHitUpdator::calcParameters(), BasicTrajectoryState::checkCurvilinError(), CollinearFitAtTM2::CollinearFitAtTM2(), TrajectoryStateCombiner::combine(), MultipleScatteringUpdator::compute(), GsfTrackProducerBase::computeModeAtTM(), PFGsfHelper::computeQpMode(), SiTrackerMultiRecHitUpdator::ComputeWeight(), ReferenceTrajectory::construct(), GlobalTrackerMuonAlignment::debugTrajectorySOS(), GlobalTrackerMuonAlignment::debugTrajectorySOSv(), MRHChi2MeasurementEstimator::estimate(), CollinearFitAtTM::fit(), MuonKinkFinder::getChi2(), MatcherUsingTracksAlgorithm::getChi2(), GsfTrackProducerBase::localParametersFromQpMode(), GlobalMuonTrackMatcher::match_Chi2(), SeedMatcher::matchSimTrack(), MeasurementExtractor::measuredError(), BasicTrajectoryState::missingError(), GlobalTrackerMuonAlignment::muonFitter(), BasicTrajectoryState::notValid(), oldMUcompute(), operator<<(), TRecHit5DParamConstraint::parametersError(), trajectoryStateTransform::persistentState(), StraightLinePropagator::propagatedState(), TrackAssociatorByPositionImpl::quality(), NuclearInteractionFinder::rescaleError(), BasicTrajectoryState::rescaleError(), TrajectorySegmentBuilder::segments(), CRackTrajectoryBuilder::SortHits(), sqr(), FastTSGFromPropagation::stateOnDet(), ChargeSignificanceTrajectoryFilter::TBC(), CkfDebugger::testSeed(), GlobalTrackerMuonAlignment::trackFitter(), DualTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), Strip1DMeasurementTransformator::trajectoryError(), Tsos2DPhi::Tsos2DPhi(), Tsos2DZed::Tsos2DZed(), Tsos4D::Tsos4D(), GsfMaterialEffectsUpdator::updateState(), VolumeMaterialEffectsUpdator::updateState(), and MaterialEffectsUpdator::updateStateInPlace().

61  {
62  return theCovarianceMatrix;
63  }
AlgebraicSymMatrix55 theCovarianceMatrix
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 theCovarianceMatrix, and theWeightMatrixPtr.

73  {
74  theCovarianceMatrix *= factor;
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.

Referenced by BasicTrajectoryState::notValid().

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

Returns the two-by-two submatrix of the covariance matrix which yields the local position errors as well as the correlation between them.

Definition at line 83 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

Referenced by CkfDebugger::analyseCompatibleMeasurements(), TkGluedMeasurementDet::checkHitProjection(), ForwardDetLayer::compatible(), MuRingForwardDoubleLayer::compatible(), MuRingForwardLayer::compatibleDets(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), Chi2Strip1DEstimator::estimate(), Chi2MeasurementEstimatorBase::estimate(), AlignmentMonitorMuonResiduals::event(), AlignmentMonitorGeneric::event(), TrackerValidationVariables::fillHitQuantities(), ApeEstimator::fillHitVariables(), TrackDetectorAssociator::getTAMuonChamberMatches(), TkPixelMeasurementDet::hasBadComponents(), DeDxTools::IsFarFromBorder(), ShallowGainCalibration::IsFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), TRecHit5DParamConstraint::localPositionError(), GlobalMuonTrackMatcher::match_dist(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), ForwardMeasurementEstimator::maximalLocalDisplacement(), BarrelMeasurementEstimator::maximalLocalDisplacement(), TkPixelMeasurementDet::measurements(), TkStripMeasurementDet::measurements(), MuonResidualsFromTrack::MuonResidualsFromTrack(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), ShallowTrackClustersProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TkGluedMeasurementDet::testStrips(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), SimpleNavigableLayer::wellInside(), and MuRodBarrelLayer::xError().

83  {
85  theCovarianceMatrix(4,4));
86  }
AlgebraicSymMatrix55 theCovarianceMatrix
bool LocalTrajectoryError::valid ( ) const
inline

Definition at line 31 of file LocalTrajectoryError.h.

References invalid().

Referenced by BasicTrajectoryState::missingError(), and BasicTrajectoryState::rescaleError().

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.

Referenced by matrix().

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().