CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Propagator.h
Go to the documentation of this file.
1 #ifndef CommonDet_Propagator_H
2 #define CommonDet_Propagator_H
3 
7 
8 
9 #include <utility>
10 #include <memory>
11 
13 
14 class Plane;
15 class Cylinder;
16 class Surface;
17 class MagneticField;
18 
19 namespace reco{class BeamSpot;}
20 
45 class Propagator {
46 public:
47 
49  theDir(dir) {}
50  virtual ~Propagator();
51 
52 
53 #ifndef CMS_NOCXX11
54  template<typename STA, typename SUR>
56  propagate (STA const & state, SUR const & surface) const {
57  return propagateWithPath(state,surface).first;
58  }
59 #endif
60 
61 public:
62 
72  virtual std::pair< TrajectoryStateOnSurface, double>
73  propagateWithPath (const FreeTrajectoryState&, const Surface&) const final;
74 
75  virtual std::pair< TrajectoryStateOnSurface, double>
77 
78  virtual std::pair< TrajectoryStateOnSurface, double>
79  propagateWithPath (const FreeTrajectoryState&, const Cylinder&) const=0;
80 
91  virtual std::pair< TrajectoryStateOnSurface, double>
92  propagateWithPath (const TrajectoryStateOnSurface& tsos, const Surface& sur) const final;
93 
94  virtual std::pair< TrajectoryStateOnSurface, double>
95  propagateWithPath (const TrajectoryStateOnSurface& tsos, const Plane& sur) const {
96  return propagateWithPath( *tsos.freeState(), sur);
97  }
98 
99  virtual std::pair< TrajectoryStateOnSurface, double>
100  propagateWithPath (const TrajectoryStateOnSurface& tsos, const Cylinder& sur) const {
101  return propagateWithPath( *tsos.freeState(), sur);
102  }
103 
104 
107  virtual std::pair<FreeTrajectoryState, double>
108  propagateWithPath(const FreeTrajectoryState& ftsStart, const GlobalPoint& pDest) const;
110  virtual std::pair<FreeTrajectoryState, double>
111  propagateWithPath(const FreeTrajectoryState& ftsStart,
112  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const;
114  virtual std::pair<FreeTrajectoryState, double>
115  propagateWithPath(const FreeTrajectoryState& ftsStart, const reco::BeamSpot& beamSpot) const;
116 
117  // this is a mess...
118  virtual FreeTrajectoryState
119  propagate(const FreeTrajectoryState& ftsStart, const GlobalPoint& pDest) const final {
120  return propagateWithPath(ftsStart,pDest).first;
121  }
122  virtual FreeTrajectoryState
124  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const final {
125  return propagateWithPath(ftsStart,pDest1,pDest2).first;
126  }
127  virtual FreeTrajectoryState
128  propagate(const FreeTrajectoryState& ftsStart, const reco::BeamSpot& beamSpot) const final{
129  return propagateWithPath(ftsStart,beamSpot).first;
130  }
131 
132 
133 
134 
135 
136 public:
145  theDir = dir;
146  }
147 
156  return theDir;
157  }
158 
169  virtual bool setMaxDirectionChange( float phiMax) { return false;}
170 
171  virtual Propagator * clone() const = 0;
172 
173  virtual const MagneticField* magneticField() const = 0;
174 
175 private:
176 
178 };
179 
180 // Put here declaration of helper function, so that it is
181 // automatically included in all proper places w/o having to add an
182 // additional include file. Keep implementation separate, to avoid
183 // multiple definition of the same symbol in all cc inlcuding this
184 // file.
185 std::unique_ptr<Propagator> SetPropagationDirection (Propagator const & iprop,
187 
188 #endif // CommonDet_Propagator_H
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:144
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
Definition: Propagator.h:100
virtual ~Propagator()
Definition: Propagator.cc:9
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:48
virtual Propagator * clone() const =0
PropagationDirection
virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:169
Definition: Plane.h:17
virtual PropagationDirection propagationDirection() const GCC11_FINAL
Definition: Propagator.h:155
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
Definition: Propagator.h:128
PropagationDirection theDir
Definition: Propagator.h:177
FreeTrajectoryState const * freeState(bool withErrors=true) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
string const
Definition: compareJSON.py:14
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:56
virtual const MagneticField * magneticField() const =0
dbl *** dir
Definition: mlp_gen.cc:35
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
Definition: Propagator.h:123
Unlimited (trivial) bounds.