Go to the documentation of this file.00001 #ifndef TR_StraightLine_Propagator_H_
00002 #define TR_StraightLine_Propagator_H_
00003
00004 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00006 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00007
00008 class MagneticField;
00009
00010
00017 class StraightLinePropagator : public Propagator {
00018
00019 private:
00020
00021 typedef FreeTrajectoryState FTS;
00022 typedef TrajectoryStateOnSurface TSOS;
00023
00024 public:
00025
00026 StraightLinePropagator( const MagneticField* field,
00027 PropagationDirection aDir = alongMomentum) :
00028 Propagator(aDir), theField(field) {}
00029
00030 ~StraightLinePropagator() {}
00031
00032 virtual TSOS propagate(const FreeTrajectoryState& fts,
00033 const Surface& surface) const {
00034 return Propagator::propagate(fts, surface);
00035 }
00036
00037 virtual TSOS propagate(const FreeTrajectoryState& fts,
00038 const Plane& plane) const {
00039 return propagateWithPath(fts,plane).first;
00040 }
00041
00042 virtual TSOS propagate(const FreeTrajectoryState& fts,
00043 const Cylinder& cylinder) const {
00044 return propagateWithPath(fts,cylinder).first;
00045 }
00046
00047 std::pair<TSOS,double> propagateWithPath(const FreeTrajectoryState& fts,
00048 const Surface& surface) const {
00049 return Propagator::propagateWithPath(fts,surface);
00050 }
00051
00052 std::pair<TSOS,double> propagateWithPath(const FreeTrajectoryState& fts,
00053 const Plane& surface) const;
00054
00055 std::pair<TSOS,double> propagateWithPath(const FreeTrajectoryState& fts,
00056 const Cylinder& surface) const;
00057
00058 virtual StraightLinePropagator * clone() const {
00059 return new StraightLinePropagator(*this);
00060 }
00061
00062
00063 virtual const MagneticField* magneticField() const {return theField;}
00064
00065 private:
00066
00067 const MagneticField* theField;
00068
00069
00070 TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts,
00071 const Surface& surface,
00072 const AlgebraicMatrix55& jacobian,
00073 const GlobalPoint& x,
00074 const GlobalVector& p) const;
00075
00076 TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts,
00077 const Surface& surface,
00078 const AlgebraicMatrix55& jacobian,
00079 const LocalPoint& x,
00080 const LocalVector& p) const;
00081
00082
00083
00084 AlgebraicMatrix55 jacobian(double& s) const;
00085
00086
00087 bool propagateParametersOnCylinder(const FreeTrajectoryState& fts,
00088 const Cylinder& cylinder,
00089 GlobalPoint& x,
00090 GlobalVector& p,
00091 double& s) const;
00092
00093
00094 bool propagateParametersOnPlane(const FreeTrajectoryState& fts,
00095 const Plane& plane,
00096 LocalPoint& x,
00097 LocalVector& p,
00098 double& s) const;
00099
00100 };
00101
00102 #endif