@@ -646,114 +646,112 @@ struct HfElectronSelectionWithTpcEmcal {
646646 isEmbEta = true ; // eta->pi0->gamma-> e
647647 }
648648
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- }
649+ auto const & mother = particleMc.mothers_first_as <aod::McParticles>();
679650
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- }
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>();
702656
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- }
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+ }
711690
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 ;
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+ }
718+ isEmbEta = true ; // eta->pi0->gamma-> e
719+ }
720+ }
721+ }
722+
723+ if (isEmbPi0 || isEmbEta) {
724+ registry.fill (HIST (" hMcgenNonHfeElectron" ), particleMc.pt ());
725+ isNonHfe = true ;
726+ if (isEmbPi0) {
727+
728+ registry.fill (HIST (" hPi0eEmbTrkPt" ), particleMc.pt ());
729+ }
730+ if (isEmbEta) {
731+ registry.fill (HIST (" hEtaeEmbTrkPt" ), particleMc.pt ());
732+ }
733+ }
734+ if (isEmbPi0 || isEmbEta) {
735+ registry.fill (HIST (" hMcgenNonHfeElectron" ), particleMc.pt ());
736+ isNonHfe = true ;
737+ if (isEmbPi0) {
738+
739+ registry.fill (HIST (" hPi0eEmbTrkPt" ), particleMc.pt ());
740+ }
741+ if (isEmbEta) {
742+ registry.fill (HIST (" hEtaeEmbTrkPt" ), particleMc.pt ());
743+ }
744+ }
745+ }
717746
747+ hfGenElectronSel (mcCollision.globalIndex (), particleMc.globalIndex (), particleMc.eta (), particleMc.phi (), particleMc.pt (), isNonHfe);
748+ }
718749 }
719- isEmbEta = true ; // eta->pi0->gamma-> e
720750 }
751+ PROCESS_SWITCH (HfElectronSelectionWithTpcEmcal, processMcGen, " Process MC Gen mode" , false );
752+ };
753+ WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
754+ {
755+ return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
721756 }
722- }
723-
724- if (isEmbPi0 || isEmbEta) {
725- registry.fill (HIST (" hMcgenNonHfeElectron" ), particleMc.pt ());
726- isNonHfe = true ;
727- if (isEmbPi0) {
728-
729- registry.fill (HIST (" hPi0eEmbTrkPt" ), particleMc.pt ());
730- }
731- if (isEmbEta) {
732- registry.fill (HIST (" hEtaeEmbTrkPt" ), particleMc.pt ());
733- }
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-
746- }
747- }
748- }
749-
750- hfGenElectronSel (mcCollision.globalIndex (), particleMc.globalIndex (), particleMc.eta (), particleMc.phi (), particleMc.pt (), isNonHfe);
751- }
752- }
753- }
754- PROCESS_SWITCH (HfElectronSelectionWithTpcEmcal, processMcGen, " Process MC Gen mode" , false );
755- };
756- WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
757- {
758- return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
759- }
757+
0 commit comments