17 auto mutableSf =
const_cast<Surface*
>(sf);
26 std::vector<ObjectIntersection<Surface>> sIntersections;
27 sIntersections.reserve(m_surfaceCache.size());
28 for (
auto& sf : m_surfaceCache) {
29 auto sfIntersection = sf->intersect(gctx, position, direction, bcheck);
31 if (sfIntersection.intersection.pathLength < 0. and
32 sfIntersection.alternative.pathLength > 0.) {
33 std::swap(sfIntersection.intersection, sfIntersection.alternative);
35 sIntersections.push_back(sfIntersection);
38 std::sort(sIntersections.begin(), sIntersections.end());
39 return (*sIntersections.begin());
42 const std::vector<const Acts::Surface*>&
44 return m_surfaceCache;
47 std::vector<const Acts::Surface*>&
49 return m_surfaceCache;