Skip to content

[PWGHF] Check the charm-hadron mass hypothesis in the V0 femto task - #18913

Merged
fgrosa merged 1 commit into
AliceO2Group:masterfrom
Alascraker:fix-v0-charm-mass-check
Nov 25, 2026
Merged

fgrosa merged 1 commit into
AliceO2Group:masterfrom
Alascraker:fix-v0-charm-mass-check

Conversation

@Alascraker

@Alascraker Alascraker commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Locally, the D* - K0S pairs produced with the V0 femto task came out with the mT computed with the Lambda_c mass: the charm-hadron PDG code was a configurable with a Lambda_c default, and nothing forced it to match the process function in use. The mass enters kT, k* and mT of the output table and the internal calculations of the container, so it is easy to get wrong again.

  • remove charmHadPDGCode and set the PDG code in init() from the enabled process function
  • do the same in the track-based femto task (as asked by @zhangbiao-phy)

@github-actions

Copy link
Copy Markdown

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

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for e4f6631 at 2026-11-25 09:00:

## 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 0 warnings.'
Found 1 errors and 0 warnings.
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/b6cc0e6951a9a8e86bb811cd1d41b6645ab6c8cc/O2Physics-code-check/errors.txt
PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx:332:27: error: no header providing "std::pair" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 0 -gt 0 ]]
++ [[ 1 -gt 0 ]]
++ exit 1
--

Full log here.

@Alascraker
Alascraker force-pushed the fix-v0-charm-mass-check branch from e4f6631 to a7eff3f Compare November 25, 2026 08:05
Configurable<float> charmHadMinPt{"charmHadMinPt", 0., "Minimum pT of Charm Hadron (particle 2)"};
Configurable<float> charmHadMaxPt{"charmHadMaxPt", 999., "Maximum pT of Charm Hadron (particle 2)"};
Configurable<int> charmHadPDGCode{"charmHadPDGCode", 4122, "PDG code of particle 2 Charm Hadron"};
Configurable<int> charmHadPDGCode{"charmHadPDGCode", 4122, "PDG code of the charm hadron (particle 2); it sets the mass hypothesis used for kT, k* and mT and has to match the process function in use"};

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.

I would actually remove the configurable and have instead a member of the struct that is set to a value, depending on the process function that is enabled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done: the configurable is removed and the PDG code is now set in init() from the enabled process function. I applied the same change to the track-based task as well, as asked by @zhangbiao-phy.

@zhangbiao-phy

Copy link
Copy Markdown
Collaborator

Hi @Alascraker, Thanks for the development! Just to clarify, for D*, D+, and D0, we currently set the PDG codes manually for different analyses. However, as you mentioned, it would be better to set them automatically according to the selected process. Could you also implement this for the charm–track task? Otherwise, I can open a separate PR for that.

@Alascraker

Copy link
Copy Markdown
Contributor Author

Hi @Alascraker, Thanks for the development! Just to clarify, for D*, D+, and D0, we currently set the PDG codes manually for different analyses. However, as you mentioned, it would be better to set them automatically according to the selected process. Could you also implement this for the charm–track task? Otherwise, I can open a separate PR for that.

Of course, I will do that.

@Alascraker
Alascraker force-pushed the fix-v0-charm-mass-check branch from a7eff3f to b341725 Compare November 25, 2026 08:37
@Alascraker

Copy link
Copy Markdown
Contributor Author

Implemented for the charm-track task in this PR: charmHadPDGCode is removed there as well and the PDG code is derived from the enabled process function (Lambda_c, D+, D0, D*, Xic; the SigmaC case keeps setting it per candidate).

…o process

The mass of the charm hadron enters kT, k* and mT of the pair and the internal
calculations of the container, but it was taken from the charmHadPDGCode
configurable. Its default is the Lambda_c mass and nothing checked it against the
process function in use, so a D*/D+/D0 configuration could silently run with a
wrong mass hypothesis.

Remove the configurable and set the PDG code in init() from the enabled process
function, both in the V0 and in the track-based femto task.
@Alascraker
Alascraker force-pushed the fix-v0-charm-mass-check branch from b341725 to d0f20e0 Compare November 25, 2026 08:49
@fgrosa
fgrosa enabled auto-merge (squash) November 25, 2026 09:27
@fgrosa
fgrosa merged commit 2400f65 into AliceO2Group:master Nov 25, 2026
14 of 15 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