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
2 changes: 1 addition & 1 deletion PWGLF/Tasks/QC/mcParticlePrediction.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/QC/mcParticlePrediction.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -191,7 +191,7 @@
const AxisSpec axisImpactParameter{binsImpactParameter, "Impact parameter (fm)"};
const AxisSpec axisMultiplicity{binsMultiplicity, "Multiplicity (undefined)"};
const AxisSpec axisMultiplicityReco{binsMultiplicityReco, "Multiplicity Reco. (undefined)"};
const AxisSpec axisMultiplicityRecoITS{100, 0, 100, "Multiplicity Reco. ITSIB"};
const AxisSpec axisMultiplicityRecoITS{binsMultiplicityReco, "Multiplicity Reco. ITSIB"};
const AxisSpec axisMultiplicityGenV0s{100, 0, 100, "K0s gen"};
const AxisSpec axisMultiplicityRecoV0s{20, 0, 20, "K0s reco"};
const AxisSpec axisBCID{o2::constants::lhc::LHCMaxBunches, -0.5, -0.5 + o2::constants::lhc::LHCMaxBunches, "BC ID in orbit"};
Expand Down Expand Up @@ -436,7 +436,7 @@
}

histos.fill(HIST("collisions/generated"), 1);
if (std::abs(mcCollision.posZ()) > 10.f) {

Check failure on line 439 in PWGLF/Tasks/QC/mcParticlePrediction.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.
return;
}
histos.fill(HIST("collisions/generated"), 2);
Expand Down Expand Up @@ -480,14 +480,14 @@

TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode());
if (p) {
if (std::abs(p->Charge()) > 1e-3) {

Check failure on line 483 in PWGLF/Tasks/QC/mcParticlePrediction.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.
histos.fill(HIST("particles/eta/charged"), particle.eta());
} else {
histos.fill(HIST("particles/eta/neutral"), particle.eta());
}
}

if (std::abs(particle.y()) > 0.5) {

Check failure on line 490 in PWGLF/Tasks/QC/mcParticlePrediction.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.
continue;
}

Expand Down Expand Up @@ -653,10 +653,10 @@
float nMultRecoMCBC[Estimators::nEstimators] = {0};
if (mcBC.has_ft0()) {
const auto& ft0 = mcBC.ft0();
for (auto amplitude : ft0.amplitudeA()) {

Check failure on line 656 in PWGLF/Tasks/QC/mcParticlePrediction.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.
nMultRecoMCBC[Estimators::FT0A] += amplitude;
}
for (auto amplitude : ft0.amplitudeC()) {

Check failure on line 659 in PWGLF/Tasks/QC/mcParticlePrediction.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.
nMultRecoMCBC[Estimators::FT0C] += amplitude;
}
nMultRecoMCBC[Estimators::FT0AC] = nMultRecoMCBC[Estimators::FT0A] + nMultRecoMCBC[Estimators::FT0C];
Expand Down
Loading