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 BeamHaloPropagator &)
 Copy constructor. 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 Propagator *aEndCapTkProp, const Propagator *aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
 Defines which propagator is used inside endcap and in barrel. 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 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
 
void setPropagationDirection (PropagationDirection dir) override
 
 ~BeamHaloPropagator () 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 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 ~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 Cylinder &cylinder) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) 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.

54  : Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
56 }

References DeadROC_duringRun::dir, and directionCheck().

Referenced by clone().

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

62  : Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
64 }

References DeadROC_duringRun::dir, and directionCheck().

◆ BeamHaloPropagator() [3/3]

BeamHaloPropagator::BeamHaloPropagator ( const BeamHaloPropagator aProp)

Copy constructor.

Definition at line 66 of file BeamHaloPropagator.cc.

67  : Propagator(aProp.propagationDirection()), theEndCapTkProp(nullptr), theCrossTkProp(nullptr) {
68  if (aProp.theEndCapTkProp)
70  if (aProp.theCrossTkProp)
72 }

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

◆ ~BeamHaloPropagator()

BeamHaloPropagator::~BeamHaloPropagator ( )
override

virtual destructor

Definition at line 75 of file BeamHaloPropagator.cc.

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

References theCrossTkProp, and 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().

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

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 }

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

Referenced by propagateWithPath().

◆ directionCheck()

void BeamHaloPropagator::directionCheck ( PropagationDirection  dir)
private

Definition at line 31 of file BeamHaloPropagator.cc.

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 }

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

Referenced by BeamHaloPropagator().

◆ getCrossTkPropagator()

const Propagator * BeamHaloPropagator::getCrossTkPropagator ( ) const
private

return the propagator used to cross the tracker

Definition at line 106 of file BeamHaloPropagator.cc.

106  {
107  LogDebug("BeamHaloPropagator") << "using the Crossing propagator";
108  return theCrossTkProp;
109 }

References LogDebug, and theCrossTkProp.

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

◆ getEndCapTkPropagator()

const Propagator * BeamHaloPropagator::getEndCapTkPropagator ( ) const
private

return the propagator used in endcaps

Definition at line 101 of file BeamHaloPropagator.cc.

101  {
102  LogDebug("BeamHaloPropagator") << "using the EndCap propagator";
103  return theEndCapTkProp;
104 }

References LogDebug, and theEndCapTkProp.

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

◆ magneticField()

const MagneticField* BeamHaloPropagator::magneticField ( ) const
inlineoverrideprivatevirtual

return the magneticField

Implements Propagator.

Definition at line 75 of file BeamHaloPropagator.h.

75 { return theField; }

References theField.

Referenced by clone().

◆ 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/11]

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

◆ propagateWithPath() [2/11]

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

◆ propagateWithPath() [3/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 }

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

97  {
98  return getCrossTkPropagator()->propagateWithPath(fts, cylinder);
99 }

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

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

88  {
89  if (crossingTk(fts, plane)) {
90  return getCrossTkPropagator()->propagateWithPath(fts, plane);
91  } else {
92  return getEndCapTkPropagator()->propagateWithPath(fts, plane);
93  }
94 }

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

◆ propagateWithPath() [6/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() [7/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() [8/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() [9/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  }

◆ propagateWithPath() [10/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  }

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

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

anyDirection
Definition: PropagationDirection.h:4
BeamHaloPropagator::crossingTk
bool crossingTk(const FreeTrajectoryState &fts, const Plane &plane) const
true if the plane and the fts z position have different sign
Definition: BeamHaloPropagator.cc:80
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
PropagationException
Common base class.
Definition: PropagationExceptions.h:14
BeamHaloPropagator::getCrossTkPropagator
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
Definition: BeamHaloPropagator.cc:106
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
BeamHaloPropagator::theField
const MagneticField * theField
Definition: BeamHaloPropagator.h:82
BeamHaloPropagator::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: BeamHaloPropagator.cc:50
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
Propagator::setPropagationDirection
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
BeamHaloPropagator::theCrossTkProp
Propagator * theCrossTkProp
Definition: BeamHaloPropagator.h:81
BeamHaloPropagator::magneticField
const MagneticField * magneticField() const override
return the magneticField
Definition: BeamHaloPropagator.h:75
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
BeamHaloPropagator::propagateWithPath
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
Definition: BeamHaloPropagator.cc:87
BeamHaloPropagator::getEndCapTkPropagator
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
Definition: BeamHaloPropagator.cc:101
Propagator::clone
virtual Propagator * clone() const =0
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
BeamHaloPropagator::theEndCapTkProp
Propagator * theEndCapTkProp
Definition: BeamHaloPropagator.h:80
Cylinder
Definition: Cylinder.h:19
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
Propagator::Propagator
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
BeamHaloPropagator::directionCheck
void directionCheck(PropagationDirection dir)
Definition: BeamHaloPropagator.cc:31