Skip to content

[PWGEM,PWGEM-36] PhotonMeson: two-photon MC truth task, pair background QA and PCM-EMC MC - #18275

Merged
mhemmer-cern merged 6 commits into
AliceO2Group:masterfrom
mhemmer-cern:PWGEM-36
Oct 15, 2026
Merged

mhemmer-cern merged 6 commits into
AliceO2Group:masterfrom
mhemmer-cern:PWGEM-36

Conversation

@mhemmer-cern

Copy link
Copy Markdown
Collaborator

Add tools to find out which parts of the same-event photon-pair spectrum
the mixed event cannot describe, and add PCM-EMC to the MC pi0/eta task.

twoPhotonMcTask (new):

  • Classify same-event PCM-PCM, EMC-EMC and PCM-EMC pairs by the closest
    common MC ancestor of the two candidates: none, same particle,
    pi0/eta direct, pi0/eta cross, omega, K0S, eta', other hadron,
    parton/string. Output THn (m_inv, pT, cent, pair truth, bucket).
  • Per-photon truth flag (true photon / non-photon / fake) and ancestor
    chains cached once per DF. EMC chains of a conversion e+- start at the
    photon. The colliding beam nuclei are never part of a chain.
  • Ancestor chain QA: length, why the chain ended, kind and PDG of the
    last element.
  • PCM-EMC same-particle diagnostics: what made the EMC cluster (V0 leg
    e+-, bremsstrahlung of a leg, other), and for leg clusters whether and
    where the leg appears among the matched primary/secondary tracks, with
    residuals and E/p.
  • Mixed-event process functions (z-vertex and centrality mixing, same
    event and photon selection as taskPi0FlowEMC), filling (m_inv, pT,
    cent, pair truth) to compare with the "none" component.

MCUtilities.h:

  • Add isPartonLike, isNucleus, getAncestorChain and
    getFirstCommonAncestor.

taskPi0FlowEMC:

  • Replace hEtaPhiAngleMassCent(Mixed) with hPairBkgSE/ME: THnF in
    (m_inv, pT, cent, alpha, atan2(deta, dphi)), with dphi folded to
    [0, pi] identically for SE and ME. Alpha is signed (PCM - EMC) for
    PCM-EMC. Filled after all pair cuts.
  • Fix processPCMMixed filling the same-event direction histogram.

Pi0EtaToGammaGammaMC:

  • Add PCM-EMC: true conversion on the PCM side, photon below the pi0/eta
    on the EMC side, sharing the existing truth logic; new task
    pi0eta-to-gammagamma-mc-pcmemc.
  • Cut only the first photon in the generic cut block. The second photon
    is cut afterwards with its own tag (with matched tracks for EMC).

NMHistograms.h:

  • Move pairname to the third parameter of addNMHistograms. The MC calls
    passed the name in that position, where it was silently converted to
    the sparseFullAxes bool, so PCM-Dalitz MC axes were labelled gamma-gamma.
    Build the occupancy/EP/vertex axes only where they are used.

@github-actions github-actions Bot added pwgem photon Photon and neutral meson PAG label labels Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 485 warnings, 🔕 31 disabled

@alibuild

This comment was marked as outdated.

@alibuild

This comment was marked as outdated.

…nd QA and PCM-EMC MC

Add tools to find out which parts of the same-event photon-pair spectrum
the mixed event cannot describe, and add PCM-EMC to the MC pi0/eta task.

twoPhotonMcTask (new):
- Classify same-event PCM-PCM, EMC-EMC and PCM-EMC pairs by the closest
  common MC ancestor of the two candidates: none, same particle,
  pi0/eta direct, pi0/eta cross, omega, K0S, eta', other hadron,
  parton/string. Output THn (m_inv, pT, cent, pair truth, bucket).
- Per-photon truth flag (true photon / non-photon / fake) and ancestor
  chains cached once per DF. EMC chains of a conversion e+- start at the
  photon. The colliding beam nuclei are never part of a chain.
- Ancestor chain QA: length, why the chain ended, kind and PDG of the
  last element.
- PCM-EMC same-particle diagnostics: what made the EMC cluster (V0 leg
  e+-, bremsstrahlung of a leg, other), and for leg clusters whether and
  where the leg appears among the matched primary/secondary tracks, with
  residuals and E/p.
- Mixed-event process functions (z-vertex and centrality mixing, same
  event and photon selection as taskPi0FlowEMC), filling (m_inv, pT,
  cent, pair truth) to compare with the "none" component.

MCUtilities.h:
- Add isPartonLike, isNucleus, getAncestorChain and
  getFirstCommonAncestor.

taskPi0FlowEMC:
- Replace hEtaPhiAngleMassCent(Mixed) with hPairBkgSE/ME: THnF in
  (m_inv, pT, cent, alpha, atan2(deta, dphi)), with dphi folded to
  [0, pi] identically for SE and ME. Alpha is signed (PCM - EMC) for
  PCM-EMC. Filled after all pair cuts.
- Fix processPCMMixed filling the same-event direction histogram.

Pi0EtaToGammaGammaMC:
- Add PCM-EMC: true conversion on the PCM side, photon below the pi0/eta
  on the EMC side, sharing the existing truth logic; new task
  pi0eta-to-gammagamma-mc-pcmemc.
- Cut only the first photon in the generic cut block. The second photon
  is cut afterwards with its own tag (with matched tracks for EMC).

NMHistograms.h:
- Move pairname to the third parameter of addNMHistograms. The MC calls
  passed the name in that position, where it was silently converted to
  the sparseFullAxes bool, so PCM-Dalitz MC axes were labelled gamma-gamma.
  Build the occupancy/EP/vertex axes only where they are used.
@mhemmer-cern

Copy link
Copy Markdown
Collaborator Author

macOS-arm failed build is not related to this PR. Hope it restarts the build soon.

@mhemmer-cern
mhemmer-cern marked this pull request as draft October 14, 2026 13:11
@mhemmer-cern
mhemmer-cern marked this pull request as ready for review October 14, 2026 13:46
@mhemmer-cern
mhemmer-cern enabled auto-merge (squash) October 15, 2026 12:29

@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 70d381f into AliceO2Group:master Oct 15, 2026
15 checks passed
@mhemmer-cern
mhemmer-cern deleted the PWGEM-36 branch October 15, 2026 12:30
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

Development

Successfully merging this pull request may close these issues.

2 participants