File indexing completed on 2023-10-25 10:05:33
0001 #ifndef HelixBarrelCylinderCrossing_H
0002 #define HelixBarrelCylinderCrossing_H
0003
0004 #include "DataFormats/GeometryVector/interface/Basic2DVector.h"
0005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0006 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0007 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0008
0009 #include "FWCore/Utilities/interface/Visibility.h"
0010
0011 class Cylinder;
0012
0013
0014
0015
0016 class HelixBarrelCylinderCrossing {
0017 public:
0018 enum Solution { bothSol, bestSol, onlyPos };
0019
0020 typedef double TmpType;
0021 typedef Basic2DVector<TmpType> Point;
0022 typedef Basic2DVector<TmpType> Vector;
0023
0024 typedef GlobalPoint PositionType;
0025 typedef GlobalVector DirectionType;
0026
0027 HelixBarrelCylinderCrossing(const GlobalPoint& startingPos,
0028 const GlobalVector& startingDir,
0029 double rho,
0030 PropagationDirection propDir,
0031 const Cylinder& cyl,
0032 Solution sol = bothSol);
0033
0034 bool hasSolution() const { return theSolExists; }
0035
0036
0037
0038
0039
0040 double pathLength() const { return theS; }
0041
0042
0043
0044
0045
0046
0047
0048 PositionType position() const { return thePos; }
0049
0050
0051 PositionType position1() const { return thePos1; }
0052
0053
0054 PositionType position2() const { return thePos2; }
0055
0056
0057
0058
0059
0060
0061 DirectionType direction() const { return theDir; }
0062
0063 private:
0064 PositionType thePos;
0065 DirectionType theDir;
0066 double theS;
0067 bool theSolExists;
0068
0069 PositionType thePos1;
0070 PositionType thePos2;
0071
0072 std::pair<Vector, int> chooseSolution(const Point& p1,
0073 const Point& p2,
0074 const PositionType& startingPos,
0075 const DirectionType& startingDir,
0076 PropagationDirection propDir) dso_internal;
0077 };
0078
0079 #endif