File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
PWGLF/TableProducer/Nuspex Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 5353
5454#include " Math/Vector4D.h"
5555#include " TRandom3.h"
56+ #include < TMCProcess.h>
5657
5758#include < algorithm>
5859#include < cmath>
@@ -988,6 +989,7 @@ struct nucleiSpectra {
988989 if (particle.isPhysicalPrimary ()) {
989990 flags |= kIsPhysicalPrimary ;
990991 nuclei::hGenNuclei[iS][particle.pdgCode () < 0 ]->Fill (1 ., particle.pt ());
992+ // antinuclei from B hadrons are classified as physical primaries
991993 if (particle.has_mothers ()) {
992994 for (auto & motherparticle : particle.mothers_as <aod::McParticles>()) {
993995 if (std::find (nuclei::hfMothCodes.begin (), nuclei::hfMothCodes.end (), std::abs (motherparticle.pdgCode ())) != nuclei::hfMothCodes.end ()) {
@@ -998,7 +1000,10 @@ struct nucleiSpectra {
9981000 }
9991001 }
10001002 }
1001- } else if (particle.has_mothers ()) {
1003+ } else if (particle.getProcess () == TMCProcess::kPDecay ) {
1004+ if (!particle.has_mothers ()) {
1005+ continue ; // skip secondaries from weak decay without mothers
1006+ }
10021007 flags |= kIsSecondaryFromWeakDecay ;
10031008 for (auto & motherparticle : particle.mothers_as <aod::McParticles>()) {
10041009 motherPdgCode = motherparticle.pdgCode ();
You can’t perform that action at this time.
0 commit comments