CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackingTools/GeomPropagators/interface/StraightLinePropagator.h

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   // compute propagated state, with errors if needed
00070   TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts, 
00071                                            const Surface& surface, 
00072                                            const AlgebraicMatrix& jacobian, 
00073                                            const GlobalPoint& x, 
00074                                            const GlobalVector& p) const;
00075 
00076   TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts, 
00077                                            const Surface& surface, 
00078                                            const AlgebraicMatrix& jacobian, 
00079                                            const LocalPoint& x, 
00080                                            const LocalVector& p) const;
00081 
00082   TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts, 
00083                                            const Surface& surface, 
00084                                            const AlgebraicMatrix55& jacobian, 
00085                                            const GlobalPoint& x, 
00086                                            const GlobalVector& p) const;
00087 
00088   TrajectoryStateOnSurface propagatedState(const FreeTrajectoryState& fts, 
00089                                            const Surface& surface, 
00090                                            const AlgebraicMatrix55& jacobian, 
00091                                            const LocalPoint& x, 
00092                                            const LocalVector& p) const;
00093 
00094 
00095   // compute jacobian of transform
00096   AlgebraicMatrix55 jacobian(double& s) const;
00097   AlgebraicMatrix jacobian_old(double& s) const;
00098 
00099   // compute propagated x and p and path s, return true when propagation is OK
00100   bool propagateParametersOnCylinder(const FreeTrajectoryState& fts, 
00101                                      const Cylinder& cylinder, 
00102                                      GlobalPoint& x, 
00103                                      GlobalVector& p, 
00104                                      double& s) const;
00105 
00106   // compute propagated x and p and path s, return true when propagation is OK
00107   bool propagateParametersOnPlane(const FreeTrajectoryState& fts, 
00108                                   const Plane& plane, 
00109                                   LocalPoint& x, 
00110                                   LocalVector& p, 
00111                                   double& s) const;
00112 
00113 };
00114 
00115 #endif