CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Propagator Class Referenceabstract

#include <Propagator.h>

Inheritance diagram for Propagator:
AnalyticalPropagator BeamHaloPropagator Geant4ePropagator GsfPropagatorAdapter GsfPropagatorWithMaterial PropagatorWithMaterial RKPropagatorInR RKPropagatorInS RKPropagatorInZ SmartPropagator SteppingHelixPropagator StraightLinePropagator

Public Member Functions

virtual Propagatorclone () const =0
 
virtual const MagneticFieldmagneticField () const =0
 
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
 
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
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 final
 
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 std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual PropagationDirection propagationDirection () const 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 44 of file Propagator.h.

Constructor & Destructor Documentation

◆ Propagator()

Propagator::Propagator ( PropagationDirection  dir = alongMomentum)
inlineexplicit

Definition at line 46 of file Propagator.h.

46 : theDir(dir) {}

◆ ~Propagator()

Propagator::~Propagator ( )
virtual

Definition at line 8 of file Propagator.cc.

8 {}

Member Function Documentation

◆ clone()

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

◆ magneticField()

virtual const MagneticField* Propagator::magneticField ( ) const
pure virtual

◆ propagate() [1/4]

virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest 
) const
inlinefinalvirtual

Definition at line 109 of file Propagator.h.

109  {
110  return propagateWithPath(ftsStart, pDest).first;
111  }

References propagateWithPath().

◆ propagate() [2/4]

virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest1,
const GlobalPoint pDest2 
) const
inlinefinalvirtual

Definition at line 112 of file Propagator.h.

114  {
115  return propagateWithPath(ftsStart, pDest1, pDest2).first;
116  }

References propagateWithPath().

◆ propagate() [3/4]

virtual FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const reco::BeamSpot beamSpot 
) const
inlinefinalvirtual

Definition at line 117 of file Propagator.h.

118  {
119  return propagateWithPath(ftsStart, beamSpot).first;
120  }

References pwdgSkimBPark_cfi::beamSpot, and propagateWithPath().

◆ propagate() [4/4]

template<typename STA , typename SUR >
TrajectoryStateOnSurface Propagator::propagate ( STA const &  state,
SUR const &  surface 
) const
inline

Definition at line 50 of file Propagator.h.

50  {
51  return propagateWithPath(state, surface).first;
52  }

References propagateWithPath().

Referenced by CRackTrajectoryBuilder::AddHit(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), MuonAlignmentAnalyzer::analyze(), TestHits::analyze(), TestSmoothHits::analyze(), TestTrackHits::analyze(), CosmicMuonTrajectoryBuilder::build(), MTDSectorForwardDoubleLayer::compatible(), MuDetRing::compatible(), MTDDetRing::compatible(), BarrelDetLayer::compatible(), ForwardDetLayer::compatible(), MuDetRod::compatible(), MTDDetTray::compatible(), MTDDetSector::compatible(), MuRingForwardDoubleLayer::compatible(), MTDRingForwardDoubleLayer::compatible(), PixelRod::compatibleDetsV(), TrackEfficiencyMonitor::compatibleLayers(), CkfDebugger::computePulls(), SeedFromNuclearInteraction::construct(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), L1MuonRecoTreeProducer::cylExtrapTrkSam(), ResidualRefitting::cylExtrapTrkSam(), CSCPairResidualsConstraint::dphidzFromTrack(), PropagateToMuon::extrapolate(), AnalyticalImpactPointExtrapolator::extrapolateFullState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateFullState(), InOutConversionSeedFinder::fillClusterSeeds(), GsfTrackProducerBase::fillMode(), SETFilter::findChi2(), TrackEfficiencyMonitor::findNextLayer(), CosmicMuonSmoother::fit(), GsfTrajectoryFitter::fitOne(), HDetIdAssociator::getTrajectory(), GlobalTrajectoryBuilderBase::getTransientRecHits(), CosmicMuonTrajectoryBuilder::intermediateState(), GeomDetCompatibilityChecker::isCompatible(), ticl::SeedingRegionByTracks::makeRegions(), TSGForRoadSearch::makeSeeds_0(), TSGForRoadSearch::makeSeeds_4(), MatcherUsingTracksAlgorithm::matchWithPropagation(), MuonResidualsFromTrack::MuonResidualsFromTrack(), StateOnTrackerBound::operator()(), cms::CkfTrackCandidateMakerBase::produceBase(), CachedTrajectory::propagate(), SeedingOTEDProducer::propagateAndUpdate(), TrackExtrapolator::propagateTrackToVolume(), KFBasedPixelFitter::run(), BaseCkfTrajectoryBuilder::seedMeasurements(), CosmicMuonSmoother::smooth(), CosmicMuonUtilities::stepPropagate(), L1MuonRecoTreeProducer::surfExtrapTrkSam(), TrackEfficiencyMonitor::testSTATracks(), TrackEfficiencyMonitor::testTrackerTracks(), TrackEfficiencyMonitor::trackerAcceptance(), InOutConversionTrackFinder::tracks(), OutInConversionTrackFinder::tracks(), KFTrajectorySmoother::trajectory(), SETFilter::transform(), TrackTransformer::transform(), and ResidualRefitting::trkExtrap().

◆ propagateWithPath() [1/9]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const FreeTrajectoryState ,
const Cylinder  
) const
pure virtual

◆ propagateWithPath() [2/9]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const FreeTrajectoryState ,
const Plane  
) const
pure virtual

◆ propagateWithPath() [3/9]

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 10 of file Propagator.cc.

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 != nullptr)
15  return propagateWithPath(state, *bp);
16 
17  // if not plane try cylinder
18  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
19  if (bc != nullptr)
20  return propagateWithPath(state, *bc);
21 
22  // unknown surface - can't do it!
23  throw PropagationException("The surface is neither Cylinder nor Plane");
24 }

Referenced by MkFitOutputConverter::backwardFit(), TrackExtenderWithMTDT< TrackCollection >::buildTrack(), CSCTimingExtractor::fillTiming(), DTTimingExtractor::fillTiming(), propagate(), ReferenceTrajectory::propagate(), GsfPropagatorAdapter::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), BeamHaloPropagator::propagateWithPath(), SmartPropagator::propagateWithPath(), and propagateWithPath().

◆ propagateWithPath() [4/9]

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

Reimplemented in SteppingHelixPropagator.

Definition at line 42 of file Propagator.cc.

43  {
44  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint) not implemented");
45  return std::pair<FreeTrajectoryState, double>();
46 }

References Exception.

◆ propagateWithPath() [5/9]

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.

Reimplemented in SteppingHelixPropagator.

Definition at line 47 of file Propagator.cc.

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

References Exception.

◆ propagateWithPath() [6/9]

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 SteppingHelixPropagator.

Definition at line 53 of file Propagator.cc.

54  {
55  throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
56  return std::pair<FreeTrajectoryState, double>();
57 }

References Exception.

◆ propagateWithPath() [7/9]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const
inlinevirtual

◆ propagateWithPath() [8/9]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane sur 
) const
inlinevirtual

◆ propagateWithPath() [9/9]

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 26 of file Propagator.cc.

27  {
28  // try plane first, most probable case (disk "is a" plane too)
29  const Plane* bp = dynamic_cast<const Plane*>(&sur);
30  if (bp != nullptr)
31  return propagateWithPath(state, *bp);
32 
33  // if not plane try cylinder
34  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
35  if (bc != nullptr)
36  return propagateWithPath(state, *bc);
37 
38  // unknown surface - can't do it!
39  throw PropagationException("The surface is neither Cylinder nor Plane");
40 }

References propagateWithPath().

◆ propagationDirection()

virtual PropagationDirection Propagator::propagationDirection ( void  ) const
inlinefinalvirtual

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 139 of file Propagator.h.

139 { return theDir; }

References theDir.

Referenced by LayerCrossingSide::barrelSide(), BeamHaloPropagator::clone(), Geant4ePropagator::configurePropagation(), GsfPropagatorWithMaterial::convoluteWithMaterial(), SeedingOTEDProducer::createSeed(), BeamHaloPropagator::directionCheck(), LayerCrossingSide::endcapSide(), PixelForwardLayer::groupedCompatibleDetsV(), PixelForwardLayerPhase1::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), TBLayer::groupedCompatibleDetsV(), TIBRing::groupedCompatibleDetsV(), TIDRing::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), Phase2EndcapLayer::groupedCompatibleDetsV(), Phase2EndcapRing::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), Phase1PixelBlade::groupedCompatibleDetsV(), Phase2OTBarrelRod::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), GeomDetCompatibilityChecker::isCompatible(), StraightLinePropagator::jacobian(), PropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::materialAtSource(), SteppingHelixPropagator::propagate(), Geant4ePropagator::propagateGeneric(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), RKPropagatorInS::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), TIDLayer::ringIndicesByCrossingProximity(), Phase2EndcapLayer::ringIndicesByCrossingProximity(), SeedingOTEDProducer::run(), SteppingHelixPropagator::setIState(), OutInConversionSeedFinder::startSeed(), and KFTrajectorySmoother::trajectory().

◆ setMaxDirectionChange()

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

Definition at line 151 of file Propagator.h.

151 { return false; }

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

◆ setPropagationDirection()

virtual void Propagator::setPropagationDirection ( PropagationDirection  dir)
inlinevirtual

Member Data Documentation

◆ theDir

PropagationDirection Propagator::theDir
private

Definition at line 158 of file Propagator.h.

Referenced by propagationDirection(), and setPropagationDirection().

pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
PropagationException
Common base class.
Definition: PropagationExceptions.h:14
Propagator::theDir
PropagationDirection theDir
Definition: Propagator.h:158
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
Exception
Definition: hltDiff.cc:245
Plane
Definition: Plane.h:16
Propagator::propagateWithPath
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
Cylinder
Definition: Cylinder.h:19
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23