Skip to content

[PWGLF] Changes to accomodate online mult-integrated efficiency correction + electron rejection#15770

Merged
romainschotter merged 5 commits intoAliceO2Group:masterfrom
scannito:closure
Apr 14, 2026
Merged

[PWGLF] Changes to accomodate online mult-integrated efficiency correction + electron rejection#15770
romainschotter merged 5 commits intoAliceO2Group:masterfrom
scannito:closure

Conversation

@scannito
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Phi–strangeness correlation workflow to support mult-integrated (2D) efficiency maps and introduces an electron-rejection step in pion track production.

Changes:

  • Extend efficiency-map handling to accept either TH2 or TH3 maps from CCDB and update weighting logic accordingly.
  • Add configurable toggles for enabling/disabling individual associated-particle correlations (K0S / Xi / pion).
  • Add an electron-rejection step to the pion track producer and simplify the pion PID “in nσ region” helper signature.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx Introduces TH2/TH3 efficiency map support, correlation enable toggles, updated weighting/selection guards, and MC-closure bookkeeping updates.
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx Adds electron rejection to pion track PID hypothesis rejection.
PWGLF/DataModel/LFPhiStrangeCorrelationTables.h Updates the pion InNSigmaRegion dynamic column signature to remove the pT/threshold dependency.
Comments suppressed due to low confidence (1)

PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1110

  • The new doXiCorrelation/kXi plumbing is incomplete: xiParticles is never filled (no PDG selection for Xi in the MC loop), so enabling Phi–Xi correlations will silently produce no output while still attempting to load an efficiency map. Either implement Xi candidate collection (and corresponding histograms) or remove/disable the Xi option until it is supported.
    std::vector<MiniParticle> phiParticles;
    std::vector<MiniParticle> k0sParticles;
    std::vector<MiniParticle> xiParticles;
    std::vector<MiniParticle> pionParticles;

    auto inYAcceptance = [&](const auto& mcParticle) {
      return std::abs(mcParticle.y()) <= yConfigs.cfgYAcceptance;
    };

    // Preliminary loop to fill vectors of particles of interest for the current event, applying pt and y cuts
    for (const auto& mcParticle : mcParticles) {
      if (!inYAcceptance(mcParticle))
        continue;

      switch (std::abs(mcParticle.pdgCode())) {
        case o2::constants::physics::Pdg::kPhi:
          if (eventSelectionType == 0 && mcParticle.pt() >= minPtMcGenConfigs.minPhiPt)
            phiParticles.emplace_back(mcParticle.pt(), mcParticle.y(), mcParticle.phi());
          break;
        case PDG_t::kK0Short:
          if (mcParticle.isPhysicalPrimary() && mcParticle.pt() >= minPtMcGenConfigs.v0SettingMinPt)
            k0sParticles.emplace_back(mcParticle.pt(), mcParticle.y(), mcParticle.phi());
          break;
        case PDG_t::kPiPlus:
          if (mcParticle.isPhysicalPrimary() && mcParticle.pt() >= minPtMcGenConfigs.cMinPionPtcut)
            pionParticles.emplace_back(mcParticle.pt(), mcParticle.y(), mcParticle.phi());
          break;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

romainschotter
romainschotter previously approved these changes Apr 14, 2026
@romainschotter romainschotter enabled auto-merge (squash) April 14, 2026 16:34
auto-merge was automatically disabled April 14, 2026 16:43

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1085 to 1088
std::vector<MiniParticle> phiParticles;
std::vector<MiniParticle> k0sParticles;
std::vector<MiniParticle> xiParticles;
std::vector<MiniParticle> pionParticles;
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

xiParticles is added for Phi–Xi closure, but the MC-particle loop below does not currently push any Xi candidates into this vector (no PDG handling), so enabling Xi correlations will still produce empty Phi–Xi closure output. Either populate xiParticles in the PDG loop (with appropriate selection cuts) or remove/disable the Xi path until implemented.

Copilot uses AI. Check for mistakes.

struct : ConfigurableGroup {
Configurable<bool> doK0SCorrelation{"doK0SCorrelation", true, "Enable Phi-K0S correlation"};
Configurable<bool> doXiCorrelation{"doXiCorrelation", false, "Enable Phi-Xi correlation"};
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

doXiCorrelation is exposed as a user-facing toggle, but this task currently has no Xi candidate input/selection and no Xi correlation loops in the data/MC-reco processing paths (only K0S and pion are actually used). As a result, enabling this option will not produce any Phi–Xi output (and it still attempts to load a Xi efficiency map). Either implement the full Phi–Xi chain (tables, selection, histogram definitions, filling) or remove/disable this configurable until Xi support is complete.

Suggested change
Configurable<bool> doXiCorrelation{"doXiCorrelation", false, "Enable Phi-Xi correlation"};
// Xi correlation is not yet implemented in this task (no Xi candidate input/selection
// and no Phi-Xi correlation filling in the processing paths), so keep it hard-disabled
// until the full Xi chain is added.
const bool doXiCorrelation = false;

Copilot uses AI. Check for mistakes.
Comment on lines 411 to 413
histos.add("phiK0S/h5PhiK0SClosureMCGen", "Deltay vs deltaphi for Phi and K0Short in MCGen", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTK0SAxis, deltayAxis, deltaphiAxis});
histos.add("phiPi/h5PhiPiClosureMCGen", "Deltay vs deltaphi for Phi and Pion in MCGen", kTHnSparseF, {binnedmultAxis, binnedpTPhiAxis, binnedpTPiAxis, deltayAxis, deltaphiAxis});

Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

assocParticleLabels now includes Xi, and the closure code later constructs histogram keys from these labels (e.g. phiXi/...) when doXiCorrelation is enabled, but the registry only defines closure histograms for K0S and pion here. Either add the corresponding phiXi/... histograms as part of completing Xi support, or remove Xi from the label/config machinery until the feature is implemented end-to-end.

Copilot uses AI. Check for mistakes.
@romainschotter romainschotter merged commit f418000 into AliceO2Group:master Apr 14, 2026
22 of 27 checks passed
@scannito scannito deleted the closure branch April 14, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants