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
 
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< 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< 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 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< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
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 Plane &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
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
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 TrajectoryStateOnSurface &tsos, const Surface &sur) 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 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.

Referenced by clone().

9  : Propagator(aPropagator.propagationDirection()), thePropagator(aPropagator.clone()) {}
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
DeepCopyPointerByClone< Propagator > thePropagator

◆ ~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.

References GsfPropagatorAdapter(), and thePropagator.

52 { return new GsfPropagatorAdapter(*thePropagator); }
GsfPropagatorAdapter(const Propagator &Propagator)
Constructor with explicit propagator.
DeepCopyPointerByClone< Propagator > thePropagator

◆ magneticField()

const MagneticField* GsfPropagatorAdapter::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 54 of file GsfPropagatorAdapter.h.

References Propagator::magneticField(), and thePropagator.

Referenced by GsfPropagatorWithMaterial::magneticField().

54 { return thePropagator->magneticField(); }
DeepCopyPointerByClone< Propagator > thePropagator
virtual const MagneticField * magneticField() const =0

◆ propagate() [1/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  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagate() [2/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 109 of file Propagator.h.

109  {
110  return propagateWithPath(ftsStart, pDest).first;
111  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagate() [3/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 112 of file Propagator.h.

114  {
115  return propagateWithPath(ftsStart, pDest1, pDest2).first;
116  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagate() [4/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 117 of file Propagator.h.

118  {
119  return propagateWithPath(ftsStart, beamSpot).first;
120  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagateWithPath() [1/13]

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

◆ propagateWithPath() [2/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 }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
Definition: Plane.h:16
Common base class.

◆ propagateWithPath() [3/13]

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

◆ propagateWithPath() [4/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  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagateWithPath() [5/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() [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 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() [8/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  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override

◆ propagateWithPath() [9/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 }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
Definition: Plane.h:16
Common base class.

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

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

Referenced by GsfPropagatorWithMaterial::propagateWithPath().

12  {
14  return multiPropagator.propagateWithPath(tsos, plane);
15 }
DeepCopyPointerByClone< Propagator > thePropagator

◆ propagateWithPath() [11/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.

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

18  {
20  return multiPropagator.propagateWithPath(tsos, cylinder);
21 }
DeepCopyPointerByClone< Propagator > thePropagator

◆ propagateWithPath() [12/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.

References Propagator::propagateWithPath(), and thePropagator.

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 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
DeepCopyPointerByClone< Propagator > thePropagator
Log< level::Info, false > LogInfo

◆ propagateWithPath() [13/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.

References Propagator::propagateWithPath(), and thePropagator.

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 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
DeepCopyPointerByClone< Propagator > thePropagator
Log< level::Info, false > LogInfo

◆ propagator()

const Propagator& GsfPropagatorAdapter::propagator ( ) const
inline

access to single state propagator

Definition at line 50 of file GsfPropagatorAdapter.h.

References thePropagator.

50 { return *thePropagator; }
DeepCopyPointerByClone< Propagator > 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().

virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:151
DeepCopyPointerByClone< Propagator > thePropagator

◆ 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().

41  {
44 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
DeepCopyPointerByClone< Propagator > thePropagator

Member Data Documentation

◆ thePropagator

DeepCopyPointerByClone<Propagator> GsfPropagatorAdapter::thePropagator
private