[PWGCF] Femto: Add D0 meson support to the femto framework - #17253
[PWGCF] Femto: Add D0 meson support to the femto framework#17253IgorPtak wants to merge 8 commits into
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Error while checking build/O2Physics/code-check for e6b7555 at 2026-07-29 19:46: Full log here. |
|
Error while checking build/O2Physics/o2 for 250a654 at 2026-07-30 14:23: Full log here. |
| using Run3RecoVzeros = o2::soa::Join<o2::aod::V0Datas, o2::aod::McV0Labels>; | ||
|
|
||
| using Run3D0Candidates = soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0>; | ||
| using Run3McD0Candidates = soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0, aod::HfCand2ProngMcRec>; |
There was a problem hiding this comment.
can be made simpler
using Run3McD0Candidates = soa::Join<Run3D0Candidates, aod::HfCand2ProngMcRec>;
| constexpr const char PrefixV01NegDauBinning[] = "V01NegDauBinning"; | ||
| constexpr const char PrefixV02PosDauBinning[] = "V02PosDauBinning"; | ||
| constexpr const char PrefixV02NegDauBinning[] = "V02NegDauBinning"; | ||
| constexpr const char PrefixD0PosDauBinning[] = "D0PosDauBinning"; |
There was a problem hiding this comment.
In case there will be a D0-D0 correlation task or similar, it would be good start enumerating them already
Can you rename prefixes like this
constexpr const char PrefixD01PosDauBinning[] = "D01PosDauBinning";
Similar to how it is also done for the V0s now
| using ConfV01NegDauBinning = ConfTrackBinning<PrefixV01NegDauBinning>; | ||
| using ConfV02PosDauBinning = ConfTrackBinning<PrefixV02PosDauBinning>; | ||
| using ConfV02NegDauBinning = ConfTrackBinning<PrefixV02NegDauBinning>; | ||
| using ConfD0PosDauBinning = ConfTrackBinning<PrefixD0PosDauBinning>; |
There was a problem hiding this comment.
Same comment, please renmae D0->D01
| constexpr const char PrefixV01NegDauQaBinning[] = "V01NegDauQaBinning"; | ||
| constexpr const char PrefixV02PosDauQaBinning[] = "V02PosDauQaBinning"; | ||
| constexpr const char PrefixV02NegDauQaBinning[] = "V02NegDauQaBinning"; | ||
| constexpr const char PrefixD0PosDauQaBinning[] = "D0PosDauQaBinning"; |
There was a problem hiding this comment.
Same comment, please renmae D0->D01
| using ConfV01NegDauQaBinning = ConfTrackQaBinning<PrefixV01NegDauQaBinning>; | ||
| using ConfV02PosDauQaBinning = ConfTrackQaBinning<PrefixV02PosDauQaBinning>; | ||
| using ConfV02NegDauQaBinning = ConfTrackQaBinning<PrefixV02NegDauQaBinning>; | ||
| using ConfD0PosDauQaBinning = ConfTrackQaBinning<PrefixD0PosDauQaBinning>; |
There was a problem hiding this comment.
Same comment, please renmae D0->D01
| continue; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
so in summary, all prefilters should be in checkFilters function, so here you can just call
if checkFilter() ...
applySelections()
if passesMinimalSelection() ...
Fill tables
| auto prong0 = candidate.template prong0_as<T7>(); | ||
| auto prong1 = candidate.template prong1_as<T7>(); | ||
| int64_t posDauIndex = trackBuilder.template getDaughterIndex<modes::Track::kCharmDaughter>(prong0, trackProducts, collisionBuilder); | ||
| int64_t negDauIndex = trackBuilder.template getDaughterIndex<modes::Track::kCharmDaughter>(prong1, trackProducts, collisionBuilder); |
There was a problem hiding this comment.
It is better style to decalre the indices outside of the loop
| continue; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Same comments as the function for data
| void fillMcParticle(T1 const& mcParticle, T2 const& mcParticles, T3 const& mcCol, T4& mcProducts) | ||
| { | ||
| this->getOrCreateMcParticleRow<system>(mcParticle, mcParticles, mcCol, mcProducts); | ||
| // charm hadrons get a prompt/non-prompt origin, consistent with the reco-matched path; |
There was a problem hiding this comment.
I think it would more elegant to have this resolved in here
template <modes::System system, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
int64_t getOrCreateMcParticleRow(T1 const& col, T2 const& mcCols, T3 const& mcParticle, T4 const& mcParticles, T5 const& mcCol, T6& mcProducts)
{
auto origin = this->getOrigin(col, mcCols, mcParticle);
return this->buildMcParticleRow<system>(mcParticle, mcParticles, mcCol, origin, mcProducts);
}
here you add the check for the PID and then call a custom getHeavyFlavourOrigin function and set the correct origin for the D meson, the the new function overlaod can be avoided
| return this->buildMcParticleRow<system>(mcParticle, mcParticles, mcCol, origin, mcProducts); | ||
| } | ||
|
|
||
| /// \brief Overload for a caller-provided origin, e.g. prompt vs non-prompt for a charm |
There was a problem hiding this comment.
see comment above, I think this overload is not needed
|
Hi @IgorPtak , |
Adds D0 mesons as a new particle species to the unified femto framework, enabling D0-hadron femtoscopic correlations.
What is added
Data model - three new tables:
FD0s- kinematics, mass of the accepted hypothesis and daughter indicesFD0Masks- selection bitmaskFD0Extras- QA/debug: both mass hypotheses, topological variables, BDT scores and the PWGHF selection flagsFD0Labels- MC labelsCore:
charmHadronBuilder.handcharmHadronHistManager.h, following the structure of the existing V0/cascade builders. D0 candidates are taken from PWGHF (HfCand2Prong), with the acceptance applied as a rapidity cut viaHfHelper. The D0/D0bar hypothesis is encoded in the sign of the stored signed pT.Tasks: two new workflows:
femto-d0-qa- QA for D0 candidates and their daughtersfemto-pair-track-d0- D0-hadron correlations, same and mixed eventMC: D0 candidates have no direct MC label, so both prongs are matched to a generated D0 -> K pi decay with
RecoDecay::getMatchedMCRec. Charm hadrons are additionally classified as prompt or non-prompt, which required extending theMcOriginenum.