fix: fully move CherenkovRadiator state into RadiatorHistory#49
Merged
Conversation
7 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses thread-safety issues in IRT v1 by moving stateful data (trajectory locations and bin counts) from the shared CherenkovRadiator class to the per-event RadiatorHistory class. This allows multiple threads to safely process events concurrently without requiring external synchronization.
Changes:
- Moved
m_TrajectoryBinCountandm_LocationsfromCherenkovRadiatortoRadiatorHistoryfor thread safety - Added backwards-compatible deprecated API in
CherenkovRadiatorto maintain compatibility with existing code - Updated
ChargedParticle::PIDReconstructionto use the new thread-safe API with fallback to deprecated API
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| include/RadiatorHistory.h | Added trajectory management methods and members (GetTrajectoryBinCount, SetTrajectoryBinCount, GetLocations, AddLocation, ResetLocations); initialized m_TrajectoryBinCount in constructor; incremented ClassDef to version 2 |
| include/CherenkovRadiator.h | Renamed members with _deprecated suffix; added backwards-compatible methods with deprecation warnings; incremented ClassDef to version 6 |
| source/ChargedParticle.cc | Implemented fallback logic to use new thread-safe API when available, falling back to deprecated API for backwards compatibility; updated location access to use the appropriate API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
23733e1 to
e6e087d
Compare
e6e087d to
a56af41
Compare
github-merge-queue bot
pushed a commit
to eic/EICrecon
that referenced
this pull request
Feb 14, 2026
### Briefly, what does this PR introduce? This PR makes avoids locking IRT1 when a thread-safe IRT1 is detected (e.g. the version with the changes in eic/irt#49). If a thread-unsafe IRT1 is detected, we continue locking. ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [x] New feature (issue: avoid locking IRT in EICrecon code with thread-safe design) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
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?
This PR moves the problematic stateful aspects of CherenkovRadiator into RadiatorHistory. With this set of changes, IRT v1 can work in a thread-safe manner without imposing thread-locking requirements on the callers.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No. Fully backward compatible for current callers that use the thread-unsafe interface.