14 : theX0(startingPos), theP0(startingDir.
unit()), thePropDir(propDir), theTolerance(tolerance) {}
30 if (!eq.hasSolution) {
41 return std::pair<bool, double>(
false, 0.);
54 return std::pair<bool, double>(
true, (fabs(s1) < fabs(s2) ? s1 : s2));
59 return std::pair<bool, double>(
true, ((s1 * propSign > 0) ? s1 : s2));
60 }
else if (s1 * propSign > 0) {
62 return std::pair<bool, double>(
true, (fabs(s1) < fabs(s2) ? s1 : s2));
65 double shorter =
std::min(fabs(s1), fabs(s2));
67 return std::pair<bool, double>(
true, 0);
69 return std::pair<bool, double>(
false, 0.);
const PropagationDirection thePropDir
std::pair< bool, double > pathLength(const Cylinder &cyl) const
Scalar radius() const
Radius of the cylinder.
std::pair< bool, double > chooseSolution(const double s1, const double s2) const
Chooses the right solution w.r.t. the propagation direction.
const DirectionType theP0
StraightLineCylinderCrossing(const LocalPoint &startingPos, const LocalVector &startingDir, const PropagationDirection propDir=alongMomentum, double tolerance=0)
Basic3DVector unit() const