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
5 changes: 2 additions & 3 deletions PWGLF/TableProducer/Nuspex/ebyeMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#include "PWGLF/DataModel/LFEbyeTables.h"

#include "TDatabasePDG.h"

Check warning on line 47 in PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Direct use of TDatabasePDG is not allowed. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG>.
#include "TFormula.h"

using namespace o2;
Expand Down Expand Up @@ -319,10 +319,10 @@
Preslice<aod::V0s> perCollisionV0 = o2::aod::v0::collisionId;
Preslice<aod::McParticles> perCollisionMcParts = o2::aod::mcparticle::mcCollisionId;

template<class P>
template <class P>
int getPartTypeMother(P const& mcPart)
{
for (auto& mother : mcPart.template mothers_as<aod::McParticles>()) {

Check warning on line 325 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
int pdgCode = mother.pdgCode();
switch (std::abs(pdgCode)) {
case 3122:
Expand Down Expand Up @@ -516,17 +516,17 @@
auto fv0c = fv0cs.rawIteratorAt(id);
float multFV0A = 0;
float multFV0C = 0;
for (float amplitude : fv0a.amplitude()) {

Check warning on line 519 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
multFV0A += amplitude;
}

for (float amplitude : fv0c.amplitude()) {

Check warning on line 523 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
multFV0C += amplitude;
}

float v0m = -1;
auto scaleMC = [](float x, float pars[6]) {
return pow(((pars[0] + pars[1] * pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);

Check warning on line 529 in PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
};

if (Run2V0MInfo.mMCScale != nullptr) {
Expand Down Expand Up @@ -895,7 +895,7 @@
fillRecoEvent<C, T>(collision, tracks, V0s, centrality);

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

Check warning on line 898 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
candidateTrack.isreco = true;

auto mcLab = mcLabels.rawIteratorAt(candidateTrack.globalIndex);
Expand All @@ -919,7 +919,7 @@
}
}
}
for (auto& candidateV0 : candidateV0s) {

Check warning on line 922 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
candidateV0.isreco = true;
auto mcLabPos = mcLabels.rawIteratorAt(candidateV0.globalIndexPos);
auto mcLabNeg = mcLabels.rawIteratorAt(candidateV0.globalIndexNeg);
Expand All @@ -928,8 +928,8 @@
auto mcTrackPos = mcLabPos.template mcParticle_as<aod::McParticles>();
auto mcTrackNeg = mcLabNeg.template mcParticle_as<aod::McParticles>();
if (mcTrackPos.has_mothers() && mcTrackNeg.has_mothers()) {
for (auto& negMother : mcTrackNeg.template mothers_as<aod::McParticles>()) {

Check warning on line 931 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.
for (auto& posMother : mcTrackPos.template mothers_as<aod::McParticles>()) {

Check warning on line 932 in PWGLF/TableProducer/Nuspex/ebyeMaker.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 (posMother.globalIndex() != negMother.globalIndex())
continue;
if (!((mcTrackPos.pdgCode() == 2212 && mcTrackNeg.pdgCode() == -211) || (mcTrackPos.pdgCode() == 211 && mcTrackNeg.pdgCode() == -2212)))
Expand Down Expand Up @@ -957,7 +957,7 @@
void fillMcGen(aod::McParticles const& mcParticles, aod::McTrackLabels const& /*mcLab*/, uint64_t const& collisionId)
{
auto mcParticles_thisCollision = mcParticles.sliceBy(perCollisionMcParts, collisionId);
for (auto& mcPart : mcParticles_thisCollision) {

Check warning on line 960 in PWGLF/TableProducer/Nuspex/ebyeMaker.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.eta();
if (std::abs(genEta) > etaMax) {
continue;
Expand Down Expand Up @@ -1416,8 +1416,7 @@
// continue;
if (candidateTrack.pdgcodemoth > 0)
selMask |= candidateTrack.pdgcodemoth;
}
else {
} else {
selMask = candidateTrack.pdgcodemoth;
}
mcMiniTrkTable(
Expand Down
Loading