Skip to content

[PWGLF] Update cascademlselection.cxx task - #17520

Merged
romainschotter merged 11 commits into
AliceO2Group:masterfrom
romainschotter:cascmlselection
Aug 20, 2026
Merged

[PWGLF] Update cascademlselection.cxx task#17520
romainschotter merged 11 commits into
AliceO2Group:masterfrom
romainschotter:cascmlselection

Conversation

@romainschotter

Copy link
Copy Markdown
Collaborator

Update cascademlselection.cxx task in order to:

  • use the MlResponse.h wrapper
  • apply ML selections as a function of pT (one BDT model per pT bin)
  • provide a configurable list of input features, to be configured by the user in order to match the expected input feature from the ML model
  • store ML scores for all classes (signal, background,...)
  • add QA histograms

As a consequence, a utility called CascadeMlResponse has been added and the strangeness CascXiMLScores and CascOmMLScores tables have been updated.

@ddobrigk @gianniliveraro for your information

@github-actions github-actions Bot changed the title Update cascademlselection.cxx task [PWGLF] Update cascademlselection.cxx task Aug 19, 2026
@github-actions

Copy link
Copy Markdown

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

Please consider the following formatting changes to AliceO2Group#17520
alibuild
alibuild previously approved these changes Aug 19, 2026

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

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 5f0fe3b at 2026-08-20 01:02:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Utils/CascadeMlResponse.h:58:7: error: enumeration value 'eta' not handled in switch [-Werror=switch]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Utils/CascadeMlResponse.h:58:7: error: enumeration value 'eta' not handled in switch [-Werror=switch]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 5f0fe3b at 2026-08-20 01:05:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Utils/CascadeMlResponse.h:58:7: error: enumeration value 'eta' not handled in switch [-Werror=switch]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Utils/CascadeMlResponse.h:58:7: error: enumeration value 'eta' not handled in switch [-Werror=switch]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 5f0fe3b at 2026-08-20 05:03:

## sw/BUILD/lhapdf-latest/log
collect2: error: ld returned 1 exit status


## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 10 errors and 1 warnings.'
Found 10 errors and 1 warnings.
++ [[ 10 -gt 0 ]]
++ cat /sw/BUILD/d76e42343ed551ba2559401902ca5581628d7478/O2Physics-code-check/errors.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:41:1: error: included header map is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:57:8: error: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:72:43: error: no header providing "TH1" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:214:99: error: no header providing "o2::cuts_ml::CutNot" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:224:50: error: no header providing "Form" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:257:34: error: no header providing "std::distance" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:23:1: error: included header vector is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:28:32: error: no header providing "uint8_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:58:15: error: enumeration value 'eta' not handled in switch [clang-diagnostic-switch,-warnings-as-errors]
Tools/ML/model.h:25:10: error: 'onnxruntime_c_api.h' file not found [clang-diagnostic-error]
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/d76e42343ed551ba2559401902ca5581628d7478/O2Physics-code-check/warnings.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:164:54: warning: statement should be inside braces [readability-braces-around-statements]
++ [[ 10 -gt 0 ]]
++ exit 1
--

Full log here.

@vkucera

vkucera commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

@romainschotter Please fix the includes before merging.

romainschotter and others added 2 commits August 20, 2026 10:39
Added includes for ML response and histogram handling.
Please consider the following formatting changes to AliceO2Group#17520
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 9f40375 at 2026-08-20 10:53:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 5 errors and 1 warnings.'
Found 5 errors and 1 warnings.
++ [[ 5 -gt 0 ]]
++ cat /sw/BUILD/3ff37dd387a3e88c49259b370be45ce66257a36e/O2Physics-code-check/errors.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:42:1: error: included header map is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:62:8: error: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:23:1: error: included header vector is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:28:32: error: no header providing "uint8_t" is directly included [misc-include-cleaner,-warnings-as-errors]
Tools/ML/model.h:25:10: error: 'onnxruntime_c_api.h' file not found [clang-diagnostic-error]
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/3ff37dd387a3e88c49259b370be45ce66257a36e/O2Physics-code-check/warnings.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:169:54: warning: statement should be inside braces [readability-braces-around-statements]
++ [[ 5 -gt 0 ]]
++ exit 1
--

Full log here.

@romainschotter
romainschotter enabled auto-merge (squash) August 20, 2026 08:55

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

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 8719cfd at 2026-08-20 11:02:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 5 errors and 1 warnings.'
Found 5 errors and 1 warnings.
++ [[ 5 -gt 0 ]]
++ cat /sw/BUILD/4ad2036e1b2ffca713a5baeb99f2d7ad88dd7a45/O2Physics-code-check/errors.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:47:1: error: included header map is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:63:8: error: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:23:1: error: included header vector is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Utils/CascadeMlResponse.h:28:32: error: no header providing "uint8_t" is directly included [misc-include-cleaner,-warnings-as-errors]
Tools/ML/model.h:25:10: error: 'onnxruntime_c_api.h' file not found [clang-diagnostic-error]
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/4ad2036e1b2ffca713a5baeb99f2d7ad88dd7a45/O2Physics-code-check/warnings.txt
PWGLF/TableProducer/Strangeness/cascademlselection.cxx:170:54: warning: statement should be inside braces [readability-braces-around-statements]
++ [[ 5 -gt 0 ]]
++ exit 1
--

Full log here.

@vkucera

vkucera commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

@romainschotter You can ignore the errors from CascadeMlResponse.h for now because Clang-Tidy does not have a compilation command for it (I will take care of it.). But please fix the includes in cascademlselection.cxx.

@romainschotter
romainschotter merged commit 02abccc into AliceO2Group:master Aug 20, 2026
13 of 15 checks passed
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