diff --git a/PWGJE/Tasks/jetChargedV2.cxx b/PWGJE/Tasks/jetChargedV2.cxx index 61b1f1e1dbd..34802fa165b 100644 --- a/PWGJE/Tasks/jetChargedV2.cxx +++ b/PWGJE/Tasks/jetChargedV2.cxx @@ -262,6 +262,8 @@ struct JetChargedV2 { //< RC test plots >// registry.add("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{120, -10.0, 110.0}, {800, -400.0, 400.0}, {160, 0., o2::constants::math::TwoPI}}}); registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{120, -10.0, 110.0}, {800, -400.0, 400.0}, {160, 0., o2::constants::math::TwoPI}}}); + registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutoneleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{120, -10.0, 110.0}, {800, -400.0, 400.0}, {160, 0., o2::constants::math::TwoPI}}}); + registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithouttwoleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{120, -10.0, 110.0}, {800, -400.0, 400.0}, {160, 0., o2::constants::math::TwoPI}}}); //< bkg sub plot | end >// //< median rho >// registry.add("h_jet_pt_in_out_plane_v2", "jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {jetPtAxisRhoAreaSub}}); @@ -329,6 +331,7 @@ struct JetChargedV2 { if (!checkConstituentMinPt && !checkConstituentMaxPt) { checkConstituentPt = false; } + if (checkConstituentPt) { bool isMinLeadingConstituent = !checkConstituentMinPt; bool isMaxLeadingConstituent = true; @@ -345,9 +348,21 @@ struct JetChargedV2 { } return isMinLeadingConstituent && isMaxLeadingConstituent; } + 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; + } + void fillLeadingJetQA(double leadingJetPt, double leadingJetPhi, double leadingJetEta) { registry.fill(HIST("leadJetPt"), leadingJetPt); @@ -361,7 +376,8 @@ struct JetChargedV2 { } void processInOutJetV2(soa::Filtered>::iterator const& collision, - soa::Join const& jets) + soa::Join const& jets, + aod::JetTracks const&) { if (collision.trackOccupancyInTimeRange() < trackOccupancyInTimeRangeMin || trackOccupancyInTimeRangeMax < collision.trackOccupancyInTimeRange()) { return; @@ -739,6 +755,26 @@ struct JetChargedV2 { break; } registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet"), collision.centrality(), randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0); + + // 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 * o2::constants::math::PI) - randomConePhi, static_cast(-o2::constants::math::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("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutoneleadingjet"), collision.centrality(), randomConePtWithoutOneLeadJet - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0); + registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithouttwoleadingjet"), collision.centrality(), randomConePtWithoutTwoLeadJet - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0); } delete hPtsumSumptFit; evtnum += 1;