CMS 3D CMS Logo

Public Member Functions | Private Attributes

Propagator Class Reference

#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

List of all members.

Public Member Functions

virtual Propagatorclone () const =0
virtual const MagneticFieldmagneticField () const =0
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Cylinder &) const =0
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Cylinder &) const
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Surface &) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Plane &) const =0
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Surface &) const
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Plane &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) 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 TrajectoryStateOnSurface &, const Plane &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const =0
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) 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.

                                                        :
    theDir(dir) {}
Propagator::~Propagator ( ) [virtual]

Definition at line 9 of file Propagator.cc.

{}

Member Function Documentation

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

Definition at line 28 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 12 of file Propagator.cc.

Referenced by CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), TestTrackHits::analyze(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), CosmicMuonTrajectoryBuilder::build(), SeedForPhotonConversion1Leg::buildSeed(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuDetRod::compatible(), MuDetRing::compatible(), BarrelDetLayer::compatible(), TrackEfficiencyMonitor::compatibleLayers(), CkfDebugger::computePulls(), SeedFromNuclearInteraction::construct(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), TransverseImpactPointExtrapolator::doExtrapolation(), CSCPairResidualsConstraint::dphidzFromTrack(), PropagateToMuon::extrapolate(), InOutConversionSeedFinder::fillClusterSeeds(), GsfTrackProducerBase::fillMode(), SETFilter::findChi2(), TrackEfficiencyMonitor::findNextLayer(), KFTrajectoryFitter::fit(), CosmicMuonSmoother::fit(), GsfTrajectoryFitter::fit(), MuonRoadTrajectoryBuilder::GatherHits(), HDetIdAssociator::getTrajectory(), HLTMuonPointingFilter::hltFilter(), 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(), TrackExtrapolator::propagateTrackToVolume(), 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]
TrajectoryStateOnSurface Propagator::propagate ( const TrajectoryStateOnSurface tsos,
const Plane sur 
) const [virtual]
virtual TrajectoryStateOnSurface Propagator::propagate ( const FreeTrajectoryState ,
const Cylinder  
) const [pure virtual]
TrajectoryStateOnSurface Propagator::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const [virtual]
FreeTrajectoryState Propagator::propagate ( const FreeTrajectoryState ftsStart,
const reco::BeamSpot beamSpot 
) const [virtual]

Reimplemented in SteppingHelixPropagator.

Definition at line 70 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 95 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 77 of file Propagator.cc.

Referenced by DTTimingExtractor::fillTiming(), CSCTimingExtractor::fillTiming(), MuonSimHitProducer::produce(), ReferenceTrajectory::propagate(), CosmicGenFilterHelix::propagateToCutCylinder(), SmartPropagator::propagateWithPath(), BeamHaloPropagator::propagateWithPath(), NavPlane::propagateWithPath(), NavCone::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]
virtual std::pair< TrajectoryStateOnSurface, double> Propagator::propagateWithPath ( const FreeTrajectoryState ,
const Cylinder  
) const [pure virtual]
std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder sur 
) const [virtual]
std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath ( const FreeTrajectoryState ftsStart,
const GlobalPoint pDest1,
const GlobalPoint pDest2 
) const [virtual]

Reimplemented in SteppingHelixPropagator.

Definition at line 131 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]
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 GroupedCkfTrajectoryBuilder::advanceOneLayer(), LayerCrossingSide::barrelSide(), BeamHaloPropagator::clone(), OutInConversionSeedFinder::completeSeed(), GsfPropagatorWithMaterial::convoluteWithMaterial(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), BeamHaloPropagator::directionCheck(), LayerCrossingSide::endcapSide(), KFTrajectoryFitter::fit(), TECLayer::groupedCompatibleDetsV(), StraightLinePropagator::jacobian(), PropagatorWithMaterial::materialAtSource(), GsfPropagatorWithMaterial::materialAtSource(), Geant4ePropagator::propagate(), SteppingHelixPropagator::propagate(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), RKPropagatorInS::propagateWithPath(), PropagatorWithMaterial::propagateWithPath(), GsfPropagatorWithMaterial::propagateWithPath(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), 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.

References dir, and theDir.

Referenced by GetTrackTrajInfo::analyze(), FixTrackHitPattern::analyze(), TrackEfficiencyMonitor::compatibleLayers(), BeamHaloPropagator::directionCheck(), TrackEfficiencyMonitor::findNextLayer(), HLTMuonPointingFilter::hltFilter(), SimpleNavigableLayer::propagator(), BeamHaloPropagator::setPropagationDirection(), SmartPropagator::setPropagationDirection(), SetPropagationDirection::SetPropagationDirection(), TrackEfficiencyMonitor::trackerAcceptance(), KFTrajectorySmoother::trajectories(), and SetPropagationDirection::~SetPropagationDirection().

                                                                       {
    theDir = dir;
  }

Member Data Documentation

Definition at line 165 of file Propagator.h.

Referenced by propagationDirection(), and setPropagationDirection().