Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 41 additions & 27 deletions PWGJE/Tasks/jetOutlierQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
auto jetPtTemp = 0.0;
jetPtBins.push_back(jetPtTemp);
while (jetPtTemp < jetPtMax) {
if (jetPtTemp < 100.0) {

Check failure on line 104 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
jetPtTemp += 1.0;
jetPtBins.push_back(jetPtTemp);
} else if (jetPtTemp < 200.0) {

Check failure on line 107 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
jetPtTemp += 5.0;
jetPtBins.push_back(jetPtTemp);
} else {
Expand All @@ -112,8 +112,11 @@
jetPtBins.push_back(jetPtTemp);
}
}
std::vector<double> pThatBinning = {0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0,
3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0};

AxisSpec jetPtAxis = {jetPtBins, "#it{p}_{T} (GeV/#it{c})"};
AxisSpec pThatAxis = {pThatBinning, "p_{T} / #hat{p_{T}}"};

if (doprocessJetsAmbiguous) {
// outliers
Expand Down Expand Up @@ -177,43 +180,48 @@
registry.add("h_Z_reco_accepted", "Z position reconstructed accepted", {HistType::kTH1F, {{400, -12, 12}}});
registry.add("h_Z_true_accepted", "Z position particle accepted", {HistType::kTH1F, {{400, -12, 12}}});

registry.add("h_track_pt", "track pt;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt", "track pt;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_eta", "track eta;#eta_{track};entries", {HistType::kTH1F, {{100, -5, 5}}});
registry.add("h_track_phi", "track phi;#varphi_{track} (rad);entries", {HistType::kTH1F, {{160, -1.0, 7.0}}});
registry.add("h_track_pt_eta", "track pt vs eta;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{300, 0, 300}, {100, -5, 5}}});
registry.add("h_track_pt_phi", "track pt vs phi;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{300, 0, 300}, {160, -1.0, 7.0}}});
registry.add("h_track_pt_eta", "track pt vs eta;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{200, 0, 200}, {100, -5, 5}}});
registry.add("h_track_pt_phi", "track pt vs phi;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{200, 0, 200}, {160, -1.0, 7.0}}});
registry.add("h_pt_hard_track_pt", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {pThatAxis, {200, 0, 200}}});

registry.add("h_track_pt_accepted", "track pt accepted;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_accepted", "track pt accepted;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_eta_accepted", "track eta accepted;#eta_{track};entries", {HistType::kTH1F, {{100, -5, 5}}});
registry.add("h_track_phi_accepted", "track phi accepted;#varphi_{track} (rad);entries", {HistType::kTH1F, {{160, -1.0, 7.0}}});
registry.add("h_track_pt_eta_accepted", "track pt vs eta accepted;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{300, 0, 300}, {100, -5, 5}}});
registry.add("h_track_pt_phi_accepted", "track pt vs phi accepted;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{300, 0, 300}, {160, -1.0, 7.0}}});
registry.add("h_track_pt_accepted_no_JJ_outlier", "track pT with no JJ outlier", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_eta_accepted_no_JJ_outlier", "track pT vs eta with no JJ outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{300, 0, 300}, {100, -5, 5}}});
registry.add("h_track_pt_phi_accepted_no_JJ_outlier", "track pT vs phi with no JJ outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{300, 0, 300}, {160, -1.0, 7.0}}});
registry.add("h_track_pt_with_JJ_outlier", "track pT with JJ outlier", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_eta_with_JJ_outlier", "track pT vs eta with JJ outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{300, 0, 300}, {100, -5, 5}}});
registry.add("h_track_pt_phi_with_JJ_outlier", "track pT vs phi with JJ outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{300, 0, 300}, {160, -1.0, 7.0}}});
registry.add("h_track_pt_with_MB_outlier", "track pT with MB outlier", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_eta_with_MB_outlier", "track pT vs eta with MB outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{300, 0, 300}, {100, -5, 5}}});
registry.add("h_track_pt_phi_with_MB_outlier", "track pT vs phi with MB outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{300, 0, 300}, {160, -1.0, 7.0}}});

registry.add("h_track_pt_no_collision", "track pt no collision;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_collision", "track pt collision;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h2_track_pt_pt_hat_no_particle", "track pt vs pt hat no particle;p_{T,track} (GeV/#it{c});#hat{p}_{T} (GeV/#it{c});entries", {HistType::kTH2F, {{300, 0, 300}, {600, 0, 600}}});
registry.add("h2_track_pt_pt_hat_particle", "track pt vs pt hat particle;p_{T,track} (GeV/#it{c});#hat{p}_{T} (GeV/#it{c});entries", {HistType::kTH2F, {{300, 0, 300}, {600, 0, 600}}});

registry.add("h_track_pt_outlier", "weight track pt", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h2_pt_hat_track_pt", "track; #hat{#it{p}_{T}} (GeV/#it{c});#it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{600, 0, 600}, {300, 0, 300}}});
registry.add("h2_pt_hat_track_pt_outlier", "track; #hat{#it{p}_{T}} (GeV/#it{c});#it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{600, 0, 600}, {300, 0, 300}}});
registry.add("h_track_pt_eta_accepted", "track pt vs eta accepted;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{200, 0, 200}, {100, -5, 5}}});
registry.add("h_track_pt_phi_accepted", "track pt vs phi accepted;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{200, 0, 200}, {160, -1.0, 7.0}}});
registry.add("h_pt_hard_track_pt_accepted", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {pThatAxis, {200, 0, 200}}});
registry.add("h_track_pt_accepted_no_JJ_outlier", "track pT with no JJ outlier", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_eta_accepted_no_JJ_outlier", "track pT vs eta with no JJ outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{200, 0, 200}, {100, -5, 5}}});
registry.add("h_track_pt_phi_accepted_no_JJ_outlier", "track pT vs phi with no JJ outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{200, 0, 200}, {160, -1.0, 7.0}}});
registry.add("h_pt_hard_track_pt_no_JJ_outlier", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {pThatAxis, {200, 0, 200}}});
registry.add("h_track_pt_with_JJ_outlier", "track pT with JJ outlier", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_eta_with_JJ_outlier", "track pT vs eta with JJ outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{200, 0, 200}, {100, -5, 5}}});
registry.add("h_track_pt_phi_with_JJ_outlier", "track pT vs phi with JJ outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{200, 0, 200}, {160, -1.0, 7.0}}});
registry.add("h_pt_hard_track_pt_with_JJ_outlier", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {pThatAxis, {200, 0, 200}}});
registry.add("h_track_pt_with_MB_outlier", "track pT with MB outlier", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_eta_with_MB_outlier", "track pT vs eta with MB outlier;p_{T,track} (GeV/#it{c});#eta_{track};entries", {HistType::kTH2F, {{200, 0, 200}, {100, -5, 5}}});
registry.add("h_track_pt_phi_with_MB_outlier", "track pT vs phi with MB outlier;p_{T,track} (GeV/#it{c});#varphi_{track} (rad);entries", {HistType::kTH2F, {{200, 0, 200}, {160, -1.0, 7.0}}});
registry.add("h_pt_hard_track_pt_with_MB_outlier", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {pThatAxis, {200, 0, 200}}});

registry.add("h_track_pt_no_collision", "track pt no collision;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_collision", "track pt collision;p_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h2_track_pt_pt_hat_no_particle", "track pt vs pt hat no particle;p_{T,track} (GeV/#it{c});#hat{p}_{T} (GeV/#it{c});entries", {HistType::kTH2F, {{200, 0, 200}, {600, 0, 600}}});
registry.add("h2_track_pt_pt_hat_particle", "track pt vs pt hat particle;p_{T,track} (GeV/#it{c});#hat{p}_{T} (GeV/#it{c});entries", {HistType::kTH2F, {{200, 0, 200}, {600, 0, 600}}});

registry.add("h_track_pt_outlier", "weight track pt", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h2_pt_hat_track_pt", "track; #hat{#it{p}_{T}} (GeV/#it{c});#it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{600, 0, 600}, {200, 0, 200}}});
registry.add("h2_pt_hat_track_pt_outlier", "track; #hat{#it{p}_{T}} (GeV/#it{c});#it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{600, 0, 600}, {200, 0, 200}}});
registry.add("h2_neighbour_pt_hat_outlier", "neighbour; distance from collision; #hat{#it{p}_{T}} (GeV/#it{c})", {HistType::kTH2F, {{15, -7.5, 7.5}, {600, 0, 600}}});
registry.add("h2_neighbour_track_pt_outlier", "neighbour; distance from collision; #it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{15, -7.5, 7.5}, {200, 0, 100}}});
registry.add("h2_neighbour_pt_hat_all", "neighbour; distance from collision; #hat{#it{p}_{T}} (GeV/#it{c})", {HistType::kTH2F, {{15, -7.5, 7.5}, {600, 0, 600}}});
registry.add("h2_neighbour_track_pt_all", "neighbour; distance from collision; #it{p}_{T,track} (GeV/#it{c})", {HistType::kTH2F, {{15, -7.5, 7.5}, {200, 0, 100}}});

registry.add("h_track_pt_outlier_same_collision", "weight track pt same collision", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_outlier_different_collision_JJ", "weight track pt different jet-jet collision", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_outlier_different_collision_MB", "weight track pt different MB collision", {HistType::kTH1F, {{300, 0, 300}}});
registry.add("h_track_pt_outlier_same_collision", "weight track pt same collision", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_outlier_different_collision_JJ", "weight track pt different jet-jet collision", {HistType::kTH1F, {{200, 0, 200}}});
registry.add("h_track_pt_outlier_different_collision_MB", "weight track pt different MB collision", {HistType::kTH1F, {{200, 0, 200}}});

registry.add("h2_outlier_event_Ntracks_different_selected_JJ", "number of selected tracks from different jet-jet events", {HistType::kTH2F, {{600, 0, 600}, {200, 0, 200}}});
registry.add("h2_outlier_event_Ntracks_different_selected_MB", "number of selected tracks from different MB events", {HistType::kTH2F, {{600, 0, 600}, {200, 0, 200}}});
Expand All @@ -235,13 +243,13 @@
bool isAcceptedJet(U const& jet)
{

if (jetAreaFractionMin > -98.0) {

Check failure on line 246 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (jet.area() < jetAreaFractionMin * M_PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
return false;
}
}
bool checkConstituentPt = true;
bool checkConstituentMinPt = (leadingConstituentPtMin > -98.0);

Check failure on line 252 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
bool checkConstituentMaxPt = (leadingConstituentPtMax < 9998.0);
if (!checkConstituentMinPt && !checkConstituentMaxPt) {
checkConstituentPt = false;
Expand Down Expand Up @@ -284,7 +292,7 @@
registry.fill(HIST("h3_pthat_jet_pt_jet_ntracks_all"), pTHat, jet.pt(), jet.tracksIds().size(), weight);
registry.fill(HIST("h3_pthat_jet_pt_jet_ntracks_all_noweight"), pTHat, jet.pt(), jet.tracksIds().size());
}
for (auto& constituent : jet.template tracks_as<aod::JetTracksMCD>()) {

Check failure on line 295 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (jet.pt() > pTHatMaxMCDOutlier * pTHat) {
registry.fill(HIST("h3_jet_pt_track_dEta_track_dPhi_outliers"), jet.pt(), jet.eta() - constituent.eta(), jet.phi() - constituent.phi(), weight);
registry.fill(HIST("h3_jet_pt_track_dEta_track_dPhi_outliers_noweight"), jet.pt(), jet.eta() - constituent.eta(), jet.phi() - constituent.phi());
Expand All @@ -303,7 +311,7 @@
double pt_total = 0;
double pt_amb = 0;
double pt_unmatched = 0;
for (auto& constituent : jet.template tracks_as<aod::JetTracksMCD>()) {

Check failure on line 314 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
pt_total += constituent.pt();
bool has_MCparticle = constituent.has_mcParticle();
if (!has_MCparticle) {
Expand Down Expand Up @@ -457,10 +465,10 @@
auto bc2Events = bc2It->second;

// loop over events in the first BC
for (auto ev1It : bc1Events) {

Check failure on line 468 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto ev1 = collisions.rawIteratorAt(ev1It);
// loop over events in the second BC
for (auto ev2It : bc2Events) {

Check failure on line 471 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto ev2 = collisions.rawIteratorAt(ev2It);
// compute 2-event quantities and mark the candidate split collisions
float deltaZ = ev1.posZ() - ev2.posZ();
Expand Down Expand Up @@ -544,6 +552,7 @@
registry.fill(HIST("h_track_phi"), track.phi(), weight);
registry.fill(HIST("h_track_pt_eta"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi"), track.pt(), track.phi(), weight);
registry.fill(HIST("h_pt_hard_track_pt"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);
// checks on track distributions with/without collision and with/without MC particle
if (!track.has_collision() || track.collisionId() != collision.globalIndex()) {
registry.fill(HIST("h_track_pt_no_collision"), track.pt(), weight);
Expand All @@ -563,7 +572,7 @@
registry.fill(HIST("h2_pt_hat_track_pt_outlier"), pTHat, track.pt());
for (auto const& collisionOutlier : collisions) { // find collisions closeby
int diffColl = collision.globalIndex() - collisionOutlier.globalIndex();
if (abs(diffColl) < 6) {

Check failure on line 575 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float eventWeightOutlier = collisionOutlier.mcCollision().weight();
double pTHatOutlier = collisionOutlier.mcCollision().ptHard();
registry.fill(HIST("h2_neighbour_pt_hat_outlier"), float(diffColl + 0.1), pTHatOutlier, eventWeightOutlier);
Expand Down Expand Up @@ -657,7 +666,7 @@
double pTHatOutlier = collisionOutlier.mcCollision().ptHard();
int diffColl = collision.globalIndex() - collisionOutlier.globalIndex();

if (abs(diffColl) < 6) {

Check failure on line 669 in PWGJE/Tasks/jetOutlierQA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
// LOG(info) << "pThat = " << pTHat << "pThat neighbour = "<<pTHatOutlier;
registry.fill(HIST("h2_neighbour_pt_hat_all"), float(diffColl + 0.1), pTHatOutlier, eventWeightOutlier);
registry.fill(HIST("h2_neighbour_track_pt_all"), float(diffColl + 0.1), track.pt(), eventWeightOutlier);
Expand Down Expand Up @@ -689,19 +698,24 @@
registry.fill(HIST("h_track_phi_accepted"), track.phi(), weight);
registry.fill(HIST("h_track_pt_eta_accepted"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi_accepted"), track.pt(), track.phi(), weight);
registry.fill(HIST("h_pt_hard_track_pt_accepted"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);

if (!isOutlierEventDifferentJJCollision) {
registry.fill(HIST("h_track_pt_accepted_no_JJ_outlier"), track.pt(), weight);
registry.fill(HIST("h_track_pt_eta_accepted_no_JJ_outlier"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi_accepted_no_JJ_outlier"), track.pt(), track.phi(), weight);
registry.fill(HIST("h_pt_hard_track_pt_accepted_no_JJ_outlier"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);
} else {
registry.fill(HIST("h_track_pt_with_JJ_outlier"), track.pt(), weight);
registry.fill(HIST("h_track_pt_eta_with_JJ_outlier"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi_with_JJ_outlier"), track.pt(), track.phi(), weight);
registry.fill(HIST("h_pt_hard_track_pt_with_JJ_outlier"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);
}
if (isOutlierEventDifferentMBCollision) {
registry.fill(HIST("h_track_pt_with_MB_outlier"), track.pt(), weight);
registry.fill(HIST("h_track_pt_eta_with_MB_outlier"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi_with_MB_outlier"), track.pt(), track.phi(), weight);
registry.fill(HIST("h_pt_hard_track_pt_with_MB_outlier"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);
}
}
}
Expand Down
Loading