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
34 changes: 32 additions & 2 deletions PWGJE/Tasks/jetHadronRecoil.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
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,
0.117, 0.12, 0.123, 0.126, 0.129, 0.132, 0.135, 0.138, 0.141, 0.144,

Check failure on line 106 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.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,
0.207, 0.21, 0.213, 0.216, 0.219, 0.222, 0.225, 0.228, 0.231, 0.234,
Expand Down Expand Up @@ -143,7 +143,7 @@

registry.add("hZvtxSelected", "Z vertex position;Z_{vtx};entries", {HistType::kTH1F, {{80, -20, 20}}}, doSumw);

if (doprocessData || doprocessDataWithRhoSubtraction || doprocessMCD || doprocessMCDWithRhoSubtraction || doprocessMCDWeighted || doprocessMCDWeightedWithRhoSubtraction || doprocessMCP || doprocessMCPWeighted) {
if (doprocessData || doprocessDataWithRhoSubtraction || doprocessMCD || doprocessMCDWithRhoSubtraction || doprocessMCDWeighted || doprocessMCDWeightedWithRhoSubtraction || doprocessMCP || doprocessMCPWeighted || doprocessMCPOnTheFly || doprocessMCPOnTheFlyWeighted) {
registry.add("hNtrig", "number of triggers;trigger type;entries", {HistType::kTH1F, {{2, 0, 2}}}, doSumw);
registry.add("hSignalTriggersPtHard", "Signal triggers vs PtHard", {HistType::kTH1F, {pThatAxis}}, doSumw);
registry.add("hReferenceTriggersPtHard", "Reference triggers vs PtHard", {HistType::kTH1F, {pThatAxis}}, doSumw);
Expand Down Expand Up @@ -186,7 +186,7 @@
registry.add("hPtTrackMatchedToCollisions", "Track p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}, doSumw);
}

if (doprocessMCP || doprocessMCPWeighted) {
if (doprocessMCP || doprocessMCPWeighted || doprocessMCPOnTheFly || doprocessMCPOnTheFlyWeighted) {
registry.add("hPartvsJets", "comparing leading particles and jets;p_{T,part};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}, doSumw);
registry.add("hPtPart", "Particle p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}, doSumw);
registry.add("hEtaPart", "Particle #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}, doSumw);
Expand Down Expand Up @@ -284,7 +284,7 @@
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {
registry.fill(HIST("hRhoReferenceShift"), rho + shift, shift, weight);
}
registry.fill(HIST("hReferenceTriggersPtHard"), ptTT / pTHat, weight);

Check failure on line 287 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.
}
}
for (const auto& jet : jets) {
Expand Down Expand Up @@ -319,31 +319,31 @@
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {
registry.fill(HIST("hDeltaRpTSignal"), jet.pt() - (rho * jet.area()), dR, weight);
registry.fill(HIST("hDeltaRSignal"), dR, weight);
}

Check failure on line 322 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("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) {
registry.fill(HIST("hSignalPt"), jet.pt() - (rho * jet.area()), weight);
registry.fill(HIST("hSignalPtHard"), jet.pt() - (rho * jet.area()), ptTT / pTHat, weight);
}

Check failure on line 328 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.
}
if (!isSigCol) {
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {
registry.fill(HIST("hDeltaRpTReference"), jet.pt() - (rhoReference * jet.area()), dR, weight);
registry.fill(HIST("hDeltaRReference"), dR, weight);
}

Check failure on line 334 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("hDeltaRpTDPhiReference"), jet.pt() - (rhoReference * jet.area()), dphi, dR, weight);
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {
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);

Check failure on line 339 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.
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {
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 343 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);
}

Check failure on line 346 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.
}
}
}
Expand Down Expand Up @@ -426,7 +426,7 @@
for (double shift = 0.0; shift <= 2.0; shift += 0.1) {
registry.fill(HIST("hRhoReferenceShift"), rho + shift, shift, weight);
}
registry.fill(HIST("hReferenceTriggersPtHard"), ptTT / pTHat, weight);

Check failure on line 429 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.
}
}
for (const auto& jet : jets) {
Expand Down Expand Up @@ -923,6 +923,36 @@
}
PROCESS_SWITCH(JetHadronRecoil, processMCPWeighted, "process MC particle level with event weights", false);

void processMCPOnTheFly(aod::JetMcCollision const& mccollision,
soa::Filtered<soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetConstituents>> const& jets,
soa::Filtered<aod::JetParticles> const& particles)
{
if (std::abs(mccollision.posZ()) > vertexZCut) {
return;
}
if (mccollision.ptHard() < pTHatMinEvent) {
return;
}
registry.fill(HIST("hZvtxSelected"), mccollision.posZ());
fillMCPHistograms(jets, particles, 1.0, mccollision.ptHard());
}
PROCESS_SWITCH(JetHadronRecoil, processMCPOnTheFly, "process MC particle level for on-the-fly simulations", false);

void processMCPOnTheFlyWeighted(aod::JetMcCollision const& mccollision,
soa::Filtered<soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetConstituents>> const& jets,
soa::Filtered<aod::JetParticles> const& particles)
{
if (std::abs(mccollision.posZ()) > vertexZCut) {
return;
}
if (mccollision.ptHard() < pTHatMinEvent) {
return;
}
registry.fill(HIST("hZvtxSelected"), mccollision.posZ(), mccollision.weight());
fillMCPHistograms(jets, particles, mccollision.weight(), mccollision.ptHard());
}
PROCESS_SWITCH(JetHadronRecoil, processMCPOnTheFlyWeighted, "process MC particle level for on-the-fly simulations with event weights", false);

void processJetsMCPMCDMatched(aod::JetMcCollisions::iterator const& mccollision,
soa::SmallGroups<aod::JetCollisionsMCD> const& collisions,
soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents, aod::ChargedMCDetectorLevelJetsMatchedToChargedMCParticleLevelJets>> const& mcdjets,
Expand Down Expand Up @@ -1145,7 +1175,7 @@
registry.fill(HIST("hZvtxSelected"), mccollision.posZ(), mccollision.weight());
fillRecoilJetMatchedHistograms(mcdjets, mcpjets, tracks, particles, mccollision.weight(), mccollision.rho(), mccollision.ptHard());
}
PROCESS_SWITCH(JetHadronRecoil, processRecoilJetsMCPMCDMatchedWeightedWithRhoSubtraction, "process MC matched with event weights (recoil jets) and rho subtraction", false);

Check failure on line 1178 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.

template <typename T, typename X>
double getWTAaxisDifference(T const& jet, X const& /*tracks or particles*/)
Expand Down
Loading