Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:28

0001 #ifndef HELIXARBITRARYPLANECROSSING_H_
0002 #define HELIXARBITRARYPLANECROSSING_H_
0003 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0004 #include "TrackingTools/GeomPropagators/interface/HelixPlaneCrossing.h"
0005 #include "TrackingTools/GeomPropagators/interface/HelixArbitraryPlaneCrossing2Order.h"
0006 #include "FWCore/Utilities/interface/Visibility.h"
0007 
0008 /** Calculates intersections of a helix with planes of any orientation. */
0009 
0010 class HelixArbitraryPlaneCrossing final : public HelixPlaneCrossing {
0011 public:
0012   /** Constructor using point, direction and (transverse!) curvature.
0013    */
0014   HelixArbitraryPlaneCrossing(const PositionType& point,
0015                               const DirectionType& direction,
0016                               const float curvature,
0017                               const PropagationDirection propDir = alongMomentum);
0018   // destructor
0019   ~HelixArbitraryPlaneCrossing() override {}
0020 
0021   /** Propagation status (true if valid) and (signed) path length 
0022    *  along the helix from the starting point to the plane. The 
0023    *  starting point is given in the constructor.
0024    */
0025   std::pair<bool, double> pathLength(const Plane& plane) override;
0026 
0027   /** Position at pathlength s from the starting point.
0028    */
0029   PositionType position(double s) const override;
0030 
0031   /** Direction at pathlength s from the starting point.
0032    */
0033   DirectionType direction(double s) const override;
0034   //
0035   // double precision vectors for internal use
0036   //
0037   typedef Basic3DVector<double> PositionTypeDouble;
0038   typedef Basic3DVector<double> DirectionTypeDouble;
0039 
0040   /** Position at pathlength s from the starting point.
0041    */
0042   PositionTypeDouble positionInDouble(double s) const;
0043 
0044   /** Direction at pathlength s from the starting point.
0045    */
0046   DirectionTypeDouble directionInDouble(double s) const;
0047 
0048 private:
0049   /** Iteration control: check for significant distance to plane.
0050    */
0051   inline bool notAtSurface(const Plane&, const PositionTypeDouble&, const float) const dso_internal;
0052 
0053 private:
0054   HelixArbitraryPlaneCrossing2Order theQuadraticCrossingFromStart;
0055 
0056   const double theX0, theY0, theZ0;
0057   double theCosPhi0, theSinPhi0;
0058   double theCosTheta, theSinTheta;
0059   const double theRho;
0060 
0061   const PropagationDirection thePropDir;
0062 
0063   mutable double theCachedS;
0064   mutable double theCachedDPhi;
0065   mutable double theCachedSDPhi;
0066   mutable double theCachedCDPhi;
0067 
0068   static const float theNumericalPrecision;
0069   static const float theMaxDistToPlane;
0070 };
0071 
0072 #endif