@@ -166,6 +166,16 @@ struct Alice3SingleParticle {
166166 histos.add (" particle/mothers/prodVz" , " Mothers Prod. Vertex Z " + tit, kTH1D , {axisProdz});
167167 histos.add (" particle/mothers/prodRadiusVsPt" , " Mothers Prod. Vertex Radius " + tit, kTH2D , {axisPt, axisProdRadius});
168168 histos.add (" particle/mothers/prodRadius3DVsPt" , " Mothers Prod. Vertex Radius XYZ " + tit, kTH2D , {axisPt, axisProdRadius});
169+
170+ histos.add (" particle/mothers/mothers/PDGs" , " Mothers mothers PDGs " + tit, kTH2D , {axisPDGs, axisCharge});
171+ histos.add (" particle/mothers/mothers/PDGsPrimaries" , " Mothers mothers PDGs Primaries of " + tit, kTH2D , {axisPDGs, axisCharge});
172+ histos.add (" particle/mothers/mothers/PDGsSecondaries" , " Mothers mothers PDGs Secondaries of " + tit, kTH2D , {axisPDGs, axisCharge});
173+ histos.add (" particle/mothers/mothers/prodVx" , " Mothers mothers Prod. Vertex X " + tit, kTH1D , {axisProdx});
174+ histos.add (" particle/mothers/mothers/prodVy" , " Mothers mothers Prod. Vertex Y " + tit, kTH1D , {axisPrody});
175+ histos.add (" particle/mothers/mothers/prodVz" , " Mothers mothers Prod. Vertex Z " + tit, kTH1D , {axisProdz});
176+ histos.add (" particle/mothers/mothers/prodRadiusVsPt" , " Mothers mothers Prod. Vertex Radius " + tit, kTH2D , {axisPt, axisProdRadius});
177+ histos.add (" particle/mothers/mothers/prodRadius3DVsPt" , " Mothers mothers Prod. Vertex Radius XYZ " + tit, kTH2D , {axisPt, axisProdRadius});
178+
169179 if (doprocessParticleOnly) {
170180 return ;
171181 }
@@ -285,7 +295,7 @@ struct Alice3SingleParticle {
285295 }
286296 }
287297 if (mcParticle.has_mothers ()) {
288- auto mothers = mcParticle.mothers_as <aod::McParticles>();
298+ const auto & mothers = mcParticle.mothers_as <aod::McParticles>();
289299 for (const auto & mother : mothers) {
290300 const auto & pdgStringMot = getPdgCodeString (mother);
291301 const auto & pdgChargeMot = getCharge (mother);
@@ -302,6 +312,26 @@ struct Alice3SingleParticle {
302312 histos.fill (HIST (" particle/mothers/prodVz" ), mother.vz ());
303313 histos.fill (HIST (" particle/mothers/prodRadiusVsPt" ), mother.pt (), std::sqrt (mother.vx () * mother.vx () + mother.vy () * mother.vy ()));
304314 histos.fill (HIST (" particle/mothers/prodRadius3DVsPt" ), mother.pt (), std::sqrt (mother.vx () * mother.vx () + mother.vy () * mother.vy () + mother.vz () * mother.vz ()));
315+ if (mother.has_mothers ()) {
316+ const auto & mothers2 = mother.mothers_as <aod::McParticles>();
317+ for (const auto & mother2 : mothers2) {
318+ const auto & pdgStringMot2 = getPdgCodeString (mother2);
319+ const auto & pdgChargeMot2 = getCharge (mother2);
320+
321+ histos.get <TH2>(HIST (" particle/mothers/mothers/PDGs" ))->Fill (pdgStringMot2, pdgChargeMot2, 1 .f );
322+ if (mcParticle.isPhysicalPrimary ()) {
323+ histos.get <TH2>(HIST (" particle/mothers/mothers/PDGsPrimaries" ))->Fill (pdgStringMot2, pdgChargeMot2, 1 .f );
324+ } else {
325+ histos.get <TH2>(HIST (" particle/mothers/mothers/PDGsSecondaries" ))->Fill (pdgStringMot2, pdgChargeMot2, 1 .f );
326+ }
327+
328+ histos.fill (HIST (" particle/mothers/mothers/prodVx" ), mother2.vx ());
329+ histos.fill (HIST (" particle/mothers/mothers/prodVy" ), mother2.vy ());
330+ histos.fill (HIST (" particle/mothers/mothers/prodVz" ), mother2.vz ());
331+ histos.fill (HIST (" particle/mothers/mothers/prodRadiusVsPt" ), mother2.pt (), std::sqrt (mother2.vx () * mother2.vx () + mother2.vy () * mother2.vy ()));
332+ histos.fill (HIST (" particle/mothers/mothers/prodRadius3DVsPt" ), mother2.pt (), std::sqrt (mother2.vx () * mother2.vx () + mother2.vy () * mother2.vy () + mother2.vz () * mother2.vz ()));
333+ }
334+ }
305335 }
306336 }
307337
@@ -335,7 +365,8 @@ struct Alice3SingleParticle {
335365 if (track.hasTOF ()) {
336366 histos.get <TH2>(HIST (" track/tofPDGs" ))->Fill (getPdgCodeString (mcParticle), getCharge (mcParticle), 1 .f );
337367 }
338- if (!IsStable) {
368+ if (IsStable.value == 0 ) {
369+ LOG (info) << mcParticle.pdgCode () << " asked for " << PDG.value ;
339370 if (!mcParticle.has_mothers ()) {
340371 continue ;
341372 }
@@ -624,13 +655,12 @@ struct Alice3SingleParticle {
624655 if (track.hasTOF ()) {
625656 histos.get <TH2>(HIST (" track/tofPDGs" ))->Fill (getPdgCodeString (mcParticle), getCharge (mcParticle), 1 .f );
626657 }
627- if (! IsStable) {
658+ if (IsStable. value == 0 ) {
628659 if (!mcParticle.has_mothers ()) {
629660 continue ;
630661 }
631- // auto mothers = mcParticle.mothers();
632- auto mothers = mcParticle.mothers_as <aod::McParticles>();
633- const auto ParticleIsInteresting = std::find (ParticlesOfInterest.begin (), ParticlesOfInterest.end (), mothers[0 ].globalIndex ()) != ParticlesOfInterest.end ();
662+ const auto & mothers = mcParticle.mothers_as <aod::McParticles>();
663+ const auto & ParticleIsInteresting = std::find (ParticlesOfInterest.begin (), ParticlesOfInterest.end (), mothers[0 ].globalIndex ()) != ParticlesOfInterest.end ();
634664 if (!ParticleIsInteresting) {
635665 continue ;
636666 }
0 commit comments