Skip to content

perf: Optional recording of CKF material track states - #5827

Open
andiwand wants to merge 3 commits into
acts-project:mainfrom
andiwand:ckf-material-states
Open

perf: Optional recording of CKF material track states#5827
andiwand wants to merge 3 commits into
acts-project:mainfrom
andiwand:ckf-material-states

Conversation

@andiwand

@andiwand andiwand commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Adds recordMaterialStates to the CKF options. When disabled, surfaces with material but no sensitivity no longer get a track state. Material effects are still applied, only the record is dropped.

The transport jacobian of a skipped surface is folded into the next recorded state, so the MultiTrajectory contract that a state's jacobian runs from the previous state is preserved and smoothing is unaffected.

Defaults to true, so nothing changes unless opted out. Ignored with a multi-component stepper, which has no single jacobian to fold.

--- END COMMIT MESSAGE ---

Motivation: these states are never a measurement, hole or outlier, and are trimmed away again in the Examples chain. They still cost a bound state, a track state allocation and a branch stopper call each, and the smoother walks them.

Measured on ODD ttbar pu200, single thread, n=30, Algorithm:TrackFindingAlgorithm per event:

s/event vs main
main 0.7944 ± 0.0198
flag on (default) 0.7898 ± 0.0153 −0.6%, i.e. noise
flag off 0.7156 ± 0.0116 −9.9%

With the flag on, seed, track and branch counts are identical to main.

Two things worth knowing before turning it off:

  • The branch stopper is no longer called on a skipped surface, so a branch that would have been stopped there survives to the next sensitive surface. Effect on ttbar pu200: 1 of 13105 found tracks and 1 of 3028 selected tracks differ, 215 fewer branches stopped (−0.26%).
  • A refit with the DirectNavigator takes its surface sequence from the track states, so it needs the flag left on.

New tests cover that the product of stored jacobians and the smoothed parameters at the measurement surfaces agree with and without recording, for both GainMatrixSmoother and MbfSmoother. CubicTrackingGeometry has no material-only surfaces, hence the small telescope geometry in the test.

Adds `recordMaterialStates` to the CKF options. When disabled, surfaces
with material but no sensitivity no longer get a track state. Material
effects are still applied, only the record is dropped.

The transport jacobian of a skipped surface is folded into the next
recorded state, so the MultiTrajectory contract that a state's jacobian
runs from the previous state is preserved and smoothing is unaffected.

Defaults to true, so nothing changes unless opted out. Ignored with a
multi-component stepper, which has no single jacobian to fold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QpujVemBhQ8SiNQPsfeWhj
@github-actions github-actions Bot added Component - Core Affects the Core module Component - Examples Affects the Examples module Track Finding labels Aug 4, 2026
@github-actions github-actions Bot added this to the next milestone Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Public API surface diff

+3 added, 0 breaking.

➕ Added public API

New public data members (3)
  • Acts::CombinatorialKalmanFilter::Actor::recordMaterialStates
  • Acts::CombinatorialKalmanFilterOptions::recordMaterialStates
  • Acts::CombinatorialKalmanFilterResult::accumulatedJacobian

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for 6fccfba

Full contents

physmon summary

❗️: Downstream build failure

  • eic-shell EICrecon (cc @acts-project/epic-contacts)

andiwand and others added 2 commits August 5, 2026 21:54
Disabling `recordMaterialStates` with a multi-component stepper now throws
instead of logging a warning per `findTracks` call.

`TrackFindingAlgorithm` shares one options object between the plain and the
bremsstrahlung finder and picks the finder per seed, so every electron seed
took that path. The brem finder now gets its own options with the recording
kept enabled.

Also shortens the comments and turns the test helper into a fixture member.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSzhTpwpLH3BkzdvjnB2Xo
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@andiwand
andiwand requested a review from timadye August 6, 2026 14:54
@timadye

timadye commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

I have tested this with full_chain_test.py, ITk ttbar_pu200. It gives very similar results, with 0.5 (of 1916) fewer tracks per event when I drop the recording of material surfaces. The TrackFindingAlgorithm is 17% faster!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Component - Examples Affects the Examples module Public API Track Finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants