@@ -205,7 +205,6 @@ struct HfElectronSelectionWithTpcEmcal {
205205 registry.add (" hphiElectron" , " hphiElectron" , {HistType::kTH1D , {axisPhi}});
206206 registry.add (" hphiElectronPassEmcal" , " hphiElectron pass Emcal" , {HistType::kTH1D , {axisPhi}});
207207
208-
209208 registry.add (" hMcgenAllNonHfeElectron" , " Mc Gen All NonHf Electron" , {HistType::kTH1D , {{axisPt}}});
210209 registry.add (" hMcgenNonHfeElectron" , " Mc Gen NonHf Electron with mother" , {HistType::kTH1D , {{axisPt}}});
211210 registry.add (" hPi0eEmbTrkPt" , " Mc Gen Pi0 mother NonHf Electron" , {HistType::kTH1D , {{axisPt}}});
@@ -558,7 +557,6 @@ struct HfElectronSelectionWithTpcEmcal {
558557 bool isEmbEta = false ;
559558 bool isEmbPi0 = false ;
560559
561-
562560 // Check first mother
563561 if (mcParticle.has_mothers ()) {
564562 auto const & mother = mcParticle.template mothers_first_as <aod::McParticles>();
@@ -602,7 +600,135 @@ struct HfElectronSelectionWithTpcEmcal {
602600 }
603601 }
604602
603+ // Check first mother
604+ if (mcParticle.has_mothers ()) {
605+ auto const & mother = mcParticle.template mothers_first_as <aod::McParticles>();
606+
607+ if (std::abs (mother.pdgCode ()) == kEtaLocal || std::abs (mother.pdgCode ()) == kPi0 || std::abs (mother.pdgCode ()) == kGamma ) {
605608
609+ auto const & gmother = mother.template mothers_first_as <aod::McParticles>();
610+ // cases to consider: eta->e, eta->pi0->e, eta->gamma->e, eta->pi0->gamma->e, pi0->e, pi0->gamma->e
611+
612+ // ================= eta->e ======================================
613+ if (std::abs (mother.pdgCode ()) == kEtaLocal ) {
614+
615+ if (mother.isPhysicalPrimary ()) {
616+ if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
617+ (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
618+ continue ;
619+ }
620+ isEmbEta = true ;
621+ }
622+ }
623+
624+ // ================= eta->pi0->e ======================================
625+
626+ if (std::abs (mother.pdgCode ()) == kPi0 ) {
627+ if (mother.isPhysicalPrimary ()) {
628+ if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
629+ (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
630+ continue ;
631+ }
632+ isEmbPi0 = true ; // pi0 -> e
633+ }
634+ if (std::abs (gmother.pdgCode ()) == kEtaLocal ) {
635+ if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
636+ auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
637+ if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
638+ (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
639+ continue ;
640+ }
641+ isEmbEta = true ; // eta->pi0-> e
642+ }
643+ }
644+ }
645+
646+ >
647+ // / ==================================== eta->gamma->e and eta->pi0->gamma->e============
648+ if (std::abs (mother.pdgCode ()) == kGamma )
649+ {
650+
651+ if (std::abs (gmother.pdgCode ()) == kEtaLocal ) {
652+ if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
653+ auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
654+ if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
655+ (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
656+ continue ;
657+ }
658+ isEmbEta = true ; // eta->gamma-> e
659+ }
660+ }
661+ if (std::abs (gmother.pdgCode ()) == kPi0 ) {
662+ if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
663+ auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
664+ if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
665+ (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
666+ continue ;
667+ }
668+ isEmbPi0 = true ; // pi0-> gamma-> e
669+ }
670+ if (gmother.has_mothers ()) {
671+ auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
672+ if (std::abs (ggmother.pdgCode ()) == kEtaLocal ) {
673+ if (ggmother.isPhysicalPrimary () || ggmother.has_mothers ()) {
674+ auto const & gggmother = ggmother.template mothers_first_as <aod::McParticles>();
675+ if ((std::abs (gggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gggmother.pdgCode ()) < pdgCodeCharmMax) ||
676+ (std::abs (gggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gggmother.pdgCode ()) < pdgCodeBeautyMax)) {
677+ continue ;
678+ }
679+ isEmbEta = true ; // eta->pi0->gamma-> e
680+ }
681+ }
682+ }
683+ }
684+ }
685+ if (!(isEmbPi0 && isEmbEta)) {
686+ continue ;
687+ }
688+ }
689+ }
690+ }
691+ }
692+ }
693+ nonHfe (matchTrack, tracks, true );
694+
695+ // /////////////// NonHf electron Selection without Emcal ////////////////////////
696+ electronSel (track.collisionId (), track.globalIndex (), etaTrack, phiTrack, ptTrack, pTrack, trackRapidity, dcaxyTrack, dcazTrack, track.tpcNSigmaEl (), track.tofNSigmaEl (),
697+ eMatchEmcCluster, etaMatchEmcCluster, phiMatchEmcCluster, m02MatchEmcCluster, m20MatchEmcCluster, cellEmcCluster, timeEmcCluster, deltaEtaMatch, deltaPhiMatch, isEMcal);
698+ }
699+ // / Electron information without Emcal and use TPC and TOF
700+ if (isEMcal) {
701+ continue ;
702+ }
703+ if (std::abs (track.tofNSigmaEl ()) > tofNSigmaEl) {
704+ continue ;
705+ }
706+ registry.fill (HIST (" hTofNSigmaVsPt" ), track.tofNSigmaEl (), track.pt ());
707+ registry.fill (HIST (" hTpcNSigmaVsPt" ), track.tpcNSigmaEl (), track.pt ());
708+
709+ if ((track.tpcNSigmaEl () < tpcNsigmaElectronMin || track.tpcNSigmaEl () > tpcNsigmaElectronMax)) {
710+ continue ;
711+ }
712+
713+ registry.fill (HIST (" hphiElectron" ), track.phi ());
714+ =======
715+
716+ if constexpr (IsMc) {
717+ if (track.has_mcParticle ()) {
718+ auto mcParticle = track.template mcParticle_as <aod::McParticles>();
719+ if (std::abs (mcParticle.pdgCode ()) == kElectron ) {
720+
721+ registry.fill (HIST (" hMcRecwithoutEMCalInElectron" ), mcParticle.pt ());
722+ bool isEmbEta = false ;
723+ bool isEmbPi0 = false ;
724+
725+ // Check first mother
726+ if (mcParticle.has_mothers ()) {
727+ auto const & mother = mcParticle.template mothers_first_as <aod::McParticles>();
728+
729+ registry.fill (HIST (" hMcRecwithoutEMCalInElectron" ), mcParticle.pt ());
730+ bool isEmbEta = false ;
731+ bool isEmbPi0 = false ;
606732
607733 // Check first mother
608734 if (mcParticle.has_mothers ()) {
@@ -647,7 +773,6 @@ struct HfElectronSelectionWithTpcEmcal {
647773 }
648774 }
649775
650- >
651776 // / ==================================== eta->gamma->e and eta->pi0->gamma->e============
652777 if (std::abs (mother.pdgCode ()) == kGamma ) {
653778
@@ -691,137 +816,6 @@ struct HfElectronSelectionWithTpcEmcal {
691816 }
692817 }
693818 }
694- }
695- }
696- nonHfe (matchTrack, tracks, true );
697-
698- // /////////////// NonHf electron Selection without Emcal ////////////////////////
699- electronSel (track.collisionId (), track.globalIndex (), etaTrack, phiTrack, ptTrack, pTrack, trackRapidity, dcaxyTrack, dcazTrack, track.tpcNSigmaEl (), track.tofNSigmaEl (),
700- eMatchEmcCluster, etaMatchEmcCluster, phiMatchEmcCluster, m02MatchEmcCluster, m20MatchEmcCluster, cellEmcCluster, timeEmcCluster, deltaEtaMatch, deltaPhiMatch, isEMcal);
701- }
702- // / Electron information without Emcal and use TPC and TOF
703- if (isEMcal) {
704- continue ;
705- }
706- if (std::abs (track.tofNSigmaEl ()) > tofNSigmaEl) {
707- continue ;
708- }
709- registry.fill (HIST (" hTofNSigmaVsPt" ), track.tofNSigmaEl (), track.pt ());
710- registry.fill (HIST (" hTpcNSigmaVsPt" ), track.tpcNSigmaEl (), track.pt ());
711-
712- if ((track.tpcNSigmaEl () < tpcNsigmaElectronMin || track.tpcNSigmaEl () > tpcNsigmaElectronMax)) {
713- continue ;
714- }
715-
716- registry.fill (HIST (" hphiElectron" ), track.phi ());
717- =======
718-
719- if constexpr (IsMc) {
720- if (track.has_mcParticle ()) {
721- auto mcParticle = track.template mcParticle_as <aod::McParticles>();
722- if (std::abs (mcParticle.pdgCode ()) == kElectron ) {
723-
724-
725- registry.fill (HIST (" hMcRecwithoutEMCalInElectron" ), mcParticle.pt ());
726- bool isEmbEta = false ;
727- bool isEmbPi0 = false ;
728-
729- // Check first mother
730- if (mcParticle.has_mothers ()) {
731- auto const & mother = mcParticle.template mothers_first_as <aod::McParticles>();
732-
733-
734-
735- registry.fill (HIST (" hMcRecwithoutEMCalInElectron" ), mcParticle.pt ());
736- bool isEmbEta = false ;
737- bool isEmbPi0 = false ;
738-
739- // Check first mother
740- if (mcParticle.has_mothers ()) {
741- auto const & mother = mcParticle.template mothers_first_as <aod::McParticles>();
742-
743- if (std::abs (mother.pdgCode ()) == kEtaLocal || std::abs (mother.pdgCode ()) == kPi0 || std::abs (mother.pdgCode ()) == kGamma ) {
744-
745- auto const & gmother = mother.template mothers_first_as <aod::McParticles>();
746- // cases to consider: eta->e, eta->pi0->e, eta->gamma->e, eta->pi0->gamma->e, pi0->e, pi0->gamma->e
747-
748- // ================= eta->e ======================================
749- if (std::abs (mother.pdgCode ()) == kEtaLocal ) {
750-
751- if (mother.isPhysicalPrimary ()) {
752- if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
753- (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
754- continue ;
755- }
756- isEmbEta = true ;
757- }
758- }
759-
760- // ================= eta->pi0->e ======================================
761-
762- if (std::abs (mother.pdgCode ()) == kPi0 ) {
763- if (mother.isPhysicalPrimary ()) {
764- if ((std::abs (gmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gmother.pdgCode ()) < pdgCodeCharmMax) ||
765- (std::abs (gmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gmother.pdgCode ()) < pdgCodeBeautyMax)) {
766- continue ;
767- }
768- isEmbPi0 = true ; // pi0 -> e
769- }
770- if (std::abs (gmother.pdgCode ()) == kEtaLocal ) {
771- if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
772- auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
773- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
774- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
775- continue ;
776- }
777- isEmbEta = true ; // eta->pi0-> e
778- }
779- }
780- }
781-
782- // / ==================================== eta->gamma->e and eta->pi0->gamma->e============
783- if (std::abs (mother.pdgCode ()) == kGamma ) {
784-
785- if (std::abs (gmother.pdgCode ()) == kEtaLocal ) {
786- if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
787- auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
788- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
789- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
790- continue ;
791- }
792- isEmbEta = true ; // eta->gamma-> e
793- }
794- }
795- if (std::abs (gmother.pdgCode ()) == kPi0 ) {
796- if (gmother.isPhysicalPrimary () || gmother.has_mothers ()) {
797- auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
798- if ((std::abs (ggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (ggmother.pdgCode ()) < pdgCodeCharmMax) ||
799- (std::abs (ggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (ggmother.pdgCode ()) < pdgCodeBeautyMax)) {
800- continue ;
801- }
802- isEmbPi0 = true ; // pi0-> gamma-> e
803- }
804- if (gmother.has_mothers ()) {
805- auto const & ggmother = gmother.template mothers_first_as <aod::McParticles>();
806- if (std::abs (ggmother.pdgCode ()) == kEtaLocal ) {
807- if (ggmother.isPhysicalPrimary () || ggmother.has_mothers ()) {
808- auto const & gggmother = ggmother.template mothers_first_as <aod::McParticles>();
809- if ((std::abs (gggmother.pdgCode ()) >= pdgCodeCharmMin && std::abs (gggmother.pdgCode ()) < pdgCodeCharmMax) ||
810- (std::abs (gggmother.pdgCode ()) >= pdgCodeBeautyMin && std::abs (gggmother.pdgCode ()) < pdgCodeBeautyMax)) {
811- continue ;
812- }
813- isEmbEta = true ; // eta->pi0->gamma-> e
814- }
815- }
816- }
817- }
818- }
819- if (!(isEmbPi0 && isEmbEta)) {
820- continue ;
821- }
822- }
823- }
824- }
825819 }
826820 }
827821 nonHfe (track, tracks, false );
0 commit comments