Skip to content

Commit 4510ff5

Browse files
authored
[PWGJE] fix tracks hist and add fill MCP weighted events (#10743)
1 parent efa6651 commit 4510ff5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

PWGJE/Tasks/jetSpectraCharged.cxx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ struct JetSpectraCharged {
8484
Configurable<int> acceptSplitCollisions{"acceptSplitCollisions", 0, "0: only look at mcCollisions that are not split; 1: accept split mcCollisions, 2: accept split mcCollisions but only look at the first reco collision associated with it"};
8585
Configurable<bool> skipMBGapEvents{"skipMBGapEvents", false, "flag to choose to reject min. bias gap events; jet-level rejection can also be applied at the jet finder level for jets only, here rejection is applied for collision and track process functions for the first time, and on jets in case it was set to false at the jet finder level"};
8686
Configurable<bool> checkLeadConstituentPtForMcpJets{"checkLeadConstituentPtForMcpJets", false, "flag to choose whether particle level jets should have their lead track pt above leadingConstituentPtMin to be accepted; off by default, as leadingConstituentPtMin cut is only applied on MCD jets for the Pb-Pb analysis using pp MC anchored to Pb-Pb for the response matrix"};
87-
Configurable<bool> checkMcdEtaForMatchedJets{"checkMcdEtaForMatchedJets", false, "flag to choose whether matched jets should have the eta of the mcd jet within acceptance; off by default, as it sould not be checked for mcd jets for efficiency and response matrix: https://alice-notes.web.cern.ch/system/files/notes/analysis/34/2013-Sep-19-analysis_note-AnalysisNoteChargedJets.pdf"};
8887

8988
std::vector<int> eventSelectionBits;
9089
int trackSelection = -1;
@@ -165,6 +164,13 @@ struct JetSpectraCharged {
165164
registry.add("h2_jet_pt_part_track_pt_part", "part jet #it{p}_{T,jet} vs. #it{p}_{T,track}; #it{p}_{T,jet}^{part} (GeV/#it{c}); #it{p}_{T,track}^{part} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxisRhoAreaSub, trackPtAxis}});
166165
registry.add("h3_jet_pt_jet_eta_jet_phi_part", "part jet pt vs. eta vs. phi", {HistType::kTH3F, {jetPtAxis, jetEtaAxis, phiAxis}});
167166
if (doprocessSpectraMCPWeighted) {
167+
registry.add("h_mcColl_counts_weight", " number of weighted mc events; event status; entries", {HistType::kTH1F, {{10, 0, 10}}});
168+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(1, "allMcColl");
169+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(2, "vertexZ");
170+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(3, "noRecoColl");
171+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(4, "recoEvtSel");
172+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(5, "centralitycut");
173+
registry.get<TH1>(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(6, "occupancycut");
168174
registry.add("h2_jet_ptcut_part", "p_{T} cut;p_{T,jet}^{part} (GeV/#it{c});N;entries", {HistType::kTH2F, {{300, 0, 300}, {20, 0, 5}}});
169175
registry.add("h_jet_phat_part_weighted", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}});
170176
}
@@ -515,7 +521,7 @@ struct JetSpectraCharged {
515521
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
516522
continue;
517523
}
518-
fillTrackHistograms(track, collision.centrality());
524+
fillTrackHistograms(track);
519525
}
520526
}
521527
PROCESS_SWITCH(JetSpectraCharged, processQC, "collisions and track QC for Data and MCD", false);
@@ -831,16 +837,20 @@ struct JetSpectraCharged {
831837
aod::JetParticles const&)
832838
{
833839
bool mcLevelIsParticleLevel = true;
840+
float eventWeight = mccollision.weight();
834841

835842
registry.fill(HIST("h_mcColl_counts"), 0.5);
843+
registry.fill(HIST("h_mcColl_counts_weight"), 0.5, eventWeight);
836844
if (std::abs(mccollision.posZ()) > vertexZCut) {
837845
return;
838846
}
839847
registry.fill(HIST("h_mcColl_counts"), 1.5);
848+
registry.fill(HIST("h_mcColl_counts_weight"), 1.5, eventWeight);
840849
if (collisions.size() < 1) {
841850
return;
842851
}
843852
registry.fill(HIST("h_mcColl_counts"), 2.5);
853+
registry.fill(HIST("h_mcColl_counts_weight"), 2.5, eventWeight);
844854

845855
bool hasSel8Coll = false;
846856
for (auto const& collision : collisions) {
@@ -852,7 +862,7 @@ struct JetSpectraCharged {
852862
return;
853863
}
854864
registry.fill(HIST("h_mcColl_counts"), 3.5);
855-
registry.fill(HIST("h_mc_zvertex"), mccollision.posZ());
865+
registry.fill(HIST("h_mcColl_counts_weight"), 3.5, eventWeight);
856866

857867
for (auto const& jet : jets) {
858868
if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {

0 commit comments

Comments
 (0)