From 4b3d7f3785d6147376b8e54fe96dff75bc525ffe Mon Sep 17 00:00:00 2001 From: Aimeric Landou Date: Tue, 25 Nov 2025 10:51:47 +0000 Subject: [PATCH] [PWGJE] jetSpectraCharged: jetEventWeight -> collisionWeight --- PWGJE/Tasks/jetSpectraCharged.cxx | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/PWGJE/Tasks/jetSpectraCharged.cxx b/PWGJE/Tasks/jetSpectraCharged.cxx index 422fbb987af..47494e9ee1b 100644 --- a/PWGJE/Tasks/jetSpectraCharged.cxx +++ b/PWGJE/Tasks/jetSpectraCharged.cxx @@ -937,8 +937,7 @@ struct JetSpectraCharged { if (!isAcceptedJet(jet)) { continue; } - float jetweight = jet.eventWeight(); - fillJetAreaSubHistograms(jet, centrality, collision.rho(), jetweight); + fillJetAreaSubHistograms(jet, centrality, collision.rho(), eventWeight); } } PROCESS_SWITCH(JetSpectraCharged, processSpectraAreaSubMCDWeighted, "jet spectra with rho-area subtraction for MCD", false); @@ -1091,6 +1090,7 @@ struct JetSpectraCharged { } } + float eventWeight = mccollision.weight(); for (auto const& jet : jets) { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { continue; @@ -1098,38 +1098,37 @@ struct JetSpectraCharged { if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { continue; } - float jetweight = jet.eventWeight(); - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 1.0, jetweight); // INEL + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 1.0, eventWeight); // INEL if (!passesZvtxCut) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 2.0, jetweight); // zvtx + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 2.0, eventWeight); // zvtx if (!hasRecoColl) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 3.0, jetweight); // noRecoColl + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 3.0, eventWeight); // noRecoColl if (!passesSplitCollCut) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 4.0, jetweight); // splitColl + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 4.0, eventWeight); // splitColl if (!hasSel8Coll) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 5.0, jetweight); // recoEvtSel + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 5.0, eventWeight); // recoEvtSel if (!centralityIsGood) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 6.0, jetweight); // centralitycut + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 6.0, eventWeight); // centralitycut if (!occupancyIsGood) { continue; } - registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 7.0, jetweight); // occupancycut + registry.fill(HIST("h2_jet_pt_part_eventselection"), jet.pt(), 7.0, eventWeight); // occupancycut } } PROCESS_SWITCH(JetSpectraCharged, processCrossSectionEfficiencyWeighted, "jet spectra QC for MC particle level with step-by-step cuts (weighted)", false); @@ -1179,15 +1178,14 @@ struct JetSpectraCharged { if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { continue; } - float jetweight = jet.eventWeight(); - double pTHat = 10. / (std::pow(jetweight, 1.0 / pTHatExponent)); + double pTHat = 10. / (std::pow(eventWeight, 1.0 / pTHatExponent)); int Nmax = 21; for (int N = 1; N < Nmax; N++) { if (jet.pt() < N * 0.25 * pTHat && jet.r() == round(selectedJetsRadius * 100.0f)) { - registry.fill(HIST("h2_jet_ptcut_part"), jet.pt(), N * 0.25, jetweight); + registry.fill(HIST("h2_jet_ptcut_part"), jet.pt(), N * 0.25, eventWeight); } } - fillMCPHistograms(jet, jetweight); + fillMCPHistograms(jet, eventWeight); } } PROCESS_SWITCH(JetSpectraCharged, processSpectraMCPWeighted, "jet spectra for MC particle level weighted", false); @@ -1214,8 +1212,7 @@ struct JetSpectraCharged { if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { continue; } - float jetweight = jet.eventWeight(); - fillMCPAreaSubHistograms(jet, mccollision.rho(), jetweight); + fillMCPAreaSubHistograms(jet, mccollision.rho(), eventWeight); } } PROCESS_SWITCH(JetSpectraCharged, processSpectraAreaSubMCPWeighted, "jet spectra with area-based subtraction for MC particle level", false); @@ -1300,7 +1297,7 @@ struct JetSpectraCharged { if (!isAcceptedJet(mcdjet)) { continue; } - fillMatchedHistograms(mcdjet, mcdjet.eventWeight()); + fillMatchedHistograms(mcdjet, eventWeight); } } PROCESS_SWITCH(JetSpectraCharged, processJetsMatchedWeighted, "matched mcp and mcd jets with weighted events", false);