CMS 3D CMS Logo

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

#include <BeamHaloPropagator.h>

Inheritance diagram for BeamHaloPropagator:
Propagator

Public Member Functions

 BeamHaloPropagator (const Propagator *aEndCapTkProp, const Propagator *aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
 Defines which propagator is used inside endcap and in barrel. More...
 
 BeamHaloPropagator (const Propagator &aEndCapTkProp, const Propagator &aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
 Defines which propagator is used inside endcap and in barrel. More...
 
 BeamHaloPropagator (const BeamHaloPropagator &)
 Copy constructor. More...
 
BeamHaloPropagatorclone () const override
 Virtual constructor (using copy c'tor) More...
 
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 TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Surface &) 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...
 
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< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const=0
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const=0
 
void setPropagationDirection (PropagationDirection dir) override
 
 ~BeamHaloPropagator () 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< 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 final
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual ~Propagator ()
 

Private Member Functions

bool crossingTk (const FreeTrajectoryState &fts, const Plane &plane) const
 true if the plane and the fts z position have different sign More...
 
void directionCheck (PropagationDirection dir)
 
const PropagatorgetCrossTkPropagator () const
 return the propagator used to cross the tracker More...
 
const PropagatorgetEndCapTkPropagator () const
 return the propagator used in endcaps More...
 
const MagneticFieldmagneticField () const override
 return the magneticField More...
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const override
 

Private Attributes

PropagatortheCrossTkProp
 
PropagatortheEndCapTkProp
 
const MagneticFieldtheField
 

Detailed Description

A propagator which use different algorithm to propagate within an endcap or to cross over to the other endcap

Author
Jean-Roch VLIMANT UCSB

Definition at line 24 of file BeamHaloPropagator.h.

Constructor & Destructor Documentation

◆ BeamHaloPropagator() [1/3]

BeamHaloPropagator::BeamHaloPropagator ( const Propagator aEndCapTkProp,
const Propagator aCrossTkProp,
const MagneticField field,
PropagationDirection  dir = alongMomentum 
)

Defines which propagator is used inside endcap and in barrel.

Definition at line 50 of file BeamHaloPropagator.cc.

References DeadROC_duringRun::dir, and directionCheck().

Referenced by clone().

54  : Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
56 }
Propagator * theCrossTkProp
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
virtual Propagator * clone() const =0
void directionCheck(PropagationDirection dir)
const MagneticField * theField
Propagator * theEndCapTkProp

◆ BeamHaloPropagator() [2/3]

BeamHaloPropagator::BeamHaloPropagator ( const Propagator aEndCapTkProp,
const Propagator aCrossTkProp,
const MagneticField field,
PropagationDirection  dir = alongMomentum 
)

Defines which propagator is used inside endcap and in barrel.

Definition at line 58 of file BeamHaloPropagator.cc.

References DeadROC_duringRun::dir, and directionCheck().

62  : Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
64 }
Propagator * theCrossTkProp
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
virtual Propagator * clone() const =0
void directionCheck(PropagationDirection dir)
const MagneticField * theField
Propagator * theEndCapTkProp

◆ BeamHaloPropagator() [3/3]

BeamHaloPropagator::BeamHaloPropagator ( const BeamHaloPropagator aProp)

Copy constructor.

Definition at line 66 of file BeamHaloPropagator.cc.

References Propagator::clone(), getCrossTkPropagator(), getEndCapTkPropagator(), theCrossTkProp, and theEndCapTkProp.

67  : Propagator(aProp.propagationDirection()), theEndCapTkProp(nullptr), theCrossTkProp(nullptr) {
68  if (aProp.theEndCapTkProp)
70  if (aProp.theCrossTkProp)
72 }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
Propagator * theCrossTkProp
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
virtual Propagator * clone() const =0
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
Propagator * theEndCapTkProp

◆ ~BeamHaloPropagator()

BeamHaloPropagator::~BeamHaloPropagator ( )
override

virtual destructor

Definition at line 75 of file BeamHaloPropagator.cc.

References theCrossTkProp, and theEndCapTkProp.

75  {
76  delete theEndCapTkProp;
77  delete theCrossTkProp;
78 }
Propagator * theCrossTkProp
Propagator * theEndCapTkProp

Member Function Documentation

◆ clone()

BeamHaloPropagator* BeamHaloPropagator::clone ( void  ) const
inlineoverridevirtual

Virtual constructor (using copy c'tor)

Implements Propagator.

Definition at line 46 of file BeamHaloPropagator.h.

References BeamHaloPropagator(), getCrossTkPropagator(), getEndCapTkPropagator(), magneticField(), and Propagator::propagationDirection().

46  {
47  return new BeamHaloPropagator(
49  }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
BeamHaloPropagator(const Propagator *aEndCapTkProp, const Propagator *aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
Defines which propagator is used inside endcap and in barrel.
const MagneticField * magneticField() const override
return the magneticField
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps

◆ crossingTk()

bool BeamHaloPropagator::crossingTk ( const FreeTrajectoryState fts,
const Plane plane 
) const
private

true if the plane and the fts z position have different sign

Definition at line 80 of file BeamHaloPropagator.cc.

References LogDebug, GloballyPositioned< T >::position(), FreeTrajectoryState::position(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by propagateWithPath().

80  {
81  LogDebug("BeamHaloPropagator") << "going from: " << fts.position() << " to: " << plane.position() << "\n"
82  << "and hence "
83  << ((fts.position().z() * plane.position().z() < 0) ? "crossing" : "not crossing");
84  return (fts.position().z() * plane.position().z() < 0);
85 }
T z() const
Definition: PV3DBase.h:61
GlobalPoint position() const
const PositionType & position() const
#define LogDebug(id)

◆ directionCheck()

void BeamHaloPropagator::directionCheck ( PropagationDirection  dir)
private

Definition at line 31 of file BeamHaloPropagator.cc.

References anyDirection, DeadROC_duringRun::dir, getCrossTkPropagator(), getEndCapTkPropagator(), Propagator::propagationDirection(), Propagator::setPropagationDirection(), theCrossTkProp, and theEndCapTkProp.

Referenced by BeamHaloPropagator().

31  {
32  //consistency check for direction
35  edm::LogError("BeamHaloPropagator") << "composite propagator set with inconsistent direction components\n"
36  << "EndCap propagator is: " << getEndCapTkPropagator()->propagationDirection()
37  << "\n to be set on: " << dir;
39  }
40 
43  edm::LogError("BeamHaloPropagator") << "composite propagator set with inconsistent direction components\n"
44  << "Cross propagator is: " << getCrossTkPropagator()->propagationDirection()
45  << "\n to be set on: " << dir;
47  }
48 }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
Propagator * theCrossTkProp
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
Log< level::Error, false > LogError
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
Propagator * theEndCapTkProp

◆ getCrossTkPropagator()

const Propagator * BeamHaloPropagator::getCrossTkPropagator ( ) const
private

return the propagator used to cross the tracker

Definition at line 106 of file BeamHaloPropagator.cc.

References LogDebug, and theCrossTkProp.

Referenced by BeamHaloPropagator(), clone(), directionCheck(), and propagateWithPath().

106  {
107  LogDebug("BeamHaloPropagator") << "using the Crossing propagator";
108  return theCrossTkProp;
109 }
Propagator * theCrossTkProp
#define LogDebug(id)

◆ getEndCapTkPropagator()

const Propagator * BeamHaloPropagator::getEndCapTkPropagator ( ) const
private

return the propagator used in endcaps

Definition at line 101 of file BeamHaloPropagator.cc.

References LogDebug, and theEndCapTkProp.

Referenced by BeamHaloPropagator(), clone(), directionCheck(), and propagateWithPath().

101  {
102  LogDebug("BeamHaloPropagator") << "using the EndCap propagator";
103  return theEndCapTkProp;
104 }
Propagator * theEndCapTkProp
#define LogDebug(id)

◆ magneticField()

const MagneticField* BeamHaloPropagator::magneticField ( ) const
inlineoverrideprivatevirtual

return the magneticField

Implements Propagator.

Definition at line 75 of file BeamHaloPropagator.h.

References theField.

Referenced by clone().

75 { return theField; }
const MagneticField * theField

◆ 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 FreeTrajectoryState &fts, const Plane &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 FreeTrajectoryState &fts, const Plane &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 FreeTrajectoryState &fts, const Plane &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 FreeTrajectoryState &fts, const Plane &plane) const override

◆ propagateWithPath() [1/11]

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() [2/11]

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

◆ propagateWithPath() [3/11]

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 FreeTrajectoryState &fts, const Plane &plane) const override

◆ propagateWithPath() [4/11]

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() [5/11]

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() [6/11]

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

◆ propagateWithPath() [7/11]

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

◆ propagateWithPath() [8/11]

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 FreeTrajectoryState &fts, const Plane &plane) const override

◆ propagateWithPath() [9/11]

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

◆ propagateWithPath() [10/11]

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

Implements Propagator.

Definition at line 87 of file BeamHaloPropagator.cc.

References crossingTk(), getCrossTkPropagator(), getEndCapTkPropagator(), and Propagator::propagateWithPath().

88  {
89  if (crossingTk(fts, plane)) {
90  return getCrossTkPropagator()->propagateWithPath(fts, plane);
91  } else {
92  return getEndCapTkPropagator()->propagateWithPath(fts, plane);
93  }
94 }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
bool crossingTk(const FreeTrajectoryState &fts, const Plane &plane) const
true if the plane and the fts z position have different sign
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps

◆ propagateWithPath() [11/11]

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

Implements Propagator.

Definition at line 96 of file BeamHaloPropagator.cc.

References getCrossTkPropagator(), and Propagator::propagateWithPath().

97  {
98  return getCrossTkPropagator()->propagateWithPath(fts, cylinder);
99 }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10

◆ setPropagationDirection()

void BeamHaloPropagator::setPropagationDirection ( PropagationDirection  dir)
inlineoverridevirtual

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 51 of file BeamHaloPropagator.h.

References DeadROC_duringRun::dir, Propagator::setPropagationDirection(), theCrossTkProp, and theEndCapTkProp.

Member Data Documentation

◆ theCrossTkProp

Propagator* BeamHaloPropagator::theCrossTkProp
private

◆ theEndCapTkProp

Propagator* BeamHaloPropagator::theEndCapTkProp
private

◆ theField

const MagneticField* BeamHaloPropagator::theField
private

Definition at line 82 of file BeamHaloPropagator.h.

Referenced by magneticField().