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
13 changes: 7 additions & 6 deletions PWGMM/UE/Tasks/uecharged.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// \file uecharged.cxx
/// \brief Underlying event analysis task
/// \since November 2021
/// \last update: March 2026
/// \last update: April 2026

#include "PWGLF/Utils/inelGt.h"

Expand Down Expand Up @@ -61,6 +61,7 @@
Configurable<bool> sel8{"event_sel8", true, "Apply the sel8 event selection"};
Configurable<bool> removeITSROFBorder{"event_removeITSROFBorder", false, "Remove ITS Read-Out Frame border and only apply kIsTriggerTVX & kNoTimeFrameBorder (recommended for MC)"};
Configurable<int> cfgINELCut{"event_cfgINELCut", 0, "INEL event selection: 0 no sel, 1 INEL>0, 2 INEL>1"};
Configurable<float> CollPosZ{"event_CollPosZ", 10.f, "Cut on the z component of the vertex position"};
Configurable<bool> analyzeEvandTracksel{"analyzeEvandTracksel", true, "Analyze the event and track selection"};

// Track selection configurables
Expand Down Expand Up @@ -192,7 +193,7 @@
ue.add("hmultTrueGen", "mult true all Gen", HistType::kTH1F, {{200, -0.5, 199.5, " "}});
ue.add("hvtxZmc", "vtxZ mctrue", HistType::kTH1F, {{40, -20.0, 20.0, " "}});
ue.add("hPtLeadingTrue", "true pTleading after physics selection", HistType::kTH1D, {ptAxist});
for (int i = 0; i < 3; ++i) {

Check failure on line 196 in PWGMM/UE/Tasks/uecharged.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.
ue.add(hPtVsPtLeadingTrue[i].data(), " ", HistType::kTH2D, {{ptAxist}, {ptAxis}});
ue.add(hPtVsPtLeadingTruePS[i].data(), " ", HistType::kTH2D, {{ptAxist}, {ptAxis}});
ue.add(pNumDenTrueAll[i].data(), "", HistType::kTProfile, {ptAxist});
Expand All @@ -202,7 +203,7 @@
ue.add(pNumDenTruePS[i].data(), "", HistType::kTProfile, {ptAxist});
ue.add(pSumPtTruePS[i].data(), "", HistType::kTProfile, {ptAxist});
}
for (int i = 0; i < 3; ++i) {

Check failure on line 206 in PWGMM/UE/Tasks/uecharged.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.
ue.add(hPhiTrue[i].data(), "all charged true; #Delta#phi; Counts", HistType::kTH1D, {{64, -o2::constants::math::PI / 2.0, 3.0 * o2::constants::math::PI / 2.0, ""}});
}
}
Expand All @@ -226,7 +227,7 @@
h->GetXaxis()->SetBinLabel(5, "IsGoodZvtxFT0vsPV");
h->GetXaxis()->SetBinLabel(6, "posZ passed");

for (int i = 0; i < 3; ++i) {

Check failure on line 230 in PWGMM/UE/Tasks/uecharged.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.
ue.add(pNumDenMeasuredPS[i].data(), "Number Density; ; #LT #it{N}_{trk} #GT", HistType::kTProfile, {ptAxist});
ue.add(pSumPtMeasuredPS[i].data(), "Total #it{p}_{T}; ; #LT#sum#it{p}_{T}#GT", HistType::kTProfile, {ptAxist});
ue.add(hPhi[i].data(), "all charged; #Delta#phi; Counts", HistType::kTH1D, {{64, -o2::constants::math::PI / 2.0, 3.0 * o2::constants::math::PI / 2.0, ""}});
Expand Down Expand Up @@ -301,20 +302,20 @@
{
float dphi = -999;
if (phia < 0) {
phia += 2 * o2::constants::math::PI;

Check failure on line 305 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
} else if (phia > 2 * o2::constants::math::PI) {
phia -= 2 * o2::constants::math::PI;

Check failure on line 307 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
if (phib < 0) {
phib += 2 * o2::constants::math::PI;

Check failure on line 310 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
} else if (phib > 2 * o2::constants::math::PI) {
phib -= 2 * o2::constants::math::PI;

Check failure on line 312 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
dphi = phib - phia;
if (dphi < rangeMin) {
dphi += 2 * o2::constants::math::PI;

Check failure on line 316 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
} else if (dphi > rangeMax) {
dphi -= 2 * o2::constants::math::PI;

Check failure on line 318 in PWGMM/UE/Tasks/uecharged.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
return dphi;
}
Expand Down Expand Up @@ -418,7 +419,7 @@
ue.fill(HIST("hCounter"), 4);

ue.fill(HIST("hStat"), collision.size());
if ((std::abs(collision.posZ()) > 10.f)) {
if ((std::abs(collision.posZ()) > CollPosZ)) {
return false;
}

Expand Down Expand Up @@ -464,7 +465,7 @@
ue.fill(HIST("hCounter"), 4);

ue.fill(HIST("hStat"), collision.size());
if ((std::abs(collision.posZ()) > 10.f)) {
if ((std::abs(collision.posZ()) > CollPosZ)) {
return false;
}

Expand Down Expand Up @@ -665,7 +666,7 @@
if (cfgINELCut == 2 && !o2::pwglf::isINELgt1mc(GenParticles, pdg)) {
return;
}
if (std::abs(mcCollision.posZ()) > 10.f) {
if (std::abs(mcCollision.posZ()) > CollPosZ) {
return;
}
ue.fill(HIST("hStat"), mcCollision.size());
Expand Down Expand Up @@ -1010,7 +1011,7 @@
if (cfgINELCut == 2 && !o2::pwglf::isINELgt1mc(GenParticles, pdg)) {
return;
}
if (std::abs(mcCollision.posZ()) > 10.f) {
if (std::abs(mcCollision.posZ()) > CollPosZ) {
return;
}

Expand Down Expand Up @@ -1147,7 +1148,7 @@
ue.fill(HIST("hVtxFT0VsVtxCol_afterGoodZvtx"), foundBC.ft0().posZ(), collision.posZ());
}

if (std::abs(collision.posZ()) > 10.f) {
if (std::abs(collision.posZ()) > CollPosZ) {
return;
}

Expand All @@ -1156,7 +1157,7 @@
int tracks_before = 0;
int tracks_after = 0;

for (auto& track : tracks) {

Check failure on line 1160 in PWGMM/UE/Tasks/uecharged.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 (track.hasITS() && track.hasTPC()) {
ue.fill(HIST("preselection_track/ITS/itsNCls"), track.itsNCls());
Expand Down
Loading