diff --git a/PWGEM/Dilepton/TableProducer/filterEoI.cxx b/PWGEM/Dilepton/TableProducer/filterEoI.cxx index 11a3078d501..dcbb33f9ec2 100644 --- a/PWGEM/Dilepton/TableProducer/filterEoI.cxx +++ b/PWGEM/Dilepton/TableProducer/filterEoI.cxx @@ -32,38 +32,43 @@ struct filterEoI { kElectron = 0x1, kFwdMuon = 0x2, kPCM = 0x4, + kElectronFromDalitz = 0x8, }; Produces emeoi; Configurable minNElectrons{"minNElectrons", 1, "min number of e+ or e- at midrapidity"}; Configurable minNMuons{"minNMuons", 1, "min number of mu+ or mu- at forward rapidity"}; Configurable minNV0s{"minNV0s", 1, "min number of v0 photons at midrapidity"}; + Configurable minNElectronsFromDalitz{"minNElectronsFromDalitz", 1, "min number of e+ or e- from dalitz decay at midrapidity"}; HistogramRegistry fRegistry{"output"}; void init(o2::framework::InitContext&) { - auto hEventCounter = fRegistry.add("hEventCounter", "hEventCounter", kTH1D, {{8, 0.5f, 8.5f}}); + auto hEventCounter = fRegistry.add("hEventCounter", "hEventCounter", kTH1D, {{9, 0.5f, 9.5f}}); hEventCounter->GetXaxis()->SetBinLabel(1, "all"); hEventCounter->GetXaxis()->SetBinLabel(2, "event with electron"); hEventCounter->GetXaxis()->SetBinLabel(3, "event with forward muon"); hEventCounter->GetXaxis()->SetBinLabel(4, "event with v0"); - hEventCounter->GetXaxis()->SetBinLabel(5, "event with electron or forward muon"); - hEventCounter->GetXaxis()->SetBinLabel(6, "event with electron and forward muon"); - hEventCounter->GetXaxis()->SetBinLabel(7, "event with electron or forward muon or v0"); - hEventCounter->GetXaxis()->SetBinLabel(8, "event with electron and forward muon and v0"); + hEventCounter->GetXaxis()->SetBinLabel(5, "event with electron from dalitz"); + hEventCounter->GetXaxis()->SetBinLabel(6, "event with electron or forward muon"); + hEventCounter->GetXaxis()->SetBinLabel(7, "event with electron and forward muon"); + hEventCounter->GetXaxis()->SetBinLabel(8, "event with electron or forward muon or v0"); + hEventCounter->GetXaxis()->SetBinLabel(9, "event with v0 or electron from dalitz"); } SliceCache cache; Preslice perCollision_el = aod::emprimaryelectron::collisionId; Preslice perCollision_mu = aod::emprimarymuon::collisionId; Preslice perCollision_v0 = aod::v0photonkf::collisionId; + Preslice perCollision_elda = aod::emprimaryelectron::collisionId; - template - void selectEoI(TCollisions const& collisions, TElectrons const& electrons, TMuons const& muons, TV0s const& v0s) + template + void selectEoI(TCollisions const& collisions, TElectrons const& electrons, TMuons const& muons, TV0s const& v0s, TElectronsFromDalitz const& electronsda) { for (const auto& collision : collisions) { bool does_electron_exist = false; bool does_fwdmuon_exist = false; bool does_pcm_exist = false; + bool does_electronda_exist = false; fRegistry.fill(HIST("hEventCounter"), 1); if constexpr (static_cast(system & kElectron)) { @@ -87,21 +92,28 @@ struct filterEoI { fRegistry.fill(HIST("hEventCounter"), 4); } } + if constexpr (static_cast(system & kElectronFromDalitz)) { + auto electronsda_coll = electronsda.sliceBy(perCollision_elda, collision.globalIndex()); + if (electronsda_coll.size() >= minNElectronsFromDalitz) { + does_electronda_exist = true; + fRegistry.fill(HIST("hEventCounter"), 5); + } + } if (does_electron_exist || does_fwdmuon_exist) { - fRegistry.fill(HIST("hEventCounter"), 5); - } - if (does_electron_exist && does_fwdmuon_exist) { fRegistry.fill(HIST("hEventCounter"), 6); } - if (does_electron_exist || does_fwdmuon_exist || does_pcm_exist) { + if (does_electron_exist && does_fwdmuon_exist) { fRegistry.fill(HIST("hEventCounter"), 7); } - if (does_electron_exist && does_fwdmuon_exist && does_pcm_exist) { + if (does_electron_exist || does_fwdmuon_exist || does_pcm_exist) { fRegistry.fill(HIST("hEventCounter"), 8); } + if (does_electronda_exist || does_pcm_exist) { + fRegistry.fill(HIST("hEventCounter"), 9); + } - emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist); + emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist); } // end of collision loop @@ -110,31 +122,37 @@ struct filterEoI { void process_Electron(aod::Collisions const& collisions, aod::EMPrimaryElectrons const& electrons) { const uint8_t sysflag = kElectron; - selectEoI(collisions, electrons, nullptr, nullptr); + selectEoI(collisions, electrons, nullptr, nullptr, nullptr); } void process_FwdMuon(aod::Collisions const& collisions, aod::EMPrimaryMuons const& muons) { const uint8_t sysflag = kFwdMuon; - selectEoI(collisions, nullptr, muons, nullptr); + selectEoI(collisions, nullptr, muons, nullptr, nullptr); } void process_Electron_FwdMuon(aod::Collisions const& collisions, aod::EMPrimaryElectrons const& electrons, aod::EMPrimaryMuons const& muons) { const uint8_t sysflag = kElectron | kFwdMuon; - selectEoI(collisions, electrons, muons, nullptr); + selectEoI(collisions, electrons, muons, nullptr, nullptr); } void process_PCM(aod::Collisions const& collisions, aod::V0PhotonsKF const& v0s) { const uint8_t sysflag = kPCM; - selectEoI(collisions, nullptr, nullptr, v0s); + selectEoI(collisions, nullptr, nullptr, v0s, nullptr); } void process_Electron_FwdMuon_PCM(aod::Collisions const& collisions, aod::EMPrimaryElectrons const& electrons, aod::EMPrimaryMuons const& muons, aod::V0PhotonsKF const& v0s) { const uint8_t sysflag = kElectron | kFwdMuon | kPCM; - selectEoI(collisions, electrons, muons, v0s); + selectEoI(collisions, electrons, muons, v0s, nullptr); + } + + void process_PCM_ElectronFromDalitz(aod::Collisions const& collisions, aod::V0PhotonsKF const& v0s, aod::EMPrimaryElectronsFromDalitz const& electronsda) + { + const uint8_t sysflag = kPCM | kElectronFromDalitz; + selectEoI(collisions, nullptr, nullptr, v0s, electronsda); } void processDummy(aod::Collisions const& collisions) @@ -149,6 +167,7 @@ struct filterEoI { PROCESS_SWITCH(filterEoI, process_PCM, "create filter bit for PCM", false); PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon, "create filter bit for Electron, FwdMuon", false); PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon_PCM, "create filter bit for Electron, FwdMuon, PCM", false); + PROCESS_SWITCH(filterEoI, process_PCM_ElectronFromDalitz, "create filter bit for PCM, electron from dalitz", false); PROCESS_SWITCH(filterEoI, processDummy, "processDummy", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)