Skip to content
Merged
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
10 changes: 9 additions & 1 deletion PWGJE/Tasks/jetHadronRecoil.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "PWGJE/Core/JetFinder.h"
#include "PWGJE/Core/JetFindingUtilities.h"
#include "PWGJE/DataModel/Jet.h"

#include "PWGJE/Core/JetDerivedDataUtilities.h"

#include "EventFiltering/filterTables.h"
Expand Down Expand Up @@ -98,7 +97,7 @@
std::vector<double> dRBinning = {0.0, 1.0e-9, 0.003, 0.006, 0.009, 0.012, 0.015, 0.018, 0.021, 0.024,
0.027, 0.03, 0.033, 0.036, 0.039, 0.042, 0.045, 0.048, 0.051, 0.054,
0.057, 0.06, 0.063, 0.066, 0.069, 0.072, 0.075, 0.078, 0.081, 0.084,
0.087, 0.09, 0.093, 0.096, 0.099, 0.102, 0.105, 0.108, 0.111, 0.114,

Check failure on line 100 in PWGJE/Tasks/jetHadronRecoil.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
0.117, 0.12, 0.123, 0.126, 0.129, 0.132, 0.135, 0.138, 0.141, 0.144,
0.147, 0.15, 0.153, 0.156, 0.159, 0.162, 0.165, 0.168, 0.171, 0.174,
0.177, 0.18, 0.183, 0.186, 0.189, 0.192, 0.195, 0.198, 0.201, 0.204,
Expand Down Expand Up @@ -128,7 +127,9 @@
{"hReferencePt", "jet p_{T};p_{T,jet};entries", {HistType::kTH1F, {{500, -100, 400}}}},
{"hSignalPt", "jet p_{T};p_{T,jet};entries", {HistType::kTH1F, {{500, -100, 400}}}},
{"hSignalTriggers", "trigger p_{T};p_{T,trig};entries", {HistType::kTH1F, {{150, 0, 150}}}},
{"hSignalPtHard", "jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}", {HistType::kTH2F, {{500, -100, 400}, {20, 0, 5}}}},
{"hReferenceTriggers", "trigger p_{T};p_{T,trig};entries", {HistType::kTH1F, {{150, 0, 150}}}},
{"hReferencePtHard", "jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}", {HistType::kTH2F, {{500, -100, 400}, {20, 0, 5}}}},
{"hSigEventTriggers", "N_{triggers};events", {HistType::kTH1F, {{10, 0, 10}}}},
{"hRefEventTriggers", "N_{triggers};events", {HistType::kTH1F, {{10, 0, 10}}}},
{"hJetPt", "jet p_{T};p_{T,jet};entries", {HistType::kTH1F, {{500, -100, 400}}}},
Expand Down Expand Up @@ -195,7 +196,9 @@
{
bool isSigCol;
std::vector<double> phiTTAr;
std::vector<double> ptTTAr;
double phiTT = 0;
double ptTT = 0;
int trigNumber = 0;
int nTT = 0;
double leadingPT = 0;
Expand All @@ -214,11 +217,13 @@
}
if (isSigCol && track.pt() < ptTTsigMax && track.pt() > ptTTsigMin) {
phiTTAr.push_back(track.phi());
ptTTAr.push_back(track.pt());
registry.fill(HIST("hSignalTriggers"), track.pt(), weight);
nTT++;
}
if (!isSigCol && track.pt() < ptTTrefMax && track.pt() > ptTTrefMin) {
phiTTAr.push_back(track.phi());
ptTTAr.push_back(track.pt());
registry.fill(HIST("hReferenceTriggers"), track.pt(), weight);
nTT++;
}
Expand All @@ -230,6 +235,7 @@
if (nTT > 0) {
trigNumber = rand->Integer(nTT);
phiTT = phiTTAr[trigNumber];
ptTT = ptTTAr[trigNumber];
if (isSigCol) {
registry.fill(HIST("hNtrig"), 1.5, weight);
registry.fill(HIST("hSigEventTriggers"), nTT, weight);
Expand All @@ -239,7 +245,7 @@
registry.fill(HIST("hNtrig"), 0.5, weight);
registry.fill(HIST("hRefEventTriggers"), nTT, weight);
registry.fill(HIST("hRhoReference"), rhoReference, weight);
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {

Check failure on line 248 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hRhoReferenceShift"), rho + shift, shift, weight);
}
}
Expand Down Expand Up @@ -271,31 +277,33 @@
if (nTT > 0) {
float dphi = RecoDecay::constrainAngle(jet.phi() - phiTT);
if (isSigCol) {
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {

Check failure on line 280 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hDeltaRpTSignal"), jet.pt() - (rho * jet.area()), dR, weight);
registry.fill(HIST("hDeltaRSignal"), dR, weight);
}
registry.fill(HIST("hDeltaRpTDPhiSignal"), jet.pt() - (rho * jet.area()), dphi, dR, weight);
registry.fill(HIST("hSignalPtDPhi"), dphi, jet.pt() - (rho * jet.area()), weight);
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {

Check failure on line 286 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hSignalPt"), jet.pt() - (rho * jet.area()), weight);
registry.fill(HIST("hSignalPtHard"), jet.pt() - (rho * jet.area()), ptTT / pTHat, weight);
}
}
if (!isSigCol) {
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {

Check failure on line 292 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hDeltaRpTReference"), jet.pt() - (rhoReference * jet.area()), dR, weight);
registry.fill(HIST("hDeltaRReference"), dR, weight);
}
registry.fill(HIST("hDeltaRpTDPhiReference"), jet.pt() - (rhoReference * jet.area()), dphi, dR, weight);
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {

Check failure on line 297 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hDeltaRpTDPhiReferenceShifts"), jet.pt() - ((rho + shift) * jet.area()), dphi, dR, shift, weight);
}
registry.fill(HIST("hReferencePtDPhi"), dphi, jet.pt() - (rhoReference * jet.area()), weight);
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {

Check failure on line 301 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hReferencePtDPhiShifts"), dphi, jet.pt() - ((rho + shift) * jet.area()), shift, weight);
}
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {

Check failure on line 304 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hReferencePt"), jet.pt() - (rhoReference * jet.area()), weight);
registry.fill(HIST("hReferencePtHard"), jet.pt() - (rhoReference * jet.area()), ptTT / pTHat, weight);
}
}
}
Expand Down Expand Up @@ -370,7 +378,7 @@
if (nTT > 0) {
float dphi = RecoDecay::constrainAngle(jet.phi() - phiTT);
if (isSigCol) {
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {

Check failure on line 381 in PWGJE/Tasks/jetHadronRecoil.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.
registry.fill(HIST("hDeltaRpTSignalPart"), jet.pt(), dR, weight);
registry.fill(HIST("hDeltaRSignalPart"), dR, weight);
}
Expand Down Expand Up @@ -767,7 +775,7 @@
} else if (wtaMethod == 1) {
// recluster jet
jetConstituents.clear();
for (auto& jetConstituent : jet.template tracks_as<X>()) {

Check failure on line 778 in PWGJE/Tasks/jetHadronRecoil.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.
fastjetutilities::fillTracks(jetConstituent, jetConstituents, jetConstituent.globalIndex());
}
jetReclustered.clear();
Expand Down
Loading