14 theP0(startingDir.
unit()),
16 theTolerance(tolerance) {}
18 std::pair<bool,double>
34 if ( !
eq.hasSolution ) {
45 return std::pair<bool,double>(
false,0.);
53 std::pair<bool,double>
55 const double s2)
const
61 return std::pair<bool,double>(
true,(fabs(s1)<fabs(s2)?s1:
s2));
67 return std::pair<bool,double>(
true,((s1*propSign>0)?s1:s2));
69 else if ( s1*propSign>0 ) {
71 return std::pair<bool,double>(
true,(fabs(s1)<fabs(s2)?s1:
s2));
75 double shorter =
std::min( fabs(s1), fabs(s2));
76 if (shorter <
theTolerance)
return std::pair<bool,double>(
true,0);
77 else 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)