CMS 3D CMS Logo

Public Member Functions | Private Attributes

LocalTrajectoryError Class Reference

#include <LocalTrajectoryError.h>

List of all members.

Public Member Functions

bool invalid () const
 LocalTrajectoryError ()
 LocalTrajectoryError (InvalidError)
 LocalTrajectoryError (float dx, float dy, float dxdir, float dydir, float dpinv)
 LocalTrajectoryError (const AlgebraicSymMatrix55 &aCovarianceMatrix)
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.

{}
LocalTrajectoryError::LocalTrajectoryError ( InvalidError  ) [inline]

Definition at line 25 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

{theCovarianceMatrix(0,0)=-99999.e10;}
LocalTrajectoryError::~LocalTrajectoryError ( ) [inline]

Definition at line 27 of file LocalTrajectoryError.h.

{}
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 43 of file LocalTrajectoryError.h.

                                                                     :
    theCovarianceMatrix(aCovarianceMatrix), 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.

                                   : theCovarianceMatrix(), theWeightMatrixPtr()
{
  theCovarianceMatrix(3,3) = dx*dx;
  theCovarianceMatrix(4,4) = dy*dy;
  theCovarianceMatrix(1,1) = dxdir*dxdir;
  theCovarianceMatrix(2,2) = dydir*dydir;
  theCovarianceMatrix(0,0) = dpinv*dpinv;
  
}

Member Function Documentation

bool LocalTrajectoryError::invalid ( ) const [inline]

Definition at line 29 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

Referenced by BasicTrajectoryState::localError(), and valid().

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

Returns the covariance matrix.

Definition at line 60 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

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

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

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

Definition at line 72 of file LocalTrajectoryError.h.

References theCovarianceMatrix, and theWeightMatrixPtr.

                                                     {
    theCovarianceMatrix *= factor;
    if ((theWeightMatrixPtr.get() != 0) && (factor != 0.0)) { (*theWeightMatrixPtr) /= factor; } 
    return *this;
  }
bool LocalTrajectoryError::posDef ( ) const [inline]

Definition at line 33 of file LocalTrajectoryError.h.

References theCovarianceMatrix.

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

References theCovarianceMatrix.

Referenced by CkfDebugger::analyseCompatibleMeasurements(), TkGluedMeasurementDet::checkHitProjection(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuRingForwardLayer::compatibleDets(), CaloDetIdAssociator::crossedElement(), Chi2Strip1DEstimator::estimate(), Chi2StripEstimator::estimate(), Chi2MeasurementEstimatorBase::estimate(), AlignmentMonitorMuonResiduals::event(), AlignmentMonitorGeneric::event(), RoadSearchTrackCandidateMakerAlgorithm::extrapolateTrajectory(), TkStripMeasurementDet::fastMeasurements(), TrackerValidationVariables::fillHitQuantities(), DualKalmanTrajectory::fillMeasurementAndError1(), DualKalmanTrajectory::fillMeasurementAndError2(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), TrackDetectorAssociator::getTAMuonChamberMatches(), TkPixelMeasurementDet::hasBadComponents(), ShallowGainCalibration::IsFarFromBorder(), DeDxDiscriminatorTools::IsFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), GlobalMuonTrackMatcher::match_dist(), BarrelMeasurementEstimator::maximalLocalDisplacement(), ForwardMeasurementEstimator::maximalLocalDisplacement(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), cms::HICSeedMeasurementEstimator::maximalLocalDisplacement(), MuonResidualsFromTrack::MuonResidualsFromTrack(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), ShallowTrackClustersProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TrajectorySeedProducer::produce(), RoadSearchTrackCandidateMakerAlgorithm::run(), TkGluedMeasurementDet::testStrips(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), SimpleNavigableLayer::wellInside(), and MuRodBarrelLayer::xError().

bool LocalTrajectoryError::valid ( ) const [inline]
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.


Member Data Documentation

boost::shared_ptr<AlgebraicSymMatrix55> LocalTrajectoryError::theWeightMatrixPtr [mutable, private]

Definition at line 89 of file LocalTrajectoryError.h.

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