#include <Propagator.h>
Basic tool for "propagation" of trajectory states to surfaces. If the starting state has an error matrix the errors will be also propagated. If you want to propagate just the parameters, construct a starting state that does not have errors. In case of propagation failure (e.g. when the trajectory does not cross the destination surface) and invalid state is returned. Always check the returned state with isValid() before using it!
The propagation can be "alongMomentum" or "oppositeToMomentum" (see setPropagationDirection() below). The difference between the two is the sign of energy loss: the trajectory momentum decreases "alongMomentum" and increases "oppositeToMomentum". In both directions extrapolation errors and multiple scattering errors increase. Propagation "oppositeToMomentum" is convenient for fitting a track "backwards", sterting from the last measurement.
The propagator interface promises to take you to "any surface" but you should check the concrete propagator you are using for additional limitations.
Definition at line 38 of file Propagator.h.
Propagator::Propagator | ( | PropagationDirection | dir = alongMomentum | ) | [inline] |
Definition at line 41 of file Propagator.h.
virtual Propagator::~Propagator | ( | ) | [inline, virtual] |
Definition at line 43 of file Propagator.h.
{}
virtual Propagator* Propagator::clone | ( | ) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
Referenced by BeamHaloPropagator::BeamHaloPropagator(), MuonSimHitProducer::beginRun(), TrajectoryExtrapolatorToLine::extrapolate(), SmartPropagator::SmartPropagator(), KinematicRefittedTrackState::trajectoryStateOnSurface(), and PerigeeRefittedTrackState::trajectoryStateOnSurface().
virtual const MagneticField* Propagator::magneticField | ( | ) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
Referenced by MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), KalmanAlignmentAlgorithm::initializeAlignmentSetups(), SimpleTrackRefitter::refitTrack(), and BaseCkfTrajectoryBuilder::seedMeasurements().
TrajectoryStateOnSurface Propagator::propagate | ( | const TrajectoryStateOnSurface & | state, |
const Surface & | sur | ||
) | const [virtual] |
The following three methods are equivalent to the corresponding methods above, but if the starting state is a TrajectoryStateOnSurface, it's better to use it as such rather than use just the FreeTrajectoryState part. It may help some concrete propagators. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, and GsfPropagatorWithMaterial.
Definition at line 25 of file Propagator.cc.
References propagate().
{ // exactly same code as for FreeTrajectoryState // try plane first, most probable case (disk "is a" plane too) const Plane* bp = dynamic_cast<const Plane*>(&sur); if (bp != 0) return propagate( state, *bp); // if not plane try cylinder const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); if (bc != 0) return propagate( state, *bc); // unknown surface - can't do it! throw PropagationException("The surface is neither Cylinder nor Plane"); }
TrajectoryStateOnSurface Propagator::propagate | ( | const FreeTrajectoryState & | state, |
const Surface & | sur | ||
) | const [virtual] |
Propagate from a free state (e.g. position and momentum in in global cartesian coordinates) to a surface. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.
Reimplemented in cms::FastMuPropagator, cms::HICMuonPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, and GsfPropagatorWithMaterial.
Definition at line 9 of file Propagator.cc.
Referenced by CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), TestTrackHits::analyze(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), CosmicMuonTrajectoryBuilder::build(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuDetRing::compatible(), MuDetRod::compatible(), BarrelDetLayer::compatible(), PixelRod::compatibleDetsV(), TrackEfficiencyMonitor::compatibleLayers(), CkfDebugger::computePulls(), SeedFromNuclearInteraction::construct(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), TransverseImpactPointExtrapolator::doExtrapolation(), CSCPairResidualsConstraint::dphidzFromTrack(), PropagateToMuon::extrapolate(), InOutConversionSeedFinder::fillClusterSeeds(), GsfTrackProducerBase::fillMode(), HLTMuonPointingFilter::filter(), SETFilter::findChi2(), TrackEfficiencyMonitor::findNextLayer(), KFTrajectoryFitter::fit(), CosmicMuonSmoother::fit(), GsfTrajectoryFitter::fit(), MuonRoadTrajectoryBuilder::GatherHits(), HDetIdAssociator::getTrajectory(), SeedFromProtoTrack::init(), CosmicMuonTrajectoryBuilder::intermediateState(), GeomDetCompatibilityChecker::isCompatible(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), StateOnTrackerBound::operator()(), NavCylinder::propagate(), NavCone::propagate(), CachedTrajectory::propagate(), BeamHaloPropagator::propagate(), propagate(), SmartPropagator::propagate(), NavPlane::propagate(), MuonTrajectoryUpdator::propagateState(), JetTracksAssociationDRCalo::propagateTrackToCalo(), TrackExtrapolator::propagateTrackToVolume(), SimpleTrackRefitter::refitTrack(), BaseCkfTrajectoryBuilder::seedMeasurements(), SimpleCosmicBONSeeder::seeds(), CosmicMuonSmoother::smooth(), CosmicMuonUtilities::stepPropagate(), TrackEfficiencyMonitor::trackerAcceptance(), KFTrajectorySmoother::trajectories(), GsfTrajectorySmoother::trajectories(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), and SETFilter::transform().
{ // try plane first, most probable case (disk "is a" plane too) const Plane* bp = dynamic_cast<const Plane*>(&sur); if (bp != 0) return propagate( state, *bp); // if not plane try cylinder const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); if (bc != 0) return propagate( state, *bc); // unknown surface - can't do it! throw PropagationException("The surface is neither Cylinder nor Plane"); }
virtual TrajectoryStateOnSurface Propagator::propagate | ( | const FreeTrajectoryState & | , |
const Plane & | |||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
TrajectoryStateOnSurface Propagator::propagate | ( | const TrajectoryStateOnSurface & | tsos, |
const Plane & | sur | ||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInS, and RKTestPropagator.
Definition at line 46 of file Propagator.cc.
References ExpressReco_HICollisions_FallBack::e, TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), propagate(), GloballyPositioned< T >::toLocal(), and z.
{ // Protect against null propagations if (fabs(sur.toLocal(tsos.globalPosition()).z())<1e-5) { // Still have to tarnsform the r.f.! return TrajectoryStateOnSurface(*tsos.freeState(), sur); } return propagate( *tsos.freeState(), sur); }
virtual TrajectoryStateOnSurface Propagator::propagate | ( | const FreeTrajectoryState & | , |
const Cylinder & | |||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
TrajectoryStateOnSurface Propagator::propagate | ( | const TrajectoryStateOnSurface & | tsos, |
const Cylinder & | sur | ||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, and Geant4ePropagator.
Definition at line 60 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagate().
FreeTrajectoryState Propagator::propagate | ( | const FreeTrajectoryState & | ftsStart, |
const reco::BeamSpot & | beamSpot | ||
) | const [virtual] |
Reimplemented in SteppingHelixPropagator.
Definition at line 67 of file Propagator.cc.
References Exception.
{ throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented"); }
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const TrajectoryStateOnSurface & | state, |
const Surface & | sur | ||
) | const [virtual] |
The following three methods are equivalent to the corresponding methods above, but if the starting state is a TrajectoryStateOnSurface, it's better to use it as such rather than use just the FreeTrajectoryState part. It may help some concrete propagators. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, and GsfPropagatorWithMaterial.
Definition at line 92 of file Propagator.cc.
References propagateWithPath().
{ // same code as above, only method name changes // try plane first, most probable case (disk "is a" plane too) const Plane* bp = dynamic_cast<const Plane*>(&sur); if (bp != 0) return propagateWithPath( state, *bp); // if not plane try cylinder const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); if (bc != 0) return propagateWithPath( state, *bc); // unknown surface - can't do it! throw PropagationException("The surface is neither Cylinder nor Plane"); }
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const FreeTrajectoryState & | state, |
const Surface & | sur | ||
) | const [virtual] |
The methods propagateWithPath() are identical to the corresponding methods propagate() in what concerns the resulting TrajectoryStateOnSurface, but they provide in addition the exact path length along the trajectory. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.
Reimplemented in BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, and GsfPropagatorWithMaterial.
Definition at line 74 of file Propagator.cc.
Referenced by DTTimingExtractor::fillTiming(), CSCTimingExtractor::fillTiming(), MuonSimHitProducer::produce(), ReferenceTrajectory::propagate(), CosmicGenFilterHelix::propagateToCutCylinder(), SmartPropagator::propagateWithPath(), BeamHaloPropagator::propagateWithPath(), NavCone::propagateWithPath(), NavPlane::propagateWithPath(), propagateWithPath(), and NavCylinder::propagateWithPath().
{ // same code as above, only method name changes // try plane first, most probable case (disk "is a" plane too) const Plane* bp = dynamic_cast<const Plane*>(&sur); if (bp != 0) return propagateWithPath( state, *bp); // if not plane try cylinder const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); if (bc != 0) return propagateWithPath( state, *bc); // unknown surface - can't do it! throw PropagationException("The surface is neither Cylinder nor Plane"); }
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath | ( | const FreeTrajectoryState & | , |
const Plane & | |||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath | ( | const FreeTrajectoryState & | , |
const Cylinder & | |||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, |
const Cylinder & | sur | ||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, and Geant4ePropagator.
Definition at line 121 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagateWithPath().
{ return propagateWithPath( *tsos.freeState(), sur); }
std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath | ( | const FreeTrajectoryState & | ftsStart, |
const GlobalPoint & | pDest1, | ||
const GlobalPoint & | pDest2 | ||
) | const [virtual] |
Reimplemented in SteppingHelixPropagator.
Definition at line 128 of file Propagator.cc.
References Exception.
{ throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented"); }
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, |
const Plane & | sur | ||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, Geant4ePropagator, and NavPropagator.
Definition at line 112 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagateWithPath().
{ return propagateWithPath( *tsos.freeState(), sur); }
virtual PropagationDirection Propagator::propagationDirection | ( | void | ) | const [inline, virtual] |
Returns the current value of the propagation direction. If you need to know the actual direction used for a given propagation in case "propagationDirection() == anyDirection", you should use propagateWithPath. A positive sign of path lengt means "alongMomentum", an egeative sign means "oppositeToMomentum".
Reimplemented in RKTestPropagator.
Definition at line 143 of file Propagator.h.
References theDir.
Referenced by LayerCrossingSide::barrelSide(), BeamHaloPropagator::clone(), OutInConversionSeedFinder::completeSeed(), GsfPropagatorWithMaterial::convoluteWithMaterial(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), BeamHaloPropagator::directionCheck(), LayerCrossingSide::endcapSide(), KFTrajectoryFitter::fit(), TIDRing::groupedCompatibleDetsV(), TIBLayer::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), PixelForwardLayer::groupedCompatibleDetsV(), TOBLayer::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), GeometricSearchDet::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), PixelBarrelLayer::groupedCompatibleDetsV(), StraightLinePropagator::jacobian(), PropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::materialAtSource(), TIDLayer::orderAndMergeLevels(), Geant4ePropagator::propagate(), SteppingHelixPropagator::propagate(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), RKPropagatorInS::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TIDLayer::ringIndicesByCrossingProximity(), SteppingHelixPropagator::setIState(), OutInConversionSeedFinder::startSeed(), KFTrajectorySmoother::trajectories(), and GsfTrajectorySmoother::trajectories().
{ return theDir; }
virtual bool Propagator::setMaxDirectionChange | ( | float | phiMax | ) | [inline, virtual] |
Set the maximal change of direction (integrated along the path) for any single propagation. If reaching of the destination surface requires change of direction that exceeds this value the Propagator returns an invalid state. For example, a track may reach a forward plane after many spirals, which may be undesirable for a track reconstructor. Setting this value to pi will force the propagation to fail. The default value is "no limit". The method returnd true if the concrete propagator respects the limit, false otherwise.
Reimplemented in AnalyticalPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, and PropagatorWithMaterial.
Definition at line 157 of file Propagator.h.
{ return false;}
virtual void Propagator::setPropagationDirection | ( | PropagationDirection | dir | ) | const [inline, virtual] |
The propagation direction can now be set for every propagator. There is no more distinction between unidirectional and bidirectional at class level. The value "anyDiriction" for PropagationDirection provides the functionality of the ex-BidirectionalPropagator. The values "alongMomentum" and "oppositeToMomentum" provide the functionality of the ex-UnidirectionalPropagator.
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, and RKTestPropagator.
Definition at line 132 of file Propagator.h.
Referenced by TrackEfficiencyMonitor::compatibleLayers(), BeamHaloPropagator::directionCheck(), HLTMuonPointingFilter::filter(), TrackEfficiencyMonitor::findNextLayer(), SimpleNavigableLayer::propagator(), BeamHaloPropagator::setPropagationDirection(), SmartPropagator::setPropagationDirection(), SetPropagationDirection::SetPropagationDirection(), TrackEfficiencyMonitor::trackerAcceptance(), KFTrajectorySmoother::trajectories(), and SetPropagationDirection::~SetPropagationDirection().
PropagationDirection Propagator::theDir [mutable, private] |
Definition at line 165 of file Propagator.h.
Referenced by propagationDirection(), and setPropagationDirection().