Skip to content

Commit 8326ddd

Browse files
authored
Improving the performance of the bkg estimators (#13796)
1 parent ffd89db commit 8326ddd

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ struct eventWiseConstituentSubtractorTask {
8080
Configurable<float> rMax{"rMax", 0.24, "maximum distance of subtraction"};
8181
Configurable<float> eventEtaMax{"eventEtaMax", 0.9, "maximum pseudorapidity of event"};
8282
Configurable<bool> doRhoMassSub{"doRhoMassSub", true, "perfom mass subtraction as well"};
83+
Configurable<double> ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"};
84+
Configurable<int> ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"};
85+
Configurable<double> ghostArea{"ghostArea", 0.005, "Area per ghost"};
86+
Configurable<double> ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"};
87+
Configurable<double> ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"};
88+
Configurable<double> ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"};
8389

8490
JetBkgSubUtils eventWiseConstituentSubtractor;
8591
std::vector<fastjet::PseudoJet> inputParticles;
@@ -98,6 +104,9 @@ struct eventWiseConstituentSubtractorTask {
98104
eventWiseConstituentSubtractor.setDoRhoMassSub(doRhoMassSub);
99105
eventWiseConstituentSubtractor.setConstSubAlphaRMax(alpha, rMax);
100106
eventWiseConstituentSubtractor.setMaxEtaEvent(eventEtaMax);
107+
fastjet::GhostedAreaSpec ghostAreaSpec(ghostRapMax, ghostRepeat, ghostArea,
108+
ghostGridScatter, ghostKtScatter, ghostMeanPt);
109+
eventWiseConstituentSubtractor.setGhostAreaSpec(ghostAreaSpec);
101110

102111
if (applyTrackingEfficiency) {
103112
if (trackingEfficiencyPtBinning->size() < 2) {

PWGJE/TableProducer/rhoEstimator.cxx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ struct RhoEstimatorTask {
8686
Configurable<float> bkgjetR{"bkgjetR", 0.2, "jet resolution parameter for determining background density"};
8787
Configurable<float> bkgEtaMin{"bkgEtaMin", -0.7, "minimim pseudorapidity for determining background density"};
8888
Configurable<float> bkgEtaMax{"bkgEtaMax", 0.7, "maximum pseudorapidity for determining background density"};
89-
Configurable<float> bkgPhiMin{"bkgPhiMin", -99., "minimim phi for determining background density"};
90-
Configurable<float> bkgPhiMax{"bkgPhiMax", 99., "maximum phi for determining background density"};
89+
Configurable<float> bkgPhiMin{"bkgPhiMin", -6.283, "minimim phi for determining background density"};
90+
Configurable<float> bkgPhiMax{"bkgPhiMax", 6.283, "maximum phi for determining background density"};
9191
Configurable<bool> doSparse{"doSparse", false, "perfom sparse estimation"};
92+
Configurable<double> ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"};
93+
Configurable<int> ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"};
94+
Configurable<double> ghostArea{"ghostArea", 0.005, "Area per ghost"};
95+
Configurable<double> ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"};
96+
Configurable<double> ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"};
97+
Configurable<double> ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"};
9298

9399
Configurable<float> thresholdTriggerTrackPtMin{"thresholdTriggerTrackPtMin", 0.0, "Minimum trigger track pt to accept event"};
94100
Configurable<float> thresholdClusterEnergyMin{"thresholdClusterEnergyMin", 0.0, "Minimum cluster energy to accept event"};
@@ -134,6 +140,11 @@ struct RhoEstimatorTask {
134140
bkgPhiMin_ = -2.0 * M_PI;
135141
}
136142
bkgSub.setPhiMinMax(bkgPhiMin_, bkgPhiMax_);
143+
144+
fastjet::GhostedAreaSpec ghostAreaSpec(config.ghostRapMax, config.ghostRepeat, config.ghostArea,
145+
config.ghostGridScatter, config.ghostKtScatter, config.ghostMeanPt);
146+
bkgSub.setGhostAreaSpec(ghostAreaSpec);
147+
137148
eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(config.eventSelections));
138149
triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(config.triggerMasks);
139150

PWGJE/Tasks/jetTutorial.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ struct JetTutorialTask {
215215

216216
using JetMCPTable = soa::Filtered<soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetConstituents, aod::ChargedMCParticleLevelJetsMatchedToChargedMCDetectorLevelJets>>;
217217
void processMCMatchedCharged(soa::Filtered<aod::JetCollisionsMCD>::iterator const& collision,
218+
aod::JetMcCollisions const&,
218219
soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents, aod::ChargedMCDetectorLevelJetsMatchedToChargedMCParticleLevelJets>> const& mcdjets,
219220
JetMCPTable const&,
220221
aod::JetTracks const&,
@@ -226,8 +227,8 @@ struct JetTutorialTask {
226227
for (const auto& mcdjet : mcdjets) {
227228
for (auto& mcpjet : mcdjet.template matchedJetGeo_as<JetMCPTable>()) {
228229
registry.fill(HIST("h_matched_jets_pt"), mcpjet.pt(), mcdjet.pt(), collision.mcCollision().weight());
229-
registry.fill(HIST("h_matched_jets_pt"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight());
230-
registry.fill(HIST("h_matched_jets_pt"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight());
230+
registry.fill(HIST("h_matched_jets_phi"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight());
231+
registry.fill(HIST("h_matched_jets_eta"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight());
231232
}
232233
}
233234
}

0 commit comments

Comments
 (0)