@@ -550,12 +550,9 @@ struct HfElectronSelectionWithTpcEmcal {
550550 void processMcGen (McGenTableCollision const & mcCollision, aod::McParticles const & mcParticles)
551551 {
552552
553- // /// electron identification
554553 bool isNonHfe = false ;
555554 for (const auto & particleMc : mcParticles) {
556555
557- if (!particleMc.isPhysicalPrimary ())
558- continue ;
559556 if (!mcGensel (particleMc)) {
560557 continue ;
561558 }
@@ -580,30 +577,41 @@ struct HfElectronSelectionWithTpcEmcal {
580577
581578 // ================= eta->e ======================================
582579 if (std::abs (mother.pdgCode ()) == kEta ) {
583- isEmbEta = true ;
580+ if (mother.isPhysicalPrimary ()) {
581+ isEmbEta = true ;
582+ }
584583 }
585584 // ================= eta->pi0->e ======================================
586585
587586 if (std::abs (mother.pdgCode ()) == kPi0 ) {
588- isEmbPi0 = true ; // pi0 -> e
587+ if (mother.isPhysicalPrimary ()) {
588+ isEmbPi0 = true ; // pi0 -> e
589+ }
589590
590591 if (std::abs (gmother.pdgCode ()) == kEta ) {
591- isEmbEta = true ; // eta->pi0-> e
592+ if (gmother.isPhysicalPrimary ()) {
593+ isEmbEta = true ; // eta->pi0-> e
594+ }
592595 }
593596 }
594597
595598 // / ==================================== eta->gamma->e and eta->pi0->gamma->e============
596599 if (std::abs (mother.pdgCode ()) == kGamma ) {
597600 if (std::abs (gmother.pdgCode ()) == kEta ) {
598- isEmbEta = true ; // eta->gamma-> e
601+ if (gmother.isPhysicalPrimary ()) {
602+ isEmbEta = true ; // eta->gamma-> e
603+ }
599604 }
600605
601606 if (std::abs (gmother.pdgCode ()) == kPi0 ) {
602- isEmbPi0 = true ; // pi0-> gamma-> e
607+ if (gmother.isPhysicalPrimary ()) {
608+ isEmbPi0 = true ; // pi0-> gamma-> e
609+ }
603610
604611 if (std::abs (ggmother.pdgCode ()) == kEta ) {
605-
606- isEmbEta = true ; // eta->pi0->gamma-> e
612+ if (ggmother.isPhysicalPrimary ()) {
613+ isEmbEta = true ; // eta->pi0->gamma-> e
614+ }
607615 }
608616 }
609617 }
@@ -629,7 +637,6 @@ struct HfElectronSelectionWithTpcEmcal {
629637
630638 PROCESS_SWITCH (HfElectronSelectionWithTpcEmcal, processMcGen, " Process MC Gen mode" , false );
631639};
632-
633640WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
634641{
635642 return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
0 commit comments