Go to the documentation of this file.00001 #ifndef CommonDet_Propagator_H
00002 #define CommonDet_Propagator_H
00003
00004 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00006 #include <utility>
00007
00008 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00009
00010 class FreeTrajectoryState;
00011 class TrajectoryStateOnSurface;
00012 class Plane;
00013 class Cylinder;
00014 class Surface;
00015 class MagneticField;
00016
00017 namespace reco{class BeamSpot;}
00018
00040 class Propagator {
00041 public:
00042
00043 Propagator (PropagationDirection dir = alongMomentum) :
00044 theDir(dir) {}
00045 virtual ~Propagator();
00046
00054 virtual TrajectoryStateOnSurface
00055 propagate (const FreeTrajectoryState&, const Surface&) const;
00056
00057 virtual TrajectoryStateOnSurface
00058 propagate (const FreeTrajectoryState&, const Plane&) const = 0;
00059
00060 virtual TrajectoryStateOnSurface
00061 propagate (const FreeTrajectoryState&, const Cylinder&) const = 0;
00062
00073 virtual TrajectoryStateOnSurface
00074 propagate (const TrajectoryStateOnSurface&, const Surface&) const;
00075
00076 virtual TrajectoryStateOnSurface
00077 propagate (const TrajectoryStateOnSurface&, const Plane&) const;
00078
00079 virtual TrajectoryStateOnSurface
00080 propagate (const TrajectoryStateOnSurface&, const Cylinder&) const;
00081
00082 virtual FreeTrajectoryState
00083 propagate(const FreeTrajectoryState&,
00084 const reco::BeamSpot&) const;
00085
00095 virtual std::pair< TrajectoryStateOnSurface, double>
00096 propagateWithPath (const FreeTrajectoryState&, const Surface&) const;
00097
00098 virtual std::pair< TrajectoryStateOnSurface, double>
00099 propagateWithPath (const FreeTrajectoryState&, const Plane&) const = 0;
00100
00101 virtual std::pair< TrajectoryStateOnSurface, double>
00102 propagateWithPath (const FreeTrajectoryState&, const Cylinder&) const=0;
00103
00114 virtual std::pair< TrajectoryStateOnSurface, double>
00115 propagateWithPath (const TrajectoryStateOnSurface&, const Surface&) const;
00116
00117 virtual std::pair< TrajectoryStateOnSurface, double>
00118 propagateWithPath (const TrajectoryStateOnSurface&, const Plane&) const;
00119
00120 virtual std::pair< TrajectoryStateOnSurface, double>
00121 propagateWithPath (const TrajectoryStateOnSurface&, const Cylinder&) const;
00122
00123 virtual std::pair<FreeTrajectoryState, double>
00124 propagateWithPath(const FreeTrajectoryState&,
00125 const GlobalPoint&, const GlobalPoint&) const;
00126
00134 virtual void setPropagationDirection(PropagationDirection dir) const {
00135 theDir = dir;
00136 }
00137
00145 virtual PropagationDirection propagationDirection() const {
00146 return theDir;
00147 }
00148
00159 virtual bool setMaxDirectionChange( float phiMax) { return false;}
00160
00161 virtual Propagator * clone() const = 0;
00162
00163 virtual const MagneticField* magneticField() const = 0;
00164
00165 private:
00166
00167 mutable PropagationDirection theDir;
00168 };
00169
00170 class SetPropagationDirection {
00171 private:
00172 Propagator const & prop;
00173 PropagationDirection oldDir;
00174 public:
00175 SetPropagationDirection(Propagator const & iprop, PropagationDirection dir) :
00176 prop(iprop),
00177 oldDir(iprop.propagationDirection()) {
00178 prop.setPropagationDirection(dir);
00179 }
00180 ~SetPropagationDirection() {
00181 prop.setPropagationDirection(oldDir);
00182 }
00183 };
00184
00185
00186 #endif // CommonDet_Propagator_H