Skip to content

Commit f7334eb

Browse files
fmazzascFrancesco Mazzaschi
andauthored
[PWGLF] Add non-prompt info for MC gen loop (#11374)
Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent ae4df1b commit f7334eb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,17 @@ struct nucleiSpectra {
10131013

10141014
if (!isReconstructed[index] && (cfgTreeConfig->get(iS, 0u) || cfgTreeConfig->get(iS, 1u))) {
10151015
float absDecL = computeAbsoDecL(particle);
1016-
nucleiTableMC(999., 999., 999., 0., 0., 999., 999., 999., -1, -1, -1, -1, flags, 0, 0, 0, 0, 0, 0, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), 0, goodCollisions[particle.mcCollisionId()], absDecL);
1016+
int motherPdgCode = 0;
1017+
if (particle.has_mothers()) {
1018+
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
1019+
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
1020+
flags |= kIsSecondaryFromWeakDecay;
1021+
motherPdgCode = motherparticle.pdgCode();
1022+
break;
1023+
}
1024+
}
1025+
}
1026+
nucleiTableMC(999., 999., 999., 0., 0., 999., 999., 999., -1, -1, -1, -1, flags, 0, 0, 0, 0, 0, 0, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), motherPdgCode, goodCollisions[particle.mcCollisionId()], absDecL);
10171027
}
10181028
break;
10191029
}

0 commit comments

Comments
 (0)