diff --git a/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx b/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx index 5a753b397e0..162bdd33348 100644 --- a/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx +++ b/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx @@ -93,6 +93,7 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char* list->Add(new TH2F("hKFChi2vsZ", "KF chi2 vs. recalc. conversion point in Z;Z (cm);KF chi2/NDF", 500, -250.0f, 250.0f, 100, 0.f, 100.0f)); list->Add(new TH1F("hNgamma", "Number of #gamma candidates per collision", 101, -0.5f, 100.5f)); list->Add(new TH2F("hV0R_minTrackX", "V0R vs. trackiu x;R_{xy} of V0 (cm);min TrackIU X (cm)", 200, 0.0f, 200.0f, 400, 0.f, 200.0f)); + list->Add(new TH1F("hDiffZ", "difference of track iu z between e^{+} and e^{-};diff track iu Z (cm)", 400, -20.f, 20.f)); if (TString(subGroup) == "mc") { list->Add(new TH1F("hPt_Photon_Primary", "pT;p_{T} (GeV/c)", 1000, 0.0f, 10)); // for MC efficiency diff --git a/PWGEM/PhotonMeson/TableProducer/createEMReducedEvent.cxx b/PWGEM/PhotonMeson/TableProducer/createEMReducedEvent.cxx index d5d728d263e..4a60a969040 100644 --- a/PWGEM/PhotonMeson/TableProducer/createEMReducedEvent.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createEMReducedEvent.cxx @@ -88,7 +88,6 @@ struct createEMReducedEvent { auto v0photons_coll = v0photons.sliceBy(perCollision_pcm, collision.globalIndex()); ng_pcm = v0photons_coll.size(); registry.fill(HIST("hNGammas_PCM"), ng_pcm); - // for (auto& v0 : v0photons_coll) { for (int iv0 = 0; iv0 < v0photons_coll.size(); iv0++) { v0kfeventid(event.lastIndex() + 1); } @@ -97,11 +96,17 @@ struct createEMReducedEvent { auto phos_coll = phosclusters.sliceBy(perCollision_phos, collision.globalIndex()); ng_phos = phos_coll.size(); registry.fill(HIST("hNGammas_PHOS"), ng_phos); + for (int iphos = 0; iphos < phos_coll.size(); iphos++) { + phoseventid(event.lastIndex() + 1); + } } if constexpr (static_cast(system & kEMC)) { auto emc_coll = emcclusters.sliceBy(perCollision_emc, collision.globalIndex()); ng_emc = emc_coll.size(); registry.fill(HIST("hNGammas_EMC"), ng_emc); + for (int iemc = 0; iemc < emc_coll.size(); iemc++) { + emceventid(event.lastIndex() + 1); + } } if (ng_pcm >= minN_PCM) { minN_any = true; diff --git a/PWGEM/PhotonMeson/TableProducer/createEMReducedMCEvent.cxx b/PWGEM/PhotonMeson/TableProducer/createEMReducedMCEvent.cxx index a91ee727944..02a85922fa0 100644 --- a/PWGEM/PhotonMeson/TableProducer/createEMReducedMCEvent.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createEMReducedMCEvent.cxx @@ -95,14 +95,23 @@ struct createEMReducedMCEvent { if constexpr (static_cast(system & kPCM)) { auto v0photons_coll = v0photons.sliceBy(perCollision_pcm, collision.globalIndex()); ng_pcm = v0photons_coll.size(); + for (int iv0 = 0; iv0 < v0photons_coll.size(); iv0++) { + v0kfeventid(events.lastIndex() + 1); + } } if constexpr (static_cast(system & kPHOS)) { auto phos_coll = phosclusters.sliceBy(perCollision_phos, collision.globalIndex()); ng_phos = phos_coll.size(); + for (int iphos = 0; iphos < phos_coll.size(); iphos++) { + phoseventid(events.lastIndex() + 1); + } } if constexpr (static_cast(system & kEMC)) { auto emc_coll = emcclusters.sliceBy(perCollision_emc, collision.globalIndex()); ng_emc = emc_coll.size(); + for (int iemc = 0; iemc < emc_coll.size(); iemc++) { + emceventid(events.lastIndex() + 1); + } } // store event selection decisions diff --git a/PWGEM/PhotonMeson/TableProducer/createPCM.cxx b/PWGEM/PhotonMeson/TableProducer/createPCM.cxx index a3bc6dfda2f..b8fb282e8b1 100644 --- a/PWGEM/PhotonMeson/TableProducer/createPCM.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createPCM.cxx @@ -91,6 +91,10 @@ struct createPCM { Configurable max_qt_arm{"max_qt_arm", 0.03, "max qt for AP cut in GeV/c"}; Configurable max_r_req_its{"max_r_req_its", 16.0, "min Rxy for V0 with ITS hits"}; Configurable min_r_tpconly{"min_r_tpconly", 32.0, "min Rxy for V0 with TPConly tracks"}; + Configurable max_diff_tgl{"max_diff_tgl", 999.0, "max difference in track iu tgl between ele and pos"}; + Configurable max_diff_z_itstpc{"max_diff_z_itstpc", 999.0, "max difference in track iu z between ele and pos for ITS-TPC tracks"}; + Configurable max_diff_z_itsonly{"max_diff_z_itsonly", 999.0, "max difference in track iu z between ele and pos for ITSonly tracks"}; + Configurable max_diff_z_tpconly{"max_diff_z_tpconly", 999.0, "max difference in track iu z between ele and pos for TPConly tracks"}; int mRunNumber; float d_bz; @@ -206,11 +210,31 @@ struct createPCM { bool isITSonly_ele = ele.hasITS() & !ele.hasTPC(); bool isTPConly_pos = !pos.hasITS() & pos.hasTPC(); bool isTPConly_ele = !ele.hasITS() & ele.hasTPC(); + bool isITSTPC_pos = pos.hasITS() & pos.hasTPC(); + bool isITSTPC_ele = ele.hasITS() & ele.hasTPC(); if ((isITSonly_pos && isTPConly_ele) || (isITSonly_ele && isTPConly_pos)) { return false; } + if (abs(ele.tgl() - pos.tgl()) > max_diff_tgl) { + return false; + } + + if (isITSTPC_pos && isITSTPC_ele) { + if (abs(ele.z() - pos.z()) > max_diff_z_itstpc) { + return false; + } + } else if (isTPConly_pos && isTPConly_ele) { + if (abs(ele.z() - pos.z()) > max_diff_z_tpconly) { + return false; + } + } else if (isITSonly_pos && isITSonly_ele) { + if (abs(ele.z() - pos.z()) > max_diff_z_itsonly) { + return false; + } + } + // fitter is memeber variable. auto pTrack = getTrackParCov(pos); // positive auto nTrack = getTrackParCov(ele); // negative diff --git a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx index f740a019f12..787997e5978 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx @@ -165,6 +165,7 @@ struct PCMQC { o2::aod::emphotonhistograms::FillHistClass(list_v0_cut, "", v0); nv0++; reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hV0R_minTrackX"))->Fill(v0.recalculatedVtxR(), std::min(pos.x(), ele.x())); + reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hDiffZ"))->Fill(pos.z() - ele.z()); for (auto& leg : {pos, ele}) { o2::aod::emphotonhistograms::FillHistClass(list_v0leg_cut, "", leg); } diff --git a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx index 405bb58d6d6..4c885c306fa 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx @@ -214,6 +214,7 @@ struct PCMQCMC { nv0++; reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hV0R_minTrackX"))->Fill(v0.recalculatedVtxR(), std::min(pos.x(), ele.x())); + reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hDiffZ"))->Fill(pos.z() - ele.z()); for (auto& leg : {pos, ele}) { o2::aod::emphotonhistograms::FillHistClass(list_v0leg_cut, "", leg); }