Skip to content
Merged
Show file tree
Hide file tree
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: 2 additions & 2 deletions PWGLF/TableProducer/QC/nucleiQC.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/TableProducer/QC/nucleiQC.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 @@ -97,7 +97,7 @@

// CCDB options
Configurable<int> cfgMaterialCorrection{"cfgMaterialCorrection", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrLUT), "Type of material correction"};
Configurable<std::string> cfgCCDBurl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 100 in PWGLF/TableProducer/QC/nucleiQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Service<o2::ccdb::BasicCCDBManager> mCcdb;
int mRunNumber = 0;
float mBz = 0.f;
Expand Down Expand Up @@ -150,7 +150,7 @@
}

float tpcBetheBlochParams[6];
for (int iParam = 0; iParam < 6; iParam++) {

Check failure on line 153 in PWGLF/TableProducer/QC/nucleiQC.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.
tpcBetheBlochParams[iParam] = cfgBetheBlochParams->get(kSpeciesRt, iParam);
}

Expand Down Expand Up @@ -186,10 +186,10 @@
track.tpcInnerParam() < cfgCutTpcMom ||
track.itsNCls() < cfgCutNclusITS ||
track.tpcNClsFound() < cfgCutNclusTPC ||
track.tpcNClsCrossedRows() < 70 ||

Check failure on line 189 in PWGLF/TableProducer/QC/nucleiQC.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.
track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() ||

Check failure on line 190 in PWGLF/TableProducer/QC/nucleiQC.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.
track.tpcChi2NCl() > 4.f ||

Check failure on line 191 in PWGLF/TableProducer/QC/nucleiQC.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.
track.itsChi2NCl() > 36.f) {

Check failure on line 192 in PWGLF/TableProducer/QC/nucleiQC.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 false;
}
return true;
Expand Down Expand Up @@ -380,7 +380,7 @@
mHistograms.fill(HIST(nuclei::cNames[kIndex]) + HIST("/h3DCAzVsPtVsCentrality"), candidate.pt, candidate.DCAz, candidate.centrality);
mHistograms.fill(HIST(nuclei::cNames[kIndex]) + HIST("/h3BetaVsPtVsCentrality"), candidate.pt, candidate.beta, candidate.centrality);
mHistograms.fill(HIST(nuclei::cNames[kIndex]) + HIST("/h3dEdxVsPVsCentrality"), candidate.pt, candidate.TPCsignal, candidate.centrality);
mHistograms.fill(HIST(nuclei::cNames[kIndex]) + HIST("/h3ClusterSizeVsPtVsCentrality"), mPidManagers[kIndex].getClusterSizeCosLambdaITS(candidate.clusterSizesITS, candidate.eta), candidate.pt, candidate.centrality);
mHistograms.fill(HIST(nuclei::cNames[kIndex]) + HIST("/h3ClusterSizeVsPtVsCentrality"), candidate.pt, mPidManagers[kIndex].getClusterSizeCosLambdaITS(candidate.clusterSizesITS, candidate.eta), candidate.centrality);
}
}

Expand Down Expand Up @@ -409,7 +409,7 @@
if (track.has_mcParticle()) {
const auto& particle = track.mcParticle();
if (cfgDoCheckPdgCode) {
if (particle.pdgCode() != nuclei::pdgCodes[kSpeciesRt])
if (std::abs(particle.pdgCode()) != nuclei::pdgCodes[kSpeciesRt])
return;
}
if ((particle.y() - cfgRapidityCenterMass) < cfgRapidityMin || (particle.y() - cfgRapidityCenterMass) > cfgRapidityMax) {
Expand Down
7 changes: 4 additions & 3 deletions PWGLF/Utils/nucleiUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#include <string>
#include <vector>

using namespace o2;

Check failure on line 31 in PWGLF/Utils/nucleiUtils.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 32 in PWGLF/Utils/nucleiUtils.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework::expressions;

Check failure on line 33 in PWGLF/Utils/nucleiUtils.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::constants::physics;

struct NucleusCandidate {
Expand Down Expand Up @@ -348,7 +348,7 @@
template <typename Tcollision>
float getCentrality(Tcollision const& collision, const int centralityEstimator)
{
if constexpr (!o2::aod::HasCentrality<Tcollision>) {
if constexpr (!o2::aod::HasCentrality<Tcollision>) { // requires aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentNTPVs
return -1.f;
}
if (centralityEstimator == centDetectors::kFV0A) {
Expand Down Expand Up @@ -475,6 +475,7 @@
}
}

// ITS
template <typename Ttrack>
float getClusterSizeCosLambdaITS(const Ttrack& track)
{
Expand Down Expand Up @@ -508,7 +509,7 @@
// TPC
float getExpectedTPCsignal(const float p)
{
if (!mUseTpcCentralCalibration)
if (mUseTpcCentralCalibration)
return -999.f;

float pScaled = p * mMomScaling[0] + mMomScaling[1];
Expand All @@ -524,7 +525,7 @@
template <typename Ttrack>
float getNSigmaTPC(const Ttrack& track)
{
if (!mUseTpcCentralCalibration) {
if (mUseTpcCentralCalibration) {
return getNSigmaTPCcentral(track);
}
float expectedSignal = getExpectedTPCsignal(track.tpcInnerParam());
Expand Down
Loading