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
4 changes: 4 additions & 0 deletions PWGLF/Tasks/Nuspex/nucleiEbye.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <vector>
#include <utility>
#include <random>
#include <iostream>

Check failure on line 15 in PWGLF/Tasks/Nuspex/nucleiEbye.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <memory>
#include <algorithm>

Expand All @@ -23,7 +23,7 @@

#include "PWGLF/DataModel/LFEbyeTables.h"

#include "TDatabasePDG.h"

Check failure on line 26 in PWGLF/Tasks/Nuspex/nucleiEbye.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -491,12 +491,16 @@
CandidateV0 candV0;
candV0.pt = -999.f;
candV0.eta = -999.f;
candV0.mass = -999.f;
candV0.cpa = -999.f;
candV0.dcav0daugh = -999.f;
candV0.dcav0pv = -999.f;
candV0.globalIndexPos = -999;
candV0.globalIndexNeg = -999;
candidateV0s.push_back(candV0);
return -1;
}
for (auto& candidateV0 : candidateV0s) {

Check failure on line 503 in PWGLF/Tasks/Nuspex/nucleiEbye.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.
histos.fill(HIST("QA/massLambdaEvRej"), centrality, candidateV0.pt, candidateV0.mass);
}

Expand Down Expand Up @@ -544,7 +548,7 @@
}

for (int iP{0}; iP < kNpart; ++iP) {
for (auto& candidateTrack : candidateTracks[iP]) {

Check failure on line 551 in PWGLF/Tasks/Nuspex/nucleiEbye.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 mcTrack = tracks.rawIteratorAt(candidateTrack.globalIndex);
if (std::abs(mcTrack.pdgCode()) != partPdg[iP])
continue;
Expand All @@ -559,11 +563,11 @@
}
}
}
for (auto& candidateV0 : candidateV0s) {

Check failure on line 566 in PWGLF/Tasks/Nuspex/nucleiEbye.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 mcTrack = v0s.rawIteratorAt(candidateV0.globalIndex);
if (!mcTrack.isReco())
continue;
if (std::abs(mcTrack.pdgCode()) != 3122) {

Check failure on line 570 in PWGLF/Tasks/Nuspex/nucleiEbye.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.
histos.fill(HIST("QA/cosPaBkg"), candidateV0.cpa);
histos.fill(HIST("QA/dcaV0daughBkg"), candidateV0.dcav0daugh);
histos.fill(HIST("QA/dcaV0PvBkg"), candidateV0.dcav0pv);
Expand Down Expand Up @@ -621,13 +625,13 @@

auto rnd = static_cast<float>(gen32()) / static_cast<float>(gen32.max());
auto subsample = static_cast<int>(rnd * nSubsamples);
for (auto& mcPart : v0s) {

Check failure on line 628 in PWGLF/Tasks/Nuspex/nucleiEbye.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 genEta = mcPart.genEta();
if (std::abs(genEta) > etaMax) {
continue;
}
auto pdgCode = mcPart.pdgCode();
if (std::abs(pdgCode) == 3122) {

Check failure on line 634 in PWGLF/Tasks/Nuspex/nucleiEbye.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.
auto genPt = mcPart.genPt();
if (pdgCode > 0) {
histos.fill(HIST("genL"), centrality, genPt, std::abs(genEta));
Expand All @@ -638,7 +642,7 @@
}
}
}
for (auto& mcPart : tracks) {

Check failure on line 645 in PWGLF/Tasks/Nuspex/nucleiEbye.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 genEta = mcPart.genEta();
if (std::abs(genEta) > etaMax) {
continue;
Expand Down Expand Up @@ -686,7 +690,7 @@

void processMc(aod::CollEbyeTables const& collisions, aod::McNucleiEbyeTables const& tracksTot, aod::McLambdaEbyeTables const& v0sTot)
{
for (auto& collision : collisions) {

Check failure on line 693 in PWGLF/Tasks/Nuspex/nucleiEbye.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.zvtx()) > zVtxMax)
continue;
auto tracks = tracksTot.sliceBy(perCollTrack, collision.globalIndex());
Expand Down
Loading