From aac994feb0bfea6d0fdc4ed8394403e570960988 Mon Sep 17 00:00:00 2001 From: Gijs van Weelden Date: Thu, 9 Feb 2023 11:33:22 +0100 Subject: [PATCH 1/3] Added gamma trigger --- EventFiltering/PWGJE/fullJetFilter.cxx | 42 ++++++++++++++++++++------ EventFiltering/filterTables.h | 3 +- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/EventFiltering/PWGJE/fullJetFilter.cxx b/EventFiltering/PWGJE/fullJetFilter.cxx index 46f05eaa47c..c74e8c758c2 100644 --- a/EventFiltering/PWGJE/fullJetFilter.cxx +++ b/EventFiltering/PWGJE/fullJetFilter.cxx @@ -43,25 +43,29 @@ using filteredJets = o2::soa::Filtered; struct fullJetFilter { enum { kJetFullHighPt = 0, + kGammaHighPt, kCategories }; Produces tags; OutputObj hProcessedEvents{"hProcessedEvents"}; - OutputObj hEmcClusterPtEta{"hEmcClusterEta"}; - OutputObj hEmcClusterPtPhi{"hEmcClusterPhi"}; + OutputObj hEmcClusterPtEta{"hEmcClusterPtEta"}; + OutputObj hEmcClusterPtPhi{"hEmcClusterPtPhi"}; OutputObj hSelectedClusterPtEta{"hSelectedClusterEta"}; OutputObj hSelectedClusterPtPhi{"hSelectedClusterPhi"}; OutputObj hEmcJetPtEta{"hEmcJetEta"}; OutputObj hEmcJetPtPhi{"hEmcJetPhi"}; OutputObj hSelectedJetPtEta{"hSelectedJetEta"}; OutputObj hSelectedJetPtPhi{"hSelectedJetPhi"}; + OutputObj hSelectedGammaPtEta{"hSelectedGammaEta"}; + OutputObj hSelectedGammaPtPhi{"hSelectedGammaPhi"}; // Configurables Configurable f_jetPtMin{"f_jetPtMin", 0.0, "minimum jet pT cut"}; Configurable f_clusterPtMin{"f_clusterPtMin", 0.0, "minimum cluster pT cut"}; Configurable f_jetR{"f_jetR", 0.2, "jet R to trigger on"}; + Configurable f_gammaPtMin{"f_gammaPtMin", 4.0, "minimum gamma pT cut"}; Configurable mClusterDefinition{"clusterDefinition", "kV3Default", "cluster definition to be selected, e.g. V3Default"}; void init(o2::framework::InitContext&) @@ -85,8 +89,10 @@ struct fullJetFilter { hSelectedClusterPtPhi.setObject(new TH2F("hSelectedClusterPtPhi", "Selected Clusters;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); hEmcJetPtEta.setObject(new TH2F("hEmcJetPtEta", "Emc Jets;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); hEmcJetPtPhi.setObject(new TH2F("hEmcJetPtPhi", "Emc Jets;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); - hSelectedJetPtEta.setObject(new TH2F("hEmcJetPtEta", "Emc Jets;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); - hSelectedJetPtPhi.setObject(new TH2F("hEmcJetPtPhi", "Emc Jets;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedJetPtEta.setObject(new TH2F("hSelectedJetPtEta", "Selected Jets;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); + hSelectedJetPtPhi.setObject(new TH2F("hSelectedJetPtPhi", "Selected Jets;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedGammaPtEta.setObject(new TH2F("hSelectedGammaPtEta", "Selected Gammas;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); + hSelectedGammaPtPhi.setObject(new TH2F("hSelectedGammaPtPhi", "Selected Gammas;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); } // init() // Declare filters @@ -104,9 +110,17 @@ struct fullJetFilter { return false; } - Bool_t isEvtSelected(double const& jetpt, double const& jeteta, double const& jetphi, double const& cluspt, double const& cluseta, double const& clusphi) + Bool_t isEvtSelected(double const& jetpt) { - if (jetpt > f_jetPtMin && cluspt >= f_clusterPtMin) { + if (jetpt > f_jetPtMin) { + return true; + } + return false; + } + + Bool_t isEvtSelectedGamma(double const& gammapt) + { + if (gammapt > f_gammaPtMin) { return true; } return false; @@ -118,10 +132,11 @@ struct fullJetFilter { double maxClusterPt = -1., maxSelectedJetPt = -1.; if (!collision.alias()[kTVXinEMC]) { - tags(keepEvent[0]); + tags(keepEvent[0], keepEvent[1]); return; // Skip events where EMCAL is not live } + // Store pt of leading jet inside of the emcal to trigger on for (const auto& jet : jets) { hEmcJetPtEta->Fill(jet.pt(), jet.eta()); hEmcJetPtPhi->Fill(jet.pt(), jet.phi()); @@ -140,7 +155,16 @@ struct fullJetFilter { hEmcClusterPtPhi->Fill(clusterPt, cluster.phi()); } - if (isEvtSelected(maxSelectedJetPt, -1, -1, maxClusterPt, -1, -1)) { + if (isEvtSelectedGamma(maxClusterPt)) { + keepEvent[kGammaHighPt] = true; + for (const auto& cluster : clusters) { + double clusterPt = cluster.energy() / std::cosh(cluster.eta()); + hSelectedGammaPtEta->Fill(clusterPt, cluster.eta()); + hSelectedGammaPtPhi->Fill(clusterPt, cluster.phi()); + } + } + + if (isEvtSelected(maxSelectedJetPt)) { keepEvent[kJetFullHighPt] = true; for (const auto& jet : jets) { if (isJetInEmcal(jet)) { @@ -160,7 +184,7 @@ struct fullJetFilter { hProcessedEvents->Fill(iDecision); } } - tags(keepEvent[0]); + tags(keepEvent[0], keepEvent[1]); } // process() }; diff --git a/EventFiltering/filterTables.h b/EventFiltering/filterTables.h index 69c9501087c..86fb3f3cb94 100644 --- a/EventFiltering/filterTables.h +++ b/EventFiltering/filterTables.h @@ -65,6 +65,7 @@ DECLARE_SOA_COLUMN(JetChHighPt, hasJetChHighPt, bool); //! high-pT charged jet // full jets DECLARE_SOA_COLUMN(JetFullHighPt, hasJetFullHighPt, bool); //! high-pT full jet +DECLARE_SOA_COLUMN(GammaHighPt, hasGammaHighPt, bool); //! high-pT photon // strangeness (lf) DECLARE_SOA_COLUMN(Omega, hasOmega, bool); //! at leat 1 Omega @@ -144,7 +145,7 @@ DECLARE_SOA_TABLE(JetFilters, "AOD", "JetFilters", //! using JetFilter = JetFilters::iterator; DECLARE_SOA_TABLE(FullJetFilters, "AOD", "FullJetFilters", //! - filtering::JetFullHighPt); + filtering::JetFullHighPt, filtering::GammaHighPt); using FullJetFilter = FullJetFilters::iterator; From e2e91fb98edff7aaeda6da766a396ae31c065670 Mon Sep 17 00:00:00 2001 From: Gijs van Weelden Date: Thu, 9 Feb 2023 11:34:06 +0100 Subject: [PATCH 2/3] Added gamma, allows qa to only consider jets in EMCAL Added max spectra --- PWGJE/Tasks/FullJetTriggerQATask.cxx | 145 +++++++++++++++++++++++++-- 1 file changed, 139 insertions(+), 6 deletions(-) diff --git a/PWGJE/Tasks/FullJetTriggerQATask.cxx b/PWGJE/Tasks/FullJetTriggerQATask.cxx index 269e06146b1..05c6890e211 100644 --- a/PWGJE/Tasks/FullJetTriggerQATask.cxx +++ b/PWGJE/Tasks/FullJetTriggerQATask.cxx @@ -43,8 +43,12 @@ struct JetTriggerQA { OutputObj hJetRPtEta{"hJetRPtEta"}; OutputObj hJetRPtPhi{"hJetRPtPhi"}; + OutputObj hJetRMaxPtEta{"hJetRMaxPtEta"}; + OutputObj hJetRMaxPtPhi{"hJetRMaxPtPhi"}; OutputObj hClusterPtEta{"hClusterPtEta"}; OutputObj hClusterPtPhi{"hClusterPtPhi"}; + OutputObj hClusterMaxPtEta{"hClusterMaxPtEta"}; + OutputObj hClusterMaxPtPhi{"hClusterMaxPtPhi"}; OutputObj hJetRPtTrackPt{"hJetRPtTrackPt"}; OutputObj hJetRPtClusterPt{"hJetRPtClusterPt"}; OutputObj hJetRPtPtd{"hJetRPtPtd"}; @@ -53,11 +57,16 @@ struct JetTriggerQA { OutputObj hJetRPtZTheta{"hJetRPtZTheta"}; OutputObj hJetRPtZSqTheta{"hJetRPtZSqTheta"}; OutputObj hJetRPtZThetaSq{"hJetRPtZThetaSq"}; + OutputObj hJetRMaxPtClusterMaxPt{"hJetRMaxPtClusterMaxPt"}; OutputObj hSelectedJetRPtEta{"hSelectedJetRPtEta"}; OutputObj hSelectedJetRPtPhi{"hSelectedJetRPtPhi"}; + OutputObj hSelectedJetRMaxPtEta{"hSelectedJetRMaxPtEta"}; + OutputObj hSelectedJetRMaxPtPhi{"hSelectedJetRMaxPtPhi"}; OutputObj hSelectedClusterPtEta{"hSelectedClusterPtEta"}; OutputObj hSelectedClusterPtPhi{"hSelectedClusterPtPhi"}; + OutputObj hSelectedClusterMaxPtEta{"hSelectedClusterMaxPtEta"}; + OutputObj hSelectedClusterMaxPtPhi{"hSelectedClusterMaxPtPhi"}; OutputObj hSelectedJetRPtTrackPt{"hSelectedJetRPtTrackPt"}; OutputObj hSelectedJetRPtClusterPt{"hSelectedJetRPtClusterPt"}; OutputObj hSelectedJetRPtPtd{"hSelectedJetRPtPtd"}; @@ -66,6 +75,12 @@ struct JetTriggerQA { OutputObj hSelectedJetRPtZTheta{"hSelectedJetRPtZTheta"}; OutputObj hSelectedJetRPtZSqTheta{"hSelectedJetRPtZSqTheta"}; OutputObj hSelectedJetRPtZThetaSq{"hSelectedJetRPtZThetaSq"}; + OutputObj hSelectedJetRMaxPtClusterMaxPt{"hJetRMaxPtClusterMaxPt"}; + + OutputObj hSelectedGammaPtEta{"hSelectedGammaPtEta"}; + OutputObj hSelectedGammaPtPhi{"hSelectedGammaPtPhi"}; + OutputObj hSelectedGammaMaxPtEta{"hSelectedGammaMaxPtEta"}; + OutputObj hSelectedGammaMaxPtPhi{"hSelectedGammaMaxPtPhi"}; Configurable f_jetPtMin{"f_jetPtMin", 0.0, "minimum jet pT cut"}; Configurable f_SD_zCut{"f_SD_zCut", 0.1, "soft drop z cut"}; @@ -73,7 +88,7 @@ struct JetTriggerQA { Configurable f_jetR{"f_jetR", 0.4, "jet resolution parameter"}; Configurable> f_ang_kappa{"f_ang_kappa", {1.0, 1.0, 2.0}, "angularity momentum exponent"}; Configurable> f_ang_alpha{"f_ang_alpha", {1.0, 2.0, 1.0}, "angularity angle exponent"}; - Configurable b_DoConstSub{"b_DoConstSub", false, "do constituent subtraction"}; + Configurable b_JetsInEmcalOnly{"b_JetsInEmcalOnly", false, "fill histograms only for jets inside the EMCAL"}; Configurable cfgVertexCut{"cfgVertexCut", 10.0f, "Accepted z-vertex range"}; Configurable mClusterDefinition{"clusterDefinition", "kV3Default", "cluster definition to be selected, e.g. V3Default"}; @@ -101,16 +116,21 @@ struct JetTriggerQA { Float_t kMinR = 0.05; Float_t kMaxR = 0.65; - hProcessedEvents.setObject(new TH1I("hProcessedEvents", "Processed events", 3, -0.5, 2.5)); + hProcessedEvents.setObject(new TH1I("hProcessedEvents", "Processed events", 4, -0.5, 3.5)); hProcessedEvents->GetXaxis()->SetBinLabel(1, "MB"); hProcessedEvents->GetXaxis()->SetBinLabel(2, "EMC"); - hProcessedEvents->GetXaxis()->SetBinLabel(3, "Selected"); + hProcessedEvents->GetXaxis()->SetBinLabel(3, "Selected Jet"); + hProcessedEvents->GetXaxis()->SetBinLabel(4, "Selected Gamma"); // Histograms for events where the EMCAL is live hJetRPtEta.setObject(new TH3F("hJetRPtEta", "Jets #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); hJetRPtPhi.setObject(new TH3F("hJetRPtPhi", "Jets #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); + hJetRMaxPtEta.setObject(new TH3F("hJetRMaxPtEta", "Leading jets #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); + hJetRMaxPtPhi.setObject(new TH3F("hJetRMaxPtPhi", "Leading jets #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); hClusterPtEta.setObject(new TH2F("hClusterPtEta", "Cluster #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); hClusterPtPhi.setObject(new TH2F("hClusterPtPhi", "Cluster #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); + hClusterMaxPtEta.setObject(new TH2F("hClusterMaxPtEta", "Leading clusters #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); + hClusterMaxPtPhi.setObject(new TH2F("hClusterMaxPtPhi", "Leading clusters #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); hJetRPtTrackPt.setObject(new TH3F("hJetRPtTrackPt", "Jets;#it{p}_{T};#it{R};#it{p}_{T}^{track}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); hJetRPtClusterPt.setObject(new TH3F("hJetRPtClusterPt", "Jets;#it{R};#it{p}_{T};#it{p}_{T}^{clus}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); hJetRPtPtd.setObject(new TH3F("hJetRPtPtd", "Jets;#it{R};#it{p}_{T};ptD", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); @@ -119,12 +139,17 @@ struct JetTriggerQA { hJetRPtZTheta.setObject(new TH3F("hJetRPtZTheta", "Jets;#it{R};#it{p}_{T};z#theta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); hJetRPtZSqTheta.setObject(new TH3F("hJetRPtZSqTheta", "Jets;#it{R};#it{p}_{T};z^{2} #theta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); hJetRPtZThetaSq.setObject(new TH3F("hJetRPtZThetaSq", "Jets;#it{R};#it{p}_{T};z #theta^{2}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); + hJetRMaxPtClusterMaxPt.setObject(new TH3F("hJetRMaxPtClusterMaxPt", "Leading jets and clusters;#it{R};#it{p}_{T};#it{p}_{T}^{clus}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); // Histograms for triggered events hSelectedJetRPtEta.setObject(new TH3F("hSelectedJetRPtEta", "Selected jets #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); hSelectedJetRPtPhi.setObject(new TH3F("hSelectedJetRPtPhi", "Selected jets #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedJetRMaxPtEta.setObject(new TH3F("hSelectedJetRMaxPtEta", "Leading selected jets #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nEtaBins, kMinEta, kMaxEta)); + hSelectedJetRMaxPtPhi.setObject(new TH3F("hSelectedJetRMaxPtPhi", "Leading selected jets #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPhiBins, kMinPhi, kMaxPhi)); hSelectedClusterPtEta.setObject(new TH2F("hSelectedClusterPtEta", "Selected Cluster #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); hSelectedClusterPtPhi.setObject(new TH2F("hSelectedClusterPtPhi", "Selected Cluster #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedClusterMaxPtEta.setObject(new TH2F("hSelectedClusterMaxPtEta", "Leading selected clusters #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); + hSelectedClusterMaxPtPhi.setObject(new TH2F("hSelectedClusterMaxPtPhi", "Leading selected clusters #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); hSelectedJetRPtTrackPt.setObject(new TH3F("hSelectedJetRPtTrackPt", "Selected jets;#it{R};#it{p}_{T};#it{p}_{T}^{track}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); hSelectedJetRPtClusterPt.setObject(new TH3F("hSelectedJetRPtClusterPt", "Selected jets;#it{R};#it{p}_{T};#it{p}_{T}^{clus}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); hSelectedJetRPtPtd.setObject(new TH3F("hSelectedJetRPtPtd", "Selected jets;#it{R};#it{p}_{T};ptD", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); @@ -133,6 +158,41 @@ struct JetTriggerQA { hSelectedJetRPtZTheta.setObject(new TH3F("hSelectedJetRPtZTheta", "Selected jets;#it{R};#it{p}_{T};z#theta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); hSelectedJetRPtZSqTheta.setObject(new TH3F("hSelectedJetRPtZSqTheta", "Selected jets;#it{R};#it{p}_{T};z^{2} #theta", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); hSelectedJetRPtZThetaSq.setObject(new TH3F("hSelectedJetRPtZThetaSq", "Selected jets;#it{R};#it{p}_{T};z #theta^{2}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins / 2, 0., 1.)); + hSelectedGammaPtEta.setObject(new TH2F("hSelectedGammaPtEta", "Selected Gamma #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); + hSelectedGammaPtPhi.setObject(new TH2F("hSelectedGammaPtPhi", "Selected Gamma #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedGammaMaxPtEta.setObject(new TH2F("hSelectedGammaMaxPtEta", "Leading selected gammas #it{p}_{T} and #eta;#it{p}_{T};#eta", nPtBins, kMinPt, kMaxPt / 2, nEtaBins, kMinEta, kMaxEta)); + hSelectedGammaMaxPtPhi.setObject(new TH2F("hSelectedGammaMaxPtPhi", "Leading selected gammas #it{p}_{T} and #phi;#it{p}_{T};#phi", nPtBins, kMinPt, kMaxPt / 2, nPhiBins, kMinPhi, kMaxPhi)); + hSelectedJetRMaxPtClusterMaxPt.setObject(new TH3F("hSelectedJetRMaxPtClusterMaxPt", "Leading selected jets and clusters;#it{R};#it{p}_{T};#it{p}_{T}^{clus}", nRBins, kMinR, kMaxR, nPtBins, kMinPt, kMaxPt, nPtBins, kMinPt, kMaxPt / 2)); + + if (b_JetsInEmcalOnly) { + hJetRPtEta->SetTitle("Jets (in emcal only) #it{p}_{T} and #eta;it{R};#it{p}_{T};#eta"); + hJetRPtPhi->SetTitle("Jets (in emcal only) #it{p}_{T} and #phi;it{R};#it{p}_{T};#phi"); + hJetRPtTrackPt->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};#it{p}_{T}^{track}"); + hJetRPtClusterPt->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};#it{p}_{T}^{clus}"); + hJetRPtPtd->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};ptD"); + hJetRPtChargeFrag->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};z"); + hJetRPtNEF->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};NEF"); + hJetRPtZTheta->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};z#theta"); + hJetRPtZSqTheta->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};z^{2} #theta"); + hJetRPtZThetaSq->SetTitle("Jets (in emcal only);it{R};#it{p}_{T};z #theta^{2}"); + hJetRMaxPtEta->SetTitle("Leading jets (in emcal only) #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta"); + hJetRMaxPtPhi->SetTitle("Leading jets (in emcal only) #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi"); + hJetRMaxPtClusterMaxPt->SetTitle("Leading jets (in emcal only) and clusters;#it{R};#it{p}_{T};#it{p}_{T}^{clus}"); + + hSelectedJetRPtEta->SetTitle("Selected jets (in emcal only) #it{p}_{T} and #eta;it{R};#it{p}_{T};#eta"); + hSelectedJetRPtPhi->SetTitle("Selected jets (in emcal only) #it{p}_{T} and #phi;it{R};#it{p}_{T};#phi"); + hSelectedJetRPtTrackPt->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};#it{p}_{T}^{track}"); + hSelectedJetRPtClusterPt->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};#it{p}_{T}^{clus}"); + hSelectedJetRPtPtd->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};ptD"); + hSelectedJetRPtChargeFrag->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};z"); + hSelectedJetRPtNEF->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};NEF"); + hSelectedJetRPtZTheta->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};z#theta"); + hSelectedJetRPtZSqTheta->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};z^{2} #theta"); + hSelectedJetRPtZThetaSq->SetTitle("Selected jets (in emcal only);it{R};#it{p}_{T};z #theta^{2}"); + hSelectedJetRMaxPtEta->SetTitle("Leading selected jets (in emcal only) #it{p}_{T} and #eta;#it{R};#it{p}_{T};#eta"); + hSelectedJetRMaxPtPhi->SetTitle("Leading selected jets (in emcal only) #it{p}_{T} and #phi;#it{R};#it{p}_{T};#phi"); + hSelectedJetRMaxPtClusterMaxPt->SetTitle("Leading selected jets (in emcal only) and clusters;#it{R};#it{p}_{T};#it{p}_{T}^{clus}"); + } } // init o2::aod::EMCALClusterDefinition clusDef = o2::aod::emcalcluster::getClusterDefinitionFromString(mClusterDefinition.value); @@ -148,6 +208,32 @@ struct JetTriggerQA { return dphi; } + Bool_t isJetInEmcal(aod::Jet const& jet) + { + double emcalEtaMin = -0.7, emcalEtaMax = 0.7, emcalPhiMin = 1.40, emcalPhiMax = 3.26; // Phi: 80 - 187 deg + double R = jet.r() * 1e-2; // Jet R is saved as round(100*R) + if ((jet.eta() >= emcalEtaMin + R) && (jet.eta() <= emcalEtaMax - R) && (jet.phi() >= emcalPhiMin + R) && (jet.phi() <= emcalPhiMax - R)) { + return true; + } + return false; + } + + void check_maxJetPt(aod::Jet jet, std::vector& vecMaxJet) + { + for (int i = 0; i < vecMaxJet.size(); i++) { + auto maxJet = vecMaxJet[i]; + if (jet.r() != maxJet.r()) { + continue; + } + if (jet.pt() > maxJet.pt()) { + vecMaxJet[i] = jet; + } + return; + } + // If there is no jet of this radius yet, this is the leading one and we add it to the vector + vecMaxJet.push_back(jet); + } + void process(soa::Join::iterator const& collision, aod::Jets const& jets, aod::JetTrackConstituents const& jetTrackConstituents, @@ -161,18 +247,28 @@ struct JetTriggerQA { } hProcessedEvents->Fill(1); - bool isEvtSelected = false; + bool isEvtSelected = false, isEvtSelectedGamma = false; if (collision.hasJetFullHighPt()) { isEvtSelected = true; - } - if (isEvtSelected) { hProcessedEvents->Fill(2); } + if (collision.hasGammaHighPt()) { + isEvtSelectedGamma = true; + hProcessedEvents->Fill(3); + } + + double maxJetPt = -1., maxClusterPt = -1.; + selectedClusters::iterator maxCluster; + std::vector vecMaxJet; for (const auto& jet : jets) { + if (b_JetsInEmcalOnly && !isJetInEmcal(jet)) { + continue; + } float neutralEnergyFraction = 0., ptD = 0.; float zTheta = 0., zSqTheta = 0., zThetaSq = 0; // Jet angularities (1,1), (1,2), (2,1) double jetPt = jet.pt(), jetR = jet.r() * 1e-2; + check_maxJetPt(jet, vecMaxJet); // Slice JetTrackConstituents table to obtain a list of trackId belonging to this jet only (and the same for clusters) // This gives us access to all jet substructure information @@ -238,13 +334,50 @@ struct JetTriggerQA { for (const auto& cluster : clusters) { double clusterPt = cluster.energy() / std::cosh(cluster.eta()); + if (clusterPt > maxClusterPt) { + maxClusterPt = clusterPt; + maxCluster = cluster; + } hClusterPtEta->Fill(clusterPt, cluster.eta()); hClusterPtPhi->Fill(clusterPt, cluster.phi()); if (isEvtSelected) { hSelectedClusterPtEta->Fill(clusterPt, cluster.eta()); hSelectedClusterPtPhi->Fill(clusterPt, cluster.phi()); } + if (isEvtSelectedGamma) { + hSelectedGammaPtEta->Fill(clusterPt, cluster.eta()); + hSelectedGammaPtPhi->Fill(clusterPt, cluster.phi()); + } } // for clusters + + if (maxClusterPt > 0) { + hClusterMaxPtEta->Fill(maxClusterPt, maxCluster.eta()); + hClusterMaxPtPhi->Fill(maxClusterPt, maxCluster.phi()); + if (isEvtSelected) { + hSelectedClusterMaxPtEta->Fill(maxClusterPt, maxCluster.eta()); + hSelectedClusterMaxPtPhi->Fill(maxClusterPt, maxCluster.phi()); + } + if (isEvtSelectedGamma) { + hSelectedGammaMaxPtEta->Fill(maxClusterPt, maxCluster.eta()); + hSelectedGammaMaxPtPhi->Fill(maxClusterPt, maxCluster.phi()); + } + } + + for (auto maxJet : vecMaxJet) { + double jetR = maxJet.r() * 1e-2, jetPt = maxJet.pt(), jetEta = maxJet.eta(), jetPhi = maxJet.phi(); + hJetRMaxPtEta->Fill(jetR, jetPt, jetEta); + hJetRMaxPtPhi->Fill(jetR, jetPt, jetPhi); + if (isEvtSelected) { + hSelectedJetRMaxPtEta->Fill(jetR, jetPt, jetEta); + hSelectedJetRMaxPtPhi->Fill(jetR, jetPt, jetPhi); + } + if (maxClusterPt > 0) { + hJetRMaxPtClusterMaxPt->Fill(jetR, jetPt, maxClusterPt); + if (isEvtSelected) { + hSelectedJetRMaxPtClusterMaxPt->Fill(jetR, jetPt, maxClusterPt); + } + } // if maxClusterPt + } // for maxJet } // process }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From 956c825b891f6df93713de08f9ad300425fd83a4 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 9 Feb 2023 16:59:31 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- EventFiltering/filterTables.h | 2 +- PWGJE/Tasks/FullJetTriggerQATask.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EventFiltering/filterTables.h b/EventFiltering/filterTables.h index 86fb3f3cb94..42d5d0bb86f 100644 --- a/EventFiltering/filterTables.h +++ b/EventFiltering/filterTables.h @@ -65,7 +65,7 @@ DECLARE_SOA_COLUMN(JetChHighPt, hasJetChHighPt, bool); //! high-pT charged jet // full jets DECLARE_SOA_COLUMN(JetFullHighPt, hasJetFullHighPt, bool); //! high-pT full jet -DECLARE_SOA_COLUMN(GammaHighPt, hasGammaHighPt, bool); //! high-pT photon +DECLARE_SOA_COLUMN(GammaHighPt, hasGammaHighPt, bool); //! high-pT photon // strangeness (lf) DECLARE_SOA_COLUMN(Omega, hasOmega, bool); //! at leat 1 Omega diff --git a/PWGJE/Tasks/FullJetTriggerQATask.cxx b/PWGJE/Tasks/FullJetTriggerQATask.cxx index 05c6890e211..45711e1295e 100644 --- a/PWGJE/Tasks/FullJetTriggerQATask.cxx +++ b/PWGJE/Tasks/FullJetTriggerQATask.cxx @@ -347,7 +347,7 @@ struct JetTriggerQA { if (isEvtSelectedGamma) { hSelectedGammaPtEta->Fill(clusterPt, cluster.eta()); hSelectedGammaPtPhi->Fill(clusterPt, cluster.phi()); - } + } } // for clusters if (maxClusterPt > 0) { @@ -377,7 +377,7 @@ struct JetTriggerQA { hSelectedJetRMaxPtClusterMaxPt->Fill(jetR, jetPt, maxClusterPt); } } // if maxClusterPt - } // for maxJet + } // for maxJet } // process }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)