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
 
std::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 20 of file LocalTrajectoryError.h.

Constructor & Destructor Documentation

LocalTrajectoryError::LocalTrajectoryError ( )
inline

Definition at line 23 of file LocalTrajectoryError.h.

Referenced by LocalTrajectoryError().

23 {}
LocalTrajectoryError::LocalTrajectoryError ( InvalidError  )
inline

Definition at line 25 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

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

Definition at line 29 of file LocalTrajectoryError.h.

29 {}
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 PVValHelper::dx, PVValHelper::dy, and LocalTrajectoryError().

45  : theCovarianceMatrix(aCovarianceMatrix), theWeightMatrixPtr() {}
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
AlgebraicSymMatrix55 theCovarianceMatrix
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 5 of file LocalTrajectoryError.cc.

References PVValHelper::dx, PVValHelper::dy, and theCovarianceMatrix.

7  theCovarianceMatrix(3, 3) = dx * dx;
8  theCovarianceMatrix(4, 4) = dy * dy;
9  theCovarianceMatrix(1, 1) = dxdir * dxdir;
10  theCovarianceMatrix(2, 2) = dydir * dydir;
11  theCovarianceMatrix(0, 0) = dpinv * dpinv;
12 }
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
AlgebraicSymMatrix55 theCovarianceMatrix

Member Function Documentation

bool LocalTrajectoryError::invalid ( ) const
inline

Definition at line 31 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

Referenced by valid().

31 { return theCovarianceMatrix(0, 0) < -1.e10; }
AlgebraicSymMatrix55 theCovarianceMatrix
const AlgebraicSymMatrix55& LocalTrajectoryError::matrix ( void  ) const
inline

Returns the covariance matrix.

Definition at line 60 of file LocalTrajectoryError.h.

References theCovarianceMatrix, and weightMatrix().

Referenced by MuonResidualsFromTrack::addTrkCovMatrix(), OverlapValidation::analyze(), 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(), TSGForOI::match_Chi2(), TSGForOIFromL2::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(), and MaterialEffectsUpdator::updateStateInPlace().

60 { return theCovarianceMatrix; }
AlgebraicSymMatrix55 theCovarianceMatrix
LocalTrajectoryError& LocalTrajectoryError::operator*= ( double  factor)
inline

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

Definition at line 69 of file LocalTrajectoryError.h.

References DQMScaleToClient_cfi::factor, theCovarianceMatrix, and theWeightMatrixPtr.

69  {
71  if ((theWeightMatrixPtr.get() != nullptr) && (factor != 0.0)) {
72  (*theWeightMatrixPtr) /= factor;
73  }
74  return *this;
75  }
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
AlgebraicSymMatrix55 theCovarianceMatrix
bool LocalTrajectoryError::posDef ( ) const
inline

Definition at line 35 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

Referenced by KFTrajectoryFitter::fitOne(), and BasicTrajectoryState::notValid().

35  {
36  return (theCovarianceMatrix(0, 0) >= 0) && (theCovarianceMatrix(1, 1) >= 0) && (theCovarianceMatrix(2, 2) >= 0) &&
37  (theCovarianceMatrix(3, 3) >= 0) && (theCovarianceMatrix(4, 4) >= 0);
38  }
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 81 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

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

81  {
83  }
AlgebraicSymMatrix55 theCovarianceMatrix
bool LocalTrajectoryError::valid ( ) const
inline

Definition at line 32 of file LocalTrajectoryError.h.

References invalid().

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

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

Returns the inverse of covariance matrix.

Definition at line 14 of file LocalTrajectoryError.cc.

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

Referenced by matrix().

14  {
15  if
16  UNLIKELY(theWeightMatrixPtr.get() == nullptr) {
19  }
20  return *theWeightMatrixPtr;
21 }
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
AlgebraicSymMatrix55 theCovarianceMatrix
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
#define UNLIKELY(x)
Definition: Likely.h:21

Member Data Documentation

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

Definition at line 87 of file LocalTrajectoryError.h.

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