fix: stabilize tracker digi raw hit ordering - #2805
Open
wdconinc wants to merge 3 commits into
Open
Conversation
14 tasks
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
wdconinc
force-pushed
the
wdconinc-fix-digi-determinism
branch
from
July 29, 2026 17:49
45fe132 to
2524df5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a multi-thread reproducibility issue in tracker digitization by making raw-hit emission deterministic in the SiliconTrackerDigi and MPGDTrackerDigi algorithms. It keeps the existing unordered_map aggregation behavior but stabilizes the final emission ordering by sorting the aggregated output cell IDs before creating RawTrackerHits and their corresponding links/associations.
Changes:
- Collect aggregated output cell IDs into a vector and
std::ranges::sortthem before emitting raw hits inSiliconTrackerDigi. - Apply the same sorted-emission approach to each
cell_hit_mapinMPGDTrackerDigi, ensuring deterministic raw hit emission order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/algorithms/digi/SiliconTrackerDigi.cc | Sorts aggregated cell IDs before emitting raw hits and building link/association collections. |
| src/algorithms/digi/MPGDTrackerDigi.cc | Sorts aggregated strip/cell IDs before emitting raw hits and building link/association collections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
14 tasks
Contributor
Capybara summary for PR 2805
Last updated 2026-07-31T21:37-04:00 2524df5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
This PR makes raw-hit emission deterministic in
SiliconTrackerDigiandMPGDTrackerDigiby preserving the existingunordered_map-based hit aggregation and sorting the final output cell IDs in ascending order before emitting raw hits, links, and associations.This addresses one specific MT reproducibility issue in tracking digitization, but it is not sufficient by itself to resolve all determinism issues in the broader CKF unfiltered path. Additional nondeterministic ordering or aggregation points may still exist elsewhere in the chain.
Computationally, the change adds a sort over the unique output cell IDs after aggregation. That changes the final emission step from hash-iteration order to
O(N log N)ordering over the number of unique cells, while leaving the main accumulation logic unchanged. Expected impact is small because the extra work is limited to the already-reduced set of unique output channels per event.What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
AI was used to inspect the two digi algorithms, implement the minimal deterministic-ordering fix, run a targeted build/test in the EIC container environment, and draft this PR description.