Skip to content

[PWGCF] Handle kSecondaryFromPhi in the FemtoDream QA history - #18757

Merged
lauraser merged 1 commit into
AliceO2Group:masterfrom
Alascraker:fix-femtodream-phi-origin
Nov 19, 2026
Merged

lauraser merged 1 commit into
AliceO2Group:masterfrom
Alascraker:fix-femtodream-phi-origin

Conversation

@Alascraker

Copy link
Copy Markdown
Contributor

The kSecondaryFromPhi origin was introduced together with kSecondaryFromHF/LF, but the FemtoDream QA switch statements were not updated accordingly.
Since fillQA_MC treats every unknown ParticleOriginMCTruth value as fatal (LOG(fatal)), any V0 candidate coming from a phi -> K0/K0bar -> K0S chain killed the whole workflow:

[FATAL] femtodreamparticleMC: not known value for ParticleOriginMCTruth - please check. Quitting!

This was seen in HF MC trains (LHC26g5, task hf-task-charm-hadrons-v0-femto-dream) as soon as a feed-down K0S from a phi was selected, and it takes down the whole DPL workflow.

Changes

Single file, PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h:

  • add hCPA_SecondaryFromHF/LF/Phi registrations for V0 candidates (debug and non-debug)
  • add the corresponding cases to both V0 switches
  • add the kSecondaryFromPhi case and its histograms (hDCAxy_SecondaryFromPhi, Debug/hPDGmother_SecondaryFromPhi) to the kaon switches

Verification

Static, since the local setup cannot run the full train chain:

  • the producer (PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx) can write eight values for V0: kPrimary, kMaterial, kFake, kWrongCollision, kElse, kSecondaryFromHF/LF/Phi; all of them have a case after this patch, so the fatal default is unreachable for this producer
  • the same check on the unpatched file reports 15 (HF), 16 (LF) and 17 (Phi) missing, i.e. it reproduces the crash logically
  • every histogram filled in the new cases is registered (12/12 names match, both for V0 and kaons)
  • the fill target of each new case matches its origin class
  • the patched header compiles with the project compile flags

Notes

  • the cascade branches in the same file still miss the HF/LF/Phi origins: this is a pre-existing gap from the HF/LF split and is unreachable from this producer (it does not create cascade particles), so it is left untouched to keep the scope minimal
  • PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h has the same gap, but it only logs at info level there, so it does not crash

kSecondaryFromPhi was added together with kSecondaryFromHF/LF, but the
FemtoDream QA switch statements did not know it, so any V0 candidate from
a phi decay chain hit the fatal branch in fillQA_MC and killed the whole
workflow.

- add hCPA_SecondaryFromHF/LF/Phi registration for V0 candidates
- add the three cases to both V0 switches (debug and non-debug)
- add the Phi case and its histograms to the kaon switches

Note: the cascade branches keep their pre-existing gap for the HF/LF/Phi
origins; they are not touched here to keep the scope minimal.
@github-actions

Copy link
Copy Markdown

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

@Alascraker

Copy link
Copy Markdown
Contributor Author

@fgrosa

@lauraser
lauraser merged commit fc753e6 into AliceO2Group:master Nov 19, 2026
13 of 14 checks passed
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