From 33c3ed1528e1a8e8b4ed67e51bacad96470918c5 Mon Sep 17 00:00:00 2001 From: dajones2 Date: Wed, 7 Jan 2026 18:37:33 +0000 Subject: [PATCH 1/4] PWGJE: Adding RTC selections and more QA histograms --- PWGJE/Tasks/jetHadronRecoil.cxx | 93 +++++++++++++++------------------ 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index cdeb3fff418..5f2c1a20848 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -82,6 +82,7 @@ struct JetHadronRecoil { Configurable skipMBGapEvents{"skipMBGapEvents", false, "flag to choose to reject min. bias gap events; jet-level rejection applied at the jet finder level, here rejection is applied for collision and track process functions"}; Configurable outlierRejectEvent{"outlierRejectEvent", true, "where outliers are found, reject event (true) or just reject the single track/jet (false)"}; Configurable doSumw{"doSumw", false, "enable sumw2 for weighted histograms"}; + Configurable applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"}; TRandom3* rand = new TRandom3(0); @@ -204,9 +205,11 @@ struct JetHadronRecoil { if (doprocessJetsMCPMCDMatched || doprocessJetsMCPMCDMatchedWithRhoSubtraction || doprocessJetsMCPMCDMatchedWeighted || doprocessJetsMCPMCDMatchedWeightedWithRhoSubtraction || doprocessRecoilJetsMCPMCDMatched || doprocessRecoilJetsMCPMCDMatchedWeighted || doprocessRecoilJetsMCPMCDMatchedWeightedWithRhoSubtraction) { registry.add("hPtMatched", "p_{T} matching;p_{T,det};p_{T,part}", {HistType::kTH2F, {ptAxisDet, ptAxisPart}}, doSumw); registry.add("hPhiMatched", "#phi matching;#phi_{det};#phi_{part}", {HistType::kTH2F, {phiAxisDet, phiAxisPart}}, doSumw); - registry.add("hPhiMatched2d", "#phi matching 2d;#phi;p_{T}", {HistType::kTH2F, {phiAxisPart, ptAxisPart}}, doSumw); + registry.add("hPhiMatchedPt", "#phi matching 2d;#phi;p_{T}", {HistType::kTH2F, {{400, 0, 400}, phiAxisPart}}, doSumw); registry.add("hDeltaRMatched", "#DeltaR matching;#DeltaR_{det};#DeltaR_{part}", {HistType::kTH2F, {dRAxisDet, dRAxisPart}}, doSumw); registry.add("hPtMatched1d", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); + registry.add("hPtTruth2D", "p_{T} matching 1d;p_{T,part};dphip", {HistType::kTH2F, {{400, 0, 400},phiAxisPart}}, doSumw); + registry.add("hPtTruth1D", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); registry.add("hDeltaRMatched1d", "#DeltaR matching 1d;#DeltaR_{part}", {HistType::kTH1F, {dRAxisPart}}, doSumw); registry.add("hPtResolution", "p_{T} resolution;p_{T,part};Relative Resolution", {HistType::kTH2F, {ptAxisPart, {100, -5.0, 5.0}}}, doSumw); registry.add("hPhiResolution", "#phi resolution;#p_{T,part};Resolution", {HistType::kTH2F, {ptAxisPart, {100, -7.0, 7.0}}}, doSumw); @@ -626,9 +629,10 @@ struct JetHadronRecoil { } } - double dR = getWTAaxisDifference(jetTag, particles); + registry.fill(HIST("hPtTruth"), jetTag.pt(), weight); - if (jetTag.has_matchedJetGeo() && jetTag.has_matchedJetPt()) { + double dR = getWTAaxisDifference(jetTag, particles); + if (jetTag.has_matchedJetGeo()) { for (const auto& jetBase : jetTag.template matchedJetGeo_as>()) { if (jetBase.pt() > pTHatMaxMCD * pTHat) { if (outlierRejectEvent) { @@ -701,32 +705,31 @@ struct JetHadronRecoil { float dphip = RecoDecay::constrainAngle(jetTag.phi() - phiTT); double dRp = getWTAaxisDifference(jetTag, particles); - - if (jetTag.has_matchedJetGeo() && jetTag.has_matchedJetPt()) { + registry.fill(HIST("hPtTruth1D"), jetTag.pt(), weight); + registry.fill(HIST("hPtTruth2D"), jetTag.pt(), dphip, weight); + if (jetTag.has_matchedJetGeo()) { for (const auto& jetBase : jetTag.template matchedJetGeo_as>()) { - if (jetTag.template matchedJetGeo_first_as>().globalIndex() == jetTag.template matchedJetPt_first_as>().globalIndex()) { - if (jetBase.pt() > pTHatMaxMCD * pTHat) { - if (outlierRejectEvent) { - return; - } else { - continue; - } + if (jetBase.pt() > pTHatMaxMCD * pTHat) { + if (outlierRejectEvent) { + return; + } else { + continue; } + } - float dphi = RecoDecay::constrainAngle(jetBase.phi() - phiTT); - double dR = getWTAaxisDifference(jetBase, tracks); - registry.fill(HIST("hPhiMatched"), dphi, dphip, weight); - registry.fill(HIST("hPhiMatched2d"), jetTag.phi(), jetTag.pt(), weight); - registry.fill(HIST("hPhiResolution"), jetTag.pt(), dphip - dphi, weight); - registry.fill(HIST("hFullMatching"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), dphi, dphip, dR, dRp, weight); - if ((std::abs(dphip - o2::constants::math::PI) < 0.6)) { - registry.fill(HIST("hPtMatched1d"), jetTag.pt(), weight); - registry.fill(HIST("hDeltaRMatched1d"), dRp, weight); - registry.fill(HIST("hPtMatched"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), weight); - registry.fill(HIST("hPtResolution"), jetTag.pt(), (jetTag.pt() - (jetBase.pt() - (rho * jetBase.area()))) / jetTag.pt(), weight); - registry.fill(HIST("hDeltaRMatched"), dR, dRp, weight); - registry.fill(HIST("hDeltaRResolution"), jetTag.pt(), dRp - dR, weight); - } + float dphi = RecoDecay::constrainAngle(jetBase.phi() - phiTT); + double dR = getWTAaxisDifference(jetBase, tracks); + registry.fill(HIST("hPhiMatched"), dphi, dphip, weight); + registry.fill(HIST("hPhiMatchedPt"), jetTag.pt(), dphip, weight); + registry.fill(HIST("hPhiResolution"), jetTag.pt(), dphip - dphi, weight); + registry.fill(HIST("hFullMatching"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), dphi, dphip, dR, dRp, weight); + registry.fill(HIST("hPtMatched1d"), jetTag.pt(), weight); + if ((std::abs(dphip - o2::constants::math::PI) < 0.6)) { + registry.fill(HIST("hDeltaRMatched1d"), dRp, weight); + registry.fill(HIST("hPtMatched"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), weight); + registry.fill(HIST("hPtResolution"), jetTag.pt(), (jetTag.pt() - (jetBase.pt() - (rho * jetBase.area()))) / jetTag.pt(), weight); + registry.fill(HIST("hDeltaRMatched"), dR, dRp, weight); + registry.fill(HIST("hDeltaRResolution"), jetTag.pt(), dRp - dR, weight); } } } @@ -768,10 +771,7 @@ struct JetHadronRecoil { soa::Filtered> const& jets, soa::Filtered> const& tracks) { - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { - return; - } - if (skipMBGapEvents && collision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections)) { return; } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { @@ -793,10 +793,7 @@ struct JetHadronRecoil { soa::Filtered> const& jets, soa::Filtered> const& tracks) { - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { - return; - } - if (skipMBGapEvents && collision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections)) { return; } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { @@ -818,10 +815,7 @@ struct JetHadronRecoil { soa::Filtered> const& jets, soa::Filtered> const& tracks) { - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { - return; - } - if (skipMBGapEvents && collision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections)) { return; } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { @@ -843,10 +837,7 @@ struct JetHadronRecoil { soa::Filtered> const& jets, soa::Filtered> const& tracks) { - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { - return; - } - if (skipMBGapEvents && collision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections)) { return; } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { @@ -871,7 +862,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -901,7 +892,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -933,7 +924,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -965,7 +956,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -997,7 +988,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -1029,7 +1020,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -1061,7 +1052,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -1093,7 +1084,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { @@ -1125,7 +1116,7 @@ struct JetHadronRecoil { if (std::abs(mccollision.posZ()) > vertexZCut) { return; } - if (skipMBGapEvents && mccollision.getSubGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + if (!jetderiveddatautilities::selectMcCollision(mccollision, skipMBGapEvents, applyRCTSelections)) { return; } if (mccollision.ptHard() < pTHatMinEvent) { From e8648c8512130376be0397d32b6f43982b1c7afb Mon Sep 17 00:00:00 2001 From: dajones2 Date: Thu, 8 Jan 2026 11:27:15 +0000 Subject: [PATCH 2/4] minor changes --- PWGJE/Tasks/jetHadronRecoil.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index 5f2c1a20848..3748769213c 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -208,8 +208,8 @@ struct JetHadronRecoil { registry.add("hPhiMatchedPt", "#phi matching 2d;#phi;p_{T}", {HistType::kTH2F, {{400, 0, 400}, phiAxisPart}}, doSumw); registry.add("hDeltaRMatched", "#DeltaR matching;#DeltaR_{det};#DeltaR_{part}", {HistType::kTH2F, {dRAxisDet, dRAxisPart}}, doSumw); registry.add("hPtMatched1d", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); - registry.add("hPtTruth2D", "p_{T} matching 1d;p_{T,part};dphip", {HistType::kTH2F, {{400, 0, 400},phiAxisPart}}, doSumw); - registry.add("hPtTruth1D", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); + registry.add("hPtTruth2D", "p_{T} truth 2d;p_{T,part};dphip", {HistType::kTH2F, {{400, 0, 400},phiAxisPart}}, doSumw); + registry.add("hPtTruth1D", "p_{T} truth 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); registry.add("hDeltaRMatched1d", "#DeltaR matching 1d;#DeltaR_{part}", {HistType::kTH1F, {dRAxisPart}}, doSumw); registry.add("hPtResolution", "p_{T} resolution;p_{T,part};Relative Resolution", {HistType::kTH2F, {ptAxisPart, {100, -5.0, 5.0}}}, doSumw); registry.add("hPhiResolution", "#phi resolution;#p_{T,part};Resolution", {HistType::kTH2F, {ptAxisPart, {100, -7.0, 7.0}}}, doSumw); @@ -629,7 +629,7 @@ struct JetHadronRecoil { } } - registry.fill(HIST("hPtTruth"), jetTag.pt(), weight); + registry.fill(HIST("hPtTruth1D"), jetTag.pt(), weight); double dR = getWTAaxisDifference(jetTag, particles); if (jetTag.has_matchedJetGeo()) { @@ -654,7 +654,7 @@ struct JetHadronRecoil { registry.fill(HIST("hPtMatched1d"), jetTag.pt(), weight); registry.fill(HIST("hDeltaRMatched1d"), dRp, weight); } - } + }s } } From de0f5359c309e79e34cb5af76104ff1c5d1360c8 Mon Sep 17 00:00:00 2001 From: dajones2 Date: Thu, 8 Jan 2026 13:25:40 +0000 Subject: [PATCH 3/4] removing rouge 's' --- PWGJE/Tasks/jetHadronRecoil.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index 3748769213c..3f6e38d74cc 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -654,7 +654,7 @@ struct JetHadronRecoil { registry.fill(HIST("hPtMatched1d"), jetTag.pt(), weight); registry.fill(HIST("hDeltaRMatched1d"), dRp, weight); } - }s + } } } From aa5282900fe2f8c945a1a28e6f2d9dc3a1fafed2 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 8 Jan 2026 13:26:18 +0000 Subject: [PATCH 4/4] Please consider the following formatting changes --- PWGJE/Tasks/jetHadronRecoil.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index 3f6e38d74cc..0ade9be55fd 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -208,7 +208,7 @@ struct JetHadronRecoil { registry.add("hPhiMatchedPt", "#phi matching 2d;#phi;p_{T}", {HistType::kTH2F, {{400, 0, 400}, phiAxisPart}}, doSumw); registry.add("hDeltaRMatched", "#DeltaR matching;#DeltaR_{det};#DeltaR_{part}", {HistType::kTH2F, {dRAxisDet, dRAxisPart}}, doSumw); registry.add("hPtMatched1d", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); - registry.add("hPtTruth2D", "p_{T} truth 2d;p_{T,part};dphip", {HistType::kTH2F, {{400, 0, 400},phiAxisPart}}, doSumw); + registry.add("hPtTruth2D", "p_{T} truth 2d;p_{T,part};dphip", {HistType::kTH2F, {{400, 0, 400}, phiAxisPart}}, doSumw); registry.add("hPtTruth1D", "p_{T} truth 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}, doSumw); registry.add("hDeltaRMatched1d", "#DeltaR matching 1d;#DeltaR_{part}", {HistType::kTH1F, {dRAxisPart}}, doSumw); registry.add("hPtResolution", "p_{T} resolution;p_{T,part};Relative Resolution", {HistType::kTH2F, {ptAxisPart, {100, -5.0, 5.0}}}, doSumw);