From af269a6321d59b875ef3a8b63b3ccfbc5b003fee Mon Sep 17 00:00:00 2001 From: yhou-git Date: Tue, 3 Feb 2026 10:48:58 +0100 Subject: [PATCH] Optimize histogram output to reduce ROOT file size --- PWGJE/Tasks/chargedJetHadron.cxx | 650 ++++++++++++++----------------- 1 file changed, 286 insertions(+), 364 deletions(-) diff --git a/PWGJE/Tasks/chargedJetHadron.cxx b/PWGJE/Tasks/chargedJetHadron.cxx index 81db287268e..e938a5d8bff 100644 --- a/PWGJE/Tasks/chargedJetHadron.cxx +++ b/PWGJE/Tasks/chargedJetHadron.cxx @@ -46,7 +46,6 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::constants::math; -const double absPiCut = 1.5; const double assoHadronPtCut = 2.0; static const float kNaN = std::numeric_limits::quiet_NaN(); @@ -59,6 +58,7 @@ struct ChargedJetHadron { Configurable centralityMax{"centralityMax", 100.0, "maximum centrality"}; Configurable leadingjetptMin{"leadingjetptMin", 20.0, "minimum leadingjetpt"}; Configurable subleadingjetptMin{"subleadingjetptMin", 10.0, "minimum subleadingjetpt"}; + Configurable dijetDphiCut{"dijetDphiCut", 0.5, "minimum dijetDphiCut"}; Configurable assoHadronPtMaxCut{"assoHadronPtMaxCut", 10.0, "maximum associate hadron pt cut"}; Configurable etaGapdw{"etaGapdw", 0.5, "dijet eta gap low threshold"}; Configurable etaGapup{"etaGapup", 1.0, "dijet eta gap high threshold"}; @@ -82,7 +82,7 @@ struct ChargedJetHadron { Configurable 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"}; Configurable 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"}; Configurable doDijetRaa{"doDijetRaa", false, "0: all axis fill of thnsparse, 1: partial filling of thnsparse"}; - // + Configurable doEventWeighted{"doEventWeighted", false, "0: weight is 1 for MB Sample, 1: weight from Jet-Jet Sample"}; Configurable cfgCentEstimator{"cfgCentEstimator", 0, "0:FT0C; 1:FT0A; 2:FT0M"}; Configurable numberEventsMixed{"numberEventsMixed", 5, "number of events mixed in ME process"}; ConfigurableAxis binsZVtx{"binsZVtx", {VARIABLE_WIDTH, -10.0f, -2.5f, 2.5f, 10.0f}, "Mixing bins - z-vertex"}; @@ -106,7 +106,6 @@ struct ChargedJetHadron { using FilterMcpCollision = soa::Filtered>::iterator; using FilterMcpCollisions = soa::Filtered>; using FilterJetTracks = soa::Filtered; - using CorrChargedJets = soa::Join; using CorrChargedMCDJets = soa::Join; using CorrChargedMCPJets = soa::Join; @@ -129,8 +128,7 @@ struct ChargedJetHadron { BinningType corrBinning{{binsZVtx, binsCentrality}, true}; BinningTypeMC corrBinningMC{{binsZVtx, binsCentrality}, true}; - ////////////////////////////////////////// - HistogramRegistry registry; + HistogramRegistry registry; // histogram registry std::vector eventSelectionBits; int trackSelection = -1; @@ -155,34 +153,30 @@ struct ChargedJetHadron { AxisSpec centralityAxis = {110, -5., 105., "Centrality"}; AxisSpec trackPtAxis = {200, 0.0, 200.0, "#it{p}_{T} (GeV/#it{c})"}; - AxisSpec etaAxis = {100, -1.0, 1.0, "#eta"}; - AxisSpec phiAxis = {70, -0.5, 6.5, "#varphi"}; + AxisSpec etaAxis = {40, -1.0, 1.0, "#eta"}; + AxisSpec phiAxis = {65, -0.2, 6.3, "#varphi"}; AxisSpec jetPtAxis = {200, 0., 200., "#it{p}_{T} (GeV/#it{c})"}; AxisSpec jetPtAxisRhoAreaSub = {280, -80., 200., "#it{p}_{T} (GeV/#it{c})"}; - AxisSpec jetmultetaAxis = {100, -0.5, 0.5, "#Delta#eta"}; - AxisSpec dphiAxis = {140, -1.7, 5.3, "#Delta#varphi"}; - AxisSpec dphijetAxis = {160, -1.7, 6.3, "#Delta#varphi"}; - AxisSpec detaAxis = {160, -1.6, 1.6, "#Delta#eta"}; - AxisSpec drAxis = {200, 0.0, 5.0, "#Delta#it{R}"}; + AxisSpec jetmultetaAxis = {4, -0.5, 0.5, "#Delta#eta"}; + AxisSpec detaAxis = {64, -1.6, 1.6, "#Delta#eta"}; + AxisSpec dphiAxis = {70, -1.7, 5.3, "#Delta#varphi"}; + AxisSpec drAxis = {60, 0.0, 1.5, "#Delta#it{R}"}; AxisSpec axisBdtScore = {100, 0., 1., "Bdt score"}; if (doprocessCollisionsQCData || doprocessCollisionsQCMCD) { - registry.add("h_collisions", "event status;event status; entries", {HistType::kTH1F, {{5, 0.0, 5.0}}}); + registry.add("h_collisions", "event status;event status; entries", {HistType::kTH1F, {{7, 0.0, 7.0}}}); + registry.add("h_collisions_weighted", "event status;event status;entries", {HistType::kTH1F, {{7, 0.0, 7.0}}}); registry.add("h_fakecollisions", "event status;event status; entries", {HistType::kTH1F, {{4, 0.0, 4.0}}}); registry.add("h2_centrality_occupancy", "centrality vs occupancy; centrality; occupancy", {HistType::kTH2F, {centralityAxis, {60, 0, 30000}}}); registry.add("h_collisions_Zvertex", "position of collision; #it{Z} (cm)", {HistType::kTH1F, {{300, -15.0, 15.0}}}); - registry.add("h_collisions_multFT0", " multiplicity using multFT0; entries", {HistType::kTH1F, {{3000, 0, 10000}}}); - if (doprocessCollisionsQCMCD) { - registry.add("h_collisions_weighted", "event status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}}); - } - registry.add("h_track_pt", "track #it{p}_{T}; #it{p}_{T,track} (GeV/#it{c})", {HistType::kTH1F, {trackPtAxis}}); + registry.add("h_collisions_multFT0", " multiplicity using multFT0; entries", {HistType::kTH1F, {{300, 0, 60000}}}); registry.add("h2_track_eta_track_phi", "track #eta vs. track #phi; #eta; #phi; counts", {HistType::kTH2F, {etaAxis, phiAxis}}); registry.add("h2_track_eta_pt", "track #eta vs. track #it{p}_{T}; #eta; #it{p}_{T,track} (GeV/#it{c}; counts", {HistType::kTH2F, {etaAxis, trackPtAxis}}); registry.add("h2_track_phi_pt", "track #phi vs. track #it{p}_{T}; #phi; #it{p}_{T,track} (GeV/#it{c}; counts", {HistType::kTH2F, {phiAxis, trackPtAxis}}); } - if (doprocessSpectraAreaSubData || doprocessSpectraAreaSubMCD || doprocessSpectraMCDWeighted) { - if (doprocessSpectraMCDWeighted) { + if (doprocessSpectraAreaSubData || doprocessSpectraAreaSubMCD) { + if (doprocessSpectraAreaSubMCD && doEventWeighted) { registry.add("h_jet_phat", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}}); registry.add("h_jet_phat_weighted", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}}); } @@ -191,8 +185,6 @@ struct ChargedJetHadron { registry.add("h_jet_phi", "jet phi; #phi_{jet}; counts", {HistType::kTH1F, {phiAxis}}); registry.add("h_jet_area", "jet Area_{jet}; Area_{jet}; counts", {HistType::kTH1F, {{150, 0., 1.5}}}); registry.add("h_jet_ntracks", "jet N_{jet tracks}; N_{jet, tracks}; counts", {HistType::kTH1F, {{200, -0.5, 199.5}}}); - registry.add("h2_jet_pt_track_pt", "jet #it{p}_{T,jet} vs. #it{p}_{T,track}; #it{p}_{T,jet} (GeV/#it{c}); #it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {jetPtAxis, trackPtAxis}}); - registry.add("h_jet_pt_rhoareasubtracted", "jet pt; #it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); registry.add("h_jet_eta_rhoareasubtracted", "jet eta; #eta_{jet}; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_jet_phi_rhoareasubtracted", "jet phi; #phi_{jet}; counts", {HistType::kTH1F, {phiAxis}}); @@ -203,16 +195,16 @@ struct ChargedJetHadron { //========jet-hadron correlations====================== if (doprocessJetHadron || doprocessMixJetHadron || doprocessJetHadronMCD || doprocessMixJetHadronMCD) { registry.add("h_trigjet_corrpt", "trigger jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("thn_jeth_correlations", "jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, trackPtAxis, detaAxis, dphiAxis, drAxis}); - registry.add("h_jeth_event_stats", "Same event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); - registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(2, "Total jets"); + registry.add("thn_jeth_correlations", "jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxis, trackPtAxis, detaAxis, dphiAxis, drAxis}); + registry.add("h_jeth_event_stats", "Same event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); + registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(1, "Total jets"); + registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(2, "Total jets with pTHat cut"); registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(3, "Total jets with cuts"); registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(4, "Total j-h pairs"); registry.get(HIST("h_jeth_event_stats"))->GetXaxis()->SetBinLabel(5, "Total j-h pairs with accepted"); - registry.add("h_mixtrigjet_corrpt", "trigger jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("thn_mixjeth_correlations", "ME: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, trackPtAxis, detaAxis, dphiAxis, drAxis}); - registry.add("h_mixjeth_event_stats", "Mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); + registry.add("thn_mixjeth_correlations", "ME: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxis, trackPtAxis, detaAxis, dphiAxis, drAxis}); + registry.add("h_mixjeth_event_stats", "Mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); registry.get(HIST("h_mixjeth_event_stats"))->GetXaxis()->SetBinLabel(1, "Total mixed events"); registry.get(HIST("h_mixjeth_event_stats"))->GetXaxis()->SetBinLabel(2, "Total jets"); registry.get(HIST("h_mixjeth_event_stats"))->GetXaxis()->SetBinLabel(3, "Total jets with cuts"); @@ -235,38 +227,32 @@ struct ChargedJetHadron { registry.add("h_d0bar_bdtScoreBkg", "D0bar BDT bkg score", {HistType::kTH1F, {axisBdtScore}}); registry.add("h2_d0jet_detadphi", "D^{0}-jets deta vs dphi; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); } - //========leading jet-hadron correlations====================== if (doprocessLeadingJetHadron || doprocessLeadinJetHadronMCD) { registry.add("h_centrality", "centrality distributions; centrality; counts", {HistType::kTH1F, {centralityAxis}}); registry.add("h_inclusivejet_corrpt", "inclusive jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("h_dijet_pair_counts", "number of pairs with good leading-subleading jets; jet pairs; counts", {HistType::kTH1F, {{10, 0, 10}}}); - registry.add("h_dijet_pair_counts_cut", "number of pairs with leadingjet & subleadingjet cut pair; jet pairs; counts", {HistType::kTH1F, {{10, 0, 10}}}); registry.add("h_leadjet_pt", "leading jet pT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxis}}); registry.add("h_leadjet_corrpt", "leading jet corrpT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); registry.add("h_subleadjet_pt", "subleading jet pT;#it{p}_{T,subleadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxis}}); registry.add("h_subleadjet_corrpt", "subleading jet corrpT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("h_dijet_dphi", "dijet #Delta#varphi before converted to 0-2pi; #Delta#varphi; counts", {HistType::kTH1F, {{126, -6.3, 6.3}}}); registry.add("h_leadjet_eta", "leading jet eta;#eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_leadjet_phi", "leading jet phi;#phi; counts", {HistType::kTH1F, {phiAxis}}); registry.add("h_subleadjet_eta", "subleading jet eta;#eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_subleadjet_phi", "subleading jet phi;#phi; counts", {HistType::kTH1F, {phiAxis}}); registry.add("h2_dijet_detanoflip_dphi", "dijet #Delta#eta no flip vs #Delta#varphi; #Delta#eta_{noflip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); - registry.add("h2_dijet_deta_dphi", "dijet #Delta#eta flip vs #Delta#varphi; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); registry.add("h2_dijet_Asymmetry", "dijet Asymmetry; #it{p}_{T,subleadingjet} (GeV/#it{c}); #it{X}_{J}; counts", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {40, 0, 1.0}}}); - registry.add("h3_dijet_deta_pt", "dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {detaAxis, jetPtAxis, jetPtAxis}}); + registry.add("h3_dijet_deta_pt", "dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #it{p}_{T,jet1} (GeV/#it{c}); #it{p}_{T,jet2} (GeV/#it{c})", {HistType::kTH3F, {{16, 0, 1.6}, jetPtAxis, jetPtAxis}}); + registry.add("h2_dijet_TimeEtaThan0_pt", "dijet #eta_{jet1}#eta_{jet1} > 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); + registry.add("h2_dijet_TimeEtaLess0_pt", "dijet #eta_{jet1}#eta_{jet1} < 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); registry.add("h_jeth_detatot", "jet-hadron tot #Delta#eta;#Delta#eta; counts", {HistType::kTH1F, {detaAxis}}); registry.add("h_jeth_deta", "jet-hadron #Delta#eta;#Delta#eta; counts", {HistType::kTH1F, {detaAxis}}); registry.add("h_jeth_dphi", "jet-hadron #Delta#varphi;#Delta#varphi; counts", {HistType::kTH1F, {dphiAxis}}); - registry.add("h2_jeth_detatot_dphi", "jeth deta vs dphi with physical cuts; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_deta_dphi", "jeth deta vs dphi; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsup_deta_dphi", "jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| > 1.0; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsmd_deta_dphi", "jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| #in (0.5, 1.0); #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsdw_deta_dphi", "jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("h2_jeth_physicalcutsHup_deta_dphi", "jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| > 1.0,#Delta#eta_{jet1}>#Delta#eta_{jet2}; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("h2_jeth_physicalcutsHdw_deta_dphi", "jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5 #Delta#eta_{jet1}> #Delta#eta_{jet2}; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("thn_ljeth_correlations", "leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub, trackPtAxis, jetmultetaAxis, detaAxis, etaAxis, detaAxis, dphiAxis}); + registry.add("thn_ljeth_correlations", "leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxis, jetPtAxis, {10, 0., 10.}, jetmultetaAxis, {16, 0, 1.6}, etaAxis, detaAxis, dphiAxis}); } if (doprocessMixLeadingJetHadron || doprocessMixLeadinJetHadronMCD) { @@ -276,22 +262,20 @@ struct ChargedJetHadron { registry.add("h_mixleadjet_eta", "ME: leading jet eta; #eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_mixsubleadjet_eta", "ME: subleading jet eta; #eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h2_mixdijet_detanoflip_dphi", "ME: dijet #Delta#eta no flip vs #Delta#varphi; #Delta#eta_{noflip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); - registry.add("h2_mixdijet_deta_dphi", "ME: dijet #Delta#eta flip vs #Delta#varphi; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); registry.add("h2_mixdijet_Asymmetry", "ME: dijet Asymmetry; #it{p}_{T,subleadingjet} (GeV/#it{c}); #it{X}_{J}; counts", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {40, 0, 1.0}}}); - registry.add("h3_mixdijet_deta_pt", "ME: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {detaAxis, jetPtAxis, jetPtAxis}}); - + registry.add("h3_mixdijet_deta_pt", "ME: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {{16, 0, 1.6}, jetPtAxis, jetPtAxis}}); + registry.add("h2_mixdijet_TimeEtaThan0_pt", "dijet #eta_{jet1}#eta_{jet1} > 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); + registry.add("h2_mixdijet_TimeEtaLess0_pt", "dijet #eta_{jet1}#eta_{jet1} < 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); registry.add("h_mixjeth_detatot", "ME: jet-hadron correlations; no flip #Delta#eta", {HistType::kTH1F, {detaAxis}}); registry.add("h_mixjeth_deta", "ME: jet-hadron correlations; #Delta#eta", {HistType::kTH1F, {detaAxis}}); registry.add("h_mixjeth_dphi", "ME: jet-hadron correlations; #Delta#phi", {HistType::kTH1F, {dphiAxis}}); - registry.add("h2_mixjeth_detatot_dphi", "ME: jet-hadron correlations; no flip #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_deta_dphi", "ME: jet-hadron correlations; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsup_deta_dphi", "ME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| > 1.0; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsmd_deta_dphi", "ME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| #in (0.5, 1.0); #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsdw_deta_dphi", "ME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("h2_mixjeth_physicalcutsHdw_deta_dphi", "ME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5 #Delta#eta_{jet1}> #Delta#eta_{jet2}; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("thn_mixljeth_correlations", "ME: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi; poolBin", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub, trackPtAxis, jetmultetaAxis, detaAxis, etaAxis, detaAxis, dphiAxis, {20, 0, 20}}); + registry.add("thn_mixljeth_correlations", "ME: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi; poolBin", HistType::kTHnSparseF, {jetPtAxis, jetPtAxis, {10, 0., 10.}, jetmultetaAxis, {16, 0, 1.6}, etaAxis, detaAxis, dphiAxis, {15, 0, 15}}); - registry.add("h_mix_event_stats", "Mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); + registry.add("h_mix_event_stats", "Mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); registry.get(HIST("h_mix_event_stats"))->GetXaxis()->SetBinLabel(1, "Total mixed events"); registry.get(HIST("h_mix_event_stats"))->GetXaxis()->SetBinLabel(2, "Total dijets"); registry.get(HIST("h_mix_event_stats"))->GetXaxis()->SetBinLabel(3, "Total dijets with cuts"); @@ -300,55 +284,57 @@ struct ChargedJetHadron { } if (doprocessCollisionsQCMCP) { - registry.add("h_mcColl_counts", " number of mc events; event status; entries", {HistType::kTH1F, {{10, 0, 10}}}); + registry.add("h_mcColl_counts", " number of mc events; event status; entries", {HistType::kTH1F, {{7, 0., 7.}}}); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(1, "allMcColl"); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(2, "vertexZ"); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(3, "noRecoColl"); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(4, "recoEvtSel"); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(5, "centralitycut"); registry.get(HIST("h_mcColl_counts"))->GetXaxis()->SetBinLabel(6, "occupancycut"); - registry.add("h_mc_mult", " multiplicity global tracks; entries", {HistType::kTH1F, {{3000, 0, 60000}}}); + registry.add("h_mcdColl_mult", " mcd multiplicity global tracks; entries", {HistType::kTH1F, {{300, 0, 60000}}}); - registry.add("h_mcColl_zvertex", "position of collision ;#it{Z} (cm)", {HistType::kTH1F, {{300, -15.0, 15.0}}}); + registry.add("h_mcpColl_Zvertex", "position of collision ;#it{Z} (cm)", {HistType::kTH1F, {{300, -15.0, 15.0}}}); registry.add("h_mcpColl_centrality", "mcp collision centrality; centrality; counts", {HistType::kTH1F, {centralityAxis}}); - registry.add("h_mcpColl_mult", " mcp multiplicity global tracks; entries", {HistType::kTH1F, {{3000, 0, 60000}}}); - registry.add("h_particle_pt", "particle #it{p}_{T}; #it{p}_{T,particle} (GeV/#it{c})", {HistType::kTH1F, {trackPtAxis}}); + registry.add("h_mcpColl_mult", " mcp multiplicity global tracks; entries", {HistType::kTH1F, {{300, 0, 60000}}}); registry.add("h2_particle_eta_phi", "particle #eta vs. particle #phi; #eta; #phi; counts", {HistType::kTH2F, {etaAxis, phiAxis}}); registry.add("h2_particle_eta_pt", "particle #eta vs. particle #it{p}_{T}; #eta; #it{p}_{T,particle} (GeV/#it{c}; counts", {HistType::kTH2F, {etaAxis, trackPtAxis}}); registry.add("h2_particle_phi_pt", "particle #phi vs. particle #it{p}_{T}; #phi; #it{p}_{T,particle} (GeV/#it{c}; counts", {HistType::kTH2F, {phiAxis, trackPtAxis}}); } - if (doprocessSpectraMCP || doprocessSpectraMCPWeighted) { + if (doprocessSpectraAreaSubMCP) { + if (doEventWeighted) { + registry.add("h_mcColl_counts_weight", " number of weighted mc events; event status; entries", {HistType::kTH1F, {{7, 0., 7.}}}); + registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(1, "McColl"); + registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(2, "xsectGen"); + registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(3, "event weight"); + } + registry.add("h_mcColl_rho", "mc collision rho;#rho (GeV/#it{c}); counts", {HistType::kTH1F, {{500, 0.0, 500.0}}}); registry.add("h_jet_pt_part", "partvjet pT;#it{p}_{T,jet}^{part} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxis}}); registry.add("h_jet_eta_part", "part jet #eta;#eta^{part}; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_jet_phi_part", "part jet #varphi;#phi^{part}; counts", {HistType::kTH1F, {phiAxis}}); registry.add("h_jet_area_part", "part jet Area_{jet}; Area_{jet}^{part}; counts", {HistType::kTH1F, {{150, 0., 1.5}}}); registry.add("h_jet_ntracks_part", "part jet N_{jet tracks}; N_{jet, tracks}^{part}; counts", {HistType::kTH1F, {{200, -0.5, 199.5}}}); - 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}}); - if (doprocessSpectraMCPWeighted) { - registry.add("h_mcColl_counts_weight", " number of weighted mc events; event status; entries", {HistType::kTH1F, {{10, 0, 10}}}); - registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(1, "McColl"); - registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(2, "xsectGen"); - registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(3, "event weight"); - registry.get(HIST("h_mcColl_counts_weight"))->GetXaxis()->SetBinLabel(4, "jet weight"); - 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}}}); - registry.add("h_jet_phat_part_weighted", "jet #hat{p};#hat{p} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0, 1000}}}); - } + registry.add("h_jet_pt_part_rhoareasubtracted", "part jet corr pT;#it{p}_{T,jet}^{part} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); + registry.add("h_jet_eta_part_rhoareasubtracted", "part jet #eta;#eta^{part}; counts", {HistType::kTH1F, {etaAxis}}); + registry.add("h_jet_phi_part_rhoareasubtracted", "part jet #varphi;#varphi^{part}; counts", {HistType::kTH1F, {phiAxis}}); + registry.add("h_jet_area_part_rhoareasubtracted", "part jet Area_{jet}; Area_{jet}^{part}; counts", {HistType::kTH1F, {{150, 0., 1.5}}}); + registry.add("h_jet_ntracks_part_rhoareasubtracted", "part jet N_{jet tracks}; N_{jet, tracks}^{part}; counts", {HistType::kTH1F, {{200, -0.5, 199.5}}}); } if (doprocessJetHadronMCP || doprocessMixJetHadronMCP) { //.........MCP: jet-hadron correlations................. registry.add("h_trigjet_corrpt_part", "trigger jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("thn_jeth_correlations_part", "MCP: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, trackPtAxis, detaAxis, dphiAxis, drAxis}); + registry.add("thn_jeth_correlations_part", "MCP: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxis, trackPtAxis, detaAxis, dphiAxis, drAxis}); - registry.add("h_jeth_event_stats_part", "MCP: same event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); - registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(2, "Total jets"); + registry.add("h_jeth_event_stats_part", "MCP: same event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); + registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(1, "Total jets"); + registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(2, "Total jets with pTHat cut"); registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(3, "Total jets with cuts"); registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(4, "Total j-h pairs"); registry.get(HIST("h_jeth_event_stats_part"))->GetXaxis()->SetBinLabel(5, "Total j-h pairs with accepted"); registry.add("h_mixtrigjet_corrpt_part", "trigger jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("thn_mixjeth_correlations_part", "mcpME: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, trackPtAxis, detaAxis, dphiAxis, drAxis}); - registry.add("h_mixjeth_event_stats_part", "MCP: mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); + registry.add("thn_mixjeth_correlations_part", "mcpME: jet-h correlations; jetpT; trackpT; jeth#Delta#eta; jeth#Delta#varphi; jeth#Delta#it{R}", HistType::kTHnSparseF, {jetPtAxis, trackPtAxis, detaAxis, dphiAxis, drAxis}); + registry.add("h_mixjeth_event_stats_part", "MCP: mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); registry.get(HIST("h_mixjeth_event_stats_part"))->GetXaxis()->SetBinLabel(1, "Total mixed events"); registry.get(HIST("h_mixjeth_event_stats_part"))->GetXaxis()->SetBinLabel(2, "Total jets"); registry.get(HIST("h_mixjeth_event_stats_part"))->GetXaxis()->SetBinLabel(3, "Total jets with cuts"); @@ -356,20 +342,8 @@ struct ChargedJetHadron { registry.get(HIST("h_mixjeth_event_stats_part"))->GetXaxis()->SetBinLabel(5, "Total j-h pairs with accepted"); } - if (doprocessLeadingJetHadronMCP || doprocessMixLeadingJetHadronMCP) { - registry.add("h_mcColl_centrality", "mcd collision centrality; centrality; counts", {HistType::kTH1F, {centralityAxis}}); - registry.add("h_mcColl_mult", " mcd multiplicity global tracks; entries", {HistType::kTH1F, {{3000, 0, 60000}}}); - registry.add("h_mcColl_rho", "mc collision rho;#rho (GeV/#it{c}); counts", {HistType::kTH1F, {{500, 0.0, 500.0}}}); - - registry.add("h_jet_pt_part_rhoareasubtracted", "part jet corr pT;#it{p}_{T,jet}^{part} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); - registry.add("h_jet_eta_part_rhoareasubtracted", "part jet #eta;#eta^{part}; counts", {HistType::kTH1F, {etaAxis}}); - registry.add("h_jet_phi_part_rhoareasubtracted", "part jet #varphi;#varphi^{part}; counts", {HistType::kTH1F, {phiAxis}}); - registry.add("h_jet_area_part_rhoareasubtracted", "part jet Area_{jet}; Area_{jet}^{part}; counts", {HistType::kTH1F, {{150, 0., 1.5}}}); - registry.add("h_jet_ntracks_part_rhoareasubtracted", "part jet N_{jet tracks}; N_{jet, tracks}^{part}; counts", {HistType::kTH1F, {{200, -0.5, 199.5}}}); - + if (doprocessLeadingJetHadronMCP) { //.........SE leading jet correlations............... - registry.add("h_dijet_pair_counts_part", "MCP: number of pairs with good leading-subleading jets; jet pairs; counts", {HistType::kTH1F, {{10, 0, 10}}}); - registry.add("h_dijet_pair_counts_cut_part", "MCP: number of pairs with leadingjet & subleadingjet cut pair; jet pairs; counts", {HistType::kTH1F, {{10, 0, 10}}}); registry.add("h_leadjet_pt_part", "MCP: leading jet pT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxis}}); registry.add("h_leadjet_corrpt_part", "MCP: leading jet corrpT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); registry.add("h_leadjet_eta_part", "MCP: leading jet eta;#eta; counts", {HistType::kTH1F, {etaAxis}}); @@ -379,21 +353,22 @@ struct ChargedJetHadron { registry.add("h_subleadjet_eta_part", "MCP: subleading jet eta;#eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_subleadjet_phi_part", "MCP: subleading jet phi;#phi; counts", {HistType::kTH1F, {phiAxis}}); registry.add("h2_dijet_detanoflip_dphi_part", "MCP: dijet #Delta#eta no flip vs #Delta#varphi; #Delta#eta_{noflip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); - registry.add("h2_dijet_deta_dphi_part", "MCP: dijet #Delta#eta flip vs #Delta#varphi; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); registry.add("h2_dijet_Asymmetry_part", "MCP: dijet Asymmetry; #it{p}_{T,subleadingjet} (GeV/#it{c}); #it{X}_{J}; counts", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {40, 0, 1.0}}}); - registry.add("h3_dijet_deta_pt_part", "MCP: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {detaAxis, jetPtAxis, jetPtAxis}}); + registry.add("h3_dijet_deta_pt_part", "MCP: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {{16, 0, 1.6}, jetPtAxis, jetPtAxis}}); + registry.add("h2_dijet_TimeEtaThan0_pt_part", "dijet #eta_{jet1}#eta_{jet1} > 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); + registry.add("h2_dijet_TimeEtaLess0_pt_part", "dijet #eta_{jet1}#eta_{jet1} < 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); registry.add("h_jeth_detatot_part", "MCP: jet-hadron tot #Delta#eta;#Delta#eta; counts", {HistType::kTH1F, {detaAxis}}); registry.add("h_jeth_deta_part", "MCP: jet-hadron #Delta#eta;#Delta#eta; counts", {HistType::kTH1F, {detaAxis}}); registry.add("h_jeth_dphi_part", "MCP: jet-hadron #Delta#varphi;#Delta#varphi; counts", {HistType::kTH1F, {dphiAxis}}); - registry.add("h2_jeth_detatot_dphi_part", "MCP: jeth deta vs dphi with physical cuts; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_deta_dphi_part", "MCP: jeth deta vs dphi; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsup_deta_dphi_part", "MCP: jeth deta vs dphi with physical cuts |#Delta#eta_{jet}| > 1.0; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsmd_deta_dphi_part", "MCP: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| #in (0.5, 1.0); #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_jeth_physicalcutsdw_deta_dphi_part", "MCP: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("h2_jeth_physicalcutsHdw_deta_dphi_part", "MCP: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5 #Delta#eta_{jet1}>#Delta#eta_{jet2}; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("thn_ljeth_correlations_part", "MCP: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub, trackPtAxis, jetmultetaAxis, detaAxis, etaAxis, detaAxis, dphiAxis}); + registry.add("thn_ljeth_correlations_part", "MCP: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxis, jetPtAxis, {10, 0., 10.}, jetmultetaAxis, {16, 0, 1.6}, etaAxis, detaAxis, dphiAxis}); + } + if (doprocessMixLeadingJetHadronMCP) { //...........mcp mixed events: leading jet correlations................. registry.add("h_mixdijet_pair_counts_cut_part", "mcpME: number of pairs with leadingjet & subleadingjet cut pair; jet pairs; counts", {HistType::kTH1F, {{10, 0, 10}}}); registry.add("h_mixleadjet_corrpt_part", "mcpME: leading jet corrpT;#it{p}_{T,leadingjet} (GeV/#it{c}); counts", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); @@ -401,28 +376,30 @@ struct ChargedJetHadron { registry.add("h_mixleadjet_eta_part", "mcpME: leading jet eta; #eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h_mixsubleadjet_eta_part", "mcpME: subleading jet eta; #eta; counts", {HistType::kTH1F, {etaAxis}}); registry.add("h2_mixdijet_detanoflip_dphi_part", "mcpME: dijet #Delta#eta no flip vs #Delta#varphi; #Delta#eta_{noflip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); - registry.add("h2_mixdijet_deta_dphi_part", "mcpME: dijet #Delta#eta flip vs #Delta#varphi; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH2F, {detaAxis, {63, 0, 6.3}}}); registry.add("h2_mixdijet_Asymmetry_part", "mcpME: dijet Asymmetry; #it{p}_{T,subleadingjet} (GeV/#it{c}); #it{X}_{J}; counts", {HistType::kTH2F, {jetPtAxisRhoAreaSub, {40, 0, 1.0}}}); - registry.add("h3_mixdijet_deta_pt_part", "mcpME: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {detaAxis, jetPtAxis, jetPtAxis}}); + registry.add("h3_mixdijet_deta_pt_part", "mcpME: dijet #Delta#eta flip vs #it{p}_{T,jet1-jet2}; #Delta#eta_{flip}; #Delta#varphi; counts", {HistType::kTH3F, {{16, 0, 1.6}, jetPtAxis, jetPtAxis}}); + registry.add("h2_mixdijet_TimeEtaThan0_pt_part", "dijet #eta_{jet1}#eta_{jet1} > 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); + registry.add("h2_mixdijet_TimeEtaLess0_pt_part", "dijet #eta_{jet1}#eta_{jet1} < 0", {HistType::kTH2F, {jetPtAxis, jetPtAxis}}); registry.add("h_mixjeth_detatot_part", "mcpME: jet-hadron correlations; no flip #Delta#eta", {HistType::kTH1F, {detaAxis}}); registry.add("h_mixjeth_deta_part", "mcpME: jet-hadron correlations; #Delta#eta", {HistType::kTH1F, {detaAxis}}); registry.add("h_mixjeth_dphi_part", "mcpME: jet-hadron correlations; #Delta#phi", {HistType::kTH1F, {dphiAxis}}); - registry.add("h2_mixjeth_detatot_dphi_part", "mcpME: jet-hadron correlations; no flip #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_deta_dphi_part", "mcpME: jet-hadron correlations; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsup_deta_dphi_part", "mcpME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet}| > 1.0; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsmd_deta_dphi_part", "mcpME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| #in (0.5, 1.0); #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); registry.add("h2_mixjeth_physicalcutsdw_deta_dphi_part", "mcpME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("h2_mixjeth_physicalcutsHdw_deta_dphi_part", "mcpME: jeth deta vs dphi with physical cuts |#Delta#eta_{jet1,2}| < 0.5 #Delta#eta_{jet1}>#Delta#eta_{jet2}; #Delta#eta; #Delta#phi", {HistType::kTH2F, {detaAxis, dphiAxis}}); - registry.add("thn_mixljeth_correlations_part", "mcpME: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxisRhoAreaSub, jetPtAxisRhoAreaSub, trackPtAxis, jetmultetaAxis, detaAxis, etaAxis, detaAxis, dphiAxis}); + registry.add("thn_mixljeth_correlations_part", "mcpME: leading jet-h correlations; leadingjetpT; subleadingjetpT; trackpT; timedijeteta; #Delta#eta_{jet1,2}; track #eta; jeth#Delta#eta; jeth#Delta#varphi", HistType::kTHnSparseF, {jetPtAxis, jetPtAxis, {10, 0., 10.}, jetmultetaAxis, {16, 0, 1.6}, etaAxis, detaAxis, dphiAxis}); - registry.add("h_mixevent_stats_part", "MCP: mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{10, 0.5, 10.5}}}); + registry.add("h_mixevent_stats_part", "MCP: mixed event statistics; Event pair type; counts", {HistType::kTH1F, {{7, 0., 7.}}}); registry.get(HIST("h_mixevent_stats_part"))->GetXaxis()->SetBinLabel(1, "Total mixed events"); registry.get(HIST("h_mixevent_stats_part"))->GetXaxis()->SetBinLabel(2, "Total dijets"); registry.get(HIST("h_mixevent_stats_part"))->GetXaxis()->SetBinLabel(3, "Total dijets with cuts"); registry.get(HIST("h_mixevent_stats_part"))->GetXaxis()->SetBinLabel(4, "Total Lj-h pairs"); registry.get(HIST("h_mixevent_stats_part"))->GetXaxis()->SetBinLabel(5, "Total Lj-h pairs with cut"); } + if (!(acceptSplitCollisions == NonSplitOnly || acceptSplitCollisions == SplitOkCheckAnyAssocColl || acceptSplitCollisions == SplitOkCheckFirstAssocCollOnly)) { + LOGF(fatal, "Configurable acceptSplitCollisions has wrong input value; stopping workflow"); + } } // ========================================================== // getcentrality getmultiplicity @@ -469,16 +446,19 @@ struct ChargedJetHadron { template bool applyMCCollisionCuts(const TMcCollision& mccollision, const TCollisions& collisions) const { - // MC z-vertex cut, must have associated collisions, plit-collision rule + // MC z-vertex cut, must have associated collisions, split-collision rule if (std::abs(mccollision.posZ()) > vertexZCut.value) return false; if (collisions.size() < 1) return false; - if (acceptSplitCollisions.value == NonSplitOnly && collisions.size() > 1) { + if (acceptSplitCollisions.value == NonSplitOnly && collisions.size() > 1) return false; - } + // At least one associated collision must pass all cuts + if (acceptSplitCollisions.value == SplitOkCheckFirstAssocCollOnly) + return isGoodCollision(*collisions.begin()); + for (auto const& collision : collisions) { if (isGoodCollision(collision)) { return true; @@ -511,7 +491,13 @@ struct ChargedJetHadron { template void fillTrackHistograms(TTracks const& track, float weight = 1.0) { - registry.fill(HIST("h_track_pt"), track.pt(), weight); + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + if (track.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) + return; + if (doEventWeighted) { + registry.fill(HIST("h_jet_phat"), pTHat); + registry.fill(HIST("h_jet_phat_weighted"), pTHat, weight); + } registry.fill(HIST("h2_track_eta_track_phi"), track.eta(), track.phi(), weight); registry.fill(HIST("h2_track_eta_pt"), track.eta(), track.pt(), weight); registry.fill(HIST("h2_track_phi_pt"), track.phi(), track.pt(), weight); @@ -520,7 +506,9 @@ struct ChargedJetHadron { template void fillParticleHistograms(const TParticles& particle, float weight = 1.0) { - registry.fill(HIST("h_particle_pt"), particle.pt(), weight); + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + if (particle.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) + return; registry.fill(HIST("h2_particle_eta_phi"), particle.eta(), particle.phi(), weight); registry.fill(HIST("h2_particle_eta_pt"), particle.eta(), particle.pt(), weight); registry.fill(HIST("h2_particle_phi_pt"), particle.phi(), particle.pt(), weight); @@ -530,9 +518,8 @@ struct ChargedJetHadron { void fillJetHistograms(TJets const& jet, float weight = 1.0) { float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); - if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) { + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) return; - } if (jet.r() == round(selectedJetsRadius * 100.0f)) { registry.fill(HIST("h_jet_pt"), jet.pt(), weight); registry.fill(HIST("h_jet_eta"), jet.eta(), weight); @@ -540,19 +527,14 @@ struct ChargedJetHadron { registry.fill(HIST("h_jet_area"), jet.area(), weight); registry.fill(HIST("h_jet_ntracks"), jet.tracksIds().size(), weight); } - - for (const auto& constituent : jet.template tracks_as()) { - registry.fill(HIST("h2_jet_pt_track_pt"), jet.pt(), constituent.pt(), weight); - } } template void fillJetAreaSubHistograms(TJets const& jet, float rho, float weight = 1.0) { float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); - if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) { + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) return; - } double jetcorrpt = jet.pt() - (rho * jet.area()); if (jet.r() == round(selectedJetsRadius * 100.0f)) { registry.fill(HIST("h_jet_pt_rhoareasubtracted"), jetcorrpt, weight); @@ -569,9 +551,8 @@ struct ChargedJetHadron { void fillMCPHistograms(TJets const& jet, float weight = 1.0) { float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); - if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) { + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) return; - } if (jet.r() == round(selectedJetsRadius * 100.0f)) { registry.fill(HIST("h_jet_pt_part"), jet.pt(), weight); registry.fill(HIST("h_jet_eta_part"), jet.eta(), weight); @@ -579,18 +560,14 @@ struct ChargedJetHadron { registry.fill(HIST("h_jet_area_part"), jet.area(), weight); registry.fill(HIST("h_jet_ntracks_part"), jet.tracksIds().size(), weight); } - for (const auto& constituent : jet.template tracks_as()) { - registry.fill(HIST("h2_jet_pt_part_track_pt_part"), jet.pt(), constituent.pt(), weight); - } } template void fillMCPAreaSubHistograms(TJets const& jet, float rho = 0.0, float weight = 1.0) { float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); - if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) { + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) return; - } if (jet.r() == round(selectedJetsRadius * 100.0f)) { double jetcorrpt = jet.pt() - (rho * jet.area()); registry.fill(HIST("h_jet_pt_part_rhoareasubtracted"), jetcorrpt, weight); @@ -607,16 +584,19 @@ struct ChargedJetHadron { //..........jet - hadron correlations........................ // ========================================================== template - void fillJetHadronHistograms(const TCollision& collision, const TJets& jets, const TTracks& tracks, float eventWeight = 1.0) + void fillJetHadronHistograms(const TCollision& collision, const TJets& jets, const TTracks& tracks, float weight = 1.0) { + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + using TracksTable = std::decay_t; for (auto const& jet : jets) { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { continue; } - using TracksTable = std::decay_t; - if (!isAcceptedJet(jet)) { + if (!isAcceptedJet(jet)) + continue; + registry.fill(HIST("h_jeth_event_stats"), 1); + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) continue; - } registry.fill(HIST("h_jeth_event_stats"), 2); double ptCorr = jet.pt() - jet.area() * collision.rho(); if (ptCorr < subleadingjetptMin) @@ -632,19 +612,22 @@ struct ChargedJetHadron { double dphi = track.phi() - jet.phi(); dphi = RecoDecay::constrainAngle(dphi, -PIHalf); double dr = std::sqrt(deta * deta + dphi * dphi); - registry.fill(HIST("thn_jeth_correlations"), ptCorr, track.pt(), deta, dphi, dr, eventWeight); + registry.fill(HIST("thn_jeth_correlations"), ptCorr, track.pt(), deta, dphi, dr, weight); } } } //.......mixed events................................. template - void fillMixJetHadronHistograms(const TCollisions& collisions, const TJets& jets, const TTracks& tracks, float eventWeight = 1.0) + void fillMixJetHadronHistograms(const TCollisions& collisions, const TJets& jets, const TTracks& tracks, float weight = 1.0) { + using TracksTable = std::decay_t; auto tracksTuple = std::make_tuple(jets, tracks); Pair pairData{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache}; //// -1 is the number of the bin to skip for (const auto& [c1, jets1, c2, tracks2] : pairData) { + weight = doEventWeighted ? c1.weight() : 1.f; + const float pTHat = 10.f / std::pow(weight, 1.f / pTHatExponent); registry.fill(HIST("h_mixjeth_event_stats"), 1); if (!isGoodCollision(c1) || !isGoodCollision(c2)) continue; @@ -652,10 +635,10 @@ struct ChargedJetHadron { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { continue; } - using TracksTable = std::decay_t; - if (!isAcceptedJet(jet)) { + if (!isAcceptedJet(jet)) + continue; // for pp Reason: Trying to dereference index with a wrong type in tracks_as for base target "JTracks" + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) continue; - } // for pp Reason: Trying to dereference index with a wrong type in tracks_as for base target "JTracks" registry.fill(HIST("h_mixjeth_event_stats"), 2); double ptCorr = jet.pt() - jet.area() * c1.rho(); if (ptCorr < subleadingjetptMin) @@ -671,7 +654,7 @@ struct ChargedJetHadron { double dphi = track.phi() - jet.phi(); dphi = RecoDecay::constrainAngle(dphi, -PIHalf); double dr = std::sqrt(deta * deta + dphi * dphi); - registry.fill(HIST("thn_mixjeth_correlations"), ptCorr, track.pt(), deta, dphi, dr, eventWeight); + registry.fill(HIST("thn_mixjeth_correlations"), ptCorr, track.pt(), deta, dphi, dr, weight); } } } @@ -679,16 +662,19 @@ struct ChargedJetHadron { //........MCP..jet - hadron correlations.......................................... template - void fillMCPJetHadronHistograms(const TmcCollision& mccollision, const TJets& jets, const TParticles& particles, float eventWeight = 1.0) + void fillMCPJetHadronHistograms(const TmcCollision& mccollision, const TJets& jets, const TParticles& particles, float weight = 1.0) { + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + using ParticlesTable = std::decay_t; for (auto const& jet : jets) { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { continue; } - using ParticlesTable = std::decay_t; if (!isAcceptedJet(jet, true)) { continue; } + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) + return; registry.fill(HIST("h_jeth_event_stats_part"), 2); double ptCorr = jet.pt() - jet.area() * mccollision.rho(); if (ptCorr < subleadingjetptMin) @@ -701,18 +687,21 @@ struct ChargedJetHadron { double dphi = particle.phi() - jet.phi(); dphi = RecoDecay::constrainAngle(dphi, -PIHalf); double dr = std::sqrt(deta * deta + dphi * dphi); - registry.fill(HIST("thn_jeth_correlations_part"), ptCorr, particle.pt(), deta, dphi, dr, eventWeight); + registry.fill(HIST("thn_jeth_correlations_part"), ptCorr, particle.pt(), deta, dphi, dr, weight); } } } //......mixed events...................... template - void fillMCPMixJetHadronHistograms(const TmcCollisions& mccollisions, const TCollisions& collisions, const TJets& jets, const TParticles& particles, float eventWeight = 1.0) + void fillMCPMixJetHadronHistograms(const TmcCollisions& mccollisions, const TCollisions& collisions, const TJets& jets, const TParticles& particles, float weight = 1.0) { + using ParticlesTable = std::decay_t; auto particlesTuple = std::make_tuple(jets, particles); Pair pairMCData{corrBinningMC, numberEventsMixed, -1, mccollisions, particlesTuple, &cache}; for (const auto& [c1, jets1, c2, particles2] : pairMCData) { + weight = doEventWeighted ? c1.weight() : 1.f; + const float pTHat = 10.f / std::pow(weight, 1.f / pTHatExponent); registry.fill(HIST("h_mixjeth_event_stats_part"), 1); if (!applyMCCollisionCuts(c1, collisions) || !applyMCCollisionCuts(c2, collisions)) continue; @@ -720,9 +709,10 @@ struct ChargedJetHadron { for (auto const& jet : jets1) { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) continue; - using ParticlesTable = std::decay_t; if (!isAcceptedJet(jet, true)) continue; + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) + return; registry.fill(HIST("h_mixjeth_event_stats_part"), 2); double ptCorr = jet.pt() - jet.area() * c1.rho(); @@ -737,7 +727,7 @@ struct ChargedJetHadron { double dphi = particle.phi() - jet.phi(); dphi = RecoDecay::constrainAngle(dphi, -PIHalf); double dr = std::sqrt(deta * deta + dphi * dphi); - registry.fill(HIST("thn_mixjeth_correlations_part"), ptCorr, particle.pt(), deta, dphi, dr, eventWeight); + registry.fill(HIST("thn_mixjeth_correlations_part"), ptCorr, particle.pt(), deta, dphi, dr, weight); } } } @@ -747,8 +737,10 @@ struct ChargedJetHadron { //..........leading jet - hadron correlations................ // ========================================================== template - void fillLeadingJetHadronHistograms(const TCollision& collision, const TJets& jets, const TTracks& tracks, float eventWeight = 1.0) + void fillLeadingJetHadronHistograms(const TCollision& collision, const TJets& jets, const TTracks& tracks, float weight = 1.0) { + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + using TracksTable = std::decay_t; registry.fill(HIST("h_centrality"), getCentrality(collision)); typename TJets::iterator leadingJet; typename TJets::iterator subleadingJet; @@ -756,7 +748,6 @@ struct ChargedJetHadron { bool hasSubleading = false; double ptLeadingCorr = -1.0; double ptSubleadingCorr = -1.0; - using TracksTable = std::decay_t; for (auto it = jets.begin(); it != jets.end(); ++it) { const auto& jet = *it; @@ -764,9 +755,10 @@ struct ChargedJetHadron { continue; if (!isAcceptedJet(jet)) continue; - - const double ptCorr = jet.pt() - jet.area() * collision.rho(); - registry.fill(HIST("h_inclusivejet_corrpt"), ptCorr, eventWeight); + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) + continue; + double ptCorr = jet.pt() - jet.area() * collision.rho(); + registry.fill(HIST("h_inclusivejet_corrpt"), ptCorr, weight); if (ptCorr > ptLeadingCorr) { if (hasLeading) { subleadingJet = leadingJet; @@ -785,87 +777,81 @@ struct ChargedJetHadron { if (!hasLeading || !hasSubleading) return; // fewer than 2 jets - const double phiLead = leadingJet.phi(); - const double phiSub = subleadingJet.phi(); + double phiLead = leadingJet.phi(); + double phiSub = subleadingJet.phi(); double deltaPhiJets = phiLead - phiSub; - registry.fill(HIST("h_dijet_dphi"), deltaPhiJets, eventWeight); - deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, 0.); - if (std::abs(deltaPhiJets) < PIHalf || std::abs(deltaPhiJets) > absPiCut * PI) + deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, -PIHalf); + if (std::abs(deltaPhiJets) < dijetDphiCut * PI) return; - // === Step2: eta ordering etajet1 > etajet2) === - const double etaJet1Raw = leadingJet.eta(); - const double etaJet2Raw = subleadingJet.eta(); - const double multEta1Eta2 = etaJet1Raw * etaJet2Raw; - const double deltaEtaJetsNoflip = etaJet1Raw - etaJet2Raw; - const double inverse = (etaJet1Raw > 0) ? 1.0 : -1.0; // Dr.Yang suggestion - const double flip = (etaJet1Raw > etaJet2Raw) ? 1.0 : -1.0; - const double etajet1 = flip * etaJet1Raw; // leading jet eta after flip - const double etajet2 = flip * etaJet2Raw; // subleading jet eta after flip - const double deltaEtaJets = etajet1 - etajet2; // >= 0 - registry.fill(HIST("h_dijet_pair_counts"), 1); - registry.fill(HIST("h_leadjet_pt"), leadingJet.pt(), eventWeight); - registry.fill(HIST("h_subleadjet_pt"), subleadingJet.pt(), eventWeight); - registry.fill(HIST("h_leadjet_corrpt"), ptLeadingCorr, eventWeight); - registry.fill(HIST("h_subleadjet_corrpt"), ptSubleadingCorr, eventWeight); + double etaJet1Raw = leadingJet.eta(); + double etaJet2Raw = subleadingJet.eta(); + double multEta1Eta2 = etaJet1Raw * etaJet2Raw; + double deltaEtaJetsNoflip = etaJet1Raw - etaJet2Raw; + double inverse = (etaJet1Raw > 0) ? 1.0 : -1.0; // Dr.Yang suggestion + double flip = (etaJet1Raw > etaJet2Raw) ? 1.0 : -1.0; + double etajet1 = flip * etaJet1Raw; // leading jet eta after flip + double etajet2 = flip * etaJet2Raw; // subleading jet eta after flip + double deltaEtaJets = etajet1 - etajet2; // >= 0 + registry.fill(HIST("h_leadjet_pt"), leadingJet.pt(), weight); + registry.fill(HIST("h_subleadjet_pt"), subleadingJet.pt(), weight); + registry.fill(HIST("h_leadjet_corrpt"), ptLeadingCorr, weight); + registry.fill(HIST("h_subleadjet_corrpt"), ptSubleadingCorr, weight); if (ptLeadingCorr < leadingjetptMin || ptSubleadingCorr < subleadingjetptMin) return; - registry.fill(HIST("h_dijet_pair_counts_cut"), 2); - registry.fill(HIST("h_leadjet_eta"), etaJet1Raw, eventWeight); - registry.fill(HIST("h_subleadjet_eta"), etaJet2Raw, eventWeight); - registry.fill(HIST("h_leadjet_phi"), phiLead, eventWeight); - registry.fill(HIST("h_subleadjet_phi"), phiSub, eventWeight); - registry.fill(HIST("h2_dijet_detanoflip_dphi"), deltaEtaJetsNoflip, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_dijet_deta_dphi"), deltaEtaJets, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_dijet_Asymmetry"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, eventWeight); - registry.fill(HIST("h3_dijet_deta_pt"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_leadjet_eta"), etaJet1Raw, weight); + registry.fill(HIST("h_subleadjet_eta"), etaJet2Raw, weight); + registry.fill(HIST("h_leadjet_phi"), phiLead, weight); + registry.fill(HIST("h_subleadjet_phi"), phiSub, weight); + registry.fill(HIST("h2_dijet_detanoflip_dphi"), deltaEtaJetsNoflip, deltaPhiJets, weight); + registry.fill(HIST("h2_dijet_Asymmetry"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, weight); + registry.fill(HIST("h3_dijet_deta_pt"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, weight); + if (multEta1Eta2 > 0) + registry.fill(HIST("h2_dijet_TimeEtaThan0_pt"), ptLeadingCorr, ptSubleadingCorr, weight); + else if (multEta1Eta2 < 0) + registry.fill(HIST("h2_dijet_TimeEtaLess0_pt"), ptLeadingCorr, ptSubleadingCorr, weight); for (auto const& track : tracks) { if (!jetderiveddatautilities::selectTrack(track, trackSelection)) continue; - const double hpt = track.pt(); - const double heta = inverse * (track.eta()); // Dr.Yang - const double detatot = track.eta() - etaJet1Raw; - const double deta = flip * (track.eta() - etaJet1Raw); // always relative to leadingJet (after flip) + double hpt = track.pt(); + double heta = inverse * (track.eta()); // Dr.Yang + double detatot = track.eta() - etaJet1Raw; + double deta = flip * (track.eta() - etaJet1Raw); // always relative to leadingJet (after flip) double dphi = track.phi() - leadingJet.phi(); dphi = RecoDecay::constrainAngle(dphi, -PIHalf); - if (hpt > assoHadronPtMaxCut) continue; - registry.fill(HIST("h_jeth_detatot"), detatot, eventWeight); - registry.fill(HIST("h_jeth_deta"), deta, eventWeight); - registry.fill(HIST("h_jeth_dphi"), dphi, eventWeight); - registry.fill(HIST("h2_jeth_detatot_dphi"), detatot, dphi, eventWeight); + registry.fill(HIST("h_jeth_detatot"), detatot, weight); + registry.fill(HIST("h_jeth_deta"), deta, weight); + registry.fill(HIST("h_jeth_dphi"), dphi, weight); if (doDijetRaa) - registry.fill(HIST("thn_ljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, eventWeight); + registry.fill(HIST("thn_ljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, weight); else - registry.fill(HIST("thn_ljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, eventWeight); + registry.fill(HIST("thn_ljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, weight); if (hpt < assoHadronPtCut) { - registry.fill(HIST("h2_jeth_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_jeth_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapup) - registry.fill(HIST("h2_jeth_physicalcutsup_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_jeth_physicalcutsup_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapdw && std::abs(deltaEtaJets) < etaGapup) - registry.fill(HIST("h2_jeth_physicalcutsmd_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_jeth_physicalcutsmd_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_jeth_physicalcutsdw_deta_dphi"), deta, dphi, eventWeight); - if (etaJet1Raw > etaJet2Raw && std::abs(deltaEtaJets) >= etaGapup) - registry.fill(HIST("h2_jeth_physicalcutsHup_deta_dphi"), detatot, dphi, eventWeight); // Dr.Yang - if (etaJet1Raw > etaJet2Raw && std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_jeth_physicalcutsHdw_deta_dphi"), detatot, dphi, eventWeight); // Dr.Yang + registry.fill(HIST("h2_jeth_physicalcutsdw_deta_dphi"), deta, dphi, weight); } } } //.......mixed events leadingjet-hadrons......................... template - void fillMixLeadingJetHadronHistograms(const TCollisions& collisions, const TJets& jets, const TTracks& tracks, float eventWeight = 1.0) + void fillMixLeadingJetHadronHistograms(const TCollisions& collisions, const TJets& jets, const TTracks& tracks, float weight = 1.0) { - int totalmix = 0, totaldijets = 0, totaldijetscut = 0, totalPairs = 0, passedPairs = 0; + using TracksTable = std::decay_t; auto tracksTuple = std::make_tuple(jets, tracks); Pair pairData{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache}; for (const auto& [c1, jets1, c2, tracks2] : pairData) { - totalmix++; + weight = doEventWeighted ? c1.weight() : 1.f; + const float pTHat = 10.f / std::pow(weight, 1.f / pTHatExponent); registry.fill(HIST("h_mix_event_stats"), 1); int poolBin = corrBinning.getBin(std::make_tuple(c2.posZ(), getCentrality(c2))); if (!isGoodCollision(c1) || !isGoodCollision(c2)) @@ -882,9 +868,10 @@ struct ChargedJetHadron { const auto& jet = *it; if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) continue; - using TracksTable = std::decay_t; if (!isAcceptedJet(jet)) continue; + if (jet.pt() > pTHatMaxMCD * pTHat || pTHat < pTHatAbsoluteMin) + continue; double ptCorr = jet.pt() - jet.area() * c1.rho(); if (ptCorr > ptLeadingCorr) { @@ -908,13 +895,11 @@ struct ChargedJetHadron { double phiLead = leadingJet.phi(); double phiSub = subleadingJet.phi(); double deltaPhiJets = phiLead - phiSub; - deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, 0.); - if (std::abs(deltaPhiJets) < PIHalf || std::abs(deltaPhiJets) > absPiCut * PI) + deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, -PIHalf); + if (std::abs(deltaPhiJets) < dijetDphiCut * PI) continue; - totaldijets++; registry.fill(HIST("h_mix_event_stats"), 2); - double etaJet1Raw = leadingJet.eta(); double etaJet2Raw = subleadingJet.eta(); double multEta1Eta2 = etaJet1Raw * etaJet2Raw; @@ -924,27 +909,27 @@ struct ChargedJetHadron { double etajet2 = flip * etaJet2Raw; double deltaEtaJetsNoflip = etaJet1Raw - etaJet2Raw; double deltaEtaJets = etajet1 - etajet2; - registry.fill(HIST("h_mixleadjet_corrpt"), ptLeadingCorr, eventWeight); - registry.fill(HIST("h_mixsubleadjet_corrpt"), ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_mixleadjet_corrpt"), ptLeadingCorr, weight); + registry.fill(HIST("h_mixsubleadjet_corrpt"), ptSubleadingCorr, weight); if (ptLeadingCorr < leadingjetptMin || ptSubleadingCorr < subleadingjetptMin) continue; - totaldijetscut++; registry.fill(HIST("h_mix_event_stats"), 3); registry.fill(HIST("h_mixdijet_pair_counts_cut"), 2); - registry.fill(HIST("h_mixleadjet_eta"), etaJet1Raw, eventWeight); - registry.fill(HIST("h_mixsubleadjet_eta"), etaJet2Raw, eventWeight); - registry.fill(HIST("h2_mixdijet_detanoflip_dphi"), deltaEtaJetsNoflip, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_mixdijet_deta_dphi"), deltaEtaJets, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_mixdijet_Asymmetry"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, eventWeight); - registry.fill(HIST("h3_mixdijet_deta_pt"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_mixleadjet_eta"), etaJet1Raw, weight); + registry.fill(HIST("h_mixsubleadjet_eta"), etaJet2Raw, weight); + registry.fill(HIST("h2_mixdijet_detanoflip_dphi"), deltaEtaJetsNoflip, deltaPhiJets, weight); + registry.fill(HIST("h2_mixdijet_Asymmetry"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, weight); + registry.fill(HIST("h3_mixdijet_deta_pt"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, weight); + if (multEta1Eta2 > 0) + registry.fill(HIST("h2_mixdijet_TimeEtaThan0_pt"), ptLeadingCorr, ptSubleadingCorr, weight); + else if (multEta1Eta2 < 0) + registry.fill(HIST("h2_mixdijet_TimeEtaLess0_pt"), ptLeadingCorr, ptSubleadingCorr, weight); for (auto const& track : tracks2) { - totalPairs++; registry.fill(HIST("h_mix_event_stats"), 4); if (!jetderiveddatautilities::selectTrack(track, trackSelection)) continue; - passedPairs++; registry.fill(HIST("h_mix_event_stats"), 5); double hpt = track.pt(); double heta = inverse * (track.eta()); // Dr.Yang @@ -955,38 +940,32 @@ struct ChargedJetHadron { if (hpt > assoHadronPtMaxCut) continue; - registry.fill(HIST("h_mixjeth_detatot"), detatot, eventWeight); - registry.fill(HIST("h_mixjeth_deta"), deta, eventWeight); - registry.fill(HIST("h_mixjeth_dphi"), dphi, eventWeight); - registry.fill(HIST("h2_mixjeth_detatot_dphi"), detatot, dphi, eventWeight); + registry.fill(HIST("h_mixjeth_detatot"), detatot, weight); + registry.fill(HIST("h_mixjeth_deta"), deta, weight); + registry.fill(HIST("h_mixjeth_dphi"), dphi, weight); if (doDijetRaa) - registry.fill(HIST("thn_mixljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, eventWeight); + registry.fill(HIST("thn_mixljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, weight); else - registry.fill(HIST("thn_mixljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, poolBin, eventWeight); + registry.fill(HIST("thn_mixljeth_correlations"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, poolBin, weight); if (hpt < assoHadronPtCut) { - registry.fill(HIST("h2_mixjeth_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapup) - registry.fill(HIST("h2_mixjeth_physicalcutsup_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_physicalcutsup_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapdw && std::abs(deltaEtaJets) < etaGapup) - registry.fill(HIST("h2_mixjeth_physicalcutsmd_deta_dphi"), deta, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_physicalcutsmd_deta_dphi"), deta, dphi, weight); if (std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_mixjeth_physicalcutsdw_deta_dphi"), deta, dphi, eventWeight); - if (etaJet1Raw > etaJet2Raw && std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_mixjeth_physicalcutsHdw_deta_dphi"), detatot, dphi, eventWeight); // Dr.Yang + registry.fill(HIST("h2_mixjeth_physicalcutsdw_deta_dphi"), deta, dphi, weight); } } } - registry.fill(HIST("h_mix_event_stats"), 6, totalmix); - registry.fill(HIST("h_mix_event_stats"), 7, totaldijets); - registry.fill(HIST("h_mix_event_stats"), 8, totaldijetscut); - registry.fill(HIST("h_mix_event_stats"), 9, totalPairs); - registry.fill(HIST("h_mix_event_stats"), 10, passedPairs); } //........MCP..leading jet - hadron correlations..................... template - void fillMCPLeadingJetHadronHistograms(const TmcCollision& mccollision, const TJets& jets, const TParticles& particles, float eventWeight = 1.0) + void fillMCPLeadingJetHadronHistograms(const TmcCollision& mccollision, const TJets& jets, const TParticles& particles, float weight = 1.0) { + float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + using ParticlesTable = std::decay_t; typename TJets::iterator leadingJet; typename TJets::iterator subleadingJet; bool hasLeading = false; @@ -998,9 +977,10 @@ struct ChargedJetHadron { const auto& jet = *it; if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) continue; - using ParticlesTable = std::decay_t; if (!isAcceptedJet(jet, true)) continue; + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) + return; double ptCorr = jet.pt() - jet.area() * mccollision.rho(); if (ptCorr > ptLeadingCorr) { @@ -1020,8 +1000,8 @@ struct ChargedJetHadron { } if (!hasLeading || !hasSubleading) return; - double deltaPhiJets = RecoDecay::constrainAngle(leadingJet.phi() - subleadingJet.phi(), 0.); - if (std::abs(deltaPhiJets) < PIHalf || std::abs(deltaPhiJets) > absPiCut * PI) + double deltaPhiJets = RecoDecay::constrainAngle(leadingJet.phi() - subleadingJet.phi(), -PIHalf); + if (std::abs(deltaPhiJets) < dijetDphiCut * PI) return; double etaJet1Raw = leadingJet.eta(); @@ -1033,23 +1013,24 @@ struct ChargedJetHadron { double etajet1 = flip * etaJet1Raw; // leading jet eta after flip double etajet2 = flip * etaJet2Raw; // subleading jet eta after flip double deltaEtaJets = etajet1 - etajet2; // >= 0 - registry.fill(HIST("h_dijet_pair_counts_part"), 1); - registry.fill(HIST("h_leadjet_pt_part"), leadingJet.pt(), eventWeight); - registry.fill(HIST("h_subleadjet_pt_part"), subleadingJet.pt(), eventWeight); - registry.fill(HIST("h_leadjet_corrpt_part"), ptLeadingCorr, eventWeight); - registry.fill(HIST("h_subleadjet_corrpt_part"), ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_leadjet_pt_part"), leadingJet.pt(), weight); + registry.fill(HIST("h_subleadjet_pt_part"), subleadingJet.pt(), weight); + registry.fill(HIST("h_leadjet_corrpt_part"), ptLeadingCorr, weight); + registry.fill(HIST("h_subleadjet_corrpt_part"), ptSubleadingCorr, weight); if (ptLeadingCorr < leadingjetptMin || ptSubleadingCorr < subleadingjetptMin) return; - registry.fill(HIST("h_dijet_pair_counts_cut_part"), 2); - registry.fill(HIST("h_leadjet_eta_part"), etaJet1Raw, eventWeight); - registry.fill(HIST("h_subleadjet_eta_part"), etaJet2Raw, eventWeight); - registry.fill(HIST("h_leadjet_phi_part"), leadingJet.phi(), eventWeight); - registry.fill(HIST("h_subleadjet_phi_part"), subleadingJet.phi(), eventWeight); - registry.fill(HIST("h2_dijet_detanoflip_dphi_part"), deltaEtaJetsNoflip, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_dijet_deta_dphi_part"), deltaEtaJets, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_dijet_Asymmetry_part"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, eventWeight); - registry.fill(HIST("h3_dijet_deta_pt_part"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_leadjet_eta_part"), etaJet1Raw, weight); + registry.fill(HIST("h_subleadjet_eta_part"), etaJet2Raw, weight); + registry.fill(HIST("h_leadjet_phi_part"), leadingJet.phi(), weight); + registry.fill(HIST("h_subleadjet_phi_part"), subleadingJet.phi(), weight); + registry.fill(HIST("h2_dijet_detanoflip_dphi_part"), deltaEtaJetsNoflip, deltaPhiJets, weight); + registry.fill(HIST("h2_dijet_Asymmetry_part"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, weight); + registry.fill(HIST("h3_dijet_deta_pt_part"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, weight); + if (multEta1Eta2 > 0) + registry.fill(HIST("h2_dijet_TimeEtaThan0_pt_part"), ptLeadingCorr, ptSubleadingCorr, weight); + else if (multEta1Eta2 < 0) + registry.fill(HIST("h2_dijet_TimeEtaLess0_pt_part"), ptLeadingCorr, ptSubleadingCorr, weight); for (auto const& particle : particles) { double hpt = particle.pt(); @@ -1060,36 +1041,36 @@ struct ChargedJetHadron { dphi = RecoDecay::constrainAngle(dphi, -PIHalf); if (hpt > assoHadronPtMaxCut) continue; - registry.fill(HIST("h_jeth_detatot_part"), detatot, eventWeight); - registry.fill(HIST("h_jeth_deta_part"), deta, eventWeight); - registry.fill(HIST("h_jeth_dphi_part"), dphi, eventWeight); - registry.fill(HIST("h2_jeth_detatot_dphi_part"), detatot, dphi, eventWeight); + registry.fill(HIST("h_jeth_detatot_part"), detatot, weight); + registry.fill(HIST("h_jeth_deta_part"), deta, weight); + registry.fill(HIST("h_jeth_dphi_part"), dphi, weight); if (doDijetRaa) - registry.fill(HIST("thn_ljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, eventWeight); + registry.fill(HIST("thn_ljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, weight); else - registry.fill(HIST("thn_ljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, eventWeight); + registry.fill(HIST("thn_ljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, weight); if (hpt < assoHadronPtCut) { registry.fill(HIST("h2_jeth_deta_dphi_part"), deta, dphi); if (std::abs(deltaEtaJets) >= etaGapup) - registry.fill(HIST("h2_jeth_physicalcutsup_deta_dphi_part"), deta, dphi, eventWeight); + registry.fill(HIST("h2_jeth_physicalcutsup_deta_dphi_part"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapdw && std::abs(deltaEtaJets) < etaGapup) - registry.fill(HIST("h2_jeth_physicalcutsmd_deta_dphi_part"), deta, dphi, eventWeight); + registry.fill(HIST("h2_jeth_physicalcutsmd_deta_dphi_part"), deta, dphi, weight); if (std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_jeth_physicalcutsdw_deta_dphi_part"), deta, dphi, eventWeight); - if (std::abs(deltaEtaJets) < etaGapdw && etaJet1Raw > etaJet2Raw) - registry.fill(HIST("h2_jeth_physicalcutsHdw_deta_dphi_part"), detatot, dphi, eventWeight); + registry.fill(HIST("h2_jeth_physicalcutsdw_deta_dphi_part"), deta, dphi, weight); } } } //..........MCP..mixed events......................................... template - void fillMCPMixLeadingJetHadronHistograms(const TmcCollisions& mccollisions, const TCollisions& collisions, const TJets& jets, const TParticles& particles, float eventWeight = 1.0) + void fillMCPMixLeadingJetHadronHistograms(const TmcCollisions& mccollisions, const TCollisions& collisions, const TJets& jets, const TParticles& particles, float weight = 1.0) { + using ParticlesTable = std::decay_t; auto particlesTuple = std::make_tuple(jets, particles); Pair pairMCData{corrBinningMC, numberEventsMixed, -1, mccollisions, particlesTuple, &cache}; for (const auto& [c1, jets1, c2, particles2] : pairMCData) { + weight = doEventWeighted ? c1.weight() : 1.f; + const float pTHat = 10.f / std::pow(weight, 1.f / pTHatExponent); registry.fill(HIST("h_mixevent_stats_part"), 1); // int poolBin = corrBinningMC.getBin(std::make_tuple(c2.posZ(), getMultiplicity(c2))); if (!applyMCCollisionCuts(c1, collisions) || !applyMCCollisionCuts(c2, collisions)) @@ -1106,9 +1087,10 @@ struct ChargedJetHadron { const auto& jet = *it; if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) continue; - using ParticlesTable = std::decay_t; if (!isAcceptedJet(jet, true)) continue; + if (jet.pt() > pTHatMaxMCP * pTHat || pTHat < pTHatAbsoluteMin) + return; double ptCorr = jet.pt() - jet.area() * c1.rho(); if (ptCorr > ptLeadingCorr) { @@ -1130,8 +1112,8 @@ struct ChargedJetHadron { continue; double deltaPhiJets = leadingJet.phi() - subleadingJet.phi(); - deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, 0.); - if (std::abs(deltaPhiJets) < PIHalf || std::abs(deltaPhiJets) > absPiCut * PI) + deltaPhiJets = RecoDecay::constrainAngle(deltaPhiJets, -PIHalf); + if (std::abs(deltaPhiJets) < dijetDphiCut * PI) continue; registry.fill(HIST("h_mixevent_stats_part"), 2); @@ -1144,19 +1126,22 @@ struct ChargedJetHadron { double etajet1 = flip * etaJet1Raw; double etajet2 = flip * etaJet2Raw; double deltaEtaJets = etajet1 - etajet2; - registry.fill(HIST("h_mixleadjet_corrpt_part"), ptLeadingCorr, eventWeight); - registry.fill(HIST("h_mixsubleadjet_corrpt_part"), ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_mixleadjet_corrpt_part"), ptLeadingCorr, weight); + registry.fill(HIST("h_mixsubleadjet_corrpt_part"), ptSubleadingCorr, weight); if (ptLeadingCorr < leadingjetptMin || ptSubleadingCorr < subleadingjetptMin) return; registry.fill(HIST("h_mixevent_stats_part"), 3); registry.fill(HIST("h_mixdijet_pair_counts_cut_part"), 1); - registry.fill(HIST("h_mixleadjet_eta_part"), etaJet1Raw, eventWeight); - registry.fill(HIST("h_mixsubleadjet_eta_part"), etaJet2Raw, eventWeight); - registry.fill(HIST("h2_mixdijet_detanoflip_dphi_part"), deltaEtaJetsNoflip, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_mixdijet_deta_dphi_part"), deltaEtaJets, deltaPhiJets, eventWeight); - registry.fill(HIST("h2_mixdijet_Asymmetry_part"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, eventWeight); - registry.fill(HIST("h3_mixdijet_deta_pt_part"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, eventWeight); + registry.fill(HIST("h_mixleadjet_eta_part"), etaJet1Raw, weight); + registry.fill(HIST("h_mixsubleadjet_eta_part"), etaJet2Raw, weight); + registry.fill(HIST("h2_mixdijet_detanoflip_dphi_part"), deltaEtaJetsNoflip, deltaPhiJets, weight); + registry.fill(HIST("h2_mixdijet_Asymmetry_part"), ptSubleadingCorr, ptSubleadingCorr / ptLeadingCorr, weight); + registry.fill(HIST("h3_mixdijet_deta_pt_part"), deltaEtaJets, ptLeadingCorr, ptSubleadingCorr, weight); + if (multEta1Eta2 > 0) + registry.fill(HIST("h2_mixdijet_TimeEtaThan0_pt_part"), ptLeadingCorr, ptSubleadingCorr, weight); + else if (multEta1Eta2 < 0) + registry.fill(HIST("h2_mixdijet_TimeEtaLess0_pt_part"), ptLeadingCorr, ptSubleadingCorr, weight); for (auto const& particle : particles2) { registry.fill(HIST("h_mixevent_stats_part"), 4); @@ -1170,24 +1155,21 @@ struct ChargedJetHadron { if (hpt > assoHadronPtMaxCut) continue; registry.fill(HIST("h_mixevent_stats_part"), 5); - registry.fill(HIST("h_mixjeth_detatot_part"), detatot, eventWeight); - registry.fill(HIST("h_mixjeth_deta_part"), deta, eventWeight); - registry.fill(HIST("h_mixjeth_dphi_part"), dphi, eventWeight); - registry.fill(HIST("h2_mixjeth_detatot_dphi_part"), detatot, dphi, eventWeight); + registry.fill(HIST("h_mixjeth_detatot_part"), detatot, weight); + registry.fill(HIST("h_mixjeth_deta_part"), deta, weight); + registry.fill(HIST("h_mixjeth_dphi_part"), dphi, weight); if (doDijetRaa) - registry.fill(HIST("thn_mixljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, eventWeight); + registry.fill(HIST("thn_mixljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, kNaN, multEta1Eta2, deltaEtaJetsNoflip, kNaN, kNaN, kNaN, weight); else - registry.fill(HIST("thn_mixljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, eventWeight); + registry.fill(HIST("thn_mixljeth_correlations_part"), ptLeadingCorr, ptSubleadingCorr, hpt, multEta1Eta2, deltaEtaJets, heta, deta, dphi, weight); if (hpt < assoHadronPtCut) { registry.fill(HIST("h2_mixjeth_deta_dphi_part"), deta, dphi); if (std::abs(deltaEtaJets) >= etaGapup) - registry.fill(HIST("h2_mixjeth_physicalcutsup_deta_dphi_part"), deta, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_physicalcutsup_deta_dphi_part"), deta, dphi, weight); if (std::abs(deltaEtaJets) >= etaGapdw && std::abs(deltaEtaJets) < etaGapup) - registry.fill(HIST("h2_mixjeth_physicalcutsmd_deta_dphi_part"), deta, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_physicalcutsmd_deta_dphi_part"), deta, dphi, weight); if (std::abs(deltaEtaJets) < etaGapdw) - registry.fill(HIST("h2_mixjeth_physicalcutsdw_deta_dphi_part"), deta, dphi, eventWeight); - if (std::abs(deltaEtaJets) < etaGapdw && etaJet1Raw > etaJet2Raw) - registry.fill(HIST("h2_mixjeth_physicalcutsHdw_deta_dphi_part"), detatot, dphi, eventWeight); + registry.fill(HIST("h2_mixjeth_physicalcutsdw_deta_dphi_part"), deta, dphi, weight); } } } @@ -1220,7 +1202,7 @@ struct ChargedJetHadron { fillTrackHistograms(track); } } - PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCData, "collisions and tracks QC for Data and MCD", true); + PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCData, "QC of collisions and tracks for Data", true); void processSpectraAreaSubData(FilterCollision const& collision, CorrChargedJets const& jets, @@ -1239,7 +1221,7 @@ struct ChargedJetHadron { fillJetAreaSubHistograms(jet, collision.rho()); } } - PROCESS_SWITCH(ChargedJetHadron, processSpectraAreaSubData, "jet spectra with rho-area subtraction for Data", false); + PROCESS_SWITCH(ChargedJetHadron, processSpectraAreaSubData, "jet spectra without and with rho-area subtraction for Data", false); void processLeadingJetHadron(FilterCollision const& collision, CorrChargedJets const& jets, @@ -1249,7 +1231,7 @@ struct ChargedJetHadron { return; fillLeadingJetHadronHistograms(collision, jets, tracks); } - PROCESS_SWITCH(ChargedJetHadron, processLeadingJetHadron, "leadingjet-h for Data", false); + PROCESS_SWITCH(ChargedJetHadron, processLeadingJetHadron, "ame event subleading jet-h for Data", false); void processMixLeadingJetHadron(FilterCollisions const& collisions, CorrChargedJets const& jets, @@ -1259,7 +1241,7 @@ struct ChargedJetHadron { return; fillMixLeadingJetHadronHistograms(collisions, jets, tracks); } - PROCESS_SWITCH(ChargedJetHadron, processMixLeadingJetHadron, "leadingjet-h mixed event correlation for Data", false); + PROCESS_SWITCH(ChargedJetHadron, processMixLeadingJetHadron, "mixed event leading jet-h for Data", false); void processJetHadron(FilterCollision const& collision, CorrChargedJets const& jets, @@ -1279,7 +1261,7 @@ struct ChargedJetHadron { return; fillMixJetHadronHistograms(collisions, jets, tracks); } - PROCESS_SWITCH(ChargedJetHadron, processMixJetHadron, "jet-h mixed event correlation for Data", false); + PROCESS_SWITCH(ChargedJetHadron, processMixJetHadron, "mixed event jet-h for Data", false); //...HF jet correlations.................... void processHFJetCorrelation(FilterCollision const& collision, @@ -1298,7 +1280,6 @@ struct ChargedJetHadron { registry.fill(HIST("h_d0jet_phi"), jet.phi()); } for (const auto& candidate : candidates) { - // float ptD = candidate.ptD(); //from HFC D0-h registry.fill(HIST("h_d0_mass"), candidate.m()); registry.fill(HIST("h_d0_pt"), candidate.pt()); registry.fill(HIST("h_d0_eta"), candidate.eta()); @@ -1317,7 +1298,7 @@ struct ChargedJetHadron { void processCollisionsQCMCD(soa::Join::iterator const& collision, FilterJetTracks const& tracks) { - float eventWeight = collision.weight(); + const float eventWeight = doEventWeighted ? collision.weight() : 1.f; if (!collision.has_mcCollision()) { registry.fill(HIST("h_fakecollisions"), 0.5); } @@ -1345,12 +1326,13 @@ struct ChargedJetHadron { fillTrackHistograms(track, eventWeight); } } - PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCMCD, "weighted collisions and tracks for MCD", false); + PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCMCD, "QC of collisions and tracks for MCD", false); void processSpectraAreaSubMCD(FilterCollision const& collision, CorrChargedMCDJets const& jets, aod::JetTracks const&) { + const float eventWeight = doEventWeighted ? collision.weight() : 1.f; if (!isGoodCollision(collision)) return; for (auto const& jet : jets) { @@ -1360,8 +1342,8 @@ struct ChargedJetHadron { if (!isAcceptedJet(jet)) { continue; } - fillJetHistograms(jet); - fillJetAreaSubHistograms(jet, collision.rho()); + fillJetHistograms(jet, eventWeight); + fillJetAreaSubHistograms(jet, collision.rho(), eventWeight); } } PROCESS_SWITCH(ChargedJetHadron, processSpectraAreaSubMCD, "jet spectra with rho-area subtraction for MCD", false); @@ -1370,10 +1352,11 @@ struct ChargedJetHadron { CorrChargedMCDJets const& jets, FilterJetTracks const& tracks) { + const float eventWeight = doEventWeighted ? collision.weight() : 1.f; if (!isGoodCollision(collision)) { return; } - fillLeadingJetHadronHistograms(collision, jets, tracks); + fillLeadingJetHadronHistograms(collision, jets, tracks, eventWeight); } PROCESS_SWITCH(ChargedJetHadron, processLeadinJetHadronMCD, "same event leading jet-hadron correlations for MCD", false); @@ -1391,9 +1374,10 @@ struct ChargedJetHadron { CorrChargedMCDJets const& jets, FilterJetTracks const& tracks) { + const float eventWeight = doEventWeighted ? collision.weight() : 1.f; if (!isGoodCollision(collision)) return; - fillJetHadronHistograms(collision, jets, tracks); + fillJetHadronHistograms(collision, jets, tracks, eventWeight); } PROCESS_SWITCH(ChargedJetHadron, processJetHadronMCD, "same event jet-hadron correlations for MCD", false); @@ -1407,38 +1391,12 @@ struct ChargedJetHadron { } PROCESS_SWITCH(ChargedJetHadron, processMixJetHadronMCD, "mixed event jet-hadron correlations for MCD", false); - //............weighted................ - void processSpectraMCDWeighted(soa::Filtered::iterator const& collision, - soa::Join const& jets, - aod::JetTracks const&) - { - if (!isGoodCollision(collision)) - return; - for (auto const& jet : jets) { - if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { - continue; - } - if (!isAcceptedJet(jet)) { - continue; - } - float eventWeight = jet.eventWeight(); - float pTHat = 10. / (std::pow(eventWeight, 1.0 / pTHatExponent)); - if (jet.pt() > pTHatMaxMCD * pTHat) { - continue; - } - registry.fill(HIST("h_jet_phat"), pTHat); - registry.fill(HIST("h_jet_phat_weighted"), pTHat, eventWeight); - fillJetHistograms(jet, eventWeight); - } - } - PROCESS_SWITCH(ChargedJetHadron, processSpectraMCDWeighted, "jet finder QC mcd with weighted events", false); - //........MCP.................................................. void processCollisionsQCMCP(aod::JetMcCollision const& mccollision, soa::SmallGroups const& collisions, soa::Filtered const& particles) { - float eventWeight = mccollision.weight(); + const float eventWeight = doEventWeighted ? mccollision.weight() : 1.f; registry.fill(HIST("h_mcColl_counts"), 0.5); if (std::abs(mccollision.posZ()) > vertexZCut) @@ -1456,30 +1414,37 @@ struct ChargedJetHadron { int nGood = 0; for (auto const& collision : collisions) { if (isGoodCollision(collision)) { - registry.fill(HIST("h_mc_mult"), getMultiplicity(collision)); + registry.fill(HIST("h_mcdColl_mult"), getMultiplicity(collision), eventWeight); nGood++; } } if (nGood == 0) return; registry.fill(HIST("h_mcColl_counts"), 4.5); - registry.fill(HIST("h_mcColl_zvertex"), mccollision.posZ(), eventWeight); + registry.fill(HIST("h_mcpColl_Zvertex"), mccollision.posZ(), eventWeight); registry.fill(HIST("h_mcpColl_centrality"), mccollision.centFT0M(), eventWeight); registry.fill(HIST("h_mcpColl_mult"), getMultiplicity(mccollision), eventWeight); for (auto const& particle : particles) { fillParticleHistograms(particle, eventWeight); } } - PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCMCP, "collisions and tracks for MCP", false); + PROCESS_SWITCH(ChargedJetHadron, processCollisionsQCMCP, "QC of collisions and particles for MCP", false); - void processSpectraMCP(soa::Filtered::iterator const& mccollision, - soa::SmallGroups const& collisions, - CorrChargedMCPJets const& jets, - aod::JetParticles const&) + void processSpectraAreaSubMCP(FilterMcpCollision const& mccollision, + soa::SmallGroups const& collisions, + CorrChargedMCPJets const& jets, + soa::Filtered const&) { bool mcLevelIsParticleLevel = true; + const float eventWeight = doEventWeighted ? mccollision.weight() : 1.f; if (!applyMCCollisionCuts(mccollision, collisions)) return; + registry.fill(HIST("h_mcColl_rho"), mccollision.rho(), eventWeight); + if (doEventWeighted) { + registry.fill(HIST("h_mcColl_counts_weight"), 1.5); + registry.fill(HIST("h_mcColl_counts_weight"), 2.5, mccollision.xsectGen()); + registry.fill(HIST("h_mcColl_counts_weight"), 3.5, eventWeight); + } for (auto const& jet : jets) { if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { continue; @@ -1487,40 +1452,24 @@ struct ChargedJetHadron { if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { continue; } - fillMCPHistograms(jet); + fillMCPHistograms(jet, eventWeight); + fillMCPAreaSubHistograms(jet, mccollision.rho(), eventWeight); } } - PROCESS_SWITCH(ChargedJetHadron, processSpectraMCP, "jet spectra for MCP", false); + PROCESS_SWITCH(ChargedJetHadron, processSpectraAreaSubMCP, "jet spectra without and with UE subtraction of area-based for MCP", false); void processLeadingJetHadronMCP(FilterMcpCollision const& mccollision, soa::SmallGroups const& collisions, CorrChargedMCPJets const& jets, soa::Filtered const& particles) { - bool mcLevelIsParticleLevel = true; + const float eventWeight = doEventWeighted ? mccollision.weight() : 1.f; if (!applyMCCollisionCuts(mccollision, collisions)) return; - for (auto const& collision : collisions) { - if (isGoodCollision(collision)) { - registry.fill(HIST("h_mcColl_centrality"), getCentrality(collision)); - registry.fill(HIST("h_mcColl_mult"), getMultiplicity(collision)); - break; - } - } - registry.fill(HIST("h_mcColl_rho"), mccollision.rho()); - for (auto const& jet : jets) { - if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { - continue; - } - if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { - continue; - } - fillMCPAreaSubHistograms(jet, mccollision.rho()); - } - fillMCPLeadingJetHadronHistograms(mccollision, jets, particles); + fillMCPLeadingJetHadronHistograms(mccollision, jets, particles, eventWeight); } - PROCESS_SWITCH(ChargedJetHadron, processLeadingJetHadronMCP, "jet spectra with area-based & SM leading jet-hadron for MCP", false); + PROCESS_SWITCH(ChargedJetHadron, processLeadingJetHadronMCP, "same event leading jet-hadron for MCP", false); void processMixLeadingJetHadronMCP(FilterMcpCollisions const& mccollisions, soa::SmallGroups const& collisions, @@ -1538,10 +1487,11 @@ struct ChargedJetHadron { CorrChargedMCPJets const& jets, soa::Filtered const& particles) { + const float eventWeight = doEventWeighted ? mccollision.weight() : 1.f; if (!applyMCCollisionCuts(mccollision, collisions)) return; - fillMCPJetHadronHistograms(mccollision, jets, particles); + fillMCPJetHadronHistograms(mccollision, jets, particles, eventWeight); } PROCESS_SWITCH(ChargedJetHadron, processJetHadronMCP, "same event jet-hadron for MCP", false); @@ -1555,34 +1505,6 @@ struct ChargedJetHadron { fillMCPMixJetHadronHistograms(mccollisions, collisions, jets, particles); } PROCESS_SWITCH(ChargedJetHadron, processMixJetHadronMCP, "mixed event jet-hadron for MCP", false); - - //............weighted................ - void processSpectraMCPWeighted(soa::Filtered::iterator const& mccollision, - soa::SmallGroups const& collisions, - soa::Join const& jets, - aod::JetParticles const&) - { - bool mcLevelIsParticleLevel = true; - float eventWeight = mccollision.weight(); // float jetweight = jet.eventWeight(); - - if (!applyMCCollisionCuts(mccollision, collisions)) - return; - registry.fill(HIST("h_mcColl_counts_weight"), 1.5); - registry.fill(HIST("h_mcColl_counts_weight"), 2.5, mccollision.xsectGen()); - registry.fill(HIST("h_mcColl_counts_weight"), 3.5, eventWeight); - - for (auto const& jet : jets) { - if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { - continue; - } - if (!isAcceptedJet(jet, mcLevelIsParticleLevel)) { - continue; - } - registry.fill(HIST("h_mcColl_counts_weight"), 4.5, jet.eventWeight()); - fillMCPHistograms(jet, eventWeight); - } - } - PROCESS_SWITCH(ChargedJetHadron, processSpectraMCPWeighted, "jet spectra for MCP weighted", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)