From f29c2a6e691f6a254c2efebf96cba568832b4a4e Mon Sep 17 00:00:00 2001 From: aimeric-landou Date: Tue, 10 Sep 2024 16:08:01 +0200 Subject: [PATCH 1/3] PWGJE - trackEfficiency quick fix --- PWGJE/Tasks/trackEfficiency.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Tasks/trackEfficiency.cxx b/PWGJE/Tasks/trackEfficiency.cxx index a4f08419073..67821db8a8c 100644 --- a/PWGJE/Tasks/trackEfficiency.cxx +++ b/PWGJE/Tasks/trackEfficiency.cxx @@ -207,7 +207,7 @@ struct TrackEfficiencyJets { if (doprocessParticles || doprocessParticlesWeighted) { AxisSpec centAxis = {121, -10., 111., "centrality (%)"}; registry.add("h_mccollisions", "event status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}}); - registry.add("h2_centrality_mccollisions", "centrality vs mccollisions; centrality; collisions", {HistType::kTH1F, {centAxis, {4, 0.0, 4.0}}}); + registry.add("h2_centrality_mccollisions", "centrality vs mccollisions; centrality; collisions", {HistType::kTH2F, {centAxis, {4, 0.0, 4.0}}}); } if (doprocessTracksWeighted) { registry.add("h_collisions_weighted", "event status;event status;entries", {HistType::kTH1F, {{4, 0.0, 4.0}}}); From f05681680276f4a9500f09b6e6b8af951161914d Mon Sep 17 00:00:00 2001 From: aimeric-landou Date: Fri, 13 Sep 2024 14:05:36 +0200 Subject: [PATCH 2/3] PWGJE - random cone add randomised eta,phi without leading jets --- PWGJE/Tasks/jetfinderQA.cxx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/PWGJE/Tasks/jetfinderQA.cxx b/PWGJE/Tasks/jetfinderQA.cxx index edd974c71ed..8af214b3860 100644 --- a/PWGJE/Tasks/jetfinderQA.cxx +++ b/PWGJE/Tasks/jetfinderQA.cxx @@ -211,6 +211,8 @@ struct JetFinderQATask { registry.add("h2_centrality_rhorandomcone", "; centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho} (GeV/c);", {HistType::kTH2F, {{1100, 0., 110.}, {800, -400.0, 400.0}}}); registry.add("h2_centrality_rhorandomconerandomtrackdirection", "; centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho} (GeV/c);", {HistType::kTH2F, {{1100, 0., 110.}, {800, -400.0, 400.0}}}); registry.add("h2_centrality_rhorandomconewithoutleadingjet", "; centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho} (GeV/c);", {HistType::kTH2F, {{1100, 0., 110.}, {800, -400.0, 400.0}}}); + registry.add("h2_centrality_rhorandomconerandomtrackdirectionwithoutoneleadingjets", "; centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho} (GeV/c);", {HistType::kTH2F, {{1100, 0., 110.}, {800, -400.0, 400.0}}}); + registry.add("h2_centrality_rhorandomconerandomtrackdirectionwithouttwoleadingjets", "; centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho} (GeV/c);", {HistType::kTH2F, {{1100, 0., 110.}, {800, -400.0, 400.0}}}); } if (doprocessJetsMCP || doprocessJetsMCPWeighted) { @@ -363,6 +365,16 @@ struct JetFinderQATask { return true; } + template + bool trackIsInJet(T const& track, U const& jet) { + for (auto const& constituentId : jet.tracksIds()) { + if (constituentId == track.globalIndex()) { + return true; + } + } + return false; + } + template void fillHistograms(T const& jet, float centrality, float occupancy, float weight = 1.0) { @@ -648,6 +660,27 @@ struct JetFinderQATask { } registry.fill(HIST("h2_centrality_rhorandomconewithoutleadingjet"), collision.centrality(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho()); + + + // randomised eta,phi for tracks, to assess part of fluctuations coming from statistically independently emitted particles, removing tracks from 2 leading jets + double randomConePtWithoutOneLeadJet = 0; + double randomConePtWithoutTwoLeadJet = 0; + for (auto const& track : tracks) { + if (jetderiveddatautilities::selectTrack(track, trackSelection)) { + float dPhi = RecoDecay::constrainAngle(randomNumber.Uniform(0.0, 2 * M_PI) - randomConePhi, static_cast(-M_PI)); // ignores actual phi of track + float dEta = randomNumber.Uniform(trackEtaMin, trackEtaMax) - randomConeEta; // ignores actual eta of track + if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) { + if (!trackIsInJet(track, jets.iteratorAt(0))) { + randomConePtWithoutOneLeadJet += track.pt(); + if(!trackIsInJet(track, jets.iteratorAt(1))) { + randomConePtWithoutTwoLeadJet += track.pt(); + } + } + } + } + } + registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithoutoneleadingjets"), collision.centrality(), randomConePtWithoutOneLeadJet - M_PI * randomConeR * randomConeR * collision.rho()); + registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithouttwoleadingjets"), collision.centrality(), randomConePtWithoutTwoLeadJet - M_PI * randomConeR * randomConeR * collision.rho()); } void processJetsData(soa::Filtered::iterator const& collision, soa::Join const& jets, JetTracks const&) From 692cad3ca5e70a331b697a6ea4a4b33e6c261e79 Mon Sep 17 00:00:00 2001 From: aimeric-landou Date: Fri, 13 Sep 2024 20:46:36 +0200 Subject: [PATCH 3/3] clang fixes --- PWGJE/Tasks/jetfinderQA.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGJE/Tasks/jetfinderQA.cxx b/PWGJE/Tasks/jetfinderQA.cxx index 8af214b3860..38c5b1cbab4 100644 --- a/PWGJE/Tasks/jetfinderQA.cxx +++ b/PWGJE/Tasks/jetfinderQA.cxx @@ -366,7 +366,8 @@ struct JetFinderQATask { } template - bool trackIsInJet(T const& track, U const& jet) { + bool trackIsInJet(T const& track, U const& jet) + { for (auto const& constituentId : jet.tracksIds()) { if (constituentId == track.globalIndex()) { return true; @@ -661,7 +662,6 @@ struct JetFinderQATask { registry.fill(HIST("h2_centrality_rhorandomconewithoutleadingjet"), collision.centrality(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho()); - // randomised eta,phi for tracks, to assess part of fluctuations coming from statistically independently emitted particles, removing tracks from 2 leading jets double randomConePtWithoutOneLeadJet = 0; double randomConePtWithoutTwoLeadJet = 0; @@ -672,7 +672,7 @@ struct JetFinderQATask { if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) { if (!trackIsInJet(track, jets.iteratorAt(0))) { randomConePtWithoutOneLeadJet += track.pt(); - if(!trackIsInJet(track, jets.iteratorAt(1))) { + if (!trackIsInJet(track, jets.iteratorAt(1))) { randomConePtWithoutTwoLeadJet += track.pt(); } }