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...
 
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::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 54 of file BeamHaloPropagator.cc.

References directionCheck().

Referenced by clone().

55  :
56  Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
58 }
Propagator * theCrossTkProp
virtual Propagator * clone() const =0
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
void directionCheck(PropagationDirection dir)
const MagneticField * theField
dbl *** dir
Definition: mlp_gen.cc:35
Propagator * theEndCapTkProp
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 61 of file BeamHaloPropagator.cc.

References directionCheck().

62  :
63  Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
65 }
Propagator * theCrossTkProp
virtual Propagator * clone() const =0
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
void directionCheck(PropagationDirection dir)
const MagneticField * theField
dbl *** dir
Definition: mlp_gen.cc:35
Propagator * theEndCapTkProp
BeamHaloPropagator::BeamHaloPropagator ( const BeamHaloPropagator aProp)

Copy constructor.

Definition at line 68 of file BeamHaloPropagator.cc.

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

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

virtual destructor

Definition at line 77 of file BeamHaloPropagator.cc.

References theCrossTkProp, and theEndCapTkProp.

77  {
78 
79  delete theEndCapTkProp;
80  delete theCrossTkProp;
81 
82 }
Propagator * theCrossTkProp
Propagator * theEndCapTkProp

Member Function Documentation

BeamHaloPropagator* BeamHaloPropagator::clone ( void  ) const
inlineoverridevirtual

Virtual constructor (using copy c'tor)

Implements Propagator.

Definition at line 45 of file BeamHaloPropagator.h.

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

45  {
47  }
const MagneticField * magneticField() const override
return the magneticField
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.
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
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 84 of file BeamHaloPropagator.cc.

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

Referenced by propagateWithPath(), and setPropagationDirection().

84  {
85  LogDebug("BeamHaloPropagator")<<"going from: "<<fts.position()<<" to: "<<plane.position()<<"\n"
86  <<"and hence "<<((fts.position().z()*plane.position().z()<0)?"crossing":"not crossing");
87  return (fts.position().z()*plane.position().z()<0);}
#define LogDebug(id)
T z() const
Definition: PV3DBase.h:64
GlobalPoint position() const
const PositionType & position() const
void BeamHaloPropagator::directionCheck ( PropagationDirection  dir)
private

Definition at line 34 of file BeamHaloPropagator.cc.

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

Referenced by BeamHaloPropagator(), and magneticField().

34  {
35 
36  //consistency check for direction
39  edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
40  <<"EndCap propagator is: "<<getEndCapTkPropagator()->propagationDirection()
41  <<"\n to be set on: "<<dir;
43  }
44 
47  edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
48  <<"Cross propagator is: "<<getCrossTkPropagator()->propagationDirection()
49  <<"\n to be set on: "<<dir;
51  }
52 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:140
Propagator * theCrossTkProp
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
dbl *** dir
Definition: mlp_gen.cc:35
Propagator * theEndCapTkProp
const Propagator * BeamHaloPropagator::getCrossTkPropagator ( ) const
private

return the propagator used to cross the tracker

Definition at line 112 of file BeamHaloPropagator.cc.

References LogDebug, and theCrossTkProp.

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

112  {
113  LogDebug("BeamHaloPropagator")<<"using the Crossing propagator";
114  return theCrossTkProp;}
#define LogDebug(id)
Propagator * theCrossTkProp
const Propagator * BeamHaloPropagator::getEndCapTkPropagator ( ) const
private

return the propagator used in endcaps

Definition at line 107 of file BeamHaloPropagator.cc.

References LogDebug, and theEndCapTkProp.

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

107  {
108  LogDebug("BeamHaloPropagator")<<"using the EndCap propagator";
109  return theEndCapTkProp;}
#define LogDebug(id)
Propagator * theEndCapTkProp
const MagneticField* BeamHaloPropagator::magneticField ( ) const
inlineoverrideprivatevirtual

return the magneticField

Implements Propagator.

Definition at line 80 of file BeamHaloPropagator.h.

References dir, directionCheck(), and theField.

Referenced by clone().

80 {return theField;}
const MagneticField * theField
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 92 of file BeamHaloPropagator.cc.

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

Referenced by setPropagationDirection().

94 {
95  if (crossingTk(fts,plane)){
96  return getCrossTkPropagator()->propagateWithPath(fts, plane);}
97  else{
98  return getEndCapTkPropagator()->propagateWithPath(fts, plane);}
99 }
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
bool crossingTk(const FreeTrajectoryState &fts, const Plane &plane) const
true if the plane and the fts z position have different sign
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 102 of file BeamHaloPropagator.cc.

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

104 { return getCrossTkPropagator()->propagateWithPath(fts, cylinder);}
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:15
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 50 of file BeamHaloPropagator.h.

References crossingTk(), getCrossTkPropagator(), getEndCapTkPropagator(), Propagator::propagate(), propagateWithPath(), Propagator::propagateWithPath(), Propagator::setPropagationDirection(), theCrossTkProp, and theEndCapTkProp.

51  {
55  }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:140
Propagator * theCrossTkProp
dbl *** dir
Definition: mlp_gen.cc:35
Propagator * theEndCapTkProp

Member Data Documentation

Propagator* BeamHaloPropagator::theCrossTkProp
private
Propagator* BeamHaloPropagator::theEndCapTkProp
private
const MagneticField* BeamHaloPropagator::theField
private

Definition at line 87 of file BeamHaloPropagator.h.

Referenced by magneticField().