test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
31 
32 
33 /* Constructor */
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 }
53 
54 BeamHaloPropagator::BeamHaloPropagator(const Propagator* aEndCapTkProp, const Propagator* aCrossTkProp, const MagneticField* field,
56  Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
57  directionCheck(dir);
58 }
59 
60 
61 BeamHaloPropagator::BeamHaloPropagator(const Propagator& aEndCapTkProp, const Propagator& aCrossTkProp,const MagneticField* field,
63  Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
64  directionCheck(dir);
65 }
66 
67 
69  Propagator(aProp.propagationDirection()), theEndCapTkProp(0), theCrossTkProp(0) {
70  if (aProp.theEndCapTkProp)
72  if (aProp.theCrossTkProp)
74 }
75 
76 /* Destructor */
78 
79  delete theEndCapTkProp;
80  delete theCrossTkProp;
81 
82 }
83 
84 bool BeamHaloPropagator::crossingTk(const FreeTrajectoryState& fts, const Plane& plane) const{
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);}
88 
89 
90 
91 std::pair<TrajectoryStateOnSurface,double>
93  const Plane& plane) const
94 {
95  if (crossingTk(fts,plane)){
96  return getCrossTkPropagator()->propagateWithPath(fts, plane);}
97  else{
98  return getEndCapTkPropagator()->propagateWithPath(fts, plane);}
99 }
100 
101 std::pair<TrajectoryStateOnSurface,double>
103  const Cylinder& cylinder) const
104 { return getCrossTkPropagator()->propagateWithPath(fts, cylinder);}
105 
106 
108  LogDebug("BeamHaloPropagator")<<"using the EndCap propagator";
109  return theEndCapTkProp;}
110 
111 
113  LogDebug("BeamHaloPropagator")<<"using the Crossing propagator";
114  return theCrossTkProp;}
115 
116 
#define LogDebug(id)
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:140
Propagator * theCrossTkProp
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 Propagator * clone() const =0
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
void directionCheck(PropagationDirection dir)
PropagationDirection
Definition: Plane.h:17
const Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
T z() const
Definition: PV3DBase.h:64
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
GlobalPoint position() const
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
dbl *** dir
Definition: mlp_gen.cc:35
const PositionType & position() const
Propagator * theEndCapTkProp