CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
BeamHaloPropagator Class Reference

#include <BeamHaloPropagator.h>

Inheritance diagram for BeamHaloPropagator:
Propagator

Public Member Functions

 BeamHaloPropagator (Propagator *aEndCapTkProp, 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...
 
virtual BeamHaloPropagatorclone () const
 Virtual constructor (using copy c'tor) More...
 
bool crossingTk (const FreeTrajectoryState &fts, const Plane &plane) const
 true if the plane and the fts z position have different sign More...
 
PropagatorgetCrossTkPropagator () const
 return the propagator used to cross the tracker More...
 
PropagatorgetEndCapTkPropagator () const
 return the propagator used in endcaps More...
 
virtual const MagneticFieldmagneticField () const
 return the magneticField More...
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Surface &surface) const
 
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) const
 
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
 
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Surface &surface) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
 
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
 
void setPropagationDirection (PropagationDirection dir) const
 
virtual ~BeamHaloPropagator ()
 
- Public Member Functions inherited from Propagator
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const
 
virtual PropagationDirection propagationDirection () const
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual ~Propagator ()
 

Private Member Functions

void directionCheck (PropagationDirection dir) const
 

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 ( Propagator aEndCapTkProp,
Propagator aCrossTkProp,
const MagneticField field,
PropagationDirection  dir = alongMomentum 
)

Defines which propagator is used inside endcap and in barrel.

Definition at line 53 of file BeamHaloPropagator.cc.

References directionCheck().

Referenced by clone().

54  :
55  Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) {
57 }
Propagator * theCrossTkProp
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:41
virtual Propagator * clone() const =0
void directionCheck(PropagationDirection dir) const
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 60 of file BeamHaloPropagator.cc.

References directionCheck().

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

Copy constructor.

Definition at line 67 of file BeamHaloPropagator.cc.

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

67  :
69  if (aProp.theEndCapTkProp)
71  if (aProp.theCrossTkProp)
73 }
Propagator * theCrossTkProp
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:41
virtual Propagator * clone() const =0
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
Propagator * theEndCapTkProp
BeamHaloPropagator::~BeamHaloPropagator ( )
virtual

virtual destructor

Definition at line 76 of file BeamHaloPropagator.cc.

References theCrossTkProp, and theEndCapTkProp.

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

Member Function Documentation

virtual BeamHaloPropagator* BeamHaloPropagator::clone ( void  ) const
inlinevirtual

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  }
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual const MagneticField * magneticField() const
return the magneticField
BeamHaloPropagator(Propagator *aEndCapTkProp, Propagator *aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
Defines which propagator is used inside endcap and in barrel.
bool BeamHaloPropagator::crossingTk ( const FreeTrajectoryState fts,
const Plane plane 
) const

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

Definition at line 83 of file BeamHaloPropagator.cc.

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

Referenced by propagate(), and propagateWithPath().

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

Definition at line 34 of file BeamHaloPropagator.cc.

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

Referenced by BeamHaloPropagator().

34  {
35 
36  //consistency check for direction
38  edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
39  <<"EndCap propagator is: "<<getEndCapTkPropagator()->propagationDirection()
40  <<"\n to be set on: "<<dir;
42  }
43 
45  edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
46  <<"Cross propagator is: "<<getCrossTkPropagator()->propagationDirection()
47  <<"\n to be set on: "<<dir;
49  }
50 
51 }
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual void setPropagationDirection(PropagationDirection dir) const
Definition: Propagator.h:132
dbl *** dir
Definition: mlp_gen.cc:35
Propagator * BeamHaloPropagator::getCrossTkPropagator ( ) const

return the propagator used to cross the tracker

Definition at line 130 of file BeamHaloPropagator.cc.

References LogDebug, and theCrossTkProp.

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

130  {
131  LogDebug("BeamHaloPropagator")<<"using the Crossing propagator";
132  return theCrossTkProp;}
#define LogDebug(id)
Propagator * theCrossTkProp
Propagator * BeamHaloPropagator::getEndCapTkPropagator ( ) const

return the propagator used in endcaps

Definition at line 125 of file BeamHaloPropagator.cc.

References LogDebug, and theEndCapTkProp.

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

125  {
126  LogDebug("BeamHaloPropagator")<<"using the EndCap propagator";
127  return theEndCapTkProp;}
#define LogDebug(id)
Propagator * theEndCapTkProp
virtual const MagneticField* BeamHaloPropagator::magneticField ( ) const
inlinevirtual

return the magneticField

Implements Propagator.

Definition at line 124 of file BeamHaloPropagator.h.

References theField.

Referenced by clone().

124 {return theField;}
const MagneticField * theField
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState state,
const Surface sur 
) const
virtual

Propagate from a free state (e.g. position and momentum in in global cartesian coordinates) to a surface.Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 88 of file BeamHaloPropagator.cc.

References Propagator::propagate().

89  {
90  return Propagator::propagate( fts, surface);
91 }
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface state,
const Surface sur 
) const
inlinevirtual

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.

Reimplemented from Propagator.

Definition at line 63 of file BeamHaloPropagator.h.

References Propagator::propagate().

64  {
65  return Propagator::propagate(tsos,surface);
66  }
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const
virtual

Implements Propagator.

Definition at line 94 of file BeamHaloPropagator.cc.

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

95  {
96 
97  if (crossingTk(fts,plane)){
98  return getCrossTkPropagator()->propagate(fts, plane);}
99  else{
100  return getEndCapTkPropagator()->propagate(fts, plane);}
101 }
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
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 TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 71 of file BeamHaloPropagator.h.

References Propagator::propagate().

72  {
73  return Propagator::propagate(tsos, plane);
74  }
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
virtual

Implements Propagator.

Definition at line 104 of file BeamHaloPropagator.cc.

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

105  {
106  return getCrossTkPropagator()->propagate(fts, cylinder);
107 }
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 79 of file BeamHaloPropagator.h.

References Propagator::propagate().

80  {
81  return Propagator::propagate(tsos, cylinder);
82  }
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState state,
const Surface sur 
) const
inlinevirtual

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.

Reimplemented from Propagator.

Definition at line 85 of file BeamHaloPropagator.h.

References Propagator::propagateWithPath().

86  {
87  return Propagator::propagateWithPath(fts,surface);
88  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const TrajectoryStateOnSurface state,
const Surface sur 
) const
inlinevirtual

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.

Reimplemented from Propagator.

Definition at line 91 of file BeamHaloPropagator.h.

References Propagator::propagateWithPath().

92  {
93  return Propagator::propagateWithPath(tsos,surface);
94  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
virtual

Implements Propagator.

Definition at line 110 of file BeamHaloPropagator.cc.

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

112 {
113  if (crossingTk(fts,plane)){
114  return getCrossTkPropagator()->propagateWithPath(fts, plane);}
115  else{
116  return getEndCapTkPropagator()->propagateWithPath(fts, plane);}
117 }
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
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 TrajectoryStateOnSurface tsos,
const Plane plane 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 101 of file BeamHaloPropagator.h.

References Propagator::propagateWithPath().

102  {
103  return Propagator::propagateWithPath(tsos, plane);
104  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
virtual

Implements Propagator.

Definition at line 120 of file BeamHaloPropagator.cc.

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

122 { return getCrossTkPropagator()->propagateWithPath(fts, cylinder);}
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 111 of file BeamHaloPropagator.h.

References Propagator::propagateWithPath().

112  {
113  return Propagator::propagateWithPath(tsos, cylinder);
114  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
void BeamHaloPropagator::setPropagationDirection ( PropagationDirection  dir) const
inlinevirtual

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 getCrossTkPropagator(), getEndCapTkPropagator(), and Propagator::setPropagationDirection().

51  {
55  }
Propagator * getEndCapTkPropagator() const
return the propagator used in endcaps
Propagator * getCrossTkPropagator() const
return the propagator used to cross the tracker
virtual void setPropagationDirection(PropagationDirection dir) const
Definition: Propagator.h:132
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

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

Definition at line 131 of file BeamHaloPropagator.h.

Referenced by magneticField().