Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CKF-related bugs that break the continuous benchmark #909

Merged
merged 5 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion benchmarks/common/benchmarks/toy_detector_benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class ToyDetectorBenchmark : public benchmark::Fixture {

// Same propagation configuration for sim and reco
apply_propagation_config(sim.get_config().propagation);
sim.get_config().propagation.navigation.search_window = {3, 3};
// Set constrained step size to 1 mm
sim.get_config().propagation.stepping.step_constraint =
1.f * traccc::unit<float>::mm;
Expand Down Expand Up @@ -155,8 +156,9 @@ class ToyDetectorBenchmark : public benchmark::Fixture {

void apply_propagation_config(detray::propagation::config& cfg) const {
// Configure the propagation for the toy detector
// @NOTE: currently Non-{0,0} search windows cause an error during CKF
// cfg.navigation.search_window = {3, 3};
cfg.navigation.overstep_tolerance = -300.f * traccc::unit<float>::um;
cfg.navigation.overstep_tolerance = -1000.f * traccc::unit<float>::um;
cfg.navigation.min_mask_tolerance = 1e-5f * traccc::unit<float>::mm;
cfg.navigation.max_mask_tolerance = 3.f * traccc::unit<float>::mm;
cfg.navigation.mask_tolerance_scalor = 0.05f;
Expand Down
5 changes: 5 additions & 0 deletions core/include/traccc/finding/details/find_tracks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ track_candidate_container_types::host find_tracks(
const bound_track_parameters_collection_types::const_view& seeds_view,
const finding_config& config) {

assert(config.min_step_length_for_next_surface >
math::fabs(config.propagation.navigation.overstep_tolerance) &&
"Min step length for the next surface should be higher than the "
"overstep tolerance");

/*****************************************************************
* Types used by the track finding
*****************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion core/include/traccc/finding/finding_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct finding_config {
/// Minimum step length that track should make to reach the next surface. It
/// should be set higher than the overstep tolerance not to make it stay on
/// the same surface
float min_step_length_for_next_surface = 0.5f * traccc::unit<float>::mm;
float min_step_length_for_next_surface = 1.2f * traccc::unit<float>::mm;
/// Maximum step counts that track can make to reach the next surface
unsigned int max_step_counts_for_next_surface = 100;

Expand Down
5 changes: 5 additions & 0 deletions device/cuda/src/finding/finding_algorithm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ finding_algorithm<stepper_t, navigator_t>::operator()(
const typename measurement_collection_types::view& measurements,
const bound_track_parameters_collection_types::buffer& seeds_buffer) const {

assert(m_cfg.min_step_length_for_next_surface >
math::fabs(m_cfg.propagation.navigation.overstep_tolerance) &&
"Min step length for the next surface should be higher than the "
"overstep tolerance");

// Get a convenience variable for the stream that we'll be using.
cudaStream_t stream = details::get_stream(m_stream);

Expand Down
5 changes: 5 additions & 0 deletions device/sycl/src/finding/find_tracks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ track_candidate_container_types::buffer find_tracks(
const finding_config& config, const memory_resource& mr, vecmem::copy& copy,
::sycl::queue& queue) {

assert(config.min_step_length_for_next_surface >
math::fabs(config.propagation.navigation.overstep_tolerance) &&
"Min step length for the next surface should be higher than the "
"overstep tolerance");

assert(is_contiguous_on<measurement_collection_types::const_device>(
measurement_module_projection(), mr.main, copy, queue, measurements));

Expand Down
2 changes: 1 addition & 1 deletion io/src/csv/read_spacepoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void read_spacepoints(edm::spacepoint_collection::host& spacepoints,
const traccc::default_detector::host* detector) {

// Read all measurements.
static constexpr bool sort_measurements = false;
static constexpr bool sort_measurements = true;
read_measurements(measurements, meas_filename, detector, sort_measurements);

// Measurement hit id reader
Expand Down
Loading