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 
54  double theTolerance;
55 };
56 
57 #endif
Vector3DBase< float, LocalTag >
StraightLineCylinderCrossing::theTolerance
double theTolerance
Definition: StraightLineCylinderCrossing.h:54
StraightLineCylinderCrossing::theX0
const PositionType theX0
Definition: StraightLineCylinderCrossing.h:51
StraightLineCylinderCrossing::DirectionType
LocalVector DirectionType
Definition: StraightLineCylinderCrossing.h:47
StraightLineCylinderCrossing::PositionType
LocalPoint PositionType
Definition: StraightLineCylinderCrossing.h:46
indexGen.s2
s2
Definition: indexGen.py:107
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
alignCSCRings.s
s
Definition: alignCSCRings.py:92
StraightLineCylinderCrossing::DirectionType2D
Basic2DVector< float > DirectionType2D
Definition: StraightLineCylinderCrossing.h:49
StraightLineCylinderCrossing::pathLength
std::pair< bool, double > pathLength(const Cylinder &cyl) const
Definition: StraightLineCylinderCrossing.cc:16
Point3DBase< float, LocalTag >
Basic2DVector< float >
StraightLineCylinderCrossing::theP0
const DirectionType theP0
Definition: StraightLineCylinderCrossing.h:52
StraightLineCylinderCrossing
Definition: StraightLineCylinderCrossing.h:17
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
StraightLineCylinderCrossing::PositionType2D
Basic2DVector< float > PositionType2D
Definition: StraightLineCylinderCrossing.h:48
StraightLineCylinderCrossing::position
LocalPoint position(const double s) const
Definition: StraightLineCylinderCrossing.h:36
PropagationDirection.h
Basic2DVector.h
LocalPoint.h
StraightLineCylinderCrossing::thePropDir
const PropagationDirection thePropDir
Definition: StraightLineCylinderCrossing.h:53
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
Cylinder
Definition: Cylinder.h:19
LocalVector.h
StraightLineCylinderCrossing::chooseSolution
std::pair< bool, double > chooseSolution(const double s1, const double s2) const
Chooses the right solution w.r.t. the propagation direction.
Definition: StraightLineCylinderCrossing.cc:49
alongMomentum
Definition: PropagationDirection.h:4
StraightLineCylinderCrossing::StraightLineCylinderCrossing
StraightLineCylinderCrossing(const LocalPoint &startingPos, const LocalVector &startingDir, const PropagationDirection propDir=alongMomentum, double tolerance=0)
Definition: StraightLineCylinderCrossing.cc:10