Skip to content

Commit

Permalink
refactor!: Remove navigator layer bounds check option (acts-project#2851
Browse files Browse the repository at this point in the history
)

This option is supposed to improve the navigation but can also cause regressions. Layers without bounds overlap with boundaries therefore we might end up outside the current tracking volume while targeting a layer. I propose that this should be rather fixed by the used with proper layer bounds that extend to the volume boundaries.
  • Loading branch information
andiwand authored Dec 21, 2023
1 parent 73553d3 commit c51f48a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
5 changes: 0 additions & 5 deletions Core/include/Acts/Propagator/Navigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ class Navigator {
bool resolveMaterial = true;
/// stop at every surface regardless what it is
bool resolvePassive = false;

/// Whether to perform boundary checks for layer resolving (improves
/// navigation for bended tracks)
BoundaryCheck boundaryCheckLayerResolving = BoundaryCheck(true);
};

/// @brief Nested State struct
Expand Down Expand Up @@ -1187,7 +1183,6 @@ class Navigator {
// Create the navigation options
// - and get the compatible layers, start layer will be excluded
NavigationOptions<Layer> navOpts;
navOpts.boundaryCheck = m_cfg.boundaryCheckLayerResolving;
navOpts.resolveSensitive = m_cfg.resolveSensitive;
navOpts.resolveMaterial = m_cfg.resolveMaterial;
navOpts.resolvePassive = m_cfg.resolvePassive;
Expand Down
37 changes: 0 additions & 37 deletions Tests/IntegrationTests/PropagationBentTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,6 @@ BOOST_AUTO_TEST_CASE(with_boundary_check_no_bfield) {
0);
}

BOOST_AUTO_TEST_CASE(without_boundary_check_no_bfield) {
auto navCfg = Acts::Navigator::Config{};
navCfg.boundaryCheckLayerResolving = Acts::BoundaryCheck(false);
const auto xPositions = xPositionsOfPassedSurfaces(navCfg, 0.0_T);

// without bField we exit at the side so we don't hit the surfaces at x ~
// 2000 and also not the boundary surface at x = 3000, regardless of the
// boundary checking
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 999.0), 1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 1001.0),
1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 1999.0),
0);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 2001.0),
0);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 3000.0),
0);
}

BOOST_AUTO_TEST_CASE(with_boundary_check_with_bfield) {
auto navCfg = Acts::Navigator::Config{};
const auto xPositions = xPositionsOfPassedSurfaces(navCfg, 0.5_T);
Expand All @@ -124,21 +105,3 @@ BOOST_AUTO_TEST_CASE(with_boundary_check_with_bfield) {
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 3000.0),
1);
}

BOOST_AUTO_TEST_CASE(no_boundary_check_with_bfield) {
auto navCfg = Acts::Navigator::Config{};
navCfg.boundaryCheckLayerResolving = Acts::BoundaryCheck(false);
const auto xPositions = xPositionsOfPassedSurfaces(navCfg, 0.5_T);

// Without boundary check at layer resolving, we also hit the surfaces at x ~
// 2000
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 999.0), 1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 1001.0),
1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 1999.0),
1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 2001.0),
1);
BOOST_CHECK_EQUAL(std::count(xPositions.begin(), xPositions.end(), 3000.0),
1);
}

0 comments on commit c51f48a

Please sign in to comment.