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:
GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GsfPropagatorAdapter GsfPropagatorWithMaterial

Public Member Functions

virtual Propagatorclone () const =0
 
virtual const MagneticFieldmagneticField () const =0
 
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
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 &tsos, const Surface &sur) const final
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const
 Propagate to PCA to a line (given by 2 points) given a starting point. More...
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const
 Propagate to PCA to a line (given by beamSpot position and slope) given a starting point. More...
 
virtual PropagationDirection propagationDirection () const GCC11_FINAL
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir)
 
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.

derived classes have to implement the PropagateWithPath for Plane and Cylinder

Definition at line 45 of file Propagator.h.

Constructor & Destructor Documentation

Propagator::Propagator ( PropagationDirection  dir = alongMomentum)
inlineexplicit

Definition at line 48 of file Propagator.h.

48  :
49  theDir(dir) {}
PropagationDirection theDir
Definition: Propagator.h:177
dbl *** dir
Definition: mlp_gen.cc:35
Propagator::~Propagator ( )
virtual

Definition at line 9 of file Propagator.cc.

9 {}

Member Function Documentation

virtual Propagator* Propagator::clone ( ) const
pure virtual

Implemented in GCC11_FINAL< T, TOPO >, GsfPropagatorWithMaterial, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GsfPropagatorAdapter, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Referenced by MuonSimHitProducer::beginRun(), TrajectoryExtrapolatorToLine::extrapolate(), GCC11_FINAL< T, TOPO >::KFTrajectorySmoother(), SetPropagationDirection(), PerigeeRefittedTrackState::trajectoryStateOnSurface(), and KinematicRefittedTrackState::trajectoryStateOnSurface().

virtual const MagneticField* Propagator::magneticField ( ) const
pure virtual
template<typename STA , typename SUR >
TrajectoryStateOnSurface Propagator::propagate ( STA const &  state,
SUR const &  surface 
) const
inline

Definition at line 56 of file Propagator.h.

References propagateWithPath().

Referenced by CRackTrajectoryBuilder::AddHit(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), MuonAlignmentAnalyzer::analyze(), TestTrackHits::analyze(), MuonAlignment::analyze(), CosmicMuonTrajectoryBuilder::build(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversion1Leg::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), MuDetRing::compatible(), ForwardDetLayer::compatible(), BarrelDetLayer::compatible(), MuDetRod::compatible(), MuRingForwardDoubleLayer::compatible(), 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(), CosmicMuonSmoother::fit(), HDetIdAssociator::getTrajectory(), SeedFromProtoTrack::init(), CosmicMuonTrajectoryBuilder::intermediateState(), GeomDetCompatibilityChecker::isCompatible(), StateOnTrackerBound::operator()(), CachedTrajectory::propagate(), MuonTrajectoryUpdator::propagateState(), TrackExtrapolator::propagateTrackToVolume(), BaseCkfTrajectoryBuilder::seedMeasurements(), SimpleCosmicBONSeeder::seeds(), CosmicMuonSmoother::smooth(), CosmicMuonUtilities::stepPropagate(), TrackEfficiencyMonitor::trackerAcceptance(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), and SETFilter::transform().

56  {
57  return propagateWithPath(state,surface).first;
58  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest 
) const
inlinefinalvirtual

Definition at line 119 of file Propagator.h.

References propagateWithPath().

119  {
120  return propagateWithPath(ftsStart,pDest).first;
121  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest1,
const GlobalPoint pDest2 
) const
inlinefinalvirtual

Definition at line 123 of file Propagator.h.

References propagateWithPath().

124  {
125  return propagateWithPath(ftsStart,pDest1,pDest2).first;
126  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const reco::BeamSpot beamSpot 
) const
inlinefinalvirtual

Definition at line 128 of file Propagator.h.

References SiPixelRawToDigiRegional_cfi::beamSpot, and propagateWithPath().

128  {
129  return propagateWithPath(ftsStart,beamSpot).first;
130  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath ( const FreeTrajectoryState state,
const Surface sur 
) const
finalvirtual

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.

Definition at line 15 of file Propagator.cc.

Referenced by CSCTimingExtractor::fillTiming(), DTTimingExtractor::fillTiming(), MuonSimHitProducer::produce(), propagate(), ReferenceTrajectory::propagate(), CosmicGenFilterHelix::propagateToCutCylinder(), GsfPropagatorAdapter::propagateWithPath(), and propagateWithPath().

17 {
18  // try plane first, most probable case (disk "is a" plane too)
19  const Plane* bp = dynamic_cast<const Plane*>(&sur);
20  if (bp != 0) return propagateWithPath( state, *bp);
21 
22  // if not plane try cylinder
23  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
24  if (bc != 0) return propagateWithPath( state, *bc);
25 
26  // unknown surface - can't do it!
27  throw PropagationException("The surface is neither Cylinder nor Plane");
28 }
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
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 tsos,
const Surface sur 
) const
finalvirtual

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.

Definition at line 31 of file Propagator.cc.

References propagateWithPath().

33 {
34  // try plane first, most probable case (disk "is a" plane too)
35  const Plane* bp = dynamic_cast<const Plane*>(&sur);
36  if (bp != 0) return propagateWithPath( state, *bp);
37 
38  // if not plane try cylinder
39  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
40  if (bc != 0) return propagateWithPath( state, *bc);
41 
42  // unknown surface - can't do it!
43  throw PropagationException("The surface is neither Cylinder nor Plane");
44 }
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane sur 
) const
inlinevirtual

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GsfPropagatorWithMaterial, and GsfPropagatorAdapter.

Definition at line 95 of file Propagator.h.

References propagateWithPath().

95  {
96  return propagateWithPath( *tsos.freeState(), sur);
97  }
FreeTrajectoryState const * freeState(bool withErrors=true) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const
inlinevirtual

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GsfPropagatorWithMaterial, and GsfPropagatorAdapter.

Definition at line 100 of file Propagator.h.

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

100  {
101  return propagateWithPath( *tsos.freeState(), sur);
102  }
FreeTrajectoryState const * freeState(bool withErrors=true) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest 
) const
virtual

implemented by Stepping Helix Propagate to PCA to point given a starting point

Definition at line 48 of file Propagator.cc.

References edm::hlt::Exception.

49  {
50  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint) not implemented");
51  return std::pair<FreeTrajectoryState, double> ();
52 }
std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest1,
const GlobalPoint pDest2 
) const
virtual

Propagate to PCA to a line (given by 2 points) given a starting point.

Definition at line 54 of file Propagator.cc.

References edm::hlt::Exception.

55  {
56  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented");
57  return std::pair<FreeTrajectoryState, double> ();
58 
59 }
std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath ( const FreeTrajectoryState ftsStart,
const reco::BeamSpot beamSpot 
) const
virtual

Propagate to PCA to a line (given by beamSpot position and slope) given a starting point.

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 61 of file Propagator.cc.

References edm::hlt::Exception.

61  {
62  throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
63  return std::pair<FreeTrajectoryState, double> ();
64 }
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".

Definition at line 155 of file Propagator.h.

References theDir.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), LayerCrossingSide::barrelSide(), OutInConversionSeedFinder::completeSeed(), GsfPropagatorWithMaterial::convoluteWithMaterial(), LayerCrossingSide::endcapSide(), HLTMuonPointingFilter::filter(), TECLayer::groupedCompatibleDetsV(), TBLayer::groupedCompatibleDetsV(), GsfPropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::propagateWithPath(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), and OutInConversionSeedFinder::startSeed().

155  {
156  return theDir;
157  }
PropagationDirection theDir
Definition: Propagator.h:177
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, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GsfPropagatorAdapter.

Definition at line 169 of file Propagator.h.

Referenced by GsfPropagatorAdapter::setMaxDirectionChange().

169 { return false;}
virtual void Propagator::setPropagationDirection ( PropagationDirection  dir)
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, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GsfPropagatorAdapter, and GCC11_FINAL< T, TOPO >.

Definition at line 144 of file Propagator.h.

References dir, and theDir.

Referenced by AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator(), SiPixelHitEfficiencySource::analyze(), TrackEfficiencyMonitor::compatibleLayers(), TrackEfficiencyMonitor::findNextLayer(), GCC11_FINAL< T, TOPO >::setPropagationDirection(), GsfPropagatorAdapter::setPropagationDirection(), GsfPropagatorWithMaterial::setPropagationDirection(), TrackEfficiencyMonitor::trackerAcceptance(), TransverseImpactPointExtrapolator::TransverseImpactPointExtrapolator(), and TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator().

144  {
145  theDir = dir;
146  }
PropagationDirection theDir
Definition: Propagator.h:177
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

PropagationDirection Propagator::theDir
private

Definition at line 177 of file Propagator.h.

Referenced by propagationDirection(), and setPropagationDirection().