#include <LocalTrajectoryError.h>
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 AlgebraicSymMatrix55 & | matrix () const |
LocalTrajectoryError & | operator*= (double factor) |
bool | posDef () const |
LocalError | positionError () const |
bool | valid () const |
const AlgebraicSymMatrix55 & | weightMatrix () const |
~LocalTrajectoryError () | |
Private Attributes | |
AlgebraicSymMatrix55 | theCovarianceMatrix |
boost::shared_ptr < AlgebraicSymMatrix55 > | theWeightMatrixPtr |
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.
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; }
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(), GsfTrackProducerBase::computeModeAtTM(), PFGsfHelper::computeQpMode(), ReferenceTrajectory::construct(), GlobalTrackerMuonAlignment::debugTrajectorySOS(), GlobalTrackerMuonAlignment::debugTrajectorySOSv(), 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(), 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(), 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(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuRingForwardLayer::compatibleDets(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), Chi2MeasurementEstimatorBase::estimate(), AlignmentMonitorMuonResiduals::event(), AlignmentMonitorGeneric::event(), TrackerValidationVariables::fillHitQuantities(), TrackDetectorAssociator::getTAMuonChamberMatches(), TkPixelMeasurementDet::hasBadComponents(), ShallowGainCalibration::IsFarFromBorder(), DeDxDiscriminatorTools::IsFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), GlobalMuonTrackMatcher::match_dist(), BarrelMeasurementEstimator::maximalLocalDisplacement(), ForwardMeasurementEstimator::maximalLocalDisplacement(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), MuonResidualsFromTrack::MuonResidualsFromTrack(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), ShallowTrackClustersProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TrajectorySeedProducer::produce(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), SimpleNavigableLayer::wellInside(), and MuRodBarrelLayer::xError().
{ return LocalError( theCovarianceMatrix(3,3),theCovarianceMatrix(3,4), theCovarianceMatrix(4,4)); }
bool LocalTrajectoryError::valid | ( | ) | const [inline] |
Definition at line 30 of file LocalTrajectoryError.h.
References invalid().
Referenced by BasicTrajectoryState::hasError(), BasicTrajectoryState::missingError(), and BasicTrajectoryState::rescaleError().
{ 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.
{ if unlikely(theWeightMatrixPtr.get() == 0) { theWeightMatrixPtr.reset(new AlgebraicSymMatrix55()); invertPosDefMatrix(theCovarianceMatrix,*theWeightMatrixPtr); } return *theWeightMatrixPtr; }
Definition at line 88 of file LocalTrajectoryError.h.
Referenced by invalid(), LocalTrajectoryError(), matrix(), operator*=(), posDef(), positionError(), and weightMatrix().
boost::shared_ptr<AlgebraicSymMatrix55> LocalTrajectoryError::theWeightMatrixPtr [mutable, private] |
Definition at line 89 of file LocalTrajectoryError.h.
Referenced by operator*=(), and weightMatrix().