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
3 changes: 1 addition & 2 deletions PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
float dauVtx[3]{0.f, 0.f, 0.f};
auto daughters = particle.daughters_as<aod::McParticles>();
for (const auto& dau : daughters) {
if (abs(dau.pdgCode()) != 22 && abs(dau.pdgCode()) != 11) {

Check failure on line 366 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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.

Check failure on line 366 in PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
dauVtx[0] = dau.vx();
dauVtx[1] = dau.vy();
dauVtx[2] = dau.vz();
Expand Down Expand Up @@ -618,7 +618,7 @@
{nuclei::charges[4] * cfgMomentumScalingBetheBloch->get(3u, 0u) / nuclei::masses[4], nuclei::charges[4] * cfgMomentumScalingBetheBloch->get(3u, 1u) / nuclei::masses[4]}};

int nGloTracks[2]{0, 0}, nTOFTracks[2]{0, 0};
for (auto& track : tracks) { // start loop over tracks

Check failure on line 621 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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.eta()) > cfgCutEta ||
track.tpcInnerParam() < cfgCutTpcMom ||
track.itsNCls() < cfgCutNclusITS ||
Expand Down Expand Up @@ -872,7 +872,7 @@
return;
}
fillDataInfo(collision, tracks);
for (auto& c : nuclei::candidates) {

Check failure on line 875 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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 (c.fillTree) {
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.TOFchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
}
Expand All @@ -884,7 +884,7 @@
}
}
}
for (auto& c : nuclei::candidates_flow) {

Check failure on line 887 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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.
nucleiTableFlow(c.centFV0A, c.centFT0M, c.centFT0A, c.centFT0C, c.psiFT0A, c.psiFT0C, c.psiTPC, c.psiTPCl, c.psiTPCr, c.qFT0A, c.qFT0C, c.qTPC, c.qTPCl, c.qTPCr);
}
}
Expand All @@ -901,7 +901,7 @@
return;
}
fillDataInfo(collision, tracks);
for (auto& c : nuclei::candidates) {

Check failure on line 904 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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 (c.fillTree) {
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.TOFchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
}
Expand All @@ -913,7 +913,7 @@
}
}
}
for (auto& c : nuclei::candidates_flow) {

Check failure on line 916 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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.
nucleiTableFlow(c.centFV0A, c.centFT0M, c.centFT0A, c.centFT0C, c.psiFT0A, c.psiFT0C, c.psiTPC, c.psiTPCl, c.psiTPCr, c.qFT0A, c.qFT0C, c.qTPC, c.qTPCl, c.qTPCr);
}
}
Expand All @@ -923,11 +923,11 @@
void processMC(soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels> const& collisions, aod::McCollisions const& mcCollisions, soa::Join<TrackCandidates, aod::McTrackLabels> const& tracks, aod::McParticles const& particlesMC, aod::BCsWithTimestamps const&)
{
nuclei::candidates.clear();
for (auto& c : mcCollisions) {

Check failure on line 926 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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.
spectra.fill(HIST("hGenVtxZ"), c.posZ());
}
std::vector<bool> goodCollisions(mcCollisions.size(), false);
for (auto& collision : collisions) {

Check failure on line 930 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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 (!eventSelection(collision)) {
continue;
}
Expand All @@ -936,7 +936,7 @@
fillDataInfo(collision, slicedTracks);
}
std::vector<bool> isReconstructed(particlesMC.size(), false);
for (auto& c : nuclei::candidates) {

Check failure on line 939 in PWGLF/TableProducer/Nuspex/nucleiSpectra.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 label = tracks.iteratorAt(c.globalIndex);
if (label.mcParticleId() < -1 || label.mcParticleId() >= particlesMC.size()) {
continue;
Expand Down Expand Up @@ -1035,8 +1035,7 @@
}
}
}
}
else if (particle.has_mothers()) {
} else if (particle.has_mothers()) {
flags |= kIsSecondaryFromWeakDecay;
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
motherPdgCode = motherparticle.pdgCode();
Expand Down
Loading