Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:33

0001 #ifndef HelixBarrelPlaneCrossingByCircle_H
0002 #define HelixBarrelPlaneCrossingByCircle_H
0003 
0004 #include "TrackingTools/GeomPropagators/interface/HelixPlaneCrossing.h"
0005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0006 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0007 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0008 
0009 /** Computes the crossing of a helix with a barrel plane.
0010  *  Exact if the magnetic field is parallel to the plane.
0011  */
0012 
0013 class HelixBarrelPlaneCrossingByCircle final : public HelixPlaneCrossing {
0014 public:
0015   HelixBarrelPlaneCrossingByCircle(const PositionType& pos,
0016                                    const DirectionType& dir,
0017                                    double rho,
0018                                    PropagationDirection propDir = alongMomentum);
0019 
0020   HelixBarrelPlaneCrossingByCircle(const GlobalPoint& pos,
0021                                    const GlobalVector& dir,
0022                                    double rho,
0023                                    PropagationDirection propDir = alongMomentum);
0024 
0025   std::pair<bool, double> pathLength(const Plane&) override;
0026 
0027   PositionType position(double s) const override;
0028 
0029   DirectionType direction(double s) const override;
0030 
0031 private:
0032   typedef Basic2DVector<double> Vector2D;
0033 
0034   PositionType theStartingPos;
0035   DirectionType theStartingDir;
0036   double theRho;
0037   PropagationDirection thePropDir;
0038 
0039   double theCosTheta;
0040   double theSinTheta;
0041   double theXCenter;
0042   double theYCenter;
0043 
0044   // caching of the solution for faster access
0045   double theS;
0046   Vector2D theD;
0047   double theDmag;
0048 
0049   // internal communication - not very clean
0050   double theActualDir;
0051   bool useStraightLine;
0052 
0053   void init();
0054   bool chooseSolution(const Vector2D& d1, const Vector2D& d2);
0055 };
0056 
0057 #endif