[PWGHF] Implement checks for correlated backgrounds and for B->J/Psi(->ee)X decays in B->J/Psi workflow#17034
[PWGHF] Implement checks for correlated backgrounds and for B->J/Psi(->ee)X decays in B->J/Psi workflow#17034fchinu wants to merge 2 commits into
Conversation
…ecays in B->J/Psi workflow
|
O2 linter results: ❌ 0 errors, |
|
Error while checking build/O2Physics/code-check for efde8ae at 2026-07-14 00:20: Full log here. |
| if (std::accumulate(doProcess.begin(), doProcess.end(), 0) == 0) { | ||
| LOGP(fatal, "Enable at least one process function, please fix your configuration!"); |
There was a problem hiding this comment.
Is more than one process function enabled allowed?
| // Partly reconstructed decays, i.e. the 3 prongs have a common b-hadron ancestor | ||
| // convention: final state particles are prong0,1,2 | ||
| if (!flag) { | ||
| auto particleProng0 = vecDaughtersB[0].mcParticle(); | ||
| auto particleProng1 = vecDaughtersB[1].mcParticle(); | ||
| auto particleProng2 = vecDaughtersB[2].mcParticle(); | ||
| // b-hadron hypothesis | ||
| std::array<int, 3> const bHadronMotherHypos = {Pdg::kB0, Pdg::kBS, Pdg::kLambdaB0}; | ||
|
|
||
| for (const auto& bHadronMotherHypo : bHadronMotherHypos) { | ||
| int const index0Mother = RecoDecay::getMother(particlesMc, particleProng0, bHadronMotherHypo, true); | ||
| int const index1Mother = RecoDecay::getMother(particlesMc, particleProng1, bHadronMotherHypo, true); | ||
| int const index2Mother = RecoDecay::getMother(particlesMc, particleProng2, bHadronMotherHypo, true); | ||
|
|
||
| // look for common b-hadron ancestor | ||
| if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1) { | ||
| if (index0Mother == index1Mother && index1Mother == index2Mother) { | ||
| int pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode(); | ||
| // look for common J/psi-hadron mother among prongs 0, 1 and 2 | ||
| int const index0JpsiMother = RecoDecay::getMother(particlesMc, particleProng0, Pdg::kJPsi, true, &sign, 1); | ||
| int const index1JpsiMother = RecoDecay::getMother(particlesMc, particleProng1, Pdg::kJPsi, true, &sign, 1); | ||
| if (index0JpsiMother > -1 && index1JpsiMother > -1 && index0JpsiMother == index1JpsiMother) { | ||
| if (std::abs(particleProng0.pdgCode()) == kMuonMinus && std::abs(particleProng1.pdgCode()) == kMuonMinus) { | ||
| flag = partlyRecoDecayMapMuMu[std::abs(pdgCodeBeautyMother)]; | ||
| } else if (std::abs(particleProng0.pdgCode()) == kElectron && std::abs(particleProng1.pdgCode()) == kElectron) { | ||
| flag = partlyRecoDecayMapEE[std::abs(pdgCodeBeautyMother)]; | ||
| } | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
In principle this could be done more easily with the function
O2Physics/Common/Core/RecoDecay.h
Lines 733 to 734 in 13b7152
enabling the
acceptIncompleteReco flag, or am I missing something?It can also be modified in a subsequent PR in case
| if (checkDecayTypeMc) { | ||
| // B+ → J/Psi K+ → (e+e-) K+ | ||
| if (!flag) { | ||
| indexRec = RecoDecay::getMatchedMCRec<true, false, false, true, true>(particlesMc, std::array{vecDaughtersB[0], vecDaughtersB[1], vecDaughtersB[2]}, Pdg::kBPlus, std::array{-kElectron, +kElectron, +kKPlus}, true, &sign, 3); |
There was a problem hiding this comment.
This is the only important comment: we have to accept incomplete decays, because we often have a photon emitted which ends up in the decay chain (in particular for the EE channel, but also with MuMu if I am not mistaken)
|
Error while checking build/O2Physics/staging for efde8ae at 2026-07-14 01:24: Full log here. |
No description provided.