@@ -567,7 +567,6 @@ struct HfElectronSelectionWithTpcEmcal {
567567 bool isEmbPi0 = false ;
568568
569569 // Check first mother
570-
571570 if (particleMc.has_mothers ()) {
572571 auto const & mother = particleMc.mothers_first_as <aod::McParticles>();
573572
@@ -645,82 +644,10 @@ struct HfElectronSelectionWithTpcEmcal {
645644 }
646645 isEmbEta = true ; // eta->pi0->gamma-> e
647646 }
648-
649- auto const & mother = particleMc.mothers_first_as <aod::McParticles>();
650-
651- if (std::abs (mother.pdgCode ()) == kEta || std::abs (mother.pdgCode ()) == kPi0 || std::abs (mother.pdgCode ()) == kGamma ) {
652- registry.fill (HIST (" hMcgenAllNonHfeElectron" ), particleMc.pt ());
653- auto const & gmother = mother.mothers_first_as <aod::McParticles>();
654- auto const & ggmother = gmother.mothers_first_as <aod::McParticles>();
655- auto const & gggmother = ggmother.mothers_first_as <aod::McParticles>();
656-
657- // cases to consider: eta->e, eta->pi0->e, eta->gamma->e, eta->pi0->gamma->e, pi0->e, pi0->gamma->e
658-
659- // ================= eta->e ======================================
660- if (std::abs (mother.pdgCode ()) == kEta ) {
661- if (mother.isPhysicalPrimary ()) {
662- if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
663- (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
664- continue ;
665- }
666- isEmbEta = true ;
667- }
668- }
669- // ================= eta->pi0->e ======================================
670-
671- if (std::abs (mother.pdgCode ()) == kPi0 ) {
672- if (mother.isPhysicalPrimary ()) {
673- if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
674- (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
675- continue ;
676- }
677- isEmbPi0 = true ; // pi0 -> e
678- }
679-
680- if (std::abs (gmother.pdgCode ()) == kEta ) {
681- if (gmother.isPhysicalPrimary ()) {
682- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
683- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
684- continue ;
685- }
686- isEmbEta = true ; // eta->pi0-> e
687- }
688- }
689- }
690-
691- // / ==================================== eta->gamma->e and eta->pi0->gamma->e============
692- if (std::abs (mother.pdgCode ()) == kGamma ) {
693- if (std::abs (gmother.pdgCode ()) == kEta ) {
694- if (gmother.isPhysicalPrimary ()) {
695- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
696- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
697- continue ;
698- }
699- isEmbEta = true ; // eta->gamma-> e
700- }
701- }
702-
703- if (std::abs (gmother.pdgCode ()) == kPi0 ) {
704- if (gmother.isPhysicalPrimary ()) {
705- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
706- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
707- continue ;
708- }
709- isEmbPi0 = true ; // pi0-> gamma-> e
710- }
711-
712- if (std::abs (ggmother.pdgCode ()) == kEta ) {
713- if (ggmother.isPhysicalPrimary ()) {
714- if ((std::abs (gggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gggmother.pdgCode ()) < pdgCodeCharmMax) ||
715- (std::abs (gggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gggmother.pdgCode ()) < pdgCodeBeautyMax)) {
716- continue ;
717-
718647 }
719- isEmbEta = true ; // eta->pi0->gamma-> e
720648 }
721649 }
722650 }
723-
724651 if (isEmbPi0 || isEmbEta) {
725652 registry.fill (HIST (" hMcgenNonHfeElectron" ), particleMc.pt ());
726653 isNonHfe = true ;
@@ -731,29 +658,17 @@ struct HfElectronSelectionWithTpcEmcal {
731658 if (isEmbEta) {
732659 registry.fill (HIST (" hEtaeEmbTrkPt" ), particleMc.pt ());
733660 }
734-
735- }
736- if (isEmbPi0 || isEmbEta) {
737- registry.fill (HIST (" hMcgenNonHfeElectron" ), particleMc.pt ());
738- isNonHfe = true ;
739- if (isEmbPi0) {
740-
741- registry.fill (HIST (" hPi0eEmbTrkPt" ), particleMc.pt ());
742- }
743- if (isEmbEta) {
744- registry.fill (HIST (" hEtaeEmbTrkPt" ), particleMc.pt ());
745-
746661 }
747662 }
748663 }
749-
750664 hfGenElectronSel (mcCollision.globalIndex (), particleMc.globalIndex (), particleMc.eta (), particleMc.phi (), particleMc.pt (), isNonHfe);
751665 }
752666 }
753667 }
754668 PROCESS_SWITCH (HfElectronSelectionWithTpcEmcal, processMcGen, " Process MC Gen mode" , false );
755669};
670+
756671WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
757672{
758673 return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
759- }
674+ }
0 commit comments