Skip to content

Commit 072ef15

Browse files
authored
[PWGJE] add centrality selection for response matrix (#9509)
1 parent 4ede1a5 commit 072ef15

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

PWGJE/Tasks/jetSpectraCharged.cxx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct JetSpectraCharged {
101101
if (doprocessQC || doprocessQCWeighted) {
102102
registry.add("h_collisions", "event status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}});
103103
registry.add("h2_centrality_occupancy", "centrality vs occupancy; centrality; occupancy", {HistType::kTH2F, {centralityAxis, {60, 0, 30000}}});
104-
registry.add("h_collisions_vertexZ", "position of collision ;#it{Z} (cm)", {HistType::kTH1F, {{300, -15.0, 15.0}}});
104+
registry.add("h_collisions_Zvertex", "position of collision ;#it{Z} (cm)", {HistType::kTH1F, {{300, -15.0, 15.0}}});
105105
registry.add("h_track_pt", "track pT ; #it{p}_{T,track} (GeV/#it{c})", {HistType::kTH1F, {trackPtAxis}});
106106
registry.add("h2_track_eta_track_phi", "track eta vs. track phi; #eta; #phi; counts", {HistType::kTH2F, {trackEtaAxis, phiAxis}});
107107
if (doprocessQCWeighted) {
@@ -144,7 +144,7 @@ struct JetSpectraCharged {
144144
registry.add("hsparse_mcp_jet_corr_pt_eta_phi", "mcp jet_corr_pt_eta_phi", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, jetEtaAxis, phiAxis});
145145
}
146146
if (doprocessSpectraMCPWeighted) {
147-
registry.add("h_mcp_jet_ptcut_part", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}});
147+
registry.add("h2_mcp_jet_ptcut_part", "p_{T} cut;p_{T,jet}^{part} (GeV/#it{c});N;entries", {HistType::kTH2F, {{300, 0, 300}, {20, 0, 5}}});
148148
registry.add("h_mcp_jet_phat_weighted", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}});
149149
}
150150
}
@@ -185,8 +185,8 @@ struct JetSpectraCharged {
185185
}
186186

187187
if (doprocessJetsMatchedSubtracted) {
188-
registry.add("h_mc_collisions_matched", "mc collisions status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}});
189-
registry.add("h_mcd_events_matched", "mcd event status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}});
188+
registry.add("h_mc_collisions_matched", "mc collisions status;event status;entries", {HistType::kTH1F, {{5, 0.0, 5.0}}});
189+
registry.add("h_mcd_events_matched", "mcd event status;event status;entries", {HistType::kTH1F, {{5, 0.0, 5.0}}});
190190
registry.add("h_mc_rho_matched", "mc collision rho;#rho (GeV/#it{c}); counts", {HistType::kTH1F, {{500, -100.0, 500.0}}});
191191
registry.add("h2_reco_jet_corr_pt_gen_jet_corr_pt_matchedgeo", "corr pT reco vs. corr cpT gen;#it{p}_{T,jet}^{reco} (GeV/#it{c});#it{p}_{T,jet}^{gen} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub}});
192192
registry.add("h2_gen_jet_corr_pt_jet_pt_diff_corr_matchedgeo", "jet gen corr pT vs. corr delta pT / jet gen corr pt;#it{p}_{T,jet}^{gen} (GeV/#it{c}); (#it{p}_{T,jet}^{gen} (GeV/#it{c}) - #it{p}_{T,jet}^{reco} (GeV/#it{c})) / #it{p}_{T,jet}^{gen} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {1000, -5.0, 5.0}}});
@@ -409,7 +409,7 @@ struct JetSpectraCharged {
409409
}
410410
registry.fill(HIST("h_collisions"), 2.5);
411411
registry.fill(HIST("h2_centrality_occupancy"), collision.centrality(), collision.trackOccupancyInTimeRange());
412-
registry.fill(HIST("h_collisions_vertexZ"), collision.posZ());
412+
registry.fill(HIST("h_collisions_Zvertex"), collision.posZ());
413413

414414
for (auto const& track : tracks) {
415415
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
@@ -437,7 +437,7 @@ struct JetSpectraCharged {
437437
}
438438
registry.fill(HIST("h_collisions"), 2.5);
439439
registry.fill(HIST("h_collisions_weighted"), 2.5, eventWeight);
440-
registry.fill(HIST("h_collisions_vertexZ"), collision.posZ(), eventWeight);
440+
registry.fill(HIST("h_collisions_Zvertex"), collision.posZ(), eventWeight);
441441

442442
for (auto const& track : tracks) {
443443
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
@@ -529,7 +529,9 @@ struct JetSpectraCharged {
529529
return;
530530
}
531531
registry.fill(HIST("h_mc_zvertex"), mccollision.posZ());
532-
registry.fill(HIST("h_mcp_rho"), mccollision.rho());
532+
if (doMCPJetSubtraction) {
533+
registry.fill(HIST("h_mcp_rho"), mccollision.rho());
534+
}
533535
for (auto const& jet : jets) {
534536
if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
535537
continue;
@@ -553,7 +555,7 @@ struct JetSpectraCharged {
553555
if (!(std::abs(mccollision.posZ()) < vertexZCut)) {
554556
return;
555557
}
556-
registry.fill(HIST("h_mc_vertexZ"), mccollision.posZ());
558+
registry.fill(HIST("h_mc_zvertex"), mccollision.posZ());
557559
for (auto const& jet : jets) {
558560
if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
559561
continue;
@@ -565,7 +567,7 @@ struct JetSpectraCharged {
565567
double pTHat = 10. / (std::pow(jetweight, 1.0 / pTHatExponent));
566568
for (int N = 1; N < 21; N++) {
567569
if (jet.pt() < N * 0.25 * pTHat && jet.r() == round(selectedJetsRadius * 100.0f)) {
568-
registry.fill(HIST("h_jet_ptcut_part"), jet.pt(), N * 0.25, jetweight);
570+
registry.fill(HIST("h2_mcp_jet_ptcut_part"), jet.pt(), N * 0.25, jetweight);
569571
}
570572
}
571573
registry.fill(HIST("h_mcp_jet_phat_weighted"), pTHat, jetweight);
@@ -688,10 +690,14 @@ struct JetSpectraCharged {
688690
continue;
689691
}
690692
registry.fill(HIST("h_mcd_events_matched"), 1.5);
693+
if (collision.centrality() < centralityMin || collision.centrality() > centralityMax) {
694+
continue;
695+
}
696+
registry.fill(HIST("h_mcd_events_matched"), 2.5);
691697
if (collision.trackOccupancyInTimeRange() < trackOccupancyInTimeRangeMin || trackOccupancyInTimeRangeMax < collision.trackOccupancyInTimeRange()) {
692698
return;
693699
}
694-
registry.fill(HIST("h_mcd_events_matched"), 2.5);
700+
registry.fill(HIST("h_mcd_events_matched"), 3.5);
695701

696702
auto collmcdjets = mcdjets.sliceBy(mcdjetsPerJCollision, collision.globalIndex());
697703
for (const auto& mcdjet : collmcdjets) {

0 commit comments

Comments
 (0)