#include <TrackingTools/GeomPropagators/interface/Propagator.h>
Public Member Functions | |
virtual Propagator * | clone () const =0 |
virtual const MagneticField * | magneticField () const =0 |
virtual FreeTrajectoryState | propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const |
virtual TrajectoryStateOnSurface | propagate (const TrajectoryStateOnSurface &, const Cylinder &) const |
virtual TrajectoryStateOnSurface | propagate (const TrajectoryStateOnSurface &, const Plane &) const |
virtual TrajectoryStateOnSurface | propagate (const TrajectoryStateOnSurface &, const Surface &) const |
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. | |
virtual TrajectoryStateOnSurface | propagate (const FreeTrajectoryState &, const Cylinder &) const =0 |
virtual TrajectoryStateOnSurface | propagate (const FreeTrajectoryState &, const Plane &) const =0 |
virtual TrajectoryStateOnSurface | propagate (const FreeTrajectoryState &, const Surface &) const |
Propagate from a free state (e.g. | |
virtual std::pair < FreeTrajectoryState, double > | propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const |
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. | |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const =0 |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const FreeTrajectoryState &, const Plane &) const =0 |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const FreeTrajectoryState &, const Surface &) const |
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. | |
virtual PropagationDirection | propagationDirection () const |
Returns the current value of the propagation direction. | |
Propagator (PropagationDirection dir=alongMomentum) | |
virtual bool | setMaxDirectionChange (float phiMax) |
Set the maximal change of direction (integrated along the path) for any single propagation. | |
virtual void | setPropagationDirection (PropagationDirection dir) |
The propagation direction can now be set for every propagator. | |
virtual | ~Propagator () |
Private Attributes | |
PropagationDirection | theDir |
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] |
virtual Propagator::~Propagator | ( | ) | [inline, virtual] |
virtual Propagator* Propagator::clone | ( | ) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
Referenced by BeamHaloPropagator::BeamHaloPropagator(), MuonSimHitProducer::beginRun(), TransverseImpactPointExtrapolator::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, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
Referenced by TrackLocalAngle::buildTrajectory(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), TrackAssociatorByPosition::getState(), TrackProducerWithSCAssociation::getTransient(), TrackProducer::getTransient(), KalmanAlignmentAlgorithm::initializeAlignmentSetups(), SimpleTrackRefitter::refitTrack(), BaseCkfTrajectoryBuilder::seedMeasurements(), and StartingLayerFinder::startingLayers().
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.
00068 { 00069 throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented"); 00070 }
TrajectoryStateOnSurface Propagator::propagate | ( | const TrajectoryStateOnSurface & | tsos, | |
const Cylinder & | sur | |||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, and PropagatorWithMaterial.
Definition at line 60 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagate().
TrajectoryStateOnSurface Propagator::propagate | ( | const TrajectoryStateOnSurface & | tsos, | |
const Plane & | sur | |||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, NavPropagator, RKPropagatorInS, and RKTestPropagator.
Definition at line 46 of file Propagator.cc.
References e, TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), propagate(), GloballyPositioned< T >::toLocal(), and z.
00048 { 00049 // Protect against null propagations 00050 if (fabs(sur.toLocal(tsos.globalPosition()).z())<1e-5) { 00051 // Still have to tarnsform the r.f.! 00052 return TrajectoryStateOnSurface(*tsos.freeState(), sur); 00053 } 00054 return propagate( *tsos.freeState(), sur); 00055 }
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().
00027 { 00028 // exactly same code as for FreeTrajectoryState 00029 00030 // try plane first, most probable case (disk "is a" plane too) 00031 const Plane* bp = dynamic_cast<const Plane*>(&sur); 00032 if (bp != 0) return propagate( state, *bp); 00033 00034 // if not plane try cylinder 00035 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); 00036 if (bc != 0) return propagate( state, *bc); 00037 00038 // unknown surface - can't do it! 00039 throw PropagationException("The surface is neither Cylinder nor Plane"); 00040 }
virtual TrajectoryStateOnSurface Propagator::propagate | ( | const FreeTrajectoryState & | , | |
const Cylinder & | ||||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
virtual TrajectoryStateOnSurface Propagator::propagate | ( | const FreeTrajectoryState & | , | |
const Plane & | ||||
) | const [pure virtual] |
Implemented in cms::FastMuPropagator, cms::HICMuonPropagator, AnalyticalPropagator, BeamHaloPropagator, SmartPropagator, StraightLinePropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
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 LayerCollector::allLayers(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), TestTrackHits::analyze(), RPCEfficiencyFromTrack::analyze(), MuonAlignmentAnalyzer::analyze(), TrackAssociatorByPosition::associateRecoToSim(), TrackAssociatorByPosition::associateSimToReco(), CosmicMuonTrajectoryBuilder::build(), SeedFromGenericPairOrTriplet::buildSeed(), TrackLocalAngle::buildTrajectory(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuDetRod::compatible(), MuDetRing::compatible(), BarrelDetLayer::compatible(), PixelRod::compatibleDetsV(), TrackEfficiencyMonitor::compatibleLayers(), CkfDebugger::computePulls(), SeedFromNuclearInteraction::construct(), SeedFromConsecutiveHits::construct(), MuonStandaloneAlgorithm::Derivative(), TransverseImpactPointExtrapolator::doExtrapolation(), InOutConversionSeedFinder::fillClusterSeeds(), GsfTrackProducerBase::fillMode(), HLTMuonPointingFilter::filter(), TrackEfficiencyMonitor::findNextLayer(), KFTrajectoryFitter::fit(), CosmicMuonSmoother::fit(), GsfTrajectoryFitter::fit(), MuonRoadTrajectoryBuilder::GatherHits(), HDetIdAssociator::getTrajectory(), SeedFromProtoTrack::init(), CosmicMuonTrajectoryBuilder::intermediateState(), GeomDetCompatibilityChecker::isCompatible(), MuonBestMeasurementFinder::lookAtSubRecHits(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), StateOnTrackerBound::operator()(), MuonStandaloneAlgorithm::produce(), NavCylinder::propagate(), CachedTrajectory::propagate(), NavCone::propagate(), cms::HICMuonPropagator::propagate(), BeamHaloPropagator::propagate(), cms::FastMuPropagator::propagate(), GsfPropagatorAdapter::propagate(), GsfPropagatorWithMaterial::propagate(), propagate(), SmartPropagator::propagate(), StraightLinePropagator::propagate(), NavPlane::propagate(), CachedTrajectory::propagateForward(), MuonTrajectoryUpdator::propagateState(), propagateTrackToCalo(), SimpleTrackRefitter::refitTrack(), SeedFromConsecutiveHits::SeedFromConsecutiveHits(), BaseCkfTrajectoryBuilder::seedMeasurements(), SimpleCosmicBONSeeder::seeds(), CosmicMuonSmoother::smooth(), StartingLayerFinder::startingLayers(), CosmicMuonUtilities::stepPropagate(), TrackEfficiencyMonitor::trackerAcceptance(), KFTrajectorySmoother::trajectories(), GsfTrajectorySmoother::trajectories(), and SimpleNavigableLayer::wellInside().
00011 { 00012 // try plane first, most probable case (disk "is a" plane too) 00013 const Plane* bp = dynamic_cast<const Plane*>(&sur); 00014 if (bp != 0) return propagate( state, *bp); 00015 00016 // if not plane try cylinder 00017 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); 00018 if (bc != 0) return propagate( state, *bc); 00019 00020 // unknown surface - can't do it! 00021 throw PropagationException("The surface is neither Cylinder nor Plane"); 00022 }
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.
00129 { 00130 throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented"); 00131 }
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, | |
const Cylinder & | sur | |||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, and PropagatorWithMaterial.
Definition at line 121 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagateWithPath().
00123 { 00124 return propagateWithPath( *tsos.freeState(), sur); 00125 }
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, | |
const Plane & | sur | |||
) | const [virtual] |
Reimplemented in BeamHaloPropagator, SmartPropagator, GsfPropagatorAdapter, GsfPropagatorWithMaterial, PropagatorWithMaterial, and NavPropagator.
Definition at line 112 of file Propagator.cc.
References TrajectoryStateOnSurface::freeState(), and propagateWithPath().
00114 { 00115 return propagateWithPath( *tsos.freeState(), sur); 00116 }
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().
00094 { 00095 // same code as above, only method name changes 00096 00097 // try plane first, most probable case (disk "is a" plane too) 00098 const Plane* bp = dynamic_cast<const Plane*>(&sur); 00099 if (bp != 0) return propagateWithPath( state, *bp); 00100 00101 // if not plane try cylinder 00102 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); 00103 if (bc != 0) return propagateWithPath( state, *bc); 00104 00105 // unknown surface - can't do it! 00106 throw PropagationException("The surface is neither Cylinder nor Plane"); 00107 }
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, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
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, NavPropagator, RKPropagatorInR, RKPropagatorInS, RKPropagatorInZ, RKTestPropagator, and SteppingHelixPropagator.
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 MuonTimingExtractor::fillTiming(), MuonSimHitProducer::produce(), CosmicGenFilterHelix::propagateToCutCylinder(), SmartPropagator::propagateWithPath(), BeamHaloPropagator::propagateWithPath(), GsfPropagatorAdapter::propagateWithPath(), NavPlane::propagateWithPath(), NavCone::propagateWithPath(), StraightLinePropagator::propagateWithPath(), propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), and NavCylinder::propagateWithPath().
00076 { 00077 // same code as above, only method name changes 00078 00079 // try plane first, most probable case (disk "is a" plane too) 00080 const Plane* bp = dynamic_cast<const Plane*>(&sur); 00081 if (bp != 0) return propagateWithPath( state, *bp); 00082 00083 // if not plane try cylinder 00084 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur); 00085 if (bc != 0) return propagateWithPath( state, *bc); 00086 00087 // unknown surface - can't do it! 00088 throw PropagationException("The surface is neither Cylinder nor Plane"); 00089 }
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 LayerCollector::allLayers(), LayerCrossingSide::barrelSide(), BeamHaloPropagator::clone(), InOutConversionSeedFinder::completeSeed(), OutInConversionSeedFinder::completeSeed(), GsfPropagatorWithMaterial::convoluteWithMaterial(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), BeamHaloPropagator::directionCheck(), LayerCrossingSide::endcapSide(), InOutConversionSeedFinder::fillClusterSeeds(), InOutConversionSeedFinder::findSeeds(), KFTrajectoryFitter::fit(), TIDRing::groupedCompatibleDetsV(), TIBLayer::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), PixelForwardLayer::groupedCompatibleDetsV(), TOBLayer::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), PixelBarrelLayer::groupedCompatibleDetsV(), StraightLinePropagator::jacobian(), PropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::materialAtSource(), SteppingHelixPropagator::propagate(), AnalyticalPropagator::propagatedStateWithPath(), StraightLinePropagator::propagateParametersOnCylinder(), AnalyticalPropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), AnalyticalPropagator::propagateParametersOnPlane(), AnalyticalPropagator::propagateWithLineCrossing(), RKPropagatorInS::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TIDLayer::ringIndicesByCrossingProximity(), TrajectorySegmentBuilder::segments(), SteppingHelixPropagator::setIState(), OutInConversionSeedFinder::startSeed(), KFTrajectorySmoother::trajectories(), and GsfTrajectorySmoother::trajectories().
00143 { 00144 return theDir; 00145 }
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.
virtual void Propagator::setPropagationDirection | ( | PropagationDirection | dir | ) | [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.
References theDir.
Referenced by RPCEfficiencyFromTrack::analyze(), TrackEfficiencyMonitor::compatibleLayers(), BeamHaloPropagator::directionCheck(), HLTMuonPointingFilter::filter(), TrackEfficiencyMonitor::findNextLayer(), KFTrajectoryFitter::fit(), SimpleNavigableLayer::propagator(), GsfPropagatorAdapter::setPropagationDirection(), BeamHaloPropagator::setPropagationDirection(), SmartPropagator::setPropagationDirection(), PropagatorWithMaterial::setPropagationDirection(), GsfPropagatorWithMaterial::setPropagationDirection(), TrackEfficiencyMonitor::trackerAcceptance(), and KFTrajectorySmoother::trajectories().
PropagationDirection Propagator::theDir [private] |
Definition at line 165 of file Propagator.h.
Referenced by propagationDirection(), and setPropagationDirection().