Skip to content

Commit 970ddf7

Browse files
author
Maria Calmon Behling
committed
address code-checker errors and warnings
1 parent d201ded commit 970ddf7

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎PWGLF/TableProducer/Nuspex/particleCompositionCorrection.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
215215
std::vector<std::vector<float>> input = {{dNdEta}, {particle.pt()}, {iterMapPID->second}};
216216
float fracData = particleFractionsData.evalModel(input)[0];
217217
float fracMC = particleFractionsMC.evalModel(input)[0];
218-
float weight = (fracMC) ? fracData / fracMC : 1.f;
218+
float weight = (fracMC != 0.f) ? fracData / fracMC : 1.f;
219219
std::tuple<float, float, float> weights = {weight, weight, weight};
220220
if (!skipSec && particle.has_daughters()) {
221221
storedWeights[particle.index()] = weights;
@@ -283,7 +283,7 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
283283
LOGF(error, "GLOBAL MOTHER IS INCIDING PROTON");
284284
}
285285

286-
if (storedWeights.find(refParticleID) == storedWeights.end()) {
286+
if (!storedWeights.contains(refParticleID)) {
287287
// LOGP(info, "MCB: no ref stored for mom {}, PDG: {}!!", particles.iteratorAt(refParticleID).index(),particles.iteratorAt(refParticleID).pdgCode());
288288
return noWeights;
289289
}

‎PWGLF/Tasks/Nuspex/pccQa.cxx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@
2929
#include <Framework/O2DatabasePDGPlugin.h>
3030
#include <Framework/runDataProcessing.h>
3131

32+
#include <TH1.h>
33+
#include <TH2.h>
3234
#include <TMCProcess.h>
33-
#include <TPDGCode.h>
35+
#include <TProfile.h>
36+
37+
#include <fmt/format.h>
3438

3539
#include <cstdint>
40+
#include <cstdlib>
41+
#include <memory>
3642
#include <string>
3743
#include <vector>
3844

@@ -302,7 +308,7 @@ void PccQa::processMeas(const C& collision, const T& tracks)
302308
auto mother = particle.template mothers_first_as<ParticleTableMC>();
303309

304310
const int motherCategory = getMotherCategory(mother.pdgCode());
305-
const std::string motherName = getMotherName(motherCategory);
311+
//const std::string motherName = getMotherName(motherCategory);
306312

307313
histos.fill(
308314
HIST("sec/dec/motherPDG"),

0 commit comments

Comments
 (0)