#include <FreeTrajectoryState.h>
A 6-dimensional state vector of a helix given at some point in space along the helix, and the associated error matrix. The error can be obtained in two different parametrizations: CurvilinearTrajectoryError and CartesianTrajectoryError (see descriptions of corresponding classes). The FreeTrajectoryState can be instantiated with either of these error parametrisations; it converts from one to the other internally.
Definition at line 31 of file FreeTrajectoryState.h.
FreeTrajectoryState::FreeTrajectoryState | ( | ) | [inline] |
Definition at line 36 of file FreeTrajectoryState.h.
: theCurvilinearError(InvalidError()) {}
FreeTrajectoryState::FreeTrajectoryState | ( | const GlobalTrajectoryParameters & | aGlobalParameters | ) | [inline] |
Definition at line 39 of file FreeTrajectoryState.h.
: theGlobalParameters(aGlobalParameters), theCurvilinearError(InvalidError()) {}
FreeTrajectoryState::FreeTrajectoryState | ( | const GlobalPoint & | aX, |
const GlobalVector & | aP, | ||
TrackCharge | aCharge, | ||
const MagneticField * | fieldProvider | ||
) | [inline] |
Definition at line 44 of file FreeTrajectoryState.h.
: theGlobalParameters(aX, aP, aCharge, fieldProvider), theCurvilinearError(InvalidError()) {}
FreeTrajectoryState::FreeTrajectoryState | ( | const GlobalTrajectoryParameters & | aGlobalParameters, |
const CurvilinearTrajectoryError & | aCurvilinearError | ||
) | [inline] |
Definition at line 53 of file FreeTrajectoryState.h.
: theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
FreeTrajectoryState::FreeTrajectoryState | ( | const GlobalTrajectoryParameters & | aGlobalParameters, |
const CartesianTrajectoryError & | aCartesianError | ||
) | [inline] |
Definition at line 61 of file FreeTrajectoryState.h.
References createCurvilinearError().
: theGlobalParameters(aGlobalParameters) { createCurvilinearError(aCartesianError); }
FreeTrajectoryState::FreeTrajectoryState | ( | const GlobalTrajectoryParameters & | aGlobalParameters, |
const CartesianTrajectoryError & | , | ||
const CurvilinearTrajectoryError & | aCurvilinearError | ||
) | [inline] |
Definition at line 66 of file FreeTrajectoryState.h.
: theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
bool FreeTrajectoryState::canReach | ( | double | radius | ) | const |
Definition at line 57 of file FreeTrajectoryState.cc.
References lumiQTWidget::ax, momentum(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), position(), CosmicsPD_Skims::radius, rho, findQualityFiles::rr, corrVsCorr::rx, corrVsCorr::ry, mathSSE::sqrt(), transverseCurvature(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), x, and PV3DBase< T, PVType, FrameType >::y().
{ GlobalPoint x = position(); GlobalVector p = momentum().unit(); double rho = transverseCurvature()*p.perp(); double rx = rho*x.x(); double ry = rho*x.y(); double rr = rho*radius; double ax = p.x()*rx + p.y()*ry; double ay = p.x()*ry - p.y()*rx + p.perp2(); double cospsi = (.5*(rx*rx + ry*ry - rr*rr) + ay)/sqrt(ax*ax + ay*ay); return fabs(cospsi) <= 1.; }
CartesianTrajectoryError FreeTrajectoryState::cartesianError | ( | ) | const [inline] |
Definition at line 105 of file FreeTrajectoryState.h.
References createCartesianError(), hasError(), missingError(), and unlikely.
Referenced by BasicTrajectoryState::cartesianError(), HTrack::computePull(), CSCEfficiency::getFromFTS(), SimpleCosmicBONSeeder::seeds(), TrajectoryStateClosestToBeamLine::transverseImpactParameter(), and SimpleNavigableLayer::wellInside().
{ if unlikely(!hasError()) missingError(); CartesianTrajectoryError aCartesianError; createCartesianError(aCartesianError); return aCartesianError; }
TrackCharge FreeTrajectoryState::charge | ( | void | ) | const [inline] |
Definition at line 81 of file FreeTrajectoryState.h.
References GlobalTrajectoryParameters::charge(), and theGlobalParameters.
Referenced by TransientTrackKinematicStateBuilder::buildState(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), BasicTrajectoryState::charge(), reco::TransientTrackFromFTS::charge(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), HTrack::Fill(), GsfTrackProducerBase::fillMode(), PerigeeConversions::ftsToPerigeeParameters(), MatcherUsingTracksAlgorithm::getChi2(), CSCEfficiency::getFromFTS(), TrackAssociatorByChi2::parametersAtClosestApproach(), TrackKinematicStatePropagator::planeCrossing(), SeedFromGenericPairOrTriplet::seedFromTriplet(), OutInConversionSeedFinder::startSeed(), InOutConversionSeedFinder::startSeed(), SteppingHelixStateInfo::SteppingHelixStateInfo(), and reco::TransientTrackFromFTS::track().
{ return theGlobalParameters.charge(); }
void FreeTrajectoryState::createCartesianError | ( | CartesianTrajectoryError & | aCartesianError | ) | const [private] |
Definition at line 27 of file FreeTrajectoryState.cc.
References JacobianCurvilinearToCartesian::jacobian(), CurvilinearTrajectoryError::matrix(), theCurvilinearError, and theGlobalParameters.
Referenced by cartesianError().
{ JacobianCurvilinearToCartesian curv2Cart(theGlobalParameters); const AlgebraicMatrix65& jac = curv2Cart.jacobian(); aCartesianError = ROOT::Math::Similarity(jac, theCurvilinearError.matrix()); }
void FreeTrajectoryState::createCurvilinearError | ( | CartesianTrajectoryError const & | aCartesianError | ) | const [private] |
Definition at line 37 of file FreeTrajectoryState.cc.
References JacobianCartesianToCurvilinear::jacobian(), CartesianTrajectoryError::matrix(), theCurvilinearError, and theGlobalParameters.
Referenced by FreeTrajectoryState(), and setCartesianError().
{ JacobianCartesianToCurvilinear cart2Curv(theGlobalParameters); const AlgebraicMatrix56& jac = cart2Curv.jacobian(); theCurvilinearError = ROOT::Math::Similarity(jac, aCartesianError.matrix()); }
const CurvilinearTrajectoryError& FreeTrajectoryState::curvilinearError | ( | ) | const [inline] |
Definition at line 112 of file FreeTrajectoryState.h.
References hasError(), missingError(), theCurvilinearError, and unlikely.
Referenced by TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), MuonErrorMatrix::adjust(), TransientTrackKinematicStateBuilder::buildState(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), HTrack::computePull(), BasicTrajectoryState::curvilinearError(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), GsfTrackProducerBase::fillMode(), PerigeeConversions::ftsToPerigeeError(), MatcherUsingTracksAlgorithm::getChi2(), TrajectoryStateAccessor::inversePtError(), TSCBLBuilderNoMaterial::operator()(), AnalyticalErrorPropagation::operator()(), operator<<(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), and MuonNavigableLayer::trackingRange().
{ if unlikely(!hasError()) missingError(); return theCurvilinearError; }
bool FreeTrajectoryState::hasCurvilinearError | ( | ) | const [inline] |
Definition at line 93 of file FreeTrajectoryState.h.
References theCurvilinearError, and CurvilinearTrajectoryError::valid().
Referenced by hasError().
{return theCurvilinearError.valid();}
bool FreeTrajectoryState::hasError | ( | void | ) | const [inline] |
Definition at line 95 of file FreeTrajectoryState.h.
References hasCurvilinearError().
Referenced by cartesianError(), curvilinearError(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), MatcherUsingTracksAlgorithm::getChi2(), CSCEfficiency::getFromFTS(), AnalyticalErrorPropagation::operator()(), operator<<(), MuonUpdatorAtVertex::propagate(), rescaleError(), RoadSearchTrackCandidateMakerAlgorithm::run(), SteppingHelixStateInfo::SteppingHelixStateInfo(), and TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint().
{ return hasCurvilinearError(); }
void FreeTrajectoryState::missingError | ( | ) | const [private] |
Definition at line 13 of file FreeTrajectoryState.cc.
References CurvilinearTrajectoryError::matrix(), theCurvilinearError, and CurvilinearTrajectoryError::valid().
Referenced by cartesianError(), and curvilinearError().
{ std::stringstream form; form<< "FreeTrajectoryState: attempt to access errors when none available" << "\nCurvilinear error valid/values :"<< theCurvilinearError.valid() << "\n" << theCurvilinearError.matrix(); edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str(); // throw TrajectoryStateException(form.str()); }
GlobalVector FreeTrajectoryState::momentum | ( | ) | const [inline] |
Definition at line 78 of file FreeTrajectoryState.h.
References GlobalTrajectoryParameters::momentum(), and theGlobalParameters.
Referenced by TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), MuonErrorMatrix::adjust(), ValidationMisalignedTracker::analyze(), ElectronSeedAnalyzer::analyze(), TestOutliers::analyze(), HLTPMMassFilter::approxMomAtVtx(), CosmicMuonTrajectoryBuilder::build(), TransientTrackKinematicStateBuilder::buildState(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), canReach(), DirectMuonNavigation::checkCompatible(), DirectMuonNavigation::compatibleEndcapLayers(), PixelHitMatcher::compatibleHits(), DirectMuonNavigation::compatibleLayers(), PixelHitMatcher::compatibleSeeds(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), ReferenceTrajectory::construct(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), CSCEfficiency::efficienciesPerChamber(), PropagateToMuon::extrapolate(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), HTrack::Fill(), TrackDetectorAssociator::fillCaloTruth(), GsfTrackProducerBase::fillMode(), MuonTrackAnalyzer::fillPlots(), PerigeeConversions::ftsToPerigeeParameters(), MatcherUsingTracksAlgorithm::getChi2(), CSCEfficiency::getFromFTS(), HDetIdAssociator::getTrajectory(), BasicTrajectoryState::globalDirection(), BasicTrajectoryState::globalMomentum(), TrackDetMatchInfo::insideCone(), TrajectoryStateAccessor::inversePtError(), MuonNavigableLayer::isInsideOut(), PerigeeConversions::jacobianCurvilinear2Perigee(), MuonErrorMatrixAdjuster::makeTrack(), MatcherUsingTracksAlgorithm::matchByDirectComparison(), MatcherUsingTracksAlgorithm::matchWithPropagation(), CosmicParametersDefinerForTP::momentum(), CosmicTrackingParticleSelector::operator()(), TrimmedTrackFilter::operator()(), CrossingPtBasedLinearizationPointFinder::CompareTwoTracks::operator()(), StateOnTrackerBound::operator()(), PropagationDirectionChooser::operator()(), DirectTrackerNavigation::outward(), DirectMuonNavigation::outward(), TrackAssociatorByChi2::parametersAtClosestApproach(), TrackKinematicStatePropagator::planeCrossing(), TrackCandidateProducer::produce(), reco::modules::DuplicateTrackMerger::produce(), TrajectorySeedProducer::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), TrackClassifier::reconstructionInformation(), StandAloneMuonFilter::refit(), MuonTrackingRegionBuilder::region(), SeedFromGenericPairOrTriplet::seedFromTriplet(), SeedFilter::seeds(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), CSCEfficiency::stripWire_Efficiencies(), MinPtTrajectoryFilter::test(), ThresholdPtTrajectoryFilter::test(), reco::TransientTrackFromFTS::track(), and StandAloneMuonTrajectoryBuilder::trajectories().
{ return theGlobalParameters.momentum(); }
const GlobalTrajectoryParameters& FreeTrajectoryState::parameters | ( | void | ) | const [inline] |
Definition at line 100 of file FreeTrajectoryState.h.
References theGlobalParameters.
Referenced by TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), MuonErrorMatrix::adjust(), LayerCollector::allLayers(), TransientTrackKinematicStateBuilder::buildState(), TangentApproachInRPhi::calculate(), TwoTrackMinimumDistance::calculate(), ClosestApproachInRPhi::calculate(), MuonPatternRecoDumper::dumpFTS(), TrajectoryExtrapolatorToLine::extrapolate(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), PerigeeConversions::ftsToPerigeeParameters(), BasicTrajectoryState::globalParameters(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), PerigeeConversions::jacobianCurvilinear2Perigee(), AnalyticalErrorPropagation::operator()(), operator<<(), PerigeeKinematicState::PerigeeKinematicState(), TrackKinematicStatePropagator::planeCrossing(), SimpleCosmicBONSeeder::pqFromHelixFit(), ConvBremSeedProducer::produce(), MuonUpdatorAtVertex::propagate(), rescaleError(), SeedGeneratorForCosmics::seeds(), StartingLayerFinder::startingLayers(), MinPtTrajectoryFilter::test(), ThresholdPtTrajectoryFilter::test(), TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint(), and PerigeeRefittedTrackState::trajectoryStateOnSurface().
{ return theGlobalParameters; }
GlobalPoint FreeTrajectoryState::position | ( | void | ) | const [inline] |
Definition at line 75 of file FreeTrajectoryState.h.
References GlobalTrajectoryParameters::position(), and theGlobalParameters.
Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), ValidationMisalignedTracker::analyze(), HcalCorrPFCalculation::analyze(), ElectronSeedAnalyzer::analyze(), TestOutliers::analyze(), MuonAlignmentAnalyzer::analyze(), TrackDetectorAssociator::associate(), CosmicMuonTrajectoryBuilder::build(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), TransientTrackKinematicStateBuilder::buildState(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), reco::TrackTransientTrack::calculateTSOSAtVertex(), reco::TransientTrackFromFTS::calculateTSOSAtVertex(), reco::GsfTransientTrack::calculateTSOSAtVertex(), canReach(), DirectTrackerNavigation::checkCompatible(), DirectMuonNavigation::checkCompatible(), PixelHitMatcher::compatibleHits(), DirectTrackerNavigation::compatibleLayers(), DirectMuonNavigation::compatibleLayers(), PixelHitMatcher::compatibleSeeds(), SimpleNavigableLayer::crossingState(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), PropagateToMuon::extrapolate(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), CSCEfficiency::filter(), PerigeeConversions::ftsToPerigeeParameters(), MatcherUsingTracksAlgorithm::getChi2(), EcalShowerProperties::getEndpoints(), CSCEfficiency::getFromFTS(), SteppingHelixStateInfo::getStateOnSurface(), TrackDetectorAssociator::getTAMuonChamberMatches(), HDetIdAssociator::getTrajectory(), BasicTrajectoryState::globalPosition(), reco::TrackTransientTrack::impactPointTSCP(), reco::GsfTransientTrack::impactPointTSCP(), reco::TransientTrackFromFTS::impactPointTSCP(), MuonNavigableLayer::isInsideOut(), PerigeeConversions::jacobianCurvilinear2Perigee(), MatcherUsingTracksAlgorithm::matchByDirectComparison(), MatcherUsingTracksAlgorithm::matchWithPropagation(), CosmicTrackingParticleSelector::operator()(), StateOnTrackerBound::operator()(), PropagationDirectionChooser::operator()(), TransientTrackKinematicStateBuilder::operator()(), DirectTrackerNavigation::outward(), DirectMuonNavigation::outward(), TrackAssociatorByChi2::parametersAtClosestApproach(), TrackKinematicStatePropagator::planeCrossing(), OutsideInMuonSeeder::produce(), MuonErrorMatrixAdjuster::produce(), reco::modules::DuplicateTrackMerger::produce(), MuonBarrelNavigableLayer::pushResult(), CSCEfficiency::recHitSegment_Efficiencies(), TrackClassifier::reconstructionInformation(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), MuonNavigableLayer::trackingRange(), TrajectoryStateClosestToBeamLine::transverseImpactParameter(), CosmicParametersDefinerForTP::vertex(), and SimpleNavigableLayer::wellInside().
{ return theGlobalParameters.position(); }
void FreeTrajectoryState::rescaleError | ( | double | factor | ) |
Definition at line 48 of file FreeTrajectoryState.cc.
References hasError(), GlobalTrajectoryParameters::magneticField(), MagneticField::nominalValue(), parameters(), theCurvilinearError, unlikely, and CurvilinearTrajectoryError::zeroFieldScaling().
Referenced by TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), and SimpleCosmicBONSeeder::seeds().
{ if unlikely(!hasError()) return; bool zeroField = (parameters().magneticField().nominalValue()==0); if unlikely(zeroField) theCurvilinearError.zeroFieldScaling(factor*factor); else theCurvilinearError *= (factor*factor); }
void FreeTrajectoryState::setCartesianError | ( | const CartesianTrajectoryError & | err | ) | [inline] |
Definition at line 120 of file FreeTrajectoryState.h.
References createCurvilinearError().
Referenced by TwoBodyDecayTrajectoryState::setError().
{ createCurvilinearError(err); }
void FreeTrajectoryState::setCartesianError | ( | const AlgebraicSymMatrix66 & | err | ) | [inline] |
Definition at line 123 of file FreeTrajectoryState.h.
References createCurvilinearError().
{ createCurvilinearError(CartesianTrajectoryError(err)); }
void FreeTrajectoryState::setCurvilinearError | ( | const CurvilinearTrajectoryError & | err | ) | [inline] |
Definition at line 127 of file FreeTrajectoryState.h.
References theCurvilinearError.
Referenced by FastElectronSeedGenerator::prepareElTrackSeed().
{ theCurvilinearError = err; }
void FreeTrajectoryState::setCurvilinearError | ( | const AlgebraicSymMatrix55 & | err | ) | [inline] |
Definition at line 130 of file FreeTrajectoryState.h.
References theCurvilinearError.
{ theCurvilinearError = CurvilinearTrajectoryError(err); }
double FreeTrajectoryState::signedInverseMomentum | ( | ) | const [inline] |
Definition at line 84 of file FreeTrajectoryState.h.
References GlobalTrajectoryParameters::signedInverseMomentum(), and theGlobalParameters.
Referenced by HTrack::computeTDRResolution(), PerigeeConversions::jacobianCurvilinear2Perigee(), reco::modules::DuplicateTrackMerger::produce(), and BasicTrajectoryState::signedInverseMomentum().
{ return theGlobalParameters.signedInverseMomentum(); }
double FreeTrajectoryState::transverseCurvature | ( | ) | const [inline] |
Definition at line 87 of file FreeTrajectoryState.h.
References theGlobalParameters, and GlobalTrajectoryParameters::transverseCurvature().
Referenced by SiPixelTrackResidualSource::analyze(), canReach(), TransverseImpactPointExtrapolator::doExtrapolation(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), ConversionFastHelix::helixStateAtVertex(), PerigeeConversions::jacobianCurvilinear2Perigee(), TrackKinematicStatePropagator::planeCrossing(), ConversionFastHelix::straightLineStateAtVertex(), and BasicTrajectoryState::transverseCurvature().
{ return theGlobalParameters.transverseCurvature(); }
CurvilinearTrajectoryError FreeTrajectoryState::theCurvilinearError [mutable, private] |
Definition at line 152 of file FreeTrajectoryState.h.
Referenced by createCartesianError(), createCurvilinearError(), curvilinearError(), hasCurvilinearError(), missingError(), rescaleError(), and setCurvilinearError().
Definition at line 151 of file FreeTrajectoryState.h.
Referenced by charge(), createCartesianError(), createCurvilinearError(), momentum(), parameters(), position(), signedInverseMomentum(), and transverseCurvature().