Skip to content

Commit 9185290

Browse files
PWGLF: To add the namspace for abs (AliceO2Group#8144)
Co-authored-by: Navneet <navneet.kumar@cern.ch>
1 parent 7b5a9d2 commit 9185290

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

PWGLF/Tasks/Resonances/k892pmanalysis.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ struct k892pmanalysis {
352352
}
353353

354354
// apply the competing V0 rejection cut (excluding Lambda0 candidates, massLambdaPDG = 1115.683 MeV/c2)
355-
if (abs(v0.mLambda() - massLambda0) < cV0MassWindow)
355+
if (std::abs(v0.mLambda() - massLambda0) < cV0MassWindow)
356356
continue;
357-
if (abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow)
357+
if (std::abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow)
358358
continue;
359359

360360
if (!IsMix && !IsV0QAFilled) {
@@ -382,7 +382,7 @@ struct k892pmanalysis {
382382
}
383383

384384
// Checking whether the mid-rapidity condition is met
385-
if (abs(lResonance.Rapidity()) > 0.5) {
385+
if (std::abs(lResonance.Rapidity()) > 0.5) {
386386
continue;
387387
}
388388

@@ -401,7 +401,7 @@ struct k892pmanalysis {
401401
histos.fill(HIST("k892pmMassPtMult3d"), lResonance.M(), lResonance.Pt(), multiplicity);
402402
if constexpr (IsMC) {
403403
// LOG(info) << "track PDG:\t" << trk.pdgCode() << "\tV0 PDG:\t" << v0.pdgCode();
404-
if (abs(trk.pdgCode()) != 211 || abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s
404+
if (std::abs(trk.pdgCode()) != 211 || std::abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s
405405
continue;
406406
if (trk.motherPDG() != v0.motherPDG())
407407
continue;
@@ -444,17 +444,17 @@ struct k892pmanalysis {
444444
void processMCTrue(aod::ResoMCParents& resoParents)
445445
{
446446
for (auto& part : resoParents) { // loop over all pre-filtered MC particles
447-
if (abs(part.pdgCode()) != 323) // K*892(pm)
447+
if (std::abs(part.pdgCode()) != 323) // K*892(pm)
448448
continue;
449-
if (abs(part.y()) > 0.5) // rapidity cut
449+
if (std::abs(part.y()) > 0.5) // rapidity cut
450450
continue;
451451
bool pass1 = false;
452452
bool pass2 = false;
453453
/*// Sanity check: looking for K*0 resonances for sanity check
454-
if (abs(part.pdgCode()) == 323) {
454+
if (std::abs(part.pdgCode()) == 323) {
455455
LOG(info) << "Found charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2();
456456
}
457-
if (abs(part.pdgCode()) == 313) {
457+
if (std::abs(part.pdgCode()) == 313) {
458458
LOG(info) << "Found non-charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2();
459459
}*/
460460

@@ -466,11 +466,11 @@ struct k892pmanalysis {
466466
pass2 = true;
467467
histos.fill(HIST("hK892pmCounter"), 1.5);
468468
}
469-
/*if (abs(part.daughterPDG1()) == 211)
469+
/*if (std::abs(part.daughterPDG1()) == 211)
470470
histos.fill(HIST("hDaughterCounter"), 0.5);
471-
if (abs(part.daughterPDG2()) == 310)
471+
if (std::abs(part.daughterPDG2()) == 310)
472472
histos.fill(HIST("hDaughterCounter"), 1.5);
473-
if (abs(part.daughterPDG1()) == 211 && abs(part.daughterPDG2()) == 310)
473+
if (std::abs(part.daughterPDG1()) == 211 && std::abs(part.daughterPDG2()) == 310)
474474
histos.fill(HIST("hDaughterCounter"), 2.5);*/
475475
// if (!pass1 || !pass2) // Go on only if we have both decay products, else skip to next iteration
476476
if (!pass1 && !pass2) // Go on only if we have both decay products, else skip to next iteration

0 commit comments

Comments
 (0)