Skip to content

Commit a1ce8ee

Browse files
authored
Update electronSelectionWithTpcEmcal.cxx
1 parent b05e432 commit a1ce8ee

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,12 @@ struct HfElectronSelectionWithTpcEmcal {
550550
void processMcGen(McGenTableCollision const& mcCollision, aod::McParticles const& mcParticles)
551551
{
552552

553+
///// electron identification
553554
bool isNonHfe = false;
554555
for (const auto& particleMc : mcParticles) {
555556

557+
if (!particleMc.isPhysicalPrimary())
558+
continue;
556559
if (!mcGensel(particleMc)) {
557560
continue;
558561
}
@@ -577,41 +580,30 @@ struct HfElectronSelectionWithTpcEmcal {
577580

578581
//================= eta->e ======================================
579582
if (std::abs(mother.pdgCode()) == kEta) {
580-
if (mother.isPhysicalPrimary()) {
581-
isEmbEta = true;
582-
}
583+
isEmbEta = true;
583584
}
584585
//================= eta->pi0->e ======================================
585586

586587
if (std::abs(mother.pdgCode()) == kPi0) {
587-
if (mother.isPhysicalPrimary()) {
588-
isEmbPi0 = true; // pi0 -> e
589-
}
588+
isEmbPi0 = true; // pi0 -> e
590589

591590
if (std::abs(gmother.pdgCode()) == kEta) {
592-
if (gmother.isPhysicalPrimary()) {
593-
isEmbEta = true; // eta->pi0-> e
594-
}
591+
isEmbEta = true; // eta->pi0-> e
595592
}
596593
}
597594

598595
/// ==================================== eta->gamma->e and eta->pi0->gamma->e============
599596
if (std::abs(mother.pdgCode()) == kGamma) {
600597
if (std::abs(gmother.pdgCode()) == kEta) {
601-
if (gmother.isPhysicalPrimary()) {
602-
isEmbEta = true; // eta->gamma-> e
603-
}
598+
isEmbEta = true; // eta->gamma-> e
604599
}
605600

606601
if (std::abs(gmother.pdgCode()) == kPi0) {
607-
if (gmother.isPhysicalPrimary()) {
608-
isEmbPi0 = true; // pi0-> gamma-> e
609-
}
602+
isEmbPi0 = true; // pi0-> gamma-> e
610603

611604
if (std::abs(ggmother.pdgCode()) == kEta) {
612-
if (ggmother.isPhysicalPrimary()) {
613-
isEmbEta = true; // eta->pi0->gamma-> e
614-
}
605+
606+
isEmbEta = true; // eta->pi0->gamma-> e
615607
}
616608
}
617609
}
@@ -637,6 +629,7 @@ struct HfElectronSelectionWithTpcEmcal {
637629

638630
PROCESS_SWITCH(HfElectronSelectionWithTpcEmcal, processMcGen, "Process MC Gen mode", false);
639631
};
632+
640633
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
641634
{
642635
return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};

0 commit comments

Comments
 (0)