Skip to content

[PWGHF] Adding D0/Lc analysis task - #17808

Merged
zhangbiao-phy merged 32 commits into
AliceO2Group:masterfrom
laszlogyulai:master
Sep 25, 2026
Merged

zhangbiao-phy merged 32 commits into
AliceO2Group:masterfrom
laszlogyulai:master

Conversation

@laszlogyulai

Copy link
Copy Markdown
Contributor

Adding a new analysis task for calculating the D0/Lambda_c yield ratio as a function of flattenicity

@github-actions github-actions Bot added the pwghf PWG-HF label Sep 7, 2026
@github-actions github-actions Bot changed the title Adding D0/Lc analysis task [PWGHF] Adding D0/Lc analysis task Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

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

@laszlogyulai

Copy link
Copy Markdown
Contributor Author

Dear codeowners,

Is it possible to overcome the "magic number" errors in the O2 linter / O2 linter (pull_request_target) check? In my opinion it would unnecessarily complicate the existing code. You can see an example of such a solution in the PWGLF/Tasks/GlobalEventProperties/flattenicityPikp.cxx file (lines 1814-1908)

@vkucera

vkucera commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Dear codeowners,

Is it possible to overcome the "magic number" errors in the O2 linter / O2 linter (pull_request_target) check? In my opinion it would unnecessarily complicate the existing code. You can see an example of such a solution in the PWGLF/Tasks/GlobalEventProperties/flattenicityPikp.cxx file (lines 1814-1908)

The way to "overcome" it is to write it in a better way. From what I can see, you map some number to other numbers. So how about using a map or an array, for example?

@laszlogyulai

Copy link
Copy Markdown
Contributor Author

@zhangbiao-phy @vkucera I have updated my local installation of O2Physics, and now the code is compiling and running on the latest version as well. In the end, it was missing the recent addition of the PVMults table to the HF codes. Thank you for your guidance in figuring everything out.

@laszlogyulai
laszlogyulai marked this pull request as ready for review September 23, 2026 13:01
@zhangbiao-phy
zhangbiao-phy enabled auto-merge (squash) September 23, 2026 13:57
zhangbiao-phy
zhangbiao-phy previously approved these changes Sep 23, 2026
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for fa93653 at 2026-09-23 16:55:

No log files found

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for fa93653 at 2026-09-23 16:56:

No log files found

Full log here.

@zhangbiao-phy
zhangbiao-phy enabled auto-merge (squash) September 23, 2026 14:57
@alibuild

alibuild commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for fa93653 at 2026-09-24 07:29:

## sw/BUILD/O2-latest/log
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/TPC/base/src/TPCBaseLinkDef.h:75:56
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/TPC/base/src/TPCBaseLinkDef.h:83:135
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/TPC/base/src/TPCBaseLinkDef.h:84:135
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/Upgrades/ALICE3/ECal/base/src/ECalBaseLinkDef.h:19:48
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/Upgrades/ALICE3/RICH/base/src/RICHBaseLinkDef.h:18:48
Error: missing ; at end of rule at /sw/SOURCES/O2/daily-20260923-0000/daily-20260923-0000/Detectors/Upgrades/ALICE3/MID/base/src/MI3BaseLinkDef.h:18:47


## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 24 errors and 5 warnings.'
Found 24 errors and 5 warnings.
++ [[ 24 -gt 0 ]]
++ cat /sw/BUILD/859d40414852a10cd6081743df46696d67978a8a/O2Physics-code-check/errors.txt
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:26:1: error: included header Centrality.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:29:1: error: included header PIDResponseTOF.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:30:1: error: included header PIDResponseTPC.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:41:1: error: included header algorithm is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:73:3: error: no header providing "o2::framework::Configurable" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:86:3: error: no header providing "o2::framework::Service" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:100:68: error: no header providing "uint8_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:100:77: error: no header providing "BIT" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:108:3: error: no header providing "o2::framework::Partition" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:111:3: error: no header providing "o2::framework::ConfigurableAxis" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:126:13: error: no header providing "o2::framework::InitContext" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:155:231: error: no header providing "o2::constants::math::TwoPI" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:438:3: error: no header providing "PROCESS_SWITCH" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:602:45: error: no header providing "THnSparse" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:645:28: error: no header providing "RecoDecay" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:645:180: error: no header providing "o2::constants::physics::Pdg" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:648:84: error: no header providing "o2::constants::physics::MassD0" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:867:82: error: no header providing "kProton" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:871:82: error: no header providing "kPiPlus" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:985:78: error: no header providing "o2::constants::physics::MassLambdaCPlus" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:1044:12: error: no header providing "std::bitset" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:1045:46: error: no header providing "o2::fit::Triggers" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:1047:19: error: no header providing "std::size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:1105:17: error: no header providing "std::sqrt" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 5 -gt 0 ]]
++ cat /sw/BUILD/859d40414852a10cd6081743df46696d67978a8a/O2Physics-code-check/warnings.txt
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:67:30: warning: variable 'rhoLatticeFV0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:68:30: warning: variable 'rhoLatticeFV0Calibrated' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:69:30: warning: variable 'calib' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:70:20: warning: variable 'channelsToRings' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx:1072:9: warning: do not use 'else' after 'return' [readability-else-after-return]
++ [[ 24 -gt 0 ]]
++ exit 1
[0 more errors; see full log]

Full log here.

@vkucera
vkucera disabled auto-merge September 23, 2026 16:45
@vkucera

vkucera commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

@laszlogyulai Please fix the errors reported by the code-check. You can reproduce (and fix) the errors by following the documentation instructions. See https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check

@vkucera

vkucera commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

@zhangbiao-phy Please do not merge PRs before the tests finish.

@laszlogyulai
laszlogyulai marked this pull request as draft September 24, 2026 09:30
Please consider the following formatting changes to AliceO2Group#17808
@laszlogyulai
laszlogyulai marked this pull request as ready for review September 24, 2026 12:34
@laszlogyulai

Copy link
Copy Markdown
Contributor Author

@zhangbiao-phy can you please test this PR?

@vkucera

vkucera commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

@zhangbiao-phy can you please test this PR?

What do you mean?

Comment thread PWGHF/D2H/Tasks/taskFlattenicityD0Lc.cxx Outdated
laszlogyulai and others added 2 commits September 24, 2026 14:56
Co-authored-by: Vít Kučera <26327373+vkucera@users.noreply.github.com>
Please consider the following formatting changes to AliceO2Group#17808
@zhangbiao-phy
zhangbiao-phy merged commit b2a6622 into AliceO2Group:master Sep 25, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

4 participants