From ba2925800bc0cbbc653cad729eb50893f80f71bc Mon Sep 17 00:00:00 2001 From: nzardosh Date: Wed, 12 Nov 2025 11:29:21 +0100 Subject: [PATCH 1/3] fixing bug in JE tutorial --- PWGJE/Tasks/jetTutorial.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PWGJE/Tasks/jetTutorial.cxx b/PWGJE/Tasks/jetTutorial.cxx index 42f3153dc65..0faec07c1f4 100644 --- a/PWGJE/Tasks/jetTutorial.cxx +++ b/PWGJE/Tasks/jetTutorial.cxx @@ -215,6 +215,7 @@ struct JetTutorialTask { using JetMCPTable = soa::Filtered>; void processMCMatchedCharged(soa::Filtered::iterator const& collision, + aod::JetMcCollisions const&, soa::Filtered> const& mcdjets, JetMCPTable const&, aod::JetTracks const&, @@ -226,8 +227,8 @@ struct JetTutorialTask { for (const auto& mcdjet : mcdjets) { for (auto& mcpjet : mcdjet.template matchedJetGeo_as()) { registry.fill(HIST("h_matched_jets_pt"), mcpjet.pt(), mcdjet.pt(), collision.mcCollision().weight()); - registry.fill(HIST("h_matched_jets_pt"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight()); - registry.fill(HIST("h_matched_jets_pt"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight()); + registry.fill(HIST("h_matched_jets_phi"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight()); + registry.fill(HIST("h_matched_jets_eta"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight()); } } } From 9fe8fd4ae8e33b2f5ea404d44a836c0255bb43bd Mon Sep 17 00:00:00 2001 From: nzardosh Date: Wed, 12 Nov 2025 11:55:00 +0100 Subject: [PATCH 2/3] reducing the CPU consumption of bkg subtraction --- .../eventwiseConstituentSubtractor.cxx | 9 +++++++++ PWGJE/TableProducer/rhoEstimator.cxx | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx index 53b6818cfcc..c7dc5e33bff 100644 --- a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx +++ b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx @@ -80,6 +80,12 @@ struct eventWiseConstituentSubtractorTask { Configurable rMax{"rMax", 0.24, "maximum distance of subtraction"}; Configurable eventEtaMax{"eventEtaMax", 0.9, "maximum pseudorapidity of event"}; Configurable doRhoMassSub{"doRhoMassSub", true, "perfom mass subtraction as well"}; + Configurable ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"}; + Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; + Configurable ghostArea{"ghostArea", 0.005, "Area per ghost"}; + Configurable ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"}; + Configurable ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"}; + Configurable ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"}; JetBkgSubUtils eventWiseConstituentSubtractor; std::vector inputParticles; @@ -98,6 +104,9 @@ struct eventWiseConstituentSubtractorTask { eventWiseConstituentSubtractor.setDoRhoMassSub(doRhoMassSub); eventWiseConstituentSubtractor.setConstSubAlphaRMax(alpha, rMax); eventWiseConstituentSubtractor.setMaxEtaEvent(eventEtaMax); + fastjet::GhostedAreaSpec ghostAreaSpec(ghostRapMax, ghostRepeat, ghostArea, + ghostGridScatter, ghostKtScatter, ghostMeanPt); + eventWiseConstituentSubtractor.setGhostAreaSpec(ghostAreaSpec); if (applyTrackingEfficiency) { if (trackingEfficiencyPtBinning->size() < 2) { diff --git a/PWGJE/TableProducer/rhoEstimator.cxx b/PWGJE/TableProducer/rhoEstimator.cxx index 2ef37a290ed..18420be0ea6 100644 --- a/PWGJE/TableProducer/rhoEstimator.cxx +++ b/PWGJE/TableProducer/rhoEstimator.cxx @@ -86,9 +86,15 @@ struct RhoEstimatorTask { Configurable bkgjetR{"bkgjetR", 0.2, "jet resolution parameter for determining background density"}; Configurable bkgEtaMin{"bkgEtaMin", -0.7, "minimim pseudorapidity for determining background density"}; Configurable bkgEtaMax{"bkgEtaMax", 0.7, "maximum pseudorapidity for determining background density"}; - Configurable bkgPhiMin{"bkgPhiMin", -99., "minimim phi for determining background density"}; - Configurable bkgPhiMax{"bkgPhiMax", 99., "maximum phi for determining background density"}; + Configurable bkgPhiMin{"bkgPhiMin", -6.283, "minimim phi for determining background density"}; + Configurable bkgPhiMax{"bkgPhiMax", 6.283, "maximum phi for determining background density"}; Configurable doSparse{"doSparse", false, "perfom sparse estimation"}; + Configurable ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"}; + Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; + Configurable ghostArea{"ghostArea", 0.005, "Area per ghost"}; + Configurable ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"}; + Configurable ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"}; + Configurable ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"}; Configurable thresholdTriggerTrackPtMin{"thresholdTriggerTrackPtMin", 0.0, "Minimum trigger track pt to accept event"}; Configurable thresholdClusterEnergyMin{"thresholdClusterEnergyMin", 0.0, "Minimum cluster energy to accept event"}; @@ -134,6 +140,11 @@ struct RhoEstimatorTask { bkgPhiMin_ = -2.0 * M_PI; } bkgSub.setPhiMinMax(bkgPhiMin_, bkgPhiMax_); + + fastjet::GhostedAreaSpec ghostAreaSpec(config.ghostRapMax, config.ghostRepeat, config.ghostArea, + config.ghostGridScatter, config.ghostKtScatter, config.ghostMeanPt); + bkgSub.setGhostAreaSpec(ghostAreaSpec); + eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast(config.eventSelections)); triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(config.triggerMasks); From 58d9c2e6c6379b62c77806298e4d565214c4465d Mon Sep 17 00:00:00 2001 From: nzardosh Date: Wed, 12 Nov 2025 11:55:22 +0100 Subject: [PATCH 3/3] fixing clang --- .../TableProducer/eventwiseConstituentSubtractor.cxx | 12 ++++++------ PWGJE/TableProducer/rhoEstimator.cxx | 4 ++-- PWGJE/Tasks/jetTutorial.cxx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx index c7dc5e33bff..2f912c8ae4e 100644 --- a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx +++ b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx @@ -81,11 +81,11 @@ struct eventWiseConstituentSubtractorTask { Configurable eventEtaMax{"eventEtaMax", 0.9, "maximum pseudorapidity of event"}; Configurable doRhoMassSub{"doRhoMassSub", true, "perfom mass subtraction as well"}; Configurable ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"}; - Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; - Configurable ghostArea{"ghostArea", 0.005, "Area per ghost"}; - Configurable ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"}; - Configurable ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"}; - Configurable ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"}; + Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; + Configurable ghostArea{"ghostArea", 0.005, "Area per ghost"}; + Configurable ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"}; + Configurable ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"}; + Configurable ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"}; JetBkgSubUtils eventWiseConstituentSubtractor; std::vector inputParticles; @@ -105,7 +105,7 @@ struct eventWiseConstituentSubtractorTask { eventWiseConstituentSubtractor.setConstSubAlphaRMax(alpha, rMax); eventWiseConstituentSubtractor.setMaxEtaEvent(eventEtaMax); fastjet::GhostedAreaSpec ghostAreaSpec(ghostRapMax, ghostRepeat, ghostArea, - ghostGridScatter, ghostKtScatter, ghostMeanPt); + ghostGridScatter, ghostKtScatter, ghostMeanPt); eventWiseConstituentSubtractor.setGhostAreaSpec(ghostAreaSpec); if (applyTrackingEfficiency) { diff --git a/PWGJE/TableProducer/rhoEstimator.cxx b/PWGJE/TableProducer/rhoEstimator.cxx index 18420be0ea6..d2803ccbe49 100644 --- a/PWGJE/TableProducer/rhoEstimator.cxx +++ b/PWGJE/TableProducer/rhoEstimator.cxx @@ -90,7 +90,7 @@ struct RhoEstimatorTask { Configurable bkgPhiMax{"bkgPhiMax", 6.283, "maximum phi for determining background density"}; Configurable doSparse{"doSparse", false, "perfom sparse estimation"}; Configurable ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"}; - Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; + Configurable ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"}; Configurable ghostArea{"ghostArea", 0.005, "Area per ghost"}; Configurable ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"}; Configurable ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"}; @@ -142,7 +142,7 @@ struct RhoEstimatorTask { bkgSub.setPhiMinMax(bkgPhiMin_, bkgPhiMax_); fastjet::GhostedAreaSpec ghostAreaSpec(config.ghostRapMax, config.ghostRepeat, config.ghostArea, - config.ghostGridScatter, config.ghostKtScatter, config.ghostMeanPt); + config.ghostGridScatter, config.ghostKtScatter, config.ghostMeanPt); bkgSub.setGhostAreaSpec(ghostAreaSpec); eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast(config.eventSelections)); diff --git a/PWGJE/Tasks/jetTutorial.cxx b/PWGJE/Tasks/jetTutorial.cxx index 0faec07c1f4..48742399bf7 100644 --- a/PWGJE/Tasks/jetTutorial.cxx +++ b/PWGJE/Tasks/jetTutorial.cxx @@ -215,7 +215,7 @@ struct JetTutorialTask { using JetMCPTable = soa::Filtered>; void processMCMatchedCharged(soa::Filtered::iterator const& collision, - aod::JetMcCollisions const&, + aod::JetMcCollisions const&, soa::Filtered> const& mcdjets, JetMCPTable const&, aod::JetTracks const&,