From b35c8440e61e5c2bfa3f7dd1bfd4a42cf339edbd Mon Sep 17 00:00:00 2001 From: Raphaelle Bailhache Date: Tue, 29 Sep 2026 16:07:26 +0200 Subject: [PATCH] Add the possibility to select only physical primary --- PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx b/PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx index a608e07d79a..a322e7b0d97 100644 --- a/PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx +++ b/PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx @@ -142,6 +142,7 @@ struct createResolutionMapDerived { Configurable cfg_max_phiposition_track{"cfg_max_phiposition_track", 6.3, "max phi position for single track at certain radius"}; Configurable acceptOnlyCorrectMatch{"acceptOnlyCorrectMatch", false, "flag to accept only correct match between ITS and TPC"}; // this is only for MC study, as we don't know correct match in data. Configurable acceptOnlyWrongMatch{"acceptOnlyWrongMatch", false, "flag to accept only wrong match between ITS and TPC"}; // this is only for MC study, as we don't know correct match in data. + Configurable acceptOnlyPhysicalPrimary{"acceptOnlyPhysicalPrimary", false, "flag to accept only Physical Primary electrons"}; Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif = 4, kPIDML = 5]"}; Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; @@ -456,6 +457,9 @@ struct createResolutionMapDerived { if (electroncuts.acceptOnlyWrongMatch && !o2::aod::pwgem::dilepton::utils::mcutil::hasFakeMatchITSTPC(track)) { continue; } + if (electroncuts.acceptOnlyPhysicalPrimary && !mcParticle.isPhysicalPrimary()) { + continue; + } registry.fill(HIST("Electron/hPIDForTracking"), track.pidForTracking()); if (electroncuts.checkPIDForTracking && track.pidForTracking() != static_cast(electroncuts.PartIdentifier)) {