Skip to content

Commit 3d63b46

Browse files
authored
[PWGJE] Fix leading track cut, test different method to get delta pt (#10104)
1 parent 765a2e0 commit 3d63b46

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

PWGJE/Tasks/jetChargedV2.cxx

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ struct JetChargedV2 {
262262
//< RC test plots >//
263263
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}}});
264264
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}}});
265+
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}}});
266+
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}}});
265267
//< bkg sub plot | end >//
266268
//< median rho >//
267269
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 {
329331
if (!checkConstituentMinPt && !checkConstituentMaxPt) {
330332
checkConstituentPt = false;
331333
}
334+
332335
if (checkConstituentPt) {
333336
bool isMinLeadingConstituent = !checkConstituentMinPt;
334337
bool isMaxLeadingConstituent = true;
@@ -345,9 +348,21 @@ struct JetChargedV2 {
345348
}
346349
return isMinLeadingConstituent && isMaxLeadingConstituent;
347350
}
351+
348352
return true;
349353
}
350354

355+
template <typename T, typename U>
356+
bool trackIsInJet(T const& track, U const& jet)
357+
{
358+
for (auto const& constituentId : jet.tracksIds()) {
359+
if (constituentId == track.globalIndex()) {
360+
return true;
361+
}
362+
}
363+
return false;
364+
}
365+
351366
void fillLeadingJetQA(double leadingJetPt, double leadingJetPhi, double leadingJetEta)
352367
{
353368
registry.fill(HIST("leadJetPt"), leadingJetPt);
@@ -361,7 +376,8 @@ struct JetChargedV2 {
361376
}
362377

363378
void processInOutJetV2(soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos, aod::Qvectors>>::iterator const& collision,
364-
soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const& jets)
379+
soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const& jets,
380+
aod::JetTracks const&)
365381
{
366382
if (collision.trackOccupancyInTimeRange() < trackOccupancyInTimeRangeMin || trackOccupancyInTimeRangeMax < collision.trackOccupancyInTimeRange()) {
367383
return;
@@ -739,6 +755,26 @@ struct JetChargedV2 {
739755
break;
740756
}
741757
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet"), collision.centrality(), randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0);
758+
759+
// randomised eta,phi for tracks, to assess part of fluctuations coming from statistically independently emitted particles, removing tracks from 2 leading jets
760+
double randomConePtWithoutOneLeadJet = 0;
761+
double randomConePtWithoutTwoLeadJet = 0;
762+
for (auto const& track : tracks) {
763+
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
764+
float dPhi = RecoDecay::constrainAngle(randomNumber.Uniform(0.0, o2::constants::math::TwoPI) - randomConePhi, static_cast<float>(-o2::constants::math::PI));
765+
float dEta = randomNumber.Uniform(trackEtaMin, trackEtaMax) - randomConeEta;
766+
if (std::sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
767+
if (!trackIsInJet(track, jets.iteratorAt(0))) {
768+
randomConePtWithoutOneLeadJet += track.pt();
769+
if (!trackIsInJet(track, jets.iteratorAt(1))) {
770+
randomConePtWithoutTwoLeadJet += track.pt();
771+
}
772+
}
773+
}
774+
}
775+
}
776+
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutoneleadingjet"), collision.centrality(), randomConePtWithoutOneLeadJet - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0);
777+
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithouttwoleadingjet"), collision.centrality(), randomConePtWithoutTwoLeadJet - o2::constants::math::PI * randomConeR * randomConeR * rholocal, rcPhiPsi2, 1.0);
742778
}
743779
delete hPtsumSumptFit;
744780
evtnum += 1;

0 commit comments

Comments
 (0)