Skip to content

Add optional per-sector seeding to the TPC digitizer - #16085

Open
sawenzel wants to merge 5 commits into
AliceO2Group:devfrom
sawenzel:tpc-digi-sector-seeding-v2
Open

sawenzel wants to merge 5 commits into
AliceO2Group:devfrom
sawenzel:tpc-digi-sector-seeding-v2

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

This adds an optional per-sector seeding to the TPC digitizer and is a preparation for multithreaded TPC digitization.

The random rings of ElectronTransport, GEMAmplification and SAMPAProcessing are process-wide singletons whose positions carry over from one sector to the next, so the digits depend on the number of TPC lanes. With --tpc-sector-seeding, each Digitizer owns these objects, fills their rings once from DigiParams.seed and moves them to positions derived from the seed, the sector and the timeframe. A first commit turns the remaining static workspaces into per-digitizer members, so that several digitizers can later run side by side.

Without the option the output is unchanged (digits, labels and common mode checked on PbPb and pp). With it, the digits are identical for 1, 4 and 8 lanes, at no measurable cost in time or memory.

Stacked on #16083; only the last two commits belong to this PR.

https://its.cern.ch/jira/browse/O2-7309

Assisted by Claude Code.

@sawenzel

sawenzel commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Added commits after internal review.

@sawenzel
sawenzel force-pushed the tpc-digi-sector-seeding-v2 branch from 25f1c9c to f9b05b7 Compare November 9, 2026 17:53
sawenzel and others added 5 commits November 10, 2026 10:50
This replaces two shared static workspaces of the TPC digitizer by members, in preparation for a multithreaded digitizer.

- The shaped-signal buffer of Digitizer::process and the label sorting buffer of DigitGlobalPad::fillOutputContainer are now members.
- The SAMPAProcessing used for the output is passed down from DigitContainer, which uses the singleton unless one is set.

https://its.cern.ch/jira/browse/O2-7309

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This adds an option that makes the TPC digits independent of the lane assignment, as a preparation for MT digitization.

- The random rings of ElectronTransport, GEMAmplification and SAMPAProcessing kept their positions from one sector to the next, so the digits depended on the number of TPC lanes.
- With --tpc-sector-seeding, each Digitizer owns these three objects, fills their rings once from DigiParams.seed, and moves the rings to positions derived from the seed, the sector and the timeframe.
- RandomRing can now be filled from a given generator and moved to a random position.
- Without the option, the output is unchanged.

https://its.cern.ch/jira/browse/O2-7309

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This addresses a review comment on the random ring repositioning.

- setRandomPosition() can place the ring at any index.
- getNextValueVc() now wraps to the start when a vector would run past the end.

https://its.cern.ch/jira/browse/O2-7309

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This addresses a review comment on the repeated fillOutputContainer calls.

- The eight cases now pass the mode as a type to one lambda.

https://its.cern.ch/jira/browse/O2-7309

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sawenzel
sawenzel force-pushed the tpc-digi-sector-seeding-v2 branch from f9b05b7 to 7e6c65d Compare November 10, 2026 09:53

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant