From d444ded6cd258aa7a34c771edb74093126b27ba9 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Tue, 9 Jan 2024 22:27:11 +0900 Subject: [PATCH] EventFiltering/PWGEM: reduce the number of triggers --- EventFiltering/PWGEM/EMPhotonFilter.cxx | 126 +++++++++++----------- EventFiltering/PWGEM/EMPhotonFilterQC.cxx | 118 ++++++++++---------- EventFiltering/filterTables.h | 18 ++-- PWGEM/Tasks/phosTrigQA.cxx | 36 +++---- 4 files changed, 149 insertions(+), 149 deletions(-) diff --git a/EventFiltering/PWGEM/EMPhotonFilter.cxx b/EventFiltering/PWGEM/EMPhotonFilter.cxx index 29a6286ccf6..d652d9f285c 100644 --- a/EventFiltering/PWGEM/EMPhotonFilter.cxx +++ b/EventFiltering/PWGEM/EMPhotonFilter.cxx @@ -132,67 +132,67 @@ struct EMPhotonFilter { } } // end of single v0 photon loop - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { - if (g2.pt() < min_pt_tagging) { // this is only to increase rejection factor - continue; - } - if (g2.mass() > max_mee_pi0_dalitz) { // select only pi0 candidates - continue; - } - if (g2.mass() < slope * g2.phiv() + intercept) { - continue; - } - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - - if (min_meeg_pi0 < v12.M() && v12.M() < max_meeg_pi0) { - keepEvent[kPCM_MatCalib] = true; - mHistManager.fill(HIST("hEventCounter"), 13); - break; - } - - } // end of dielectron-photon pair loop - - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { - if (g2.mass() > max_mee_eta_dalitz) { // select only eta candidates - continue; - } - if (g2.mass() < slope * g2.phiv() + intercept) { - continue; - } - - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - - if (min_meeg_eta < v12.M() && v12.M() < max_meeg_eta) { // eta -> eeg - keepEvent[kPCM_EtaDalitz] = true; - mHistManager.fill(HIST("hEventCounter"), 14); - break; - } - } // end of dielectron-photon pair loop - - for (auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(photons1_per_coll, photons1_per_coll))) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - - if (min_meeg_eta < v12.M() && v12.M() < max_meeg_eta) { // eta -> gg - keepEvent[kPCM_EtaGG] = true; - mHistManager.fill(HIST("hEventCounter"), 15); - break; - } - } // end of photon-photon pair loop - - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { - if (g2.mass() < slope * g2.phiv() + intercept) { - continue; - } - keepEvent[kPCM_EE] = true; - mHistManager.fill(HIST("hEventCounter"), 16); - break; - } // end of dielectron-photon pair loop + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { + // if (g2.pt() < min_pt_tagging) { // this is only to increase rejection factor + // continue; + // } + // if (g2.mass() > max_mee_pi0_dalitz) { // select only pi0 candidates + // continue; + // } + // if (g2.mass() < slope * g2.phiv() + intercept) { + // continue; + // } + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + + // if (min_meeg_pi0 < v12.M() && v12.M() < max_meeg_pi0) { + // keepEvent[kPCM_MatCalib] = true; + // mHistManager.fill(HIST("hEventCounter"), 13); + // break; + // } + + // } // end of dielectron-photon pair loop + + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { + // if (g2.mass() > max_mee_eta_dalitz) { // select only eta candidates + // continue; + // } + // if (g2.mass() < slope * g2.phiv() + intercept) { + // continue; + // } + + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + + // if (min_meeg_eta < v12.M() && v12.M() < max_meeg_eta) { // eta -> eeg + // keepEvent[kPCM_EtaDalitz] = true; + // mHistManager.fill(HIST("hEventCounter"), 14); + // break; + // } + // } // end of dielectron-photon pair loop + + // for (auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(photons1_per_coll, photons1_per_coll))) { + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + + // if (min_meeg_eta < v12.M() && v12.M() < max_meeg_eta) { // eta -> gg + // keepEvent[kPCM_EtaGG] = true; + // mHistManager.fill(HIST("hEventCounter"), 15); + // break; + // } + // } // end of photon-photon pair loop + + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(photons1_per_coll, dielectrons_per_coll))) { + // if (g2.mass() < slope * g2.phiv() + intercept) { + // continue; + // } + // keepEvent[kPCM_EE] = true; + // mHistManager.fill(HIST("hEventCounter"), 16); + // break; + // } // end of dielectron-photon pair loop } // end of PCM decision @@ -264,7 +264,7 @@ struct EMPhotonFilter { // if constexpr (static_cast(system & EM_Filter_PhotonType::kEMC)) { // // so far, do nothing. // } - tags(keepEvent[kPHOS_Photon], keepEvent[kPHOS_El], keepEvent[kPHOS_Pair], keepEvent[kPHOS_Nbar], keepEvent[kPCM_HighPtPhoton], keepEvent[kPCM_MatCalib], keepEvent[kPCM_EtaDalitz], keepEvent[kPCM_EtaGG], keepEvent[kPCM_EE]); + tags(keepEvent[kPHOS_Photon], keepEvent[kPHOS_Nbar], keepEvent[kPCM_HighPtPhoton]); } // end of collision loop } @@ -297,7 +297,7 @@ struct EMPhotonFilter { void processDummy(MyCollisions const& collisions) { for (int i = 0; i < collisions.size(); i++) { - tags(false, false, false, false, false, false, false, false, false); + tags(false, false, false); } } diff --git a/EventFiltering/PWGEM/EMPhotonFilterQC.cxx b/EventFiltering/PWGEM/EMPhotonFilterQC.cxx index 833fe952e62..08a9ab263b8 100644 --- a/EventFiltering/PWGEM/EMPhotonFilterQC.cxx +++ b/EventFiltering/PWGEM/EMPhotonFilterQC.cxx @@ -92,65 +92,65 @@ struct EMPhotonFilterQC { } // end of v0 photon loop } - if (collision.hasPCMMatCalib()) { - registry.fill(HIST("hEventCounter"), 5); - if (collision.sel8() && abs(collision.posZ()) < 10.f) { - registry.fill(HIST("hEventCounter"), 6); - } - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { - registry.fill(HIST("PCM_MBCalib/hMeePt"), g2.mass(), g2.pt()); - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - registry.fill(HIST("PCM_MBCalib/hMeegPt"), v12.M(), g1.pt()); - } // end of dielectron-photon pair loop - } - - if (collision.hasPCMEtaDalitz()) { - registry.fill(HIST("hEventCounter"), 7); - if (collision.sel8() && abs(collision.posZ()) < 10.f) { - registry.fill(HIST("hEventCounter"), 8); - } - for (auto& dielectron : dielectrons_coll) { - registry.fill(HIST("PCM_EtaDalitz/hMeePt"), dielectron.mass(), dielectron.pt()); - } - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - registry.fill(HIST("PCM_EtaDalitz/hMeegPt"), v12.M(), v12.Pt()); - } // end of dielectron-photon pair loop - } - - if (collision.hasPCMEtaGG()) { - registry.fill(HIST("hEventCounter"), 9); - if (collision.sel8() && abs(collision.posZ()) < 10.f) { - registry.fill(HIST("hEventCounter"), 10); - } - for (auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(v0photons_coll, v0photons_coll))) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - registry.fill(HIST("PCM_EtaGG/hMggPt"), v12.M(), v12.Pt()); - } // end of dielectron-photon pair loop - } - - if (collision.hasPCMandEE()) { - registry.fill(HIST("hEventCounter"), 11); - if (collision.sel8() && abs(collision.posZ()) < 10.f) { - registry.fill(HIST("hEventCounter"), 12); - } - - for (auto& dielectron : dielectrons_coll) { - registry.fill(HIST("PCM_EE/hMeePt"), dielectron.mass(), dielectron.pt()); - } - for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - registry.fill(HIST("PCM_EE/hMeegPt"), v12.M(), v12.Pt()); - } // end of dielectron-photon pair loop - } + // if (collision.hasPCMMatCalib()) { + // registry.fill(HIST("hEventCounter"), 5); + // if (collision.sel8() && abs(collision.posZ()) < 10.f) { + // registry.fill(HIST("hEventCounter"), 6); + // } + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { + // registry.fill(HIST("PCM_MBCalib/hMeePt"), g2.mass(), g2.pt()); + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + // registry.fill(HIST("PCM_MBCalib/hMeegPt"), v12.M(), g1.pt()); + // } // end of dielectron-photon pair loop + // } + + // if (collision.hasPCMEtaDalitz()) { + // registry.fill(HIST("hEventCounter"), 7); + // if (collision.sel8() && abs(collision.posZ()) < 10.f) { + // registry.fill(HIST("hEventCounter"), 8); + // } + // for (auto& dielectron : dielectrons_coll) { + // registry.fill(HIST("PCM_EtaDalitz/hMeePt"), dielectron.mass(), dielectron.pt()); + // } + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + // registry.fill(HIST("PCM_EtaDalitz/hMeegPt"), v12.M(), v12.Pt()); + // } // end of dielectron-photon pair loop + // } + + // if (collision.hasPCMEtaGG()) { + // registry.fill(HIST("hEventCounter"), 9); + // if (collision.sel8() && abs(collision.posZ()) < 10.f) { + // registry.fill(HIST("hEventCounter"), 10); + // } + // for (auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(v0photons_coll, v0photons_coll))) { + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + // registry.fill(HIST("PCM_EtaGG/hMggPt"), v12.M(), v12.Pt()); + // } // end of dielectron-photon pair loop + // } + + // if (collision.hasPCMandEE()) { + // registry.fill(HIST("hEventCounter"), 11); + // if (collision.sel8() && abs(collision.posZ()) < 10.f) { + // registry.fill(HIST("hEventCounter"), 12); + // } + + // for (auto& dielectron : dielectrons_coll) { + // registry.fill(HIST("PCM_EE/hMeePt"), dielectron.mass(), dielectron.pt()); + // } + // for (auto& [g1, g2] : combinations(CombinationsFullIndexPolicy(v0photons_coll, dielectrons_coll))) { + // ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); + // ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), g2.mass()); + // ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; + // registry.fill(HIST("PCM_EE/hMeegPt"), v12.M(), v12.Pt()); + // } // end of dielectron-photon pair loop + // } } // end of collision loop } diff --git a/EventFiltering/filterTables.h b/EventFiltering/filterTables.h index 476b94f2133..1dfd08cc23f 100644 --- a/EventFiltering/filterTables.h +++ b/EventFiltering/filterTables.h @@ -105,15 +105,15 @@ DECLARE_SOA_COLUMN(HighFt0cFv0Flat, hasHighFt0cFv0Flat, bool); //! isotropic eve DECLARE_SOA_COLUMN(LeadingPtTrack, hasLeadingPtTrack, bool); //! event contains leading track // photons -DECLARE_SOA_COLUMN(PHOSPhoton, hasPHOSPhoton, bool); //! PHOS single photons -DECLARE_SOA_COLUMN(PHOSElectron, hasPHOSElectron, bool); //! PHOS single electron -DECLARE_SOA_COLUMN(PHOSPair, hasPHOSpair, bool); //! PHOS photon pair -DECLARE_SOA_COLUMN(PHOSnbar, hasPHOSnbar, bool); //! PHOS antineutrons +DECLARE_SOA_COLUMN(PHOSPhoton, hasPHOSPhoton, bool); //! PHOS single photons +DECLARE_SOA_COLUMN(PHOSnbar, hasPHOSnbar, bool); //! PHOS antineutrons +// DECLARE_SOA_COLUMN(PHOSElectron, hasPHOSElectron, bool); //! PHOS single electron +// DECLARE_SOA_COLUMN(PHOSPair, hasPHOSpair, bool); //! PHOS photon pair DECLARE_SOA_COLUMN(PCMHighPtPhoton, hasPCMHighPtPhoton, bool); //! PCM high pT photon -DECLARE_SOA_COLUMN(PCMMatCalib, hasPCMMatCalib, bool); //! PCM material budget calibration -DECLARE_SOA_COLUMN(PCMEtaDalitz, hasPCMEtaDalitz, bool); //! PCM eta -> ee gamma -DECLARE_SOA_COLUMN(PCMEtaGG, hasPCMEtaGG, bool); //! PCM eta -> ee gamma -DECLARE_SOA_COLUMN(PCMandEE, hasPCMandEE, bool); //! PCM and ee +// DECLARE_SOA_COLUMN(PCMMatCalib, hasPCMMatCalib, bool); //! PCM material budget calibration +// DECLARE_SOA_COLUMN(PCMEtaDalitz, hasPCMEtaDalitz, bool); //! PCM eta -> ee gamma +// DECLARE_SOA_COLUMN(PCMEtaGG, hasPCMEtaGG, bool); //! PCM eta -> ee gamma +// DECLARE_SOA_COLUMN(PCMandEE, hasPCMandEE, bool); //! PCM and ee } // namespace filtering namespace decision @@ -196,7 +196,7 @@ using MultFilter = MultFilters::iterator; // photons DECLARE_SOA_TABLE(PhotonFilters, "AOD", "PhotonFilters", //! - filtering::PHOSPhoton, filtering::PHOSElectron, filtering::PHOSPair, filtering::PHOSnbar, filtering::PCMHighPtPhoton, filtering::PCMMatCalib, filtering::PCMEtaDalitz, filtering::PCMEtaGG, filtering::PCMandEE); + filtering::PHOSPhoton, filtering::PHOSnbar, filtering::PCMHighPtPhoton); using PhotonFilter = PhotonFilters::iterator; diff --git a/PWGEM/Tasks/phosTrigQA.cxx b/PWGEM/Tasks/phosTrigQA.cxx index e9645351976..b0b0949cfb5 100644 --- a/PWGEM/Tasks/phosTrigQA.cxx +++ b/PWGEM/Tasks/phosTrigQA.cxx @@ -372,18 +372,18 @@ struct phosTrigQA { mHistManager.fill(HIST("elSpTr"), clu.e(), 6.5); } } - if (clu.collision_as().hasPHOSElectron()) { - mHistManager.fill(HIST("cluSpTr"), clu.e(), 7.5); - if (clu.trackdist() < 2.) { // 2: Distance to CPV cluster in sigmas - mHistManager.fill(HIST("elSpTr"), clu.e(), 7.5); - } - } - if (clu.collision_as().hasPHOSpair()) { - mHistManager.fill(HIST("cluSpTr"), clu.e(), 8.5); - if (clu.trackdist() < 2.) { // 2: Distance to CPV cluster in sigmas - mHistManager.fill(HIST("elSpTr"), clu.e(), 8.5); - } - } + // if (clu.collision_as().hasPHOSElectron()) { + // mHistManager.fill(HIST("cluSpTr"), clu.e(), 7.5); + // if (clu.trackdist() < 2.) { // 2: Distance to CPV cluster in sigmas + // mHistManager.fill(HIST("elSpTr"), clu.e(), 7.5); + // } + // } + // if (clu.collision_as().hasPHOSpair()) { + // mHistManager.fill(HIST("cluSpTr"), clu.e(), 8.5); + // if (clu.trackdist() < 2.) { // 2: Distance to CPV cluster in sigmas + // mHistManager.fill(HIST("elSpTr"), clu.e(), 8.5); + // } + // } if (clu.collision_as().hasPHOSnbar()) { mHistManager.fill(HIST("cluSpTr"), clu.e(), 9.5); if (clu.trackdist() < 2.) { // 2: Distance to CPV cluster in sigmas @@ -503,12 +503,12 @@ struct phosTrigQA { if (clu1.collision_as().hasPHOSPhoton()) { selections |= 1 << 6; } - if (clu1.collision_as().hasPHOSElectron()) { - selections |= 1 << 7; - } - if (clu1.collision_as().hasPHOSpair()) { - selections |= 1 << 8; - } + // if (clu1.collision_as().hasPHOSElectron()) { + // selections |= 1 << 7; + // } + // if (clu1.collision_as().hasPHOSpair()) { + // selections |= 1 << 8; + // } if (clu1.collision_as().hasPHOSnbar()) { selections |= 1 << 9; }