diff --git a/core/include/traccc/finding/actors/ckf_aborter.hpp b/core/include/traccc/finding/actors/ckf_aborter.hpp index 02eba824a0..d91b46bb2d 100644 --- a/core/include/traccc/finding/actors/ckf_aborter.hpp +++ b/core/include/traccc/finding/actors/ckf_aborter.hpp @@ -41,7 +41,7 @@ struct ckf_aborter : detray::actor { // Abort at the next sensitive surface if (navigation.is_on_sensitive() && - stepping._s > abrt_state.min_step_length) { + stepping.path_from_surface() > abrt_state.min_step_length) { prop_state._heartbeat &= navigation.abort(); abrt_state.success = true; } diff --git a/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp b/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp index 0775311402..23a8864906 100644 --- a/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp +++ b/core/include/traccc/fitting/kalman_filter/kalman_actor.hpp @@ -106,7 +106,7 @@ struct kalman_actor : detray::actor { const bool res = sf.template visit_mask>( - trk_state, propagation._stepping._bound_params); + trk_state, propagation._stepping.bound_params()); // Abort if the Kalman update fails if (!res) { @@ -115,13 +115,14 @@ struct kalman_actor : detray::actor { } // Set full jacobian - trk_state.jacobian() = stepping._full_jacobian; + trk_state.jacobian() = stepping.full_jacobian(); // Change the charge of hypothesized particles when the sign of qop // is changed (This rarely happens when qop is set with a poor seed // resolution) propagation.set_particle(detail::correct_particle_hypothesis( - stepping._ptc, propagation._stepping._bound_params)); + stepping.particle_hypothesis(), + propagation._stepping.bound_params())); // Update iterator actor_state.next(); @@ -132,4 +133,4 @@ struct kalman_actor : detray::actor { } }; -} // namespace traccc \ No newline at end of file +} // namespace traccc diff --git a/core/src/finding/find_tracks.hpp b/core/src/finding/find_tracks.hpp index 4f8e611a06..5a33d4b4d6 100644 --- a/core/src/finding/find_tracks.hpp +++ b/core/src/finding/find_tracks.hpp @@ -324,7 +324,7 @@ track_candidate_container_types::host find_tracks( // If a surface found, add the parameter for the next // step if (s4.success) { - out_params.push_back(propagation._stepping._bound_params); + out_params.push_back(propagation._stepping.bound_params()); param_to_link[step].push_back(link_id); } // Unless the track found a surface, it is considered a diff --git a/device/common/include/traccc/finding/device/impl/propagate_to_next_surface.ipp b/device/common/include/traccc/finding/device/impl/propagate_to_next_surface.ipp index bb518215ce..06ea739494 100644 --- a/device/common/include/traccc/finding/device/impl/propagate_to_next_surface.ipp +++ b/device/common/include/traccc/finding/device/impl/propagate_to_next_surface.ipp @@ -117,7 +117,7 @@ TRACCC_DEVICE inline void propagate_to_next_surface( // If a surface found, add the parameter for the next step if (s4.success) { - params[param_id] = propagation._stepping._bound_params; + params[param_id] = propagation._stepping.bound_params(); if (payload.step == cfg.max_track_candidates_per_track - 1) { tips.push_back({payload.step, param_id}); diff --git a/examples/simulation/simulate_wire_chamber.cpp b/examples/simulation/simulate_wire_chamber.cpp index 071a67a088..1c9073d430 100644 --- a/examples/simulation/simulate_wire_chamber.cpp +++ b/examples/simulation/simulate_wire_chamber.cpp @@ -20,7 +20,7 @@ // detray include(s). #include "detray/detectors/bfield.hpp" #include "detray/io/frontend/detector_writer.hpp" -#include "detray/test/utils/detectors/create_wire_chamber.hpp" +#include "detray/test/utils/detectors/build_wire_chamber.hpp" #include "detray/test/utils/simulation/event_generator/track_generators.hpp" // VecMem include(s). @@ -62,7 +62,7 @@ int simulate(const traccc::opts::generation& generation_opts, // Create the toy geometry const auto [det, name_map] = - detray::create_wire_chamber(host_mr, wire_chamber_cfg); + detray::build_wire_chamber(host_mr, wire_chamber_cfg); /*************************** * Generate simulation data diff --git a/extern/detray/CMakeLists.txt b/extern/detray/CMakeLists.txt index ae2637e7b4..bcfa9ce8ea 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.79.0.tar.gz;URL_MD5;b2eb38b7a58c55f41aa5e295c21e1aeb" +"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.81.0.tar.gz;URL_MD5;d66d7e95c4c00f9c82999331ab0a8d4c" CACHE STRING "Source for Detray, when built as part of this project" ) mark_as_advanced( TRACCC_DETRAY_SOURCE ) diff --git a/simulation/include/traccc/simulation/smearing_writer.hpp b/simulation/include/traccc/simulation/smearing_writer.hpp index b1c1cf81dd..523bcef2e0 100644 --- a/simulation/include/traccc/simulation/smearing_writer.hpp +++ b/simulation/include/traccc/simulation/smearing_writer.hpp @@ -120,7 +120,7 @@ struct smearing_writer : detray::actor { const auto track = stepping(); const auto pos = track.pos(); - const auto mom = track.mom(stepping._ptc.charge()); + const auto mom = track.mom(stepping.particle_hypothesis().charge()); const auto sf = navigation.get_surface(); @@ -138,7 +138,7 @@ struct smearing_writer : detray::actor { // Write measurements io::csv::measurement meas; - const auto bound_params = stepping._bound_params; + const auto bound_params = stepping.bound_params(); meas.measurement_id = writer_state.m_hit_count; meas.geometry_id = hit.geometry_id; diff --git a/tests/common/tests/kalman_fitting_wire_chamber_test.hpp b/tests/common/tests/kalman_fitting_wire_chamber_test.hpp index de01f8e1a5..180da2de54 100644 --- a/tests/common/tests/kalman_fitting_wire_chamber_test.hpp +++ b/tests/common/tests/kalman_fitting_wire_chamber_test.hpp @@ -13,7 +13,7 @@ // Detray include(s). #include "detray/detectors/bfield.hpp" #include "detray/io/frontend/detector_writer.hpp" -#include "detray/test/utils/detectors/create_wire_chamber.hpp" +#include "detray/test/utils/detectors/build_wire_chamber.hpp" // System include(s) #include @@ -76,7 +76,7 @@ class KalmanFittingWireChamberTests : public KalmanFittingTests { // wire_chamber_cfg.m_thickness = 100.f * detray::unit::um; // Create telescope detector - auto [det, name_map] = create_wire_chamber(host_mr, wire_chamber_cfg); + auto [det, name_map] = build_wire_chamber(host_mr, wire_chamber_cfg); // Write detector file auto writer_cfg = detray::io::detector_writer_config{} diff --git a/tests/cpu/test_ckf_combinatorics_telescope.cpp b/tests/cpu/test_ckf_combinatorics_telescope.cpp index 03afef4f05..294acdef99 100644 --- a/tests/cpu/test_ckf_combinatorics_telescope.cpp +++ b/tests/cpu/test_ckf_combinatorics_telescope.cpp @@ -101,6 +101,10 @@ TEST_P(CpuCkfCombinatoricsTelescopeTests, Run) { writer_type>( std::get<6>(GetParam()), n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /***************************** @@ -115,10 +119,17 @@ TEST_P(CpuCkfCombinatoricsTelescopeTests, Run) { cfg_no_limit.max_num_branches_per_seed = std::numeric_limits::max(); cfg_no_limit.chi2_max = 30.f; + cfg_no_limit.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + cfg_no_limit.propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; traccc::finding_config cfg_limit; cfg_limit.max_num_branches_per_seed = 500; cfg_limit.chi2_max = 30.f; + cfg_limit.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + cfg_limit.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; // Finding algorithm object traccc::host::ckf_algorithm host_finding(cfg_no_limit); diff --git a/tests/cpu/test_ckf_sparse_tracks_telescope.cpp b/tests/cpu/test_ckf_sparse_tracks_telescope.cpp index b7d2f684e6..5d47a060e9 100644 --- a/tests/cpu/test_ckf_sparse_tracks_telescope.cpp +++ b/tests/cpu/test_ckf_sparse_tracks_telescope.cpp @@ -107,6 +107,10 @@ TEST_P(CkfSparseTrackTelescopeTests, Run) { writer_type>( ptc, n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /***************************** @@ -120,6 +124,8 @@ TEST_P(CkfSparseTrackTelescopeTests, Run) { typename traccc::finding_config cfg; cfg.ptc_hypothesis = ptc; cfg.chi2_max = 30.f; + cfg.propagation.navigation.overstep_tolerance = -100.f * unit::um; + cfg.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; // Finding algorithm object traccc::host::ckf_algorithm host_finding(cfg); @@ -127,6 +133,9 @@ TEST_P(CkfSparseTrackTelescopeTests, Run) { // Fitting algorithm object typename traccc::fitting_algorithm::config_type fit_cfg; fit_cfg.ptc_hypothesis = ptc; + fit_cfg.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + fit_cfg.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; traccc::fitting_algorithm host_fitting(fit_cfg); // Iterate over events diff --git a/tests/cpu/test_kalman_fitter_telescope.cpp b/tests/cpu/test_kalman_fitter_telescope.cpp index 6548ae76da..28c6e1781c 100644 --- a/tests/cpu/test_kalman_fitter_telescope.cpp +++ b/tests/cpu/test_kalman_fitter_telescope.cpp @@ -104,6 +104,10 @@ TEST_P(KalmanFittingTelescopeTests, Run) { writer_type>( ptc, n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /*************** @@ -116,6 +120,9 @@ TEST_P(KalmanFittingTelescopeTests, Run) { // Fitting algorithm object typename traccc::fitting_algorithm::config_type fit_cfg; fit_cfg.ptc_hypothesis = ptc; + fit_cfg.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + fit_cfg.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; fitting_algorithm fitting(fit_cfg); // Iterate over events diff --git a/tests/cpu/test_simulation.cpp b/tests/cpu/test_simulation.cpp index 71765005fe..32b852391b 100644 --- a/tests/cpu/test_simulation.cpp +++ b/tests/cpu/test_simulation.cpp @@ -271,6 +271,10 @@ TEST_P(TelescopeDetectorSimulation, telescope_detector_simulation) { std::numeric_limits::max(); // Run simulation + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); for (std::size_t i_event{0u}; i_event < n_events; i_event++) { diff --git a/tests/cuda/test_ckf_combinatorics_telescope.cpp b/tests/cuda/test_ckf_combinatorics_telescope.cpp index 7cf8d50ce8..871d0acc8b 100644 --- a/tests/cuda/test_ckf_combinatorics_telescope.cpp +++ b/tests/cuda/test_ckf_combinatorics_telescope.cpp @@ -112,6 +112,10 @@ TEST_P(CudaCkfCombinatoricsTelescopeTests, Run) { writer_type>( ptc, n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /***************************** @@ -140,12 +144,19 @@ TEST_P(CudaCkfCombinatoricsTelescopeTests, Run) { cfg_no_limit.ptc_hypothesis = ptc; cfg_no_limit.max_num_branches_per_seed = 100000; cfg_no_limit.chi2_max = 30.f; + cfg_no_limit.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + cfg_no_limit.propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; typename traccc::cuda::finding_algorithm< rk_stepper_type, device_navigator_type>::config_type cfg_limit; cfg_limit.ptc_hypothesis = ptc; cfg_limit.max_num_branches_per_seed = 500; cfg_limit.chi2_max = 30.f; + cfg_limit.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + cfg_limit.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; // Finding algorithm object traccc::cuda::finding_algorithm diff --git a/tests/cuda/test_kalman_fitter_telescope.cpp b/tests/cuda/test_kalman_fitter_telescope.cpp index c007f23e20..6801ecf988 100644 --- a/tests/cuda/test_kalman_fitter_telescope.cpp +++ b/tests/cuda/test_kalman_fitter_telescope.cpp @@ -120,6 +120,10 @@ TEST_P(KalmanFittingTelescopeTests, Run) { writer_type>( ptc, n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /*************** @@ -146,6 +150,9 @@ TEST_P(KalmanFittingTelescopeTests, Run) { typename traccc::cuda::fitting_algorithm::config_type fit_cfg; fit_cfg.ptc_hypothesis = ptc; + fit_cfg.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + fit_cfg.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; traccc::cuda::fitting_algorithm device_fitting( fit_cfg, mr, copy, stream); diff --git a/tests/sycl/test_kalman_fitter_telescope.sycl b/tests/sycl/test_kalman_fitter_telescope.sycl index 1fc14471ac..da8d134e44 100644 --- a/tests/sycl/test_kalman_fitter_telescope.sycl +++ b/tests/sycl/test_kalman_fitter_telescope.sycl @@ -141,6 +141,10 @@ TEST_P(KalmanFittingTelescopeTests, Run) { writer_type>( std::get<6>(GetParam()), n_events, host_det, field, std::move(generator), std::move(smearer_writer_cfg), full_path); + sim.get_config().propagation.navigation.overstep_tolerance = + -100.f * unit::um; + sim.get_config().propagation.navigation.max_mask_tolerance = + 1.f * unit::mm; sim.run(); /*************** @@ -163,6 +167,9 @@ TEST_P(KalmanFittingTelescopeTests, Run) { typename traccc::sycl::fitting_algorithm::config_type fit_cfg; fit_cfg.ptc_hypothesis = ptc; + fit_cfg.propagation.navigation.overstep_tolerance = + -100.f * unit::um; + fit_cfg.propagation.navigation.max_mask_tolerance = 1.f * unit::mm; traccc::sycl::fitting_algorithm device_fitting(fit_cfg, mr, &q);