Skip to content

[PWGJE] Fix physical primary V0 selection in MC and add V0 jet spectra vs multiplicity task - #18594

Open
ercolessi wants to merge 4 commits into
AliceO2Group:masterfrom
ercolessi:master
Open

ercolessi wants to merge 4 commits into
AliceO2Group:masterfrom
ercolessi:master

Conversation

@ercolessi

@ercolessi ercolessi commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Hi,

This PR introduces two main changes:

  1. A small fix for V0 clustering in analyseV0s (MC Particle-Level): analyseV0s now skips non-physical-primary V0s on MC particle-level tables.
    Previously, Lambda particles originating from Xi+- / Omega+- decays were clustered together with their primary charged mother, leading to double-counting of their momentum in the jet pT.
    Detector-level and data remain unchanged.
    Note: This changes the default behavior for all users of the MCP V0 jet finder.

  2. New task lf-jet-spectra to measures K0s, Lambda, and Lambda-bar pT spectra in jets and in the UE vs FT0M multiplicity.
    It follows the same principle as PWGLF strangenessInJets, but integrates JET tools to include the V0 pT directly in the jet clustering as suggested by PWGJE convenors.

Cheers,
Francesca

@github-actions github-actions Bot added the pwgje label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

@ercolessi
ercolessi marked this pull request as ready for review November 4, 2026 17:26
@alibuild

alibuild commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 34fedc2 at 2026-11-04 18:37:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:376:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Origin' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:403:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Source' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:469:129: error: arithmetic between enumeration type 'LfJetSpectra::V0SelectionStep' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 34fedc2 at 2026-11-04 18:41:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:376:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Origin' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:403:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Source' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:469:129: error: arithmetic between enumeration type 'LfJetSpectra::V0SelectionStep' and floating-point type 'double' is deprecated [-Werror=deprecated-enum-float-conversion]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 34fedc2 at 2026-11-04 19:05:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 12 errors and 24 warnings.'
Found 12 errors and 24 warnings.
++ [[ 12 -gt 0 ]]
++ cat /sw/BUILD/76cd8333ec114a947634f6148c547d9c4d31a551/O2Physics-code-check/errors.txt
PWGJE/Core/JetFindingUtilities.h:41:1: error: included header utility is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:25:1: error: included header LFStrangenessTables.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:26:1: error: included header V0SelectorTables.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:77:45: error: no header providing "o2::aod::McCollisions" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:80:54: error: no header providing "o2::framework::OutputObjHandlingPolicy" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:196:3: error: no header providing "o2::framework::Service" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:234:17: error: no header providing "o2::aod::McParticles" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:234:64: error: no header providing "o2::aod::mcparticle::mcCollisionId" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:236:73: error: no header providing "o2::aod::jv0indices::mcCollisionId" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:376:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Origin' and floating-point type 'double' is deprecated [clang-diagnostic-deprecated-enum-float-conversion,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:403:64: error: arithmetic between enumeration type 'LfJetSpectra::V0Source' and floating-point type 'double' is deprecated [clang-diagnostic-deprecated-enum-float-conversion,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:469:129: error: arithmetic between enumeration type 'LfJetSpectra::V0SelectionStep' and floating-point type 'double' is deprecated [clang-diagnostic-deprecated-enum-float-conversion,-warnings-as-errors]
++ [[ 24 -gt 0 ]]
++ cat /sw/BUILD/76cd8333ec114a947634f6148c547d9c4d31a551/O2Physics-code-check/warnings.txt
PWGJE/Core/JetFindingUtilities.h:44:10: warning: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead [modernize-deprecated-headers]
PWGJE/Core/JetFindingUtilities.h:272:12: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
PWGJE/Core/JetFindingUtilities.h:273:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:353:82: warning: repeated branch body in conditional chain [bugprone-branch-clone]
PWGJE/Core/JetFindingUtilities.h:355:7: warning: do not use 'else' after 'continue' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:414:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Tasks/lfJetSpectra.cxx:79:8: warning: constructor does not initialize these fields: pdgDatabase [cppcoreguidelines-pro-type-member-init]
PWGJE/Tasks/lfJetSpectra.cxx:464:13: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGJE/Tasks/lfJetSpectra.cxx:844:35: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:879:14: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:879:27: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:879:54: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:879:64: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:1100:35: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:1141:14: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:1141:27: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:1141:54: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:1141:64: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:1220:14: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:1220:27: warning: use 'contains' to check for membership [readability-container-contains]
PWGJE/Tasks/lfJetSpectra.cxx:1220:54: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion]
PWGJE/Tasks/lfJetSpectra.cxx:1220:64: warning: use 'contains' to check for membership [readability-container-contains]
[0 more errors; see full log]

Full log here.

@vkucera
vkucera marked this pull request as draft November 4, 2026 18:20
@ercolessi
ercolessi marked this pull request as ready for review November 5, 2026 08:49
@alibuild

alibuild commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 7f798ee at 2026-11-05 10:01:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:346:45: error: comparison of floating-point type 'float' with enumeration type 'PDG_t' is deprecated [-Werror=deprecated-enum-float-conversion]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 7f798ee at 2026-11-05 10:13:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/lfJetSpectra.cxx:346:45: error: comparison of floating-point type 'float' with enumeration type 'PDG_t' is deprecated [-Werror=deprecated-enum-float-conversion]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 7f798ee at 2026-11-05 10:30:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 2 errors and 7 warnings.'
Found 2 errors and 7 warnings.
++ [[ 2 -gt 0 ]]
++ cat /sw/BUILD/6b67c115bde7fa42ad67e905f68ce4a37379c837/O2Physics-code-check/errors.txt
PWGJE/Core/JetFindingUtilities.h:41:1: error: included header utility is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/lfJetSpectra.cxx:346:45: error: comparison of floating-point type 'float' with enumeration type 'PDG_t' is deprecated [clang-diagnostic-deprecated-enum-float-conversion,-warnings-as-errors]
++ [[ 7 -gt 0 ]]
++ cat /sw/BUILD/6b67c115bde7fa42ad67e905f68ce4a37379c837/O2Physics-code-check/warnings.txt
PWGJE/Core/JetFindingUtilities.h:44:10: warning: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead [modernize-deprecated-headers]
PWGJE/Core/JetFindingUtilities.h:272:12: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
PWGJE/Core/JetFindingUtilities.h:273:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:353:82: warning: repeated branch body in conditional chain [bugprone-branch-clone]
PWGJE/Core/JetFindingUtilities.h:355:7: warning: do not use 'else' after 'continue' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:414:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Tasks/lfJetSpectra.cxx:82:8: warning: constructor does not initialize these fields: pdgDatabase [cppcoreguidelines-pro-type-member-init]
++ [[ 2 -gt 0 ]]
++ exit 1
--

Full log here.

@alibuild

alibuild commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 20a3147 at 2026-11-05 11:14:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 1 errors and 7 warnings.'
Found 1 errors and 7 warnings.
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/caa48915f3faa318d4fa655f326a3b3ae9b8abae/O2Physics-code-check/errors.txt
PWGJE/Core/JetFindingUtilities.h:41:1: error: included header utility is not used directly [misc-include-cleaner,-warnings-as-errors]
++ [[ 7 -gt 0 ]]
++ cat /sw/BUILD/caa48915f3faa318d4fa655f326a3b3ae9b8abae/O2Physics-code-check/warnings.txt
PWGJE/Core/JetFindingUtilities.h:44:10: warning: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead [modernize-deprecated-headers]
PWGJE/Core/JetFindingUtilities.h:272:12: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
PWGJE/Core/JetFindingUtilities.h:273:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:353:82: warning: repeated branch body in conditional chain [bugprone-branch-clone]
PWGJE/Core/JetFindingUtilities.h:355:7: warning: do not use 'else' after 'continue' [readability-else-after-return]
PWGJE/Core/JetFindingUtilities.h:414:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGJE/Tasks/lfJetSpectra.cxx:82:8: warning: constructor does not initialize these fields: pdgDatabase [cppcoreguidelines-pro-type-member-init]
++ [[ 1 -gt 0 ]]
++ exit 1
--

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants