Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HelixPlaneCrossing_H
0002 #define HelixPlaneCrossing_H
0003 
0004 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
0005 
0006 #include <utility>
0007 
0008 class Plane;
0009 
0010 /** Abstract interface for the crossing of a helix with a plane.
0011  */
0012 
0013 class HelixPlaneCrossing {
0014 public:
0015   /// the helix is passed to the constructor and does not appear in the interface
0016 
0017   /** The types for position and direction are frame-neutral
0018    *  (not global, local, etc.) so this interface can be used
0019    *  in any frame. Of course, the helix and the plane must be defined 
0020    *  in the same frame, which is also the frame of the result.
0021    */
0022   typedef Basic3DVector<float> PositionType;
0023   typedef Basic3DVector<float> DirectionType;
0024 
0025   /** Propagation status (true if valid) and (signed) path length 
0026    *  along the helix from the starting point to the plane. The 
0027    *  starting point is given in the constructor.
0028    */
0029   virtual std::pair<bool, double> pathLength(const Plane&) = 0;
0030 
0031   /** Returns the position along the helix that corresponds to path
0032    *  length "s" from the starting point. If s is obtained from the
0033    *  pathLength method the position is the destination point, i.e.
0034    *  the position of the crossing with a plane (if it exists!) 
0035    *  is given by position( pathLength( plane)).
0036    */
0037   virtual PositionType position(double s) const = 0;
0038 
0039   /** Returns the direction along the helix that corresponds to path
0040    *  length "s" from the starting point. As for position,
0041    *  the direction of the crossing with a plane (if it exists!) 
0042    *  is given by direction( pathLength( plane)).
0043    */
0044   virtual DirectionType direction(double s) const = 0;
0045 
0046   virtual ~HelixPlaneCrossing() = default;
0047 };
0048 
0049 #endif