Skip to content

Share the scaled TPC distortions between digitizers through a file - #16091

Draft
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:tpc-distfile-dev
Draft

sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:tpc-distfile-dev

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds the option --tpc-distortion-file to the TPC digitizer, so that the distortions scaled to the instantaneous luminosity are computed only once per job.

With distortion type 2, every digitizer lane recalculates the scaled distortions from the CCDB maps in every timeframe. In Pb-Pb this takes about 3 minutes of CPU per lane and timeframe and, together with the correction maps it needs, more than 1 GB of memory per lane.

With the option, the first digitizer computes the scaled distortions and writes them to the file; the other lanes and the later timeframes of the job read it in under a second. The file is keyed on the ETags of the two CCDB maps, TPCCorrMap.lumiInst and the mean-luminosity overrides, and a lock file makes sure that only one process computes. In addition, the correction maps are now released after the recalculation, since only the distortions are used for the digitization.

The effect for one Pb-Pb timeframe (run 572106) with 8 lanes:

peak PSS wall time
before 15.1 GiB 216 s
corrections released, no file 11.9 GiB 221 s
with file, first timeframe (computed with 8 threads) 11.0 GiB 77 s
with file, later timeframes 10.8 GiB 48 s

Note that the digits do not change: with and without the file they are identical to those of the current digitizer, and without the option the only change is the released correction maps. The use in O2DPG is prepared in AliceO2Group/O2DPG#2541, and the multithreaded digitizer of #16090 will use the same file once both are merged.

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

Assisted by Claude Code.

sawenzel and others added 2 commits November 9, 2026 16:50
This frees memory in the TPC digitizer that is not needed after the recalculation of the scaled distortions.

- The digitizer only uses the global distortions of the main map.
- The global corrections of the main and the derivative map are now released after the recalculation.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This adds the option --tpc-distortion-file to the TPC digitizer, so that the scaled distortions of a job are computed only once.

- The first digitizer computes the scaled distortions and writes them to the file.
- The other lanes and later timeframes read the file instead of recomputing.
- The file is keyed on the ETags of the CCDB maps, TPCCorrMap.lumiInst and the mean-luminosity overrides.
- A file written for other inputs is replaced.
- A lock file serialises the digitizers of different processes.
- Without a usable lock or ETag the distortions are computed as before.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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