File indexing completed on 2023-03-17 11:26:21
0001 #ifndef StraightLinePlaneCrossing_H_
0002 #define StraightLinePlaneCrossing_H_
0003
0004 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
0005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0006
0007 #include <utility>
0008
0009 class Plane;
0010
0011
0012
0013
0014 class StraightLinePlaneCrossing {
0015 public:
0016
0017
0018
0019
0020
0021 using PositionType = Basic3DVector<float>;
0022 using DirectionType = Basic3DVector<float>;
0023
0024 public:
0025
0026
0027 StraightLinePlaneCrossing(const PositionType& point,
0028 const DirectionType& momentum,
0029 const PropagationDirection propDir = alongMomentum)
0030 : theX0(point), theP0(momentum.unit()), thePropDir(propDir) {}
0031
0032
0033 ~StraightLinePlaneCrossing() {}
0034
0035
0036
0037
0038 std::pair<bool, double> pathLength(const Plane& plane) const;
0039
0040
0041
0042 PositionType position(float s) const { return PositionType(theX0 + s * theP0); }
0043
0044
0045
0046 std::pair<bool, PositionType> position(const Plane& plane) const;
0047
0048 private:
0049
0050
0051
0052
0053 const PositionType theX0;
0054 const PositionType theP0;
0055 const PropagationDirection thePropDir;
0056 };
0057
0058 #endif