Skip to content

LineBounds 'inside' incorrectly defined (was ACTS-265)

Original author Shaun Roe @sroe

/Surfaces/LineBounds definition of 'inside' is incorrect; the current code returns true if a point is within Z bounds but only also on the radius (not within it), so effectively defining a cylinder. http://acts.web.cern.ch/ACTS/latest/doc/classActs_1_1LineBounds.html http://acts.web.cern.ch/ACTS/latest/doc/LineBounds_8hpp_source.html

inline bool
LineBounds::insideLocR(double r, double tol0) const
{
  return std::abs(m_valueStore.at(LineBounds::bv_radius) - r) < tol0;
}

and

inline bool
LineBounds::insideLocZ(double z, double tol1) const
{
  return (m_valueStore.at(LineBounds::bv_halfZ) + tol1) - std::abs(z) > 0.;
}

The vector accessors also use the slightly slower 'at()' method unnecessarily.

Edited by Paul Gessinger-Befurt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information