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
8 changes: 4 additions & 4 deletions PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
struct hadronnucleicorrelation {

// PDG codes and masses used in this analysis
static constexpr int pdgProton = 2212;

Check failure on line 59 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
static constexpr int pdgDeuteron = 1000010020;

Check failure on line 60 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

Configurable<int> mode{"mode", 0, "0: antid-antip, 1: d-p, 2: antid-p, 3: d-antip, 4: antip-p, 5: antip-antip, 6: p-p, 7: p-antip"};

Expand Down Expand Up @@ -893,7 +893,7 @@

void processData(FilteredCollisions const& collisions, FilteredTracks const& tracks)
{
for (auto track : tracks) {

Check failure on line 896 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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 (std::abs(track.template singleCollSel_as<FilteredCollisions>().posZ()) > cutzvertex)
continue;

Expand Down Expand Up @@ -954,7 +954,7 @@
if (isAntiDe) {
selectedtracks_antid[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));
if (mode == 0 || mode == 2) {
registry.fill(HIST("hNtrig_total"), track.pt());
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_antideuteron->Interpolate(track.pt(), track.eta()));
}

if (doQA) {
Expand All @@ -968,7 +968,7 @@
selectedtracks_d[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));

if (mode == 1 || mode == 3) {
registry.fill(HIST("hNtrig_total"), track.pt());
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_deuteron->Interpolate(track.pt(), track.eta()));
}

if (doQA) {
Expand All @@ -984,7 +984,7 @@
selectedtracks_p[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));

if (mode == 6 || mode == 7) {
registry.fill(HIST("hNtrig_total"), track.pt());
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_proton->Interpolate(track.pt(), track.eta()));
}

if (doQA) {
Expand All @@ -997,7 +997,7 @@
selectedtracks_antip[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));

if (mode == 4 || mode == 5) {
registry.fill(HIST("hNtrig_total"), track.pt());
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_antiproton->Interpolate(track.pt(), track.eta()));
}

if (doQA) {
Expand All @@ -1009,7 +1009,7 @@
}
}

for (auto collision : collisions) {

Check failure on line 1012 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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 (std::abs(collision.posZ()) > cutzvertex)
continue;
Expand Down Expand Up @@ -1316,22 +1316,22 @@
(i->second).clear();
selectedtracks_d.clear();

for (auto& pair : mixbins_antid) {

Check failure on line 1319 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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.
pair.second.clear(); // Clear the vector associated with the key
}
mixbins_antid.clear(); // Then clear the map itself

for (auto& pair : mixbins_d) {

Check failure on line 1324 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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.
pair.second.clear(); // Clear the vector associated with the key
}
mixbins_d.clear(); // Then clear the map itself

for (auto& pair : mixbins_antip) {

Check failure on line 1329 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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.
pair.second.clear(); // Clear the vector associated with the key
}
mixbins_antip.clear(); // Then clear the map itself

for (auto& pair : mixbins_p) {

Check failure on line 1334 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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.
pair.second.clear(); // Clear the vector associated with the key
}
mixbins_p.clear(); // Then clear the map itself
Expand All @@ -1340,7 +1340,7 @@

void processMC(FilteredCollisions const&, FilteredTracksMC const& tracks)
{
for (auto track : tracks) {

Check failure on line 1343 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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 (std::abs(track.template singleCollSel_as<FilteredCollisions>().posZ()) > cutzvertex)
continue;

Expand Down Expand Up @@ -1709,7 +1709,7 @@
void processGen(SimCollisions const& mcCollisions,
SimParticles const& mcParticles)
{
for (auto particle : mcParticles) {

Check failure on line 1712 in PWGLF/Tasks/Nuspex/hadronnucleicorrelation.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 (std::abs(particle.template mcCollision_as<aod::McCollisions>().posZ()) > cutzvertex)
continue;
Expand Down
Loading