Skip to content

[PWGEM,PWGJE] EMCal TM monitor: MC truth of the track matching chain - #18443

Merged
mhemmer-cern merged 2 commits into
AliceO2Group:masterfrom
mhemmer-cern:emcal-tm
Oct 23, 2026
Merged

mhemmer-cern merged 2 commits into
AliceO2Group:masterfrom
mhemmer-cern:emcal-tm

Conversation

@mhemmer-cern

Copy link
Copy Markdown
Collaborator

The EMCal track-matching veto misses many clusters made by conversion electrons (PCM photons counted twice in PCM-EMC pairs). The derived data cannot tell where the matching chain fails, so add an MC truth process that follows the leading MC particle of each cluster through it.

emcTmMonitor:

  • New processMCTruth (off by default). For every cluster, take the leading MC contributor (largest energy fraction) and classify it as conversion e+-, primary e+-, other e+-, other charged, photon, neutral or other.
  • For charged leading particles, follow the particle's best reconstructed track and record one status per cluster: no reco track, not extrapolated to the EMCal, no matching candidate (neither a global track nor a V0 leg), candidate not matched, matched as primary, matched as secondary.
  • Histograms under MCTruth/:
    • status vs truth class, track type, V0-leg flag and MC pT
    • track-cluster residuals up to +-0.4 in the origin frame of the extrapolation, so tails beyond the matching windows are visible
    • own residual minus stored residual, to validate the frame conversion
    • status vs conversion radius
    • E/p of conversion-e+- clusters
  • Needs emcal-correction-task with processMCWithSecondaries and the photon conversion builder (aod::V0Legs).
  • The event selection moves into a helper shared by both process functions; the event histograms are filled only once.
  • Charges come from the O2DatabasePDG service.
  • Histograms with labelled axes are TH2 or THn, avoiding the TH3 label merge bug in ROOT 6.36.
  • Add missing BC table to process functions for event selecton which needs it to get the runnumber via collision -> bc -> runnumber

twoPhotonMcTask:

  • hOrigin: disable axis extension on the labelled z axis. TH1Merger::LabelMerge in ROOT 6.36 reads the z labels from the y axis, so merged content ended up in a new, unlabelled bin.
  • Leg matching diagnostics: evaluate the primary-match status only for legs that pass the global track selection (rebuilt from the V0Legs columns); other legs get a new "not a global track" status instead of inflating "no match stored".

Co-Authored-By: Claude Opus 5.5

Fix missing BC table in process functions

The EMCal track-matching veto misses many clusters made by conversion
electrons (PCM photons counted twice in PCM-EMC pairs). The derived data
cannot tell where the matching chain fails, so add an MC truth process
that follows the leading MC particle of each cluster through it.

emcTmMonitor:
- New processMCTruth (off by default). For every cluster, take the
  leading MC contributor (largest energy fraction) and classify it as
  conversion e+-, primary e+-, other e+-, other charged, photon, neutral
  or other.
- For charged leading particles, follow the particle's best
  reconstructed track and record one status per cluster: no reco track,
  not extrapolated to the EMCal, no matching candidate (neither a global
  track nor a V0 leg), candidate not matched, matched as primary,
  matched as secondary.
- Histograms under MCTruth/:
  - status vs truth class, track type, V0-leg flag and MC pT
  - track-cluster residuals up to +-0.4 in the origin frame of the
    extrapolation, so tails beyond the matching windows are visible
  - own residual minus stored residual, to validate the frame conversion
  - status vs conversion radius
  - E/p of conversion-e+- clusters
- Needs emcal-correction-task with processMCWithSecondaries and the
  photon conversion builder (aod::V0Legs).
- The event selection moves into a helper shared by both process
  functions; the event histograms are filled only once.
- Charges come from the O2DatabasePDG service.
- Histograms with labelled axes are TH2 or THn, avoiding the TH3 label
  merge bug in ROOT 6.36.
- Add missing BC table to process functions for event selecton which needs
  it to get the runnumber via collision -> bc -> runnumber

twoPhotonMcTask:
- hOrigin: disable axis extension on the labelled z axis.
  TH1Merger::LabelMerge in ROOT 6.36 reads the z labels from the y axis,
  so merged content ended up in a new, unlabelled bin.
- Leg matching diagnostics: evaluate the primary-match status only for
  legs that pass the global track selection (rebuilt from the V0Legs
  columns); other legs get a new "not a global track" status instead of
  inflating "no match stored".

Co-Authored-By: Claude Opus 5.5

Fix missing BC table in process functions
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 6 warnings, 🔕 25 disabled

@mhemmer-cern

Copy link
Copy Markdown
Collaborator Author

Did locally build and run, without any code check issues, so let's hope online its the same.

@mhemmer-cern
mhemmer-cern enabled auto-merge (squash) October 23, 2026 18:27

@alibuild alibuild 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.

Auto-approving on behalf of @mhemmer-cern.

@mhemmer-cern
mhemmer-cern merged commit abc2207 into AliceO2Group:master Oct 23, 2026
15 checks passed
@mhemmer-cern
mhemmer-cern deleted the emcal-tm branch October 23, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photon Photon and neutral meson PAG label pwgem pwgje

Development

Successfully merging this pull request may close these issues.

2 participants