CMS 3D CMS Logo

StraightLineCylinderCrossing.h
Go to the documentation of this file.
1 #ifndef StraightLineCylinderCrossing_H
2 #define StraightLineCylinderCrossing_H
3 
7 
9 
10 #include <utility>
11 
12 class Cylinder;
13 
18 public:
21  StraightLineCylinderCrossing(const LocalPoint& startingPos,
22  const LocalVector& startingDir,
23  const PropagationDirection propDir = alongMomentum,
24  double tolerance = 0);
25 
29  std::pair<bool, double> pathLength(const Cylinder& cyl) const;
30 
36  LocalPoint position(const double s) const { return LocalPoint(theX0 + s * theP0); }
37 
38 private:
40  std::pair<bool, double> chooseSolution(const double s1, const double s2) const;
41 
42 private:
43  //
44  // single precision is sufficient for intermediate vectors
45  //
50 
51  const PositionType theX0;
52  const DirectionType theP0;
54  double theTolerance;
55 };
56 
57 #endif
const PropagationDirection thePropDir
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
const double tolerance
std::pair< bool, double > pathLength(const Cylinder &cyl) const
PropagationDirection
LocalPoint position(const double s) const
std::pair< bool, double > chooseSolution(const double s1, const double s2) const
Chooses the right solution w.r.t. the propagation direction.
StraightLineCylinderCrossing(const LocalPoint &startingPos, const LocalVector &startingDir, const PropagationDirection propDir=alongMomentum, double tolerance=0)