diff --git a/core/include/traccc/finding/actors/ckf_aborter.hpp b/core/include/traccc/finding/actors/ckf_aborter.hpp index d91b46bb2..7632ee804 100644 --- a/core/include/traccc/finding/actors/ckf_aborter.hpp +++ b/core/include/traccc/finding/actors/ckf_aborter.hpp @@ -28,6 +28,8 @@ struct ckf_aborter : detray::actor { bool success = false; unsigned int count = 0; + + scalar path_from_surface{0.f}; }; template @@ -38,14 +40,21 @@ struct ckf_aborter : detray::actor { auto &stepping = prop_state._stepping; abrt_state.count++; + abrt_state.path_from_surface += stepping.step_size(); // Abort at the next sensitive surface if (navigation.is_on_sensitive() && - stepping.path_from_surface() > abrt_state.min_step_length) { + abrt_state.path_from_surface > abrt_state.min_step_length) { prop_state._heartbeat &= navigation.abort(); abrt_state.success = true; } + // Reset path from surface + if (navigation.is_on_sensitive() || + navigation.encountered_sf_material()) { + abrt_state.path_from_surface = 0.f; + } + if (abrt_state.count > abrt_state.max_count) { prop_state._heartbeat &= navigation.abort(); } diff --git a/extern/detray/CMakeLists.txt b/extern/detray/CMakeLists.txt index 22b829abb..f6a36bd81 100644 --- a/extern/detray/CMakeLists.txt +++ b/extern/detray/CMakeLists.txt @@ -18,7 +18,7 @@ message( STATUS "Building Detray as part of the TRACCC project" ) # Declare where to get Detray from. set( TRACCC_DETRAY_SOURCE -"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.81.0.tar.gz;URL_MD5;d66d7e95c4c00f9c82999331ab0a8d4c" +"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.82.0.tar.gz;URL_MD5;09d777ce126c547f5c3d4ec509f9a0c0" CACHE STRING "Source for Detray, when built as part of this project" ) mark_as_advanced( TRACCC_DETRAY_SOURCE )