Skip to content

[PWGLF] Phi-Xi correlations#17112

Draft
scannito wants to merge 4 commits into
AliceO2Group:masterfrom
scannito:master
Draft

[PWGLF] Phi-Xi correlations#17112
scannito wants to merge 4 commits into
AliceO2Group:masterfrom
scannito:master

Conversation

@scannito

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends the PWGLF phi–strangeness correlation workflow to support Phi–Xi correlations by adding a reduced Xi candidate table/producer and integrating Xi as an associated species in the correlation task, alongside a refactor that generalizes “associated particle” handling.

Changes:

  • Add reduced Xi candidate AOD tables and a new XiReducedCandProducer to populate them.
  • Extend the phiStrangeCorrelation analysis task with Xi configurables, histograms, and SE/ME processing paths.
  • Refactor associated-particle processing using templated helpers to share logic across K0S/Xi/Pion.

Reviewed changes

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

File Description
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx Adds Phi–Xi histograms/configurables and refactors associated-species processing with templates.
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx Introduces Xi reduced-candidate producer and wires it into the workflow.
PWGLF/DataModel/LFPhiStrangeCorrelationTables.h Adds Xi reduced-candidate AOD table definitions and mass-window helper column.

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

Comment on lines +83 to +92
template <AssociatedParticleType PartType>
constexpr int getPdgCode()
{
if constexpr (PartType == kK0S)
return PDG_t::kK0Short;
else if constexpr (PartType == kXi)
return PDG_t::kXiMinus;
else if constexpr (PartType == kPion)
return PDG_t::kPiPlus;
}
Comment on lines +505 to +514
template <AssociatedParticleType PartType>
auto getPreslice()
{
if constexpr (PartType == kK0S)
return preslices.k0sMcRecoPerCollision;
else if constexpr (PartType == kXi)
return preslices.xiMcRecoPerCollision;
else if constexpr (PartType == kPion)
return preslices.pionTrackMcRecoPerCollision;
}
Comment on lines +516 to +525
template <AssociatedParticleType PartType>
float getMinGenPt() const
{
if constexpr (PartType == kK0S)
return minPtMcGenConfigs.v0SettingMinPt.value;
else if constexpr (PartType == kXi)
return minPtMcGenConfigs.cascadeSettingMinPt.value;
else if constexpr (PartType == kPion)
return minPtMcGenConfigs.cMinPionPtcut.value;
}
Comment thread PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 9827aa9 at 2026-07-17 16:53:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 31 errors and 139 warnings.'
Found 31 errors and 139 warnings.
++ [[ 31 -gt 0 ]]
++ cat /sw/BUILD/7909608d71d7a28dfa6af986437fa82f1da1adff/O2Physics-code-check/errors.txt
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:223:35: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:237:37: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:255:37: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:270:26: error: constness of 'motherMcParticle' prevents automatic move [performance-no-automatic-move,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:279:22: error: the const qualified variable 'genPhi' is copy-constructed from a const reference; consider making it a const reference [performance-unnecessary-copy-initialization,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:340:15: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:341:15: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:976:8: error: constructor does not initialize these fields: pdgDB [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:99:20: error: member 'effMap' of type 'const EffMapPtr &' (aka 'const variant<std::shared_ptr<TH2>, std::shared_ptr<TH3>> &') is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:105:3: error: function 'getBinEfficiencyAndError' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:129:3: error: function 'interpolateEfficiency' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const TCands &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"K0sReducedCandidatesData"_h>, o2::aod::Hash<"K0SCANDDATA/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"K0sReducedCandidatesMcReco"_h>, o2::aod::Hash<"K0SCANDMCRECO/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"PionTracksData"_h>, o2::aod::Hash<"PITRACKSDATA/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"PionTracksMcReco"_h>, o2::aod::Hash<"PITRACKSMCRECO/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"XiReducedCandidatesData"_h>, o2::aod::Hash<"XICANDDATA/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:153:17: error: member 'candidates' of type 'const o2::soa::Table<o2::aod::Hash<"XiReducedCandidatesMcReco"_h>, o2::aod::Hash<"XICANDMCRECO/0"_h>, o2::aod::Hash<"AOD"_h>> &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:162:8: error: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:288:22: error: initializer for member 'effMapPhi' is redundant [readability-redundant-member-init,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:308:10: error: constructor does not initialize these fields: multiplicity [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:442:11: error: implicit conversion 'value_type' (aka 'int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:571:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:575:29: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1576:27: error: implicit conversion 'value_type' (aka 'int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1577:26: error: implicit conversion 'value_type' (aka 'int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1578:28: error: implicit conversion 'value_type' (aka 'int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1588:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1598:44: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1609:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx:1618:46: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
++ [[ 139 -gt 0 ]]
++ cat /sw/BUILD/7909608d71d7a28dfa6af986437fa82f1da1adff/O2Physics-code-check/warnings.txt
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:155:73: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:157:67: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:160:61: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:163:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:166:171: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:168:63: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:178:109: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:180:186: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx:202:26: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@scannito
scannito marked this pull request as draft July 17, 2026 16:55
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