CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/TrackingTools/GeomPropagators/interface/HelixExtrapolatorToLine2Order.h

Go to the documentation of this file.
00001 #ifndef HelixExtrapolatorToLine2Order_h_
00002 #define HelixExtrapolatorToLine2Order_h_
00003 
00004 #include "TrackingTools/GeomPropagators/interface/HelixLineExtrapolation.h"
00005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00006 
00010 class HelixExtrapolatorToLine2Order : public HelixLineExtrapolation {
00011 public:
00013   HelixExtrapolatorToLine2Order(const PositionType& point,
00014                                 const DirectionType& direction,
00015                                 const float curvature,
00016                                 const PropagationDirection propDir = alongMomentum);
00017 
00019   HelixExtrapolatorToLine2Order(const double& x0, const double& y0, const double& z0,
00020                                 const double& cosPhi0, const double& sinPhi0,
00021                                 const double& cosTheta, const double& sinTheta,
00022                                 const double& rho,
00023                                 const PropagationDirection propDir = alongMomentum) :
00024     thePosition(x0,y0,z0),
00025     theDirection(cosPhi0,sinPhi0,cosTheta/sinTheta),
00026     theSinTheta(sinTheta),
00027     theRho(rho), 
00028     thePropDir(propDir) {}
00029   
00030   // destructor
00031   virtual ~HelixExtrapolatorToLine2Order() {}
00032 
00037   virtual std::pair<bool,double> pathLength (const GlobalPoint& point) const;
00038 
00043   virtual std::pair<bool,double> pathLength (const Line& line) const;
00044 
00046   virtual PositionType position(double s) const;
00047 
00049   virtual DirectionType direction(double s) const;
00050 
00052   PositionTypeDouble positionInDouble(double s) const;
00053 
00055   DirectionTypeDouble directionInDouble(double s) const;
00056 
00057 private:
00059   virtual std::pair<bool,double> pathLengthFromCoefficients (const double ceq[4]) const;
00061   int solve3rdOrder (const double ceq[], double sol[]) const;
00063   int solve2ndOrder (const double ceq[], double sol[]) const;
00064 
00065 private:
00066   const PositionTypeDouble thePosition;
00067   DirectionTypeDouble theDirection;
00068   double theSinTheta;
00069   const double theRho;
00070   const PropagationDirection thePropDir;
00071 };
00072 
00073 #endif
00074 
00075