Skip to content

Commit 6d2ccbc

Browse files
author
Andrea
committed
fix linter and compilation errors due to different data-type comparison
1 parent df8a984 commit 6d2ccbc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

DPG/Tasks/ITS/filterTracks.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,12 @@ struct FilterTracks {
179179
Partition<soa::Filtered<TracksWithSelAndDcaMc>> midPtTracksMC = aod::track::pt > lowPtThreshold&& aod::track::pt < midPtThreshold && (nabs(aod::track::pt * nDigitScaleFactor - nround(aod::track::pt * nDigitScaleFactor)) < trackPtWeightMidPt.node() * lowPtThreshold);
180180
Partition<soa::Filtered<TracksWithSelAndDcaMc>> highPtTracksMC = aod::track::pt > midPtThreshold;
181181

182-
const int nStudiedParticlesMc = 3;
183-
std::array<int, 3> pdgSignalParticleArray = {kK0Short, o2::constants::physics::Pdg::kD0, o2::constants::physics::Pdg::kLambdaCPlus}; // K0s, D0 and Lc
182+
const static int nStudiedParticlesMc = 3;
183+
std::array<int, nStudiedParticlesMc> pdgSignalParticleArray = {kK0Short, o2::constants::physics::Pdg::kD0, o2::constants::physics::Pdg::kLambdaCPlus}; // K0s, D0 and Lc
184184
std::array<int, 3> pdgDecayLc = {kProton, kKMinus, kPiPlus};
185185
std::array<int, 2> pdgDecayDzero = {kKMinus, kPiPlus};
186186
std::array<int, 2> pdgDecayKzero = {kPiMinus, kPiPlus};
187+
const int nK0sShortDaught=2;
187188

188189
void init(InitContext&)
189190
{
@@ -221,7 +222,7 @@ struct FilterTracks {
221222
if (pdgParticleMother == kK0Short) {
222223
auto daughtersSlice = mcparticle.template daughters_as<aod::McParticles>();
223224
int ndaught = daughtersSlice.size(); // might not be accurate in case K0s interact with material before decaying
224-
if (ndaught != 2)
225+
if (ndaught != nK0sShortDaught)
225226
ndaught *= -1;
226227
filteredTracksMC(mcparticle.pdgCode(), mcparticle.isPhysicalPrimary(), particleMother.pdgCode(), 0, motherIndex, ndaught, particleMother.pt(), particleMother.y(), 0, 0);
227228
// std::cout<<"FOUND K0s, MATCHED! size array "<<ndaught<<std::endl;
@@ -249,7 +250,7 @@ struct FilterTracks {
249250
if (RecoDecay::getCharmHadronOrigin(mcParticles, particleMother, false, &idxBhadMothers) == RecoDecay::OriginType::NonPrompt) {
250251
if (idxBhadMothers.size() > 1) {
251252
LOG(info) << "more than 1 B mother hadron found, should not be: ";
252-
for (int64_t iBhM = 0; iBhM < idxBhadMothers.size(); iBhM++) {
253+
for (uint64_t iBhM = 0; iBhM < idxBhadMothers.size(); iBhM++) {
253254
auto particleBhadr = mcParticles.rawIteratorAt(idxBhadMothers[iBhM]);
254255
LOG(info) << particleBhadr.pdgCode();
255256
}
@@ -344,7 +345,7 @@ struct FilterTracks {
344345
// }
345346
}
346347
if (isMatchedToSignal) {
347-
for (auto mcpartdaughtIdx : indxDaughers) {
348+
for (auto const mcpartdaughtIdx : indxDaughers) {
348349
auto mcPartDaught = mcParticles.rawIteratorAt(mcpartdaughtIdx);
349350
double eta = std::abs(mcPartDaught.eta());
350351
if ((eta) > etamax) {
@@ -359,7 +360,7 @@ struct FilterTracks {
359360
if (RecoDecay::getCharmHadronOrigin(mcParticles, mcpart, false, &idxBhadMothers) == RecoDecay::OriginType::NonPrompt) {
360361
if (idxBhadMothers.size() > 1) {
361362
LOG(info) << "loop on gen particles: more than 1 B mother hadron found, should not be: ";
362-
for (int64_t iBhM = 0; iBhM < idxBhadMothers.size(); iBhM++) {
363+
for (uint64_t iBhM = 0; iBhM < idxBhadMothers.size(); iBhM++) {
363364
auto particleBhadr = mcParticles.rawIteratorAt(idxBhadMothers[iBhM]);
364365
LOG(info) << particleBhadr.pdgCode();
365366
}

0 commit comments

Comments
 (0)