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 
19 public:
22  StraightLineCylinderCrossing (const LocalPoint& startingPos,
23  const LocalVector& startingDir,
24  const PropagationDirection propDir=alongMomentum,
25  double tolerance=0);
26 
30  std::pair<bool,double> pathLength (const Cylinder& cyl) const;
31 
37  LocalPoint position (const double s) const { return LocalPoint(theX0+s*theP0);}
38 
39 private:
41  std::pair<bool,double> chooseSolution (const double s1, const double s2) const;
42 
43 private:
44  //
45  // single precision is sufficient for intermediate vectors
46  //
51 
52  const PositionType theX0;
53  const DirectionType theP0;
55  double theTolerance;
56 };
57 
58 #endif
const PropagationDirection thePropDir
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
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)