Skip to content

Commit b35c844

Browse files
committed
Add the possibility to select only physical primary
1 parent abafa83 commit b35c844

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎PWGEM/Dilepton/Tasks/createResolutionMapDerived.cxx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ struct createResolutionMapDerived {
142142
Configurable<float> cfg_max_phiposition_track{"cfg_max_phiposition_track", 6.3, "max phi position for single track at certain radius"};
143143
Configurable<bool> 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.
144144
Configurable<bool> 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.
145+
Configurable<bool> acceptOnlyPhysicalPrimary{"acceptOnlyPhysicalPrimary", false, "flag to accept only Physical Primary electrons"};
145146

146147
Configurable<int> cfg_pid_scheme{"cfg_pid_scheme", static_cast<int>(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif = 4, kPIDML = 5]"};
147148
Configurable<float> cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"};
@@ -456,6 +457,9 @@ struct createResolutionMapDerived {
456457
if (electroncuts.acceptOnlyWrongMatch && !o2::aod::pwgem::dilepton::utils::mcutil::hasFakeMatchITSTPC(track)) {
457458
continue;
458459
}
460+
if (electroncuts.acceptOnlyPhysicalPrimary && !mcParticle.isPhysicalPrimary()) {
461+
continue;
462+
}
459463

460464
registry.fill(HIST("Electron/hPIDForTracking"), track.pidForTracking());
461465
if (electroncuts.checkPIDForTracking && track.pidForTracking() != static_cast<uint32_t>(electroncuts.PartIdentifier)) {

0 commit comments

Comments
 (0)