CMS 3D CMS Logo

BeamHaloPropagator.cc
Go to the documentation of this file.
1 /******* \class BeamHaloPropagator *******
2  *
3  * Description: A propagator which use different algorithm to propagate
4  * within an endcap or to cross over to the other endcap
5  *
6  *
7  * \author : Jean-Roch VLIMANT UCSB
8  *
9  *********************************/
10 
11 /* This Class Header */
13 
14 /* Collaborating Class Header */
18 
20 
23 
24 /* Base Class Headers */
25 
26 /* C++ Headers */
27 
28 /* ====================================================================== */
29 
30 /* Constructor */
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 }
49 
51  const Propagator* aCrossTkProp,
52  const MagneticField* field,
54  : Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
56 }
57 
59  const Propagator& aCrossTkProp,
60  const MagneticField* field,
62  : Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
64 }
65 
67  : Propagator(aProp.propagationDirection()), theEndCapTkProp(nullptr), theCrossTkProp(nullptr) {
68  if (aProp.theEndCapTkProp)
70  if (aProp.theCrossTkProp)
72 }
73 
74 /* Destructor */
76  delete theEndCapTkProp;
77  delete theCrossTkProp;
78 }
79 
80 bool BeamHaloPropagator::crossingTk(const FreeTrajectoryState& fts, const Plane& plane) const {
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 }
86 
87 std::pair<TrajectoryStateOnSurface, double> BeamHaloPropagator::propagateWithPath(const FreeTrajectoryState& fts,
88  const Plane& plane) const {
89  if (crossingTk(fts, plane)) {
90  return getCrossTkPropagator()->propagateWithPath(fts, plane);
91  } else {
92  return getEndCapTkPropagator()->propagateWithPath(fts, plane);
93  }
94 }
95 
96 std::pair<TrajectoryStateOnSurface, double> BeamHaloPropagator::propagateWithPath(const FreeTrajectoryState& fts,
97  const Cylinder& cylinder) const {
98  return getCrossTkPropagator()->propagateWithPath(fts, cylinder);
99 }
100 
102  LogDebug("BeamHaloPropagator") << "using the EndCap propagator";
103  return theEndCapTkProp;
104 }
105 
107  LogDebug("BeamHaloPropagator") << "using the Crossing propagator";
108  return theCrossTkProp;
109 }
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
BeamHaloPropagator::~BeamHaloPropagator
~BeamHaloPropagator() override
Definition: BeamHaloPropagator.cc:75
MessageLogger.h
Cylinder.h
BeamHaloPropagator::getCrossTkPropagator
const Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
Definition: BeamHaloPropagator.cc:106
SimpleCylinderBounds.h
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
BeamHaloPropagator
Definition: BeamHaloPropagator.h:24
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
Definition: Propagator.h:44
Plane.h
TrackerBounds.h
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
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
BeamHaloPropagator.h
edm::LogError
Definition: MessageLogger.h:183
BeamHaloPropagator::theCrossTkProp
Propagator * theCrossTkProp
Definition: BeamHaloPropagator.h:81
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
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
Propagator::clone
virtual Propagator * clone() const =0
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
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
MagneticField
Definition: MagneticField.h:19
GlobalPoint.h
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
BeamHaloPropagator::directionCheck
void directionCheck(PropagationDirection dir)
Definition: BeamHaloPropagator.cc:31