Skip to content

Commit bde993b

Browse files
fmazzascFrancesco Mazzaschi
andauthored
[PWGLF] Add feed-down from beauty (#11222)
Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent 7607086 commit bde993b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ constexpr float charges[5]{1.f, 1.f, 1.f, 2.f, 2.f};
183183
constexpr float masses[5]{MassProton, MassDeuteron, MassTriton, MassHelium3, MassAlpha};
184184
static const std::vector<std::string> matter{"M", "A"};
185185
static const std::vector<std::string> pidName{"TPC", "TOF"};
186+
static const std::vector<int> hfMothCodes{511, 521, 531, 541, 5122}; // b-mesons + Lambda_b
186187
static const std::vector<std::string> names{"proton", "deuteron", "triton", "He3", "alpha"};
187188
static const std::vector<std::string> treeConfigNames{"Filter trees", "Use TOF selection"};
188189
static const std::vector<std::string> flowConfigNames{"Save flow hists"};
@@ -948,6 +949,17 @@ struct nucleiSpectra {
948949
if (particle.getProcess() == 4) {
949950
c.fromWeakDecay = true;
950951
}
952+
} else {
953+
// if the particle has a hf mother it is flagged as secondary
954+
if (particle.has_mothers()) {
955+
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
956+
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
957+
c.isSecondary = true;
958+
c.fromWeakDecay = true;
959+
break;
960+
}
961+
}
962+
}
951963
}
952964

953965
if (c.fillDCAHist && cfgDCAHists->get(iS, c.pt < 0)) {
@@ -962,6 +974,15 @@ struct nucleiSpectra {
962974
isReconstructed[particle.globalIndex()] = true;
963975
if (particle.isPhysicalPrimary()) {
964976
c.flags |= kIsPhysicalPrimary;
977+
if (particle.has_mothers()) {
978+
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
979+
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
980+
c.flags |= kIsSecondaryFromWeakDecay;
981+
MotherpdgCode = motherparticle.pdgCode();
982+
break;
983+
}
984+
}
985+
}
965986
} else if (particle.has_mothers()) {
966987
c.flags |= kIsSecondaryFromWeakDecay;
967988
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {

0 commit comments

Comments
 (0)