CMS 3D CMS Logo

Propagator.h
Go to the documentation of this file.
1 #ifndef CommonDet_Propagator_H
2 #define CommonDet_Propagator_H
3 
7 
8 #include <utility>
9 #include <memory>
10 
11 class Plane;
12 class Cylinder;
13 class Surface;
14 class MagneticField;
15 
16 namespace reco {
17  class BeamSpot;
18 }
19 
44 class Propagator {
45 public:
47  virtual ~Propagator();
48 
49  template <typename STA, typename SUR>
50  TrajectoryStateOnSurface propagate(STA const& state, SUR const& surface) const {
51  return propagateWithPath(state, surface).first;
52  }
53 
54 public:
64  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
65  const Surface&) const final;
66 
67  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
68  const Plane&) const = 0;
69 
70  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
71  const Cylinder&) const = 0;
72 
83  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
84  const Surface& sur) const final;
85 
86  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
87  const Plane& sur) const {
88  return propagateWithPath(*tsos.freeState(), sur);
89  }
90 
91  virtual std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
92  const Cylinder& sur) const {
93  return propagateWithPath(*tsos.freeState(), sur);
94  }
95 
98  virtual std::pair<FreeTrajectoryState, double> propagateWithPath(const FreeTrajectoryState& ftsStart,
99  const GlobalPoint& pDest) const;
101  virtual std::pair<FreeTrajectoryState, double> propagateWithPath(const FreeTrajectoryState& ftsStart,
102  const GlobalPoint& pDest1,
103  const GlobalPoint& pDest2) const;
105  virtual std::pair<FreeTrajectoryState, double> propagateWithPath(const FreeTrajectoryState& ftsStart,
106  const reco::BeamSpot& beamSpot) const;
107 
108  // this is a mess...
109  virtual FreeTrajectoryState propagate(const FreeTrajectoryState& ftsStart, const GlobalPoint& pDest) const final {
110  return propagateWithPath(ftsStart, pDest).first;
111  }
113  const GlobalPoint& pDest1,
114  const GlobalPoint& pDest2) const final {
115  return propagateWithPath(ftsStart, pDest1, pDest2).first;
116  }
118  const reco::BeamSpot& beamSpot) const final {
119  return propagateWithPath(ftsStart, beamSpot).first;
120  }
121 
122 public:
131 
140 
151  virtual bool setMaxDirectionChange(float phiMax) { return false; }
152 
153  virtual Propagator* clone() const = 0;
154 
155  virtual const MagneticField* magneticField() const = 0;
156 
157 private:
159 };
160 
161 // Put here declaration of helper function, so that it is
162 // automatically included in all proper places w/o having to add an
163 // additional include file. Keep implementation separate, to avoid
164 // multiple definition of the same symbol in all cc inlcuding this
165 // file.
166 std::unique_ptr<Propagator> SetPropagationDirection(Propagator const& iprop, PropagationDirection dir);
167 
168 #endif // CommonDet_Propagator_H
TrajectoryStateOnSurface.h
FreeTrajectoryState.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
Propagator::propagateWithPath
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &sur) const
Definition: Propagator.h:86
align::BeamSpot
Definition: StructureType.h:95
Propagator::theDir
PropagationDirection theDir
Definition: Propagator.h:158
Surface
Definition: Surface.h:36
SetPropagationDirection
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
Definition: HelperPropagatorUtility.cc:5
Propagator::magneticField
virtual const MagneticField * magneticField() const =0
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
watchdog.const
const
Definition: watchdog.py:83
Propagator
Definition: Propagator.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
Propagator::propagate
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:109
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
reco::BeamSpot
Definition: BeamSpot.h:21
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition: AlignmentTrackSelector_cfi.py:17
Point3DBase< float, GlobalTag >
Propagator::setPropagationDirection
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
Propagator::propagate
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
Definition: Propagator.h:112
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
Propagator::~Propagator
virtual ~Propagator()
Definition: Propagator.cc:8
PropagationDirection.h
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
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
Cylinder
Definition: Cylinder.h:19
MagneticField
Definition: MagneticField.h:19
Propagator::setMaxDirectionChange
virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:151
alongMomentum
Definition: PropagationDirection.h:4
Propagator::propagate
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
Definition: Propagator.h:117
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
Propagator::propagateWithPath
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
Definition: Propagator.h:91
Propagator::Propagator
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46