Skip to content

Fix MC labels carried over between sectors in the TPC digitizer - #16081

Open
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:tpc-digitcontainer-reset
Open

sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:tpc-digitcontainer-reset

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

When a TPC digitizer lane processes several sectors, digits of a later sector could carry MC labels of tracks from an earlier sector. With DigiParams.maxOrbitsToDigitize set, the final flush stops at the timeframe end and leaves the time bins beyond it in the DigitContainer. reset(), called for every new sector, cleared only their charges, so their label lists were reused by the next sector.

reset() now deletes all remaining time bins. The new unit test testTPCDigitContainerReset fails before and passes after the change.

In a test with 200 pp events at 500 kHz and all 36 sectors in one lane, 2.9 % of the labels belonged to tracks without hits in the digit's sector. With one lane per sector there were none, and with this fix, still in one lane, there are none either; the digits are unchanged. The correct label was always present as well, so track-level MC labels are not expected to change.

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

Assisted by Claude Code.

This fixes a problem in the TPC DigitContainer reset and adds a unit test.

- With DigiParams.maxOrbitsToDigitize set, time bins beyond the timeframe end stay in the container after the final flush.
- reset() cleared only their charges, so their MC labels were attached to digits of the next sector processed by the same lane.
- reset() now deletes all remaining time bins, and the destructor frees them.
- testTPCDigitContainerReset checks that no label of one sector reaches the next.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DigitContainer owns the time bins it deletes, so a copy would free them twice.

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