CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Propagator Class Referenceabstract

#include <Propagator.h>

Inheritance diagram for Propagator:
AnalyticalPropagator BeamHaloPropagator cms::FastMuPropagator cms::HICMuonPropagator Geant4ePropagator GsfPropagatorAdapter GsfPropagatorWithMaterial NavPropagator PropagatorWithMaterial RKPropagatorInR RKPropagatorInS RKPropagatorInZ RKTestPropagator SmartPropagator SteppingHelixPropagator StraightLinePropagator

Public Member Functions

virtual Propagatorclone () const =0
 
virtual const MagneticFieldmagneticField () const =0
 
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Plane &) const =0
 
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Cylinder &) const =0
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Plane &) const =0
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const =0
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const
 
virtual PropagationDirection propagationDirection () const
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir) const
 
virtual ~Propagator ()
 

Private Attributes

PropagationDirection theDir
 

Detailed Description

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.

Constructor & Destructor Documentation

Propagator::Propagator ( PropagationDirection  dir = alongMomentum)
inline

Definition at line 41 of file Propagator.h.

41  :
42  theDir(dir) {}
PropagationDirection theDir
Definition: Propagator.h:165
dbl *** dir
Definition: mlp_gen.cc:35
virtual Propagator::~Propagator ( )
inlinevirtual

Definition at line 43 of file Propagator.h.

43 {}

Member Function Documentation

virtual Propagator* Propagator::clone ( ) const
pure virtual
virtual const MagneticField* Propagator::magneticField ( ) const
pure virtual
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 GsfPropagatorWithMaterial, SmartPropagator, GsfPropagatorAdapter, BeamHaloPropagator, cms::FastMuPropagator, StraightLinePropagator, and cms::HICMuonPropagator.

Definition at line 9 of file Propagator.cc.

Referenced by CRackTrajectoryBuilder::AddHit(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), MuonAlignmentAnalyzer::analyze(), TestTrackHits::analyze(), MuonAlignment::analyze(), CosmicMuonTrajectoryBuilder::build(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), ForwardDetLayer::compatible(), MuDetRing::compatible(), BarrelDetLayer::compatible(), MuDetRod::compatible(), MuRingForwardDoubleLayer::compatible(), PixelRod::compatibleDetsV(), TrackEfficiencyMonitor::compatibleLayers(), CkfDebugger::computePulls(), SeedFromNuclearInteraction::construct(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), TransverseImpactPointExtrapolator::doExtrapolation(), CSCPairResidualsConstraint::dphidzFromTrack(), PropagateToMuon::extrapolate(), AnalyticalImpactPointExtrapolator::extrapolateFullState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateFullState(), InOutConversionSeedFinder::fillClusterSeeds(), GsfTrackProducerBase::fillMode(), HLTMuonPointingFilter::filter(), SETFilter::findChi2(), TrackEfficiencyMonitor::findNextLayer(), GsfTrajectoryFitter::fit(), CosmicMuonSmoother::fit(), KFTrajectoryFitter::fit(), MuonRoadTrajectoryBuilder::GatherHits(), HDetIdAssociator::getTrajectory(), SeedFromProtoTrack::init(), CosmicMuonTrajectoryBuilder::intermediateState(), GeomDetCompatibilityChecker::isCompatible(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), StateOnTrackerBound::operator()(), GsfPropagatorAdapter::propagate(), cms::HICMuonPropagator::propagate(), NavCylinder::propagate(), NavCone::propagate(), StraightLinePropagator::propagate(), NavPlane::propagate(), GsfPropagatorWithMaterial::propagate(), cms::FastMuPropagator::propagate(), CachedTrajectory::propagate(), BeamHaloPropagator::propagate(), propagate(), SmartPropagator::propagate(), RKTestPropagator::propagate(), MuonTrajectoryUpdator::propagateState(), TrackExtrapolator::propagateTrackToVolume(), SimpleTrackRefitter::refitTrack(), BaseCkfTrajectoryBuilder::seedMeasurements(), SimpleCosmicBONSeeder::seeds(), CosmicMuonSmoother::smooth(), CosmicMuonUtilities::stepPropagate(), TrackEfficiencyMonitor::trackerAcceptance(), GsfTrajectorySmoother::trajectories(), KFTrajectorySmoother::trajectories(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), and SETFilter::transform().

11 {
12  // try plane first, most probable case (disk "is a" plane too)
13  const Plane* bp = dynamic_cast<const Plane*>(&sur);
14  if (bp != 0) return propagate( state, *bp);
15 
16  // if not plane try cylinder
17  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
18  if (bc != 0) return propagate( state, *bc);
19 
20  // unknown surface - can't do it!
21  throw PropagationException("The surface is neither Cylinder nor Plane");
22 }
Definition: Plane.h:17
Common base class.
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
virtual TrajectoryStateOnSurface Propagator::propagate ( const FreeTrajectoryState ,
const Plane  
) const
pure virtual
virtual TrajectoryStateOnSurface Propagator::propagate ( const FreeTrajectoryState ,
const Cylinder  
) const
pure virtual
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 SmartPropagator, BeamHaloPropagator, GsfPropagatorWithMaterial, and GsfPropagatorAdapter.

Definition at line 25 of file Propagator.cc.

References propagate().

27 {
28  // exactly same code as for FreeTrajectoryState
29 
30  // try plane first, most probable case (disk "is a" plane too)
31  const Plane* bp = dynamic_cast<const Plane*>(&sur);
32  if (bp != 0) return propagate( state, *bp);
33 
34  // if not plane try cylinder
35  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
36  if (bc != 0) return propagate( state, *bc);
37 
38  // unknown surface - can't do it!
39  throw PropagationException("The surface is neither Cylinder nor Plane");
40 }
Definition: Plane.h:17
Common base class.
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
TrajectoryStateOnSurface Propagator::propagate ( const TrajectoryStateOnSurface tsos,
const Plane sur 
) const
virtual

Reimplemented in RKTestPropagator, SmartPropagator, BeamHaloPropagator, PropagatorWithMaterial, Geant4ePropagator, GsfPropagatorWithMaterial, RKPropagatorInS, NavPropagator, and GsfPropagatorAdapter.

Definition at line 46 of file Propagator.cc.

References TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), propagate(), GloballyPositioned< T >::toLocal(), and detailsBasic3DVector::z.

48 {
49  // Protect against null propagations
50  if (fabs(sur.toLocal(tsos.globalPosition()).z())<1e-5) {
51  // Still have to tarnsform the r.f.!
52  return TrajectoryStateOnSurface(*tsos.freeState(), sur);
53  }
54  return propagate( *tsos.freeState(), sur);
55 }
GlobalPoint globalPosition() const
double double double z
FreeTrajectoryState * freeState(bool withErrors=true) const
LocalPoint toLocal(const GlobalPoint &gp) const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
TrajectoryStateOnSurface Propagator::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const
virtual

Reimplemented in SmartPropagator, BeamHaloPropagator, PropagatorWithMaterial, GsfPropagatorWithMaterial, Geant4ePropagator, and GsfPropagatorAdapter.

Definition at line 60 of file Propagator.cc.

References TrajectoryStateOnSurface::freeState(), and propagate().

62 {
63  return propagate( *tsos.freeState(), sur);
64 }
FreeTrajectoryState * freeState(bool withErrors=true) const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const reco::BeamSpot beamSpot 
) const
virtual

Reimplemented in SteppingHelixPropagator.

Definition at line 67 of file Propagator.cc.

References edm::hlt::Exception.

68  {
69  throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
70 }
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 GsfPropagatorWithMaterial, GsfPropagatorAdapter, SmartPropagator, BeamHaloPropagator, and StraightLinePropagator.

Definition at line 74 of file Propagator.cc.

Referenced by CSCTimingExtractor::fillTiming(), DTTimingExtractor::fillTiming(), MuonSimHitProducer::produce(), ReferenceTrajectory::propagate(), CosmicGenFilterHelix::propagateToCutCylinder(), NavCylinder::propagateWithPath(), NavCone::propagateWithPath(), NavPlane::propagateWithPath(), StraightLinePropagator::propagateWithPath(), GsfPropagatorAdapter::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), BeamHaloPropagator::propagateWithPath(), RKTestPropagator::propagateWithPath(), SmartPropagator::propagateWithPath(), and propagateWithPath().

76 {
77  // same code as above, only method name changes
78 
79  // try plane first, most probable case (disk "is a" plane too)
80  const Plane* bp = dynamic_cast<const Plane*>(&sur);
81  if (bp != 0) return propagateWithPath( state, *bp);
82 
83  // if not plane try cylinder
84  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
85  if (bc != 0) return propagateWithPath( state, *bc);
86 
87  // unknown surface - can't do it!
88  throw PropagationException("The surface is neither Cylinder nor Plane");
89 }
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:74
Common base class.
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const FreeTrajectoryState ,
const Plane  
) const
pure virtual
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const FreeTrajectoryState ,
const Cylinder  
) const
pure virtual
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 SmartPropagator, BeamHaloPropagator, GsfPropagatorWithMaterial, and GsfPropagatorAdapter.

Definition at line 92 of file Propagator.cc.

References propagateWithPath().

94 {
95  // same code as above, only method name changes
96 
97  // try plane first, most probable case (disk "is a" plane too)
98  const Plane* bp = dynamic_cast<const Plane*>(&sur);
99  if (bp != 0) return propagateWithPath( state, *bp);
100 
101  // if not plane try cylinder
102  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
103  if (bc != 0) return propagateWithPath( state, *bc);
104 
105  // unknown surface - can't do it!
106  throw PropagationException("The surface is neither Cylinder nor Plane");
107 }
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:74
Common base class.
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane sur 
) const
virtual

Reimplemented in SmartPropagator, BeamHaloPropagator, GsfPropagatorWithMaterial, Geant4ePropagator, PropagatorWithMaterial, GsfPropagatorAdapter, and NavPropagator.

Definition at line 112 of file Propagator.cc.

References TrajectoryStateOnSurface::freeState(), and propagateWithPath().

114 {
115  return propagateWithPath( *tsos.freeState(), sur);
116 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:74
FreeTrajectoryState * freeState(bool withErrors=true) const
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const
virtual

Reimplemented in SmartPropagator, BeamHaloPropagator, PropagatorWithMaterial, GsfPropagatorWithMaterial, Geant4ePropagator, and GsfPropagatorAdapter.

Definition at line 121 of file Propagator.cc.

References TrajectoryStateOnSurface::freeState(), and propagateWithPath().

123 {
124  return propagateWithPath( *tsos.freeState(), sur);
125 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:74
FreeTrajectoryState * freeState(bool withErrors=true) const
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 edm::hlt::Exception.

129  {
130  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented");
131 }
virtual PropagationDirection Propagator::propagationDirection ( void  ) const
inlinevirtual

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(), PixelForwardLayer::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), TIBLayer::groupedCompatibleDetsV(), TOBLayer::groupedCompatibleDetsV(), TIDRing::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), TIBRing::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), PixelBarrelLayer::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), StraightLinePropagator::jacobian(), PropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::materialAtSource(), TIDLayer::orderAndMergeLevels(), Geant4ePropagator::propagate(), SteppingHelixPropagator::propagate(), RKPropagatorInS::propagateParametersOnCylinder(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), RKPropagatorInS::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), RKTestPropagator::propagationDirection(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TIDLayer::ringIndicesByCrossingProximity(), SteppingHelixPropagator::setIState(), OutInConversionSeedFinder::startSeed(), GsfTrajectorySmoother::trajectories(), and KFTrajectorySmoother::trajectories().

143  {
144  return theDir;
145  }
PropagationDirection theDir
Definition: Propagator.h:165
virtual bool Propagator::setMaxDirectionChange ( float  phiMax)
inlinevirtual

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 GsfPropagatorWithMaterial, GsfPropagatorAdapter, PropagatorWithMaterial, and AnalyticalPropagator.

Definition at line 157 of file Propagator.h.

Referenced by PropagatorWithMaterial::setMaxDirectionChange(), and GsfPropagatorAdapter::setMaxDirectionChange().

157 { return false;}
virtual void Propagator::setPropagationDirection ( PropagationDirection  dir) const
inlinevirtual

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 GsfPropagatorWithMaterial, GsfPropagatorAdapter, PropagatorWithMaterial, RKTestPropagator, SmartPropagator, and BeamHaloPropagator.

Definition at line 132 of file Propagator.h.

References dir, and theDir.

Referenced by AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator(), TrackEfficiencyMonitor::compatibleLayers(), BeamHaloPropagator::directionCheck(), HLTMuonPointingFilter::filter(), TrackEfficiencyMonitor::findNextLayer(), SimpleNavigableLayer::propagator(), BeamHaloPropagator::setPropagationDirection(), SmartPropagator::setPropagationDirection(), RKTestPropagator::setPropagationDirection(), PropagatorWithMaterial::setPropagationDirection(), GsfPropagatorAdapter::setPropagationDirection(), GsfPropagatorWithMaterial::setPropagationDirection(), SetPropagationDirection::SetPropagationDirection(), TrackEfficiencyMonitor::trackerAcceptance(), KFTrajectorySmoother::trajectories(), TransverseImpactPointExtrapolator::TransverseImpactPointExtrapolator(), TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator(), and SetPropagationDirection::~SetPropagationDirection().

132  {
133  theDir = dir;
134  }
PropagationDirection theDir
Definition: Propagator.h:165
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

PropagationDirection Propagator::theDir
mutableprivate

Definition at line 165 of file Propagator.h.

Referenced by propagationDirection(), and setPropagationDirection().