Skip to content
Open
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
8 changes: 3 additions & 5 deletions PWGJE/Tasks/jetOutlierQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@
auto jetPtTemp = 0.0;
jetPtBins.push_back(jetPtTemp);
while (jetPtTemp < jetPtMax) {
if (jetPtTemp < 100.0) {

Check failure on line 105 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 108 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 Down Expand Up @@ -259,13 +259,13 @@
bool isAcceptedJet(U const& jet)
{

if (jetAreaFractionMin > -98.0) {

Check failure on line 262 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 268 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 @@ -308,7 +308,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 311 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 @@ -327,7 +327,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 330 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 @@ -481,10 +481,10 @@
auto bc2Events = bc2It->second;

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

Check failure on line 484 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 487 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 @@ -607,7 +607,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 610 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 @@ -692,12 +692,11 @@
int mcCollisionIDcoll = collision.mcCollisionId(); // Get the corresponding MC collision ID from the reco collision
int mcCollisionIDOutlier = mcParticleOutlier.mcCollisionId();
// include selection on pThat of particle
if(mcParticleOutlier.pt() < pTHatMaxMCP * pTHat) {
if (mcParticleOutlier.pt() < pTHatMaxMCP * pTHat) {
registry.fill(HIST("h_track_pt_same_collision_cut_particle"), track.pt(), weight);
registry.fill(HIST("h_pt_hard_track_pt_same_collision_cut_particle"), pTHat != 0.0 ? track.pt() / pTHat : 0.0, track.pt(), weight);
}
}
else {
} else {
registry.fill(HIST("h_track_pt_same_collision_rejected"), track.pt(), weight);
}
// fill tracks for events which have no JJ outlier tracks from different events
Expand All @@ -706,8 +705,7 @@
registry.fill(HIST("h_track_pt_eta_no_JJ_different"), track.pt(), track.eta(), weight);
registry.fill(HIST("h_track_pt_phi_no_JJ_different"), track.pt(), track.phi(), weight);
registry.fill(HIST("h2_collision_ID_difference_no_JJ_different"), pTHat, float(outlierCollisionIDDifference));
}
else {
} else {
registry.fill(HIST("h_track_pt_no_JJ_different_rejected"), track.pt(), weight);
}
// collision checks for all tracks
Expand All @@ -716,7 +714,7 @@
double pTHatOutlier = collisionOutlier.mcCollision().ptHard();
int diffColl = collision.globalIndex() - collisionOutlier.globalIndex();

if (abs(diffColl) < 6) {

Check failure on line 717 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
Loading