CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfPropagatorAdapter Class Referencefinal

#include <GsfPropagatorAdapter.h>

Inheritance diagram for GsfPropagatorAdapter:
Propagator

Public Member Functions

GsfPropagatorAdapterclone () const override
 
 GsfPropagatorAdapter (const Propagator &Propagator)
 Constructor with explicit propagator. More...
 
const MagneticFieldmagneticField () const override
 
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
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const=0
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
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...
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const override
 
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
 
const Propagatorpropagator () const
 access to single state propagator More...
 
bool setMaxDirectionChange (float phiMax) override
 
void setPropagationDirection (PropagationDirection dir) override
 
 ~GsfPropagatorAdapter () override
 
- Public Member Functions inherited from Propagator
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 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 Surface &sur) const final
 
virtual PropagationDirection propagationDirection () const final
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual ~Propagator ()
 

Private Attributes

DeepCopyPointerByClone< PropagatorthePropagator
 

Detailed Description

Propagation of multiple trajectory state by propagation of components, using an specified single-state propagator.

Definition at line 14 of file GsfPropagatorAdapter.h.

Constructor & Destructor Documentation

◆ GsfPropagatorAdapter()

GsfPropagatorAdapter::GsfPropagatorAdapter ( const Propagator Propagator)

Constructor with explicit propagator.

Definition at line 8 of file GsfPropagatorAdapter.cc.

9  : Propagator(aPropagator.propagationDirection()), thePropagator(aPropagator.clone()) {}

Referenced by clone().

◆ ~GsfPropagatorAdapter()

GsfPropagatorAdapter::~GsfPropagatorAdapter ( )
inlineoverride

Definition at line 19 of file GsfPropagatorAdapter.h.

19 {}

Member Function Documentation

◆ clone()

GsfPropagatorAdapter* GsfPropagatorAdapter::clone ( void  ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 52 of file GsfPropagatorAdapter.h.

52 { return new GsfPropagatorAdapter(*thePropagator); }

References GsfPropagatorAdapter(), and thePropagator.

◆ magneticField()

const MagneticField* GsfPropagatorAdapter::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 54 of file GsfPropagatorAdapter.h.

54 { return thePropagator->magneticField(); }

References Propagator::magneticField(), and thePropagator.

Referenced by GsfPropagatorWithMaterial::magneticField().

◆ propagate() [1/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 109 of file Propagator.h.

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

◆ propagate() [2/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 112 of file Propagator.h.

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

◆ propagate() [3/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 117 of file Propagator.h.

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

◆ propagate() [4/4]

template<typename STA , typename SUR >
TrajectoryStateOnSurface Propagator::propagate ( typename STA  ,
typename SUR   
)
inline

Definition at line 50 of file Propagator.h.

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

◆ propagateWithPath() [1/13]

std::pair< TrajectoryStateOnSurface, double > GsfPropagatorAdapter::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overridevirtual

Propagation to cylinder with path length calculation. Use from FTS implies single state (better use PropagatorWithMaterial)!

use counter in MessageLogger?

Implements Propagator.

Definition at line 32 of file GsfPropagatorAdapter.cc.

33  {
35  static std::atomic<int> nWarn{0};
36  if (nWarn++ < 5)
37  edm::LogInfo("GsfPropagatorAdapter") << "GsfPropagator used from FTS = single state mode!";
38  return thePropagator->propagateWithPath(fts, cylinder);
39 }

References Propagator::propagateWithPath(), and thePropagator.

◆ propagateWithPath() [2/13]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath

◆ propagateWithPath() [3/13]

std::pair< TrajectoryStateOnSurface, double > GsfPropagatorAdapter::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overridevirtual

Propagation to plane with path length calculation. Use from FTS implies single state (better use PropagatorWithMaterial)!

use counter in MessageLogger?

Implements Propagator.

Definition at line 23 of file GsfPropagatorAdapter.cc.

24  {
26  static std::atomic<int> nWarn{0};
27  if (nWarn++ < 5)
28  edm::LogInfo("GsfPropagatorAdapter") << "GsfPropagator used from FTS = single state mode!";
29  return thePropagator->propagateWithPath(fts, plane);
30 }

References Propagator::propagateWithPath(), and thePropagator.

◆ propagateWithPath() [4/13]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath

◆ propagateWithPath() [5/13]

std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath
final

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 }

◆ propagateWithPath() [6/13]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

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

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 }

◆ propagateWithPath() [7/13]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

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

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 }

◆ propagateWithPath() [8/13]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

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

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 }

◆ propagateWithPath() [9/13]

std::pair< TrajectoryStateOnSurface, double > GsfPropagatorAdapter::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
overridevirtual

Propagation to cylinder with path length calculation.

Reimplemented from Propagator.

Definition at line 17 of file GsfPropagatorAdapter.cc.

18  {
20  return multiPropagator.propagateWithPath(tsos, cylinder);
21 }

References MultiStatePropagation< T >::propagateWithPath(), and thePropagator.

◆ propagateWithPath() [10/13]

std::pair< TrajectoryStateOnSurface, double > GsfPropagatorAdapter::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
overridevirtual

Reimplemented from Propagator.

Definition at line 11 of file GsfPropagatorAdapter.cc.

12  {
14  return multiPropagator.propagateWithPath(tsos, plane);
15 }

References MultiStatePropagation< T >::propagateWithPath(), and thePropagator.

Referenced by GsfPropagatorWithMaterial::propagateWithPath().

◆ propagateWithPath() [11/13]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath
inline

Definition at line 91 of file Propagator.h.

92  {
93  return propagateWithPath(*tsos.freeState(), sur);
94  }

◆ propagateWithPath() [12/13]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath
inline

Definition at line 86 of file Propagator.h.

87  {
88  return propagateWithPath(*tsos.freeState(), sur);
89  }

◆ propagateWithPath() [13/13]

std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath
final

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 }

◆ propagator()

const Propagator& GsfPropagatorAdapter::propagator ( ) const
inline

access to single state propagator

Definition at line 50 of file GsfPropagatorAdapter.h.

50 { return *thePropagator; }

References thePropagator.

◆ setMaxDirectionChange()

bool GsfPropagatorAdapter::setMaxDirectionChange ( float  phiMax)
inlineoverridevirtual

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 from Propagator.

Definition at line 45 of file GsfPropagatorAdapter.h.

References AlignmentTrackSelector_cfi::phiMax, Propagator::setMaxDirectionChange(), and thePropagator.

Referenced by GsfPropagatorWithMaterial::setMaxDirectionChange().

◆ setPropagationDirection()

void GsfPropagatorAdapter::setPropagationDirection ( PropagationDirection  dir)
overridevirtual

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 from Propagator.

Definition at line 41 of file GsfPropagatorAdapter.cc.

References DeadROC_duringRun::dir, Propagator::setPropagationDirection(), and thePropagator.

Referenced by GsfPropagatorWithMaterial::setPropagationDirection().

Member Data Documentation

◆ thePropagator

DeepCopyPointerByClone<Propagator> GsfPropagatorAdapter::thePropagator
private
GsfPropagatorAdapter::propagateWithPath
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
Definition: GsfPropagatorAdapter.cc:11
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
PropagationException
Common base class.
Definition: PropagationExceptions.h:14
Propagator::magneticField
virtual const MagneticField * magneticField() const =0
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
GsfPropagatorAdapter::GsfPropagatorAdapter
GsfPropagatorAdapter(const Propagator &Propagator)
Constructor with explicit propagator.
Definition: GsfPropagatorAdapter.cc:8
GsfPropagatorAdapter::thePropagator
DeepCopyPointerByClone< Propagator > thePropagator
Definition: GsfPropagatorAdapter.h:58
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition: AlignmentTrackSelector_cfi.py:17
Propagator::setPropagationDirection
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
MultiStatePropagation
Definition: MultiStatePropagation.h:15
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
Exception
Definition: hltDiff.cc:246
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
Propagator::setMaxDirectionChange
virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:151
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
Propagator::Propagator
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46