Skip to content

Do not take ownership of CCDB distortion maps in the TPC digitizer - #16082

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:tpc-digi-sc-maps
Nov 10, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:tpc-digi-sc-maps

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

This fixes a double ownership of the TPC space-charge distortion maps and is a preparation for multithreaded TPC digitization.

The Digitizer took ownership of the maps passed to setUseSCDistortions(SC*) and setSCDistortionsDerivative(SC*). These objects belong to the DPL CCDB cache, which deletes the old object itself when a newer one replaces it, so a map update within one process would delete it twice. The Digitizer now owns only maps it creates itself, which also lets several digitizers share one map.

Digits, labels and common mode are unchanged (checked on a PbPb timeframe with distortions).

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

Assisted by Claude Code.

This fixes a double ownership of the TPC space-charge maps and prepares sharing them between digitizers.

- setUseSCDistortions(SC*) and setSCDistortionsDerivative(SC*) took ownership of objects that the DPL CCDB cache owns and deletes itself when a newer object replaces them.
- The Digitizer now owns only the maps it creates itself.
- The map members are transient for ROOT I/O.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@wiechula wiechula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sawenzel , where is the mSpaceChargeDer now owned? The change looks unsymmetric for mSpaceCharge and mSpaceChargeDer.

@sawenzel

sawenzel commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

@wiechula : mSpaceChargeDer is only set from the CCDB object in finaliseCCDB, so it is owned by the DPL CCDB cache, which keeps it alive until a new version replaces it; finaliseCCDB then hands the new object to the digitizer. The main map can also be created by the digitizer itself, via setUseSCDistortions(distortionType, histo) or from a file, and only that case goes into mSpaceChargeOwned. Hence the asymmetry.

@sawenzel
sawenzel merged commit b8dd0a3 into AliceO2Group:dev Nov 10, 2026
12 checks passed
@sawenzel
sawenzel deleted the tpc-digi-sc-maps branch November 10, 2026 09:49
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.

2 participants