Skip to content

TPC: add option to load a dedicated MC gain map in the digitizer - #16159

Merged
wiechula merged 3 commits into
AliceO2Group:devfrom
matthias-kleiner:tpc-digi-gain-mc
Nov 23, 2026
Merged

wiechula merged 3 commits into
AliceO2Group:devfrom
matthias-kleiner:tpc-digi-gain-mc

Conversation

@matthias-kleiner

Copy link
Copy Markdown
Contributor

The digitizer applies the gain map from TPC/Calib/PadGainFullMC, so that MC can be simulated with a different (true) gain map than the one the reconstruction corrects with (TPC/Calib/PadGainFull).

The digitizer applies the gain map from TPC/Calib/PadGainFullMC, so that MC can
be simulated with a different (true) gain map than the one the reconstruction
corrects with (TPC/Calib/PadGainFull).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthias-kleiner matthias-kleiner changed the title TPC: read the digitizer gain map from TPC/Calib/PadGainFullMC TPC: add option to load a dedicated MC gain map in the digitizer Nov 23, 2026
By default the digitizer applies TPC/Calib/PadGainFull as before; with
--TPCuseGainMapMC it applies TPC/Calib/PadGainFullMC. The option is
passed via the Digitizer to GEMAmplification.

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

Copy link
Copy Markdown
Collaborator

Thanks, this looks good to me. The ordering is fine: the flag reaches CDBInterface in update() before GEMAmplification reads the gain map, both with lanes and with --tpc-digi-threads.

Two small points:

  1. getGainMapMC() falls back to getGainMap() when defaults or a gain-map file are used. So --TPCuseGainMapMC without --TPCuseCCDB silently applies the random default map, while the log still prints TPC gain map for MC (PadGainFullMC): 1. Could we log the map that is actually applied (or warn when the flag is overridden)? The help text "false: apply ... PadGainFull" also only holds with --TPCuseCCDB.

  2. What should happen when there is no PadGainFullMC object for the anchor timestamp? At the moment getObjectFromCDB ends in LOG(fatal), so the digitization aborts. Is that intended, or should it fall back to PadGainFull with a warning?

Minor: initTPC() preloads PadGainFull at the anchor time but not PadGainFullMC. Adding it there would make a missing object fail at setup, not at the first TF.

TPCDigitizerConditions reads --TPCuseGainMapMC and logs the gain map from the
CCDB applied in the digitizer. A warning is given if the option has no effect
(no --TPCuseCCDB, or a GainMap.root file).

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

Copy link
Copy Markdown
Contributor Author

Thanks, this looks good to me. The ordering is fine: the flag reaches CDBInterface in update() before GEMAmplification reads the gain map, both with lanes and with --tpc-digi-threads.

Two small points:

1. `getGainMapMC()` falls back to `getGainMap()` when defaults or a gain-map file are used. So `--TPCuseGainMapMC` without `--TPCuseCCDB` silently applies the random default map, while the log still prints `TPC gain map for MC (PadGainFullMC): 1`. Could we log the map that is actually applied (or warn when the flag is overridden)? The help text "false: apply ... PadGainFull" also only holds with `--TPCuseCCDB`.

2. What should happen when there is no `PadGainFullMC` object for the anchor timestamp? At the moment `getObjectFromCDB` ends in `LOG(fatal)`, so the digitization aborts. Is that intended, or should it fall back to `PadGainFull` with a warning?

Minor: initTPC() preloads PadGainFull at the anchor time but not PadGainFullMC. Adding it there would make a missing object fail at setup, not at the first TF.

Thanks for the comments @sawenzel ,

  1. The digitizer now logs which gain map from the CCDB is applied (PadGainFull or PadGainFullMC). It warns if --TPCuseGainMapMC has no effect: without --TPCuseCCDB (default map), or when a local GainMap.root is used.
  2. I will upload a default PadGainFullMC object valid for the full time range, so a missing object should not happen.
  3. Since the object is always there, I didn't add it to initTPC()

@wiechula
wiechula enabled auto-merge (rebase) November 23, 2026 14:41
@wiechula
wiechula merged commit bff64be into AliceO2Group:dev Nov 23, 2026
11 of 13 checks passed
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.

3 participants