diff --git a/Core/include/Acts/Propagator/MultiEigenStepperLoop.hpp b/Core/include/Acts/Propagator/MultiEigenStepperLoop.hpp index dff30746cf6..613b1d77d8c 100644 --- a/Core/include/Acts/Propagator/MultiEigenStepperLoop.hpp +++ b/Core/include/Acts/Propagator/MultiEigenStepperLoop.hpp @@ -14,16 +14,12 @@ #include "Acts/Definitions/Algebra.hpp" #include "Acts/Definitions/Direction.hpp" #include "Acts/Definitions/TrackParametrization.hpp" -#include "Acts/Definitions/Units.hpp" #include "Acts/EventData/MultiComponentTrackParameters.hpp" #include "Acts/EventData/TrackParameters.hpp" #include "Acts/EventData/detail/CorrectedTransformationFreeToBound.hpp" #include "Acts/MagneticField/MagneticFieldProvider.hpp" #include "Acts/Propagator/ConstrainedStep.hpp" #include "Acts/Propagator/EigenStepper.hpp" -#include "Acts/Propagator/EigenStepperError.hpp" -#include "Acts/Propagator/MultiStepperError.hpp" -#include "Acts/Propagator/Propagator.hpp" #include "Acts/Propagator/StepperOptions.hpp" #include "Acts/Propagator/StepperStatistics.hpp" #include "Acts/Propagator/detail/LoopStepperUtils.hpp" @@ -36,7 +32,6 @@ #include #include #include -#include #include #include @@ -398,7 +393,7 @@ class MultiEigenStepperLoop : public EigenStepper { void removeMissedComponents(State& state) const { auto new_end = std::remove_if( state.components.begin(), state.components.end(), [](const auto& cmp) { - return cmp.status == IntersectionStatus::missed; + return cmp.status == IntersectionStatus::unreachable; }); state.components.erase(new_end, state.components.end()); @@ -581,10 +576,8 @@ class MultiEigenStepperLoop : public EigenStepper { } else if (counts[static_cast(Status::onSurface)] > 0) { state.stepCounterAfterFirstComponentOnSurface.reset(); return Status::onSurface; - } else if (counts[static_cast(Status::unreachable)] > 0) { - return Status::unreachable; } else { - return Status::missed; + return Status::unreachable; } } diff --git a/Core/include/Acts/Propagator/MultiEigenStepperLoop.ipp b/Core/include/Acts/Propagator/MultiEigenStepperLoop.ipp index 67aa98e94bb..a583719bb79 100644 --- a/Core/include/Acts/Propagator/MultiEigenStepperLoop.ipp +++ b/Core/include/Acts/Propagator/MultiEigenStepperLoop.ipp @@ -7,6 +7,7 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. #include "Acts/Propagator/MultiEigenStepperLoop.hpp" +#include "Acts/Propagator/MultiStepperError.hpp" #include "Acts/Utilities/Logger.hpp" namespace Acts { @@ -112,7 +113,7 @@ Result MultiEigenStepperLoop::step( m_stepLimitAfterFirstComponentOnSurface) { for (auto& cmp : components) { if (cmp.status != Status::onSurface) { - cmp.status = Status::missed; + cmp.status = Status::unreachable; } } diff --git a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp index eeb7636103b..6d5ac68d8b9 100644 --- a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp +++ b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp @@ -478,7 +478,7 @@ struct GsfActor { // we set ignored components to missed, so we can remove them after // the loop if (tmpStates.weights.at(idx) < m_cfg.weightCutoff) { - cmp.status() = IntersectionStatus::missed; + cmp.status() = IntersectionStatus::unreachable; continue; } diff --git a/Core/include/Acts/Utilities/Intersection.hpp b/Core/include/Acts/Utilities/Intersection.hpp index 11adf0bdece..837be8574e4 100644 --- a/Core/include/Acts/Utilities/Intersection.hpp +++ b/Core/include/Acts/Utilities/Intersection.hpp @@ -23,7 +23,6 @@ namespace Acts { /// Status enum enum class IntersectionStatus : int { - missed = 0, unreachable = 0, reachable = 1, onSurface = 2 @@ -58,7 +57,7 @@ class Intersection { /// Returns whether the intersection was successful or not constexpr bool isValid() const { - return m_status != IntersectionStatus::missed; + return m_status != IntersectionStatus::unreachable; } /// Returns the position of the interseciton diff --git a/Core/src/Surfaces/ConeSurface.cpp b/Core/src/Surfaces/ConeSurface.cpp index 0ad869f2a4e..baad55237df 100644 --- a/Core/src/Surfaces/ConeSurface.cpp +++ b/Core/src/Surfaces/ConeSurface.cpp @@ -301,7 +301,7 @@ Acts::SurfaceMultiIntersection Acts::ConeSurface::intersect( if (!boundaryTolerance.isInfinite() && !isOnSurface(gctx, solution1, direction, boundaryTolerance)) { - status1 = IntersectionStatus::missed; + status1 = IntersectionStatus::unreachable; } // Check the validity of the second solution @@ -311,7 +311,7 @@ Acts::SurfaceMultiIntersection Acts::ConeSurface::intersect( : IntersectionStatus::reachable; if (!boundaryTolerance.isInfinite() && !isOnSurface(gctx, solution2, direction, boundaryTolerance)) { - status2 = IntersectionStatus::missed; + status2 = IntersectionStatus::unreachable; } const auto& tf = transform(gctx); diff --git a/Core/src/Surfaces/CylinderSurface.cpp b/Core/src/Surfaces/CylinderSurface.cpp index d34726c2a7f..56d3895b080 100644 --- a/Core/src/Surfaces/CylinderSurface.cpp +++ b/Core/src/Surfaces/CylinderSurface.cpp @@ -265,11 +265,12 @@ Acts::SurfaceMultiIntersection Acts::CylinderSurface::intersect( double cZ = vecLocal.dot(tMatrix.block<3, 1>(0, 2)); double modifiedTolerance = tolerance + absoluteBound->tolerance1; double hZ = cBounds.get(CylinderBounds::eHalfLengthZ) + modifiedTolerance; - return std::abs(cZ) < std::abs(hZ) ? status : IntersectionStatus::missed; + return std::abs(cZ) < std::abs(hZ) ? status + : IntersectionStatus::unreachable; } return isOnSurface(gctx, solution, direction, boundaryTolerance) ? status - : IntersectionStatus::missed; + : IntersectionStatus::unreachable; }; // Check first solution for boundary compatibility status1 = boundaryCheck(solution1, status1); diff --git a/Core/src/Surfaces/DiscSurface.cpp b/Core/src/Surfaces/DiscSurface.cpp index 9e957346965..b1ad72bd1cc 100644 --- a/Core/src/Surfaces/DiscSurface.cpp +++ b/Core/src/Surfaces/DiscSurface.cpp @@ -297,11 +297,11 @@ Acts::SurfaceMultiIntersection Acts::DiscSurface::intersect( double modifiedTolerance = tolerance + absoluteBound->tolerance0; if (!m_bounds->insideRadialBounds(VectorHelpers::perp(lcartesian), modifiedTolerance)) { - status = IntersectionStatus::missed; + status = IntersectionStatus::unreachable; } } else if (!insideBounds(localCartesianToPolar(lcartesian), boundaryTolerance)) { - status = IntersectionStatus::missed; + status = IntersectionStatus::unreachable; } } return {{Intersection3D(intersection.position(), intersection.pathLength(), diff --git a/Core/src/Surfaces/LineSurface.cpp b/Core/src/Surfaces/LineSurface.cpp index 00d1fc6dd17..d26697cc5e4 100644 --- a/Core/src/Surfaces/LineSurface.cpp +++ b/Core/src/Surfaces/LineSurface.cpp @@ -185,7 +185,7 @@ Acts::SurfaceMultiIntersection Acts::LineSurface::intersect( double cZ = vecLocal.dot(eb); double cR = (vecLocal - cZ * eb).norm(); if (!m_bounds->inside({cR, cZ}, boundaryTolerance)) { - status = IntersectionStatus::missed; + status = IntersectionStatus::unreachable; } } diff --git a/Core/src/Surfaces/PlaneSurface.cpp b/Core/src/Surfaces/PlaneSurface.cpp index db21709a192..040e3cac1e2 100644 --- a/Core/src/Surfaces/PlaneSurface.cpp +++ b/Core/src/Surfaces/PlaneSurface.cpp @@ -175,7 +175,7 @@ Acts::SurfaceMultiIntersection Acts::PlaneSurface::intersect( const Vector3 vecLocal(intersection.position() - tMatrix.block<3, 1>(0, 3)); if (!insideBounds(tMatrix.block<3, 2>(0, 0).transpose() * vecLocal, boundaryTolerance)) { - status = IntersectionStatus::missed; + status = IntersectionStatus::unreachable; } } return {{Intersection3D(intersection.position(), intersection.pathLength(), diff --git a/Tests/UnitTests/Core/Surfaces/SurfaceIntersectionTests.cpp b/Tests/UnitTests/Core/Surfaces/SurfaceIntersectionTests.cpp index 0fcabe9ad81..14b432d2945 100644 --- a/Tests/UnitTests/Core/Surfaces/SurfaceIntersectionTests.cpp +++ b/Tests/UnitTests/Core/Surfaces/SurfaceIntersectionTests.cpp @@ -145,7 +145,8 @@ BOOST_AUTO_TEST_CASE(CylinderIntersectionTests) { // There MUST be a second solution BOOST_CHECK(!eIntersection[1].isValid()); // The other intersection MUST NOT be reachable - BOOST_CHECK_EQUAL(eIntersection[1].status(), IntersectionStatus::missed); + BOOST_CHECK_EQUAL(eIntersection[1].status(), + IntersectionStatus::unreachable); // And be the positive one BOOST_CHECK_GT(eIntersection[1].pathLength(), 0.); }; @@ -279,7 +280,8 @@ BOOST_AUTO_TEST_CASE(PlanarIntersectionTest) { // The intersection MUST NOT be valid BOOST_CHECK(!mIntersection[0].isValid()); // The intersection MUST be reachable - BOOST_CHECK_EQUAL(mIntersection[0].status(), IntersectionStatus::missed); + BOOST_CHECK_EQUAL(mIntersection[0].status(), + IntersectionStatus::unreachable); // The path length MUST be negative BOOST_CHECK_GT(mIntersection[0].pathLength(), 0.); // The intersection MUST be unique @@ -386,7 +388,8 @@ BOOST_AUTO_TEST_CASE(LineIntersectionTest) { // The intersection MUST NOT be valid BOOST_CHECK(!mIntersection[0].isValid()); // The intersection MUST be reachable - BOOST_CHECK_EQUAL(mIntersection[0].status(), IntersectionStatus::missed); + BOOST_CHECK_EQUAL(mIntersection[0].status(), + IntersectionStatus::unreachable); // The path length MUST be negative BOOST_CHECK_LT(mIntersection[0].pathLength(), 0.); // The intersection MUST be unique diff --git a/Tests/UnitTests/Core/Utilities/IntersectionTests.cpp b/Tests/UnitTests/Core/Utilities/IntersectionTests.cpp index bda4cad2da2..f1b4e1356e4 100644 --- a/Tests/UnitTests/Core/Utilities/IntersectionTests.cpp +++ b/Tests/UnitTests/Core/Utilities/IntersectionTests.cpp @@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(ObjectIntersectionTest) { BOOST_AUTO_TEST_CASE(IntersectionStatusPrinting) { std::array status_values = { - {IntersectionStatus::missed, IntersectionStatus::unreachable, + {IntersectionStatus::unreachable, IntersectionStatus::unreachable, IntersectionStatus::reachable, IntersectionStatus::onSurface}}; std::array expected_messages = { {"missed/unreachable", "missed/unreachable", "reachable", "onSurface"}};