CMS 3D CMS Logo

SmartPropagator.h
Go to the documentation of this file.
1 #ifndef GeomPropagators_SmartPropagator_H
2 #define GeomPropagators_SmartPropagator_H
3 
21 /* Collaborating Class Declarations */
28 
29 class Cylinder;
30 class Plane;
31 
32 /* Class SmartPropagator Interface */
33 
34 class SmartPropagator final : public Propagator {
35 public:
36  /* Constructor */
38  SmartPropagator(const Propagator* aTkProp,
39  const Propagator* aGenProp,
40  const MagneticField* field,
42  float epsilon = 5);
43 
45  SmartPropagator(const Propagator& aTkProp,
46  const Propagator& aGenProp,
47  const MagneticField* field,
49  float epsilon = 5);
50 
53 
55  ~SmartPropagator() override;
56 
58  SmartPropagator* clone() const override {
60  }
61 
67  }
68 
71 
72 private:
73  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
74  const Plane& plane) const override;
75 
76  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
77  const Cylinder& cylinder) const override;
78 
79  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
80  const Plane& sur) const override;
81 
82  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
83  const Cylinder& sur) const override;
84 
85 public:
87  bool insideTkVol(const FreeTrajectoryState& fts) const;
89  bool insideTkVol(const Surface& surface) const;
91  bool insideTkVol(const Cylinder& cylin) const;
93  bool insideTkVol(const Plane& plane) const;
94 
96  const Propagator* getTkPropagator() const;
98  const Propagator* getGenPropagator() const;
100  const MagneticField* magneticField() const override { return theField; }
101 
102 private:
104  void initTkVolume(float epsilon);
105 
110 
111 protected:
112 };
113 
114 #endif // SMARTPROPAGATOR_H
Propagator * theGenProp
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
void initTkVolume(float epsilon)
build the tracker volume
SmartPropagator * clone() const override
Virtual constructor (using copy c&#39;tor)
PropagationDirection
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
Definition: Plane.h:16
bool insideTkVol(const FreeTrajectoryState &fts) const
true if a fts is inside tracker volume
void setPropagationDirection(PropagationDirection dir) override
setting the direction fo both components
const Propagator * getTkPropagator() const
return the propagator used inside tracker
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
Propagator * theTkProp
const MagneticField * magneticField() const override
return the magneticField
const MagneticField * theField
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
SmartPropagator(const Propagator *aTkProp, const Propagator *aGenProp, const MagneticField *field, PropagationDirection dir=alongMomentum, float epsilon=5)
Defines which propagator is used inside Tk and which outside.
ReferenceCountingPointer< Cylinder > theTkVolume
~SmartPropagator() override
const Propagator * getGenPropagator() const
return the propagator used outside tracker