@@ -554,15 +554,21 @@ struct AntinucleiInJets {
554554 {
555555 // Keep only pi, K, p, e, mu
556556 int pdg = std::abs (particle.pdgCode ());
557- if (!(pdg == 211 || pdg == 321 || pdg == 2212 || pdg == 11 || pdg == 13 ))
557+ if (!(pdg == PDG_t:: kPiPlus || pdg == PDG_t:: kKPlus || pdg == PDG_t:: kProton || pdg == PDG_t:: kElectron || pdg == PDG_t:: kMuonMinus ))
558558 return false ;
559559
560+ // Constants for identifying heavy-flavor (charm and bottom) content from PDG codes
561+ static constexpr int kCharmQuark = 4 ;
562+ static constexpr int kBottomQuark = 5 ;
563+ static constexpr int hundreds = 100 ;
564+ static constexpr int thousands = 1000 ;
565+
560566 // Check if particle is from heavy-flavor decay
561567 bool fromHF = false ;
562568 if (particle.has_mothers ()) {
563569 auto mother = mcParticles.iteratorAt (particle.mothersIds ()[0 ]);
564570 int motherPdg = std::abs (mother.pdgCode ());
565- fromHF = (motherPdg / 100 == 4 || motherPdg / 100 == 5 || motherPdg / 1000 == 4 || motherPdg / 1000 == 5 );
571+ fromHF = (motherPdg / hundreds == kCharmQuark || motherPdg / hundreds == kBottomQuark || motherPdg / thousands == kCharmQuark || motherPdg / thousands == kBottomQuark );
566572 }
567573
568574 // Select only physical primary particles or from heavy-flavor
@@ -1760,7 +1766,7 @@ struct AntinucleiInJets {
17601766 for (const auto & particle : mcParticles) {
17611767
17621768 // Select physical primary particles or HF decay products
1763- if (!isPhysicalPrimaryOrFromHF (particle,mcParticles))
1769+ if (!isPhysicalPrimaryOrFromHF (particle, mcParticles))
17641770 continue ;
17651771
17661772 // Select particles within acceptance
0 commit comments