From 3b833a21b3c6d4342d0d9d9f500b85f7cd139b9a Mon Sep 17 00:00:00 2001 From: dajones2 Date: Thu, 24 Jul 2025 15:36:46 +0100 Subject: [PATCH 1/4] PWGJE: Adding outlier cut QA --- PWGJE/Tasks/jetHadronRecoil.cxx | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index 211e7c1f7ed..e9862799963 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -128,6 +128,8 @@ struct JetHadronRecoil { {"hEtaTrack", "Track #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiTrack", "Track #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hTrack3D", "3D tracks histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, + {"hTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType:kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, + {"hPartPtHard", "Part vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType:kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, {"hPtTrackPtHard", "Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}", {HistType::kTH2F, {{200, 0, 200}, {20, 0, 5}}}}, {"hConstituents3D", "3D constituents histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, {"hReferencePtDPhi", "jet p_{T} vs DPhi;#Delta#phi;p_{T,jet}", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {500, -100, 400}}}}, @@ -145,6 +147,8 @@ struct JetHadronRecoil { {"hJetEta", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hJetPhi", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hJet3D", "3D jet distribution;p_{T};#eta;#phi", {HistType::kTH3F, {{500, -100, 400}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, + {"hTracksvsJets" "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType:kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, + {"hPartvsJets" "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType:kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, {"hPtPart", "Particle p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}}, {"hEtaPart", "Particle #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiPart", "Particle #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, @@ -209,11 +213,16 @@ struct JetHadronRecoil { bool isSigCol; std::vector phiTTAr; std::vector ptTTAr; + std::vector tracksAr; double phiTT = 0; double ptTT = 0; + double ptRandTrack = 0; int trigNumber = 0; + int trackNumber = 0; int nTT = 0; double leadingPT = 0; + double leadingTrackPt = 0; + double leadingJetPt = 0; float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); float rhoReference = rho + rhoReferenceShift; @@ -227,6 +236,10 @@ struct JetHadronRecoil { if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { continue; } + tracksAr.push_back(track.pt()); + if (track.pt() > leadingTrackPt) { + leadingTrackPt = track.pt(); + } if (track.pt() > pTHatTrackMaxMCD * pTHat) { return; } @@ -249,6 +262,10 @@ struct JetHadronRecoil { registry.fill(HIST("hPtTrackPtHard"), track.pt(), track.pt() / pTHat, weight); } + trackNumber = rand->Integer(tracksAr.size()); + ptRandTrack = tracksAr[trackNumber]; + registry.fill(HIST("hTrackPtHard"), ptRandTrack / pTHat, ptRandTrack, weight); + if (nTT > 0) { trigNumber = rand->Integer(nTT); phiTT = phiTTAr[trigNumber]; @@ -271,6 +288,9 @@ struct JetHadronRecoil { } for (const auto& jet : jets) { + if (jet.pt() > leadingJetPt) { + leadingJetPt = jet.pt(); + } if (jet.pt() > pTHatMaxMCD * pTHat) { return; } @@ -328,6 +348,7 @@ struct JetHadronRecoil { } } } + registry.fill(HIST("hTracksvsJets"), leadingTrackPt, leadingJetPt, pTHat, weight); } template @@ -336,10 +357,15 @@ struct JetHadronRecoil { bool isSigCol; std::vector phiTTAr; std::vector ptTTAr; + std::vector partAr; double phiTT = 0; double ptTT = 0; + double ptRandPart = 0; int trigNumber = 0; + int partNumber = 0; int nTT = 0; + double leadingPartPt = 0; + double leadingJetPt = 0; float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); float dice = rand->Rndm(); @@ -349,6 +375,10 @@ struct JetHadronRecoil { isSigCol = false; for (const auto& particle : particles) { + partAr.push_back(particle.pt()); + if (particle.pt() > leadingPartPt) { + leadingPartPt = particle.pt(); + } if (particle.pt() > pTHatTrackMaxMCD * pTHat) { return; } @@ -376,6 +406,10 @@ struct JetHadronRecoil { registry.fill(HIST("hPtPartPtHard"), particle.pt(), particle.pt() / pTHat, weight); } + partNumber = rand->Integer(partAr.size()); + ptRandPart = partAr[partNumber]; + registry.fill(HIST("hPartPtHard"), ptRandPart / pTHat, ptRandPart, weight); + if (nTT > 0) { trigNumber = rand->Integer(nTT); phiTT = phiTTAr[trigNumber]; @@ -393,6 +427,9 @@ struct JetHadronRecoil { } for (const auto& jet : jets) { + if (jet.pt() > leadingJetPt) { + leadingJetPt = jet.pt(); + } if (jet.pt() > pTHatMaxMCP * pTHat) { return; } @@ -436,6 +473,7 @@ struct JetHadronRecoil { } } } + registry.fill(HIST("hPartvsJets"), leadingPartPt, leadingJetPt, pTHat, weight); } template From 7c982ed7c058fe85336c41163c2dd8592beb8c07 Mon Sep 17 00:00:00 2001 From: dajones2 Date: Mon, 28 Jul 2025 17:40:26 +0100 Subject: [PATCH 2/4] fixing formatting --- 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 e9862799963..afd6985ff1f 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -128,8 +128,8 @@ struct JetHadronRecoil { {"hEtaTrack", "Track #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiTrack", "Track #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hTrack3D", "3D tracks histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, - {"hTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType:kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, - {"hPartPtHard", "Part vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType:kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, + {"hTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, + {"hPartPtHard", "Part vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, {"hPtTrackPtHard", "Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}", {HistType::kTH2F, {{200, 0, 200}, {20, 0, 5}}}}, {"hConstituents3D", "3D constituents histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, {"hReferencePtDPhi", "jet p_{T} vs DPhi;#Delta#phi;p_{T,jet}", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {500, -100, 400}}}}, @@ -147,8 +147,8 @@ struct JetHadronRecoil { {"hJetEta", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hJetPhi", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hJet3D", "3D jet distribution;p_{T};#eta;#phi", {HistType::kTH3F, {{500, -100, 400}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, - {"hTracksvsJets" "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType:kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, - {"hPartvsJets" "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType:kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, + {"hTracksvsJets" "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, + {"hPartvsJets" "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, {"hPtPart", "Particle p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}}, {"hEtaPart", "Particle #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiPart", "Particle #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, From 4fb544ad60ac42c7f4ed52a2319ce3a5ee93cad1 Mon Sep 17 00:00:00 2001 From: dajones2 Date: Tue, 29 Jul 2025 12:34:45 +0100 Subject: [PATCH 3/4] fixing histogram registry --- PWGJE/Tasks/jetHadronRecoil.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index afd6985ff1f..db519b6db6b 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -128,8 +128,8 @@ struct JetHadronRecoil { {"hEtaTrack", "Track #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiTrack", "Track #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hTrack3D", "3D tracks histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, - {"hTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, - {"hPartPtHard", "Part vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH3F, {{20, 0, 5}, {200, 0, 200}}}}, + {"hTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {{20, 0, 5}, {200, 0, 200}}}}, + {"hPartPtHard", "Part vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {{20, 0, 5}, {200, 0, 200}}}}, {"hPtTrackPtHard", "Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}", {HistType::kTH2F, {{200, 0, 200}, {20, 0, 5}}}}, {"hConstituents3D", "3D constituents histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, {"hReferencePtDPhi", "jet p_{T} vs DPhi;#Delta#phi;p_{T,jet}", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {500, -100, 400}}}}, @@ -147,8 +147,8 @@ struct JetHadronRecoil { {"hJetEta", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hJetPhi", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, {"hJet3D", "3D jet distribution;p_{T};#eta;#phi", {HistType::kTH3F, {{500, -100, 400}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}}, - {"hTracksvsJets" "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, - {"hPartvsJets" "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, + {"hTracksvsJets", "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, + {"hPartvsJets", "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}}, {"hPtPart", "Particle p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}}, {"hEtaPart", "Particle #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"hPhiPart", "Particle #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}}, @@ -180,7 +180,7 @@ struct JetHadronRecoil { {"hPtMatched1d", "p_{T} matching 1d;p_{T,part}", {HistType::kTH1F, {{400, 0, 400}}}}, {"hDeltaRMatched1d", "#DeltaR matching 1d;#DeltaR_{part}", {HistType::kTH1F, {dRAxisPart}}}, {"hPtResolution", "p_{T} resolution;p_{T,part};Relative Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -5.0, 5.0}}}}, - {"hPhiResolution", "#phi resolution;#p{T,part};Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -7.0, 7.0}}}}, + {"hPhiResolution", "#phi resolution;#p_{T,part};Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -7.0, 7.0}}}}, {"hDeltaRResolution", "#DeltaR Resolution;p_{T,part};Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -0.15, 0.15}}}}, {"hFullMatching", "Full 6D matching;p_{T,det};p_{T,part};#phi_{det};#phi_{part};#DeltaR_{det};#DeltaR_{part}", {HistType::kTHnSparseD, {ptAxisDet, ptAxisPart, phiAxisDet, phiAxisPart, dRAxisDet, dRAxisPart}}}}}; From 19fdccdf44ee394ccfdbd6e5a216296832593306 Mon Sep 17 00:00:00 2001 From: dajones2 <140733426+dajones2@users.noreply.github.com> Date: Wed, 30 Jul 2025 12:58:24 +0100 Subject: [PATCH 4/4] Removing duplicate pthat --- PWGJE/Tasks/jetHadronRecoil.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index aa415cf4abc..22eecf4098e 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -224,7 +224,6 @@ struct JetHadronRecoil { double leadingPT = 0; double leadingTrackPt = 0; double leadingJetPt = 0; - float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); float rhoReference = rho + rhoReferenceShift; float dice = rand->Rndm(); @@ -374,7 +373,6 @@ struct JetHadronRecoil { int nTT = 0; double leadingPartPt = 0; double leadingJetPt = 0; - float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); float dice = rand->Rndm(); if (dice < fracSig) isSigCol = true;