CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/TrackingTools/GeomPropagators/interface/StraightLinePlaneCrossing.h

Go to the documentation of this file.
00001 #ifndef StraightLinePlaneCrossing_H_
00002 #define StraightLinePlaneCrossing_H_
00003 
00004 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
00005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00006 
00007 #include <utility>
00008 
00009 class Plane;
00010 
00014 class StraightLinePlaneCrossing {
00015 public:
00021   typedef Basic3DVector<float>   PositionType;
00022   typedef Basic3DVector<float>   DirectionType;
00023 
00024 public:
00027   StraightLinePlaneCrossing(const PositionType& point,
00028                             const DirectionType& momentum,
00029                             const PropagationDirection propDir = alongMomentum);
00030   // destructor
00031   ~StraightLinePlaneCrossing() {}
00032 
00036   std::pair<bool,double> pathLength (const Plane& plane) const;
00037 
00040   PositionType position (double s) const {return PositionType(theX0+s*theP0);}
00041 
00044   std::pair<bool,PositionType> position(const Plane& plane) const;
00045 
00046 private:
00047   //
00048   // single precision vectors sufficient for internal use
00049   //
00050 //   typedef Basic3DVector<double>  PositionTypeDouble;
00051 //   typedef Basic3DVector<double>  DirectionTypeDouble;
00052   typedef Basic3DVector<float>  PositionTypeDouble;
00053   typedef Basic3DVector<float>  DirectionTypeDouble;
00054 
00055   const PositionTypeDouble theX0;
00056   const PositionTypeDouble theP0;
00057   const PropagationDirection thePropDir;
00058 };
00059 
00060 #endif