Skip to content

fix: kalman actor error logic#1191

Merged
niermann999 merged 1 commit intoacts-project:mainfrom
niermann999:fix-kalman-actor
Nov 13, 2025
Merged

fix: kalman actor error logic#1191
niermann999 merged 1 commit intoacts-project:mainfrom
niermann999:fix-kalman-actor

Conversation

@niermann999
Copy link
Copy Markdown
Contributor

@niermann999 niermann999 commented Nov 12, 2025

Expand on the number of Kalman fit status codes and track fit outcomes to make a more fine-grained distinction between different error types in the Kalman fitter possible. Takes up the improvements in #1177.

Edit: The wire chamber Kalman fitter test had to be adapted, because more error states are recognized

Edit2: Also fixed the condition of is_complete for the backward fit to point one position below the first state

@niermann999
Copy link
Copy Markdown
Contributor Author

niermann999 commented Nov 12, 2025

Example output of traccc_truth_finding_example:

20:44:58    TracccExampleTruthFinding     INFO      Success: 613/670 (91.4925%)
20:44:58    TracccExampleTruthFinding     INFO        Fit failure during forward pass: 2
20:44:58    TracccExampleTruthFinding     INFO        Fit failure during backward pass: 0
20:44:58    TracccExampleTruthFinding     INFO        Failure during track propagation (forward): 0
20:44:58    TracccExampleTruthFinding     INFO        Failure during track propagation (backward): 55
20:44:58    TracccExampleTruthFinding     INFO        Non positive NDF: 0
20:44:58    TracccExampleTruthFinding     INFO        Skipped track state(s) in fit: 0
20:44:58    TracccExampleTruthFinding     INFO        Skipped track state(s) in smoother: 0
20:44:58    TracccExampleTruthFinding     INFO        Unknown: 0
20:44:58    TracccExampleTruthFinding     INFO        Total errors: 57
20:44:58    FindingPerformanceWriter      INFO      Total number of truth particles was 657
20:44:58    FindingPerformanceWriter      INFO      Total number of found tracks was 670
20:44:58    FindingPerformanceWriter      INFO      Total number of track-matched particles was 624
20:44:58    FindingPerformanceWriter      INFO      Total number of duplicated tracks was 0
20:44:58    FindingPerformanceWriter      INFO      Total number of fake tracks was 10
20:44:58    FindingPerformanceWriter      INFO      Total track efficiency was 94.9772%
20:44:58    FindingPerformanceWriter      INFO      Total track duplicate rate was 0
20:44:58    FindingPerformanceWriter      INFO      Total track fake rate was 0.0152207

@niermann999 niermann999 added the improvement Improve an existing feature label Nov 12, 2025
@niermann999
Copy link
Copy Markdown
Contributor Author

Based on #1184

@niermann999 niermann999 mentioned this pull request Nov 12, 2025
5 tasks
@stephenswat

This comment was marked as outdated.

@stephenswat

This comment was marked as outdated.

@stephenswat
Copy link
Copy Markdown
Member

Physics performance summary

Here is a summary of the physics performance effects of this PR. Command used:

traccc_seeding_example_cuda --input-directory=/data/Acts/odd-simulations-20240506/geant4_ttbar_mu200 --digitization-file=geometries/odd/odd-digi-geometric-config.json --detector-file=geometries/odd/odd-detray_geometry_detray.json --grid-file=geometries/odd/odd-detray_surface_grids_detray.json --material-file=geometries/odd/odd-detray_material_detray.json --input-events=10 --use-acts-geom-source=on --check-performance --truth-finding-min-track-candidates=5 --truth-finding-min-pt=1.0 --truth-finding-min-z=-150 --truth-finding-max-z=150 --truth-finding-max-r=10 --seed-matching-ratio=0.99 --track-matching-ratio=0.5 --track-candidates-range=5:100 --seedfinder-vertex-range=-150:150

Seeding performance

Total number of seeds went from 298345 to 298345 (+0.0%)

Seeding plots



Track finding performance

Total number of found tracks went from 50769 to 50766 (-0.0%)

Finding plots









Track fitting performance

Fitting plots





















Seeding to track finding relative performance

Seeding to track finding plots



Track finding to track fitting relative performance

Track finding to track fitting plots



Note

This is an automated message produced on the explicit request of a human being.

@sonarqubecloud
Copy link
Copy Markdown

@stephenswat
Copy link
Copy Markdown
Member

Performance summary

Here is a summary of the performance effects of this PR:

Graphical

Tabular

KernelReciprocal ThroughputParallelism
d8261ad5745e02Deltad8261ad5745e02
propagate_to_next_surface7.99 ms8.00 ms0.1%3.483.47
fit_forward1.89 ms2.00 ms5.6%7.367.36
find_tracks1.34 ms1.34 ms-0.1%1.821.82
fit_backward928.83 μs918.21 μs-1.1%5.535.53
ccl_kernel825.11 μs825.81 μs0.1%1.371.37
count_doublets621.56 μs623.21 μs0.3%1.611.61
count_triplets591.49 μs588.58 μs-0.5%1.021.02
find_doublets447.19 μs446.35 μs-0.2%3.083.08
Thrust::sort386.21 μs386.05 μs-0.0%7.367.36
find_triplets172.88 μs173.76 μs0.5%1.321.31
select_seeds53.34 μs53.37 μs0.1%1.341.34
remove_duplicates24.15 μs24.20 μs0.2%25.2225.20
populate_grid23.58 μs23.51 μs-0.3%1.221.22
count_grid_capacities22.28 μs22.21 μs-0.3%1.221.22
fill_sorted_measurements19.75 μs19.78 μs0.2%1.131.13
update_triplet_weights15.09 μs15.09 μs0.0%1.271.27
apply_interaction14.41 μs14.40 μs-0.1%6.696.69
estimate_track_params14.27 μs14.26 μs-0.1%2.152.15
fit_prelude9.74 μs9.76 μs0.2%21.8721.88
fill_finding_propagation_sort_keys8.86 μs8.87 μs0.1%7.607.60
form_spacepoints7.83 μs7.81 μs-0.3%1.481.48
reduce_triplet_counts6.29 μs6.28 μs-0.1%3.083.08
unknown5.06 μs5.06 μs0.1%4.274.27
build_tracks4.07 μs4.06 μs-0.2%14.8114.84
fill_finding_duplicate_removal_sort_keys1.58 μs1.58 μs-0.1%37.7137.71
fill_prefix_sum171.94 ns171.94 ns0.0%341.30341.30
fill_fitting_sort_keys153.11 ns153.42 ns0.2%22.1522.15
Total15.43 ms15.53 ms0.7%3.753.77

Important

All metrics in this report are given as reciprocal throughput, not as wallclock runtime.

Note

This is an automated message produced upon the explicit request of a human being.

@niermann999 niermann999 merged commit c794b66 into acts-project:main Nov 13, 2025
29 checks passed
StewMH pushed a commit to StewMH/traccc that referenced this pull request Nov 19, 2025
Expand on the number of Kalman fit status codes and track fit outcomes to make a more fine-grained distinction between different error types in the Kalman fitter possible. Takes up the improvements in acts-project#1177.

Edit: The wire chamber Kalman fitter test had to be adapted, because more error states are recognized

Edit2: Also fixed the condition of is_complete for the backward fit to point one position below the first state
krasznaa added a commit that referenced this pull request Jan 25, 2026
* Start to add alpaka magnetic field implementation

* Temporary change to covfie fork

* Fix formatting

* Update magnetic field

* Fixes for CUDA

* Fix include

* Fixes

* Formatting

* Update SYCL code, tell CI to build SYCL and CUDA when building relevant Alpaka flavours

* Add CPU implementation

* Fix formatting

* Fixes for CPU running

* Improve kalman fitter error handling (#1191)


Expand on the number of Kalman fit status codes and track fit outcomes to make a more fine-grained distinction between different error types in the Kalman fitter possible. Takes up the improvements in #1177.

Edit: The wire chamber Kalman fitter test had to be adapted, because more error states are recognized

Edit2: Also fixed the condition of is_complete for the backward fit to point one position below the first state

* Switch to default navigator for backward fit

* Update to detray v0.105.1

* Improved hole count (#1109)

If the navigation in the forward KF missed a surface, advance the track state iterator correctly (for example if the propagation config between CKF and KF is different or we are running truth fitting). This is only needed for navigators that are not "guided" or "direct".
It also adds an option to the KF to do the full hole count, which is only possible if the propagation starts at the IP and continues through the whole detector, otherwise the first and last holes are missed and the hole count remains an underestimation. Since this will not help in increasing the fit accuracy, but eat more compute resources it will remain optional.

* Read measurement dimensionality from detector

This commit switched the measurement IO code to optionally get the
dimensionality from the detector description rather than from the
measurement input data.

* Update track covariance estimation logic

This commit reworks the covariance estimation logic to match that used
in ACTS. It greatly increases the covariances of tracks, hopefully
increasing the tracking efficiency.

* Save disk space in CUDA CI job

The CUDA CI jobs are currently running out of disk space. This commit
builds ACTS separately, as a release build, in order to save space.

* Remove Kokkos and Futhark code bases

This PR is a revival of #652, removing the obsolete Kokkos and Futhark
code bases.

* Nade measurement sorting handle empty collections correctly.

Did not bother with the host algorithm, because:
  - It's not actively used in any current workflow;
  - It works correctly without this optimization as well.

* Use new covfie tag

* Revert to URL, fix download

* Separate CUDA utils into separate library for use in Alpaka

* Moving to traccc::cuda_utils from traccc_cuda_utils

* Moving to cuda_utils in CI

* Move sycl utils to sycl_utils, use in alpaka

* Link against sycl_utils

* Use ::

* Only put magnetic field utilities in own library: SYCL edition

* Split out queue_wrapper for use in magfield and main SYCL library

* Add get_queue to sycl_queue library

* Pre-apply merge results for cmake files

* Remove sycl_magfield library from linking

* Add SYCL_UTILS to cmake config

---------

Co-authored-by: Joana Niermann <53186085+niermann999@users.noreply.github.com>
Co-authored-by: Joana Niermann <joana.niermann@cern.ch>
Co-authored-by: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Co-authored-by: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants