diff --git a/PWGLF/TableProducer/Nuspex/spectraDerivedMaker.cxx b/PWGLF/TableProducer/Nuspex/spectraDerivedMaker.cxx index c96b8b1fbb6..bce0c9153d1 100644 --- a/PWGLF/TableProducer/Nuspex/spectraDerivedMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/spectraDerivedMaker.cxx @@ -178,7 +178,7 @@ struct spectraDerivedMaker { histos.fill(HIST("evsel"), 6.f); } } - if (abs(collision.posZ()) > cfgCutVertex) { + if (std::abs(collision.posZ()) > cfgCutVertex) { return false; } if constexpr (fillHistograms) { @@ -235,7 +235,7 @@ struct spectraDerivedMaker { if constexpr (fillHistograms) { histos.fill(HIST("tracksel"), 1); } - if (abs(track.eta()) > cfgCutEta) { + if (std::abs(track.eta()) > cfgCutEta) { return false; } if constexpr (fillHistograms) { @@ -388,4 +388,4 @@ struct spectraDerivedMaker { PROCESS_SWITCH(spectraDerivedMaker, processMC, "Process MC for derived dataset production", false); }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } \ No newline at end of file +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } diff --git a/PWGLF/TableProducer/Strangeness/v0qaanalysis.cxx b/PWGLF/TableProducer/Strangeness/v0qaanalysis.cxx index 85113fe1fa1..1d0c3e50187 100644 --- a/PWGLF/TableProducer/Strangeness/v0qaanalysis.cxx +++ b/PWGLF/TableProducer/Strangeness/v0qaanalysis.cxx @@ -294,7 +294,7 @@ struct LfV0qaanalysis { } auto v0mcparticle = v0.mcParticle(); - if (abs(v0mcparticle.y()) > 0.5f) { + if (std::abs(v0mcparticle.y()) > 0.5f) { continue; } @@ -372,7 +372,7 @@ struct LfV0qaanalysis { continue; } - if (abs(mcParticle.y()) > 0.5f) { + if (std::abs(mcParticle.y()) > 0.5f) { continue; } @@ -432,7 +432,7 @@ struct LfV0qaanalysis { if (!mcParticle.isPhysicalPrimary()) { continue; } - if (abs(mcParticle.y()) > 0.5f) { + if (std::abs(mcParticle.y()) > 0.5f) { continue; } @@ -491,7 +491,7 @@ struct LfV0qaanalysis { continue; } - if (abs(mcParticle.y()) > 0.5f) { + if (std::abs(mcParticle.y()) > 0.5f) { continue; } @@ -543,7 +543,7 @@ struct LfV0qaanalysis { continue; } - if (abs(mcParticle.y()) > 0.5f) { + if (std::abs(mcParticle.y()) > 0.5f) { continue; } diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 47b9a5eb886..bbc28888af0 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -446,7 +446,7 @@ struct hadronnucleicorrelation { hEtaPhi_PrAntiPr_SE[k]->Fill(deltaEta, deltaPhi, it2->pt()); hCorrEtaPhi_PrAntiPr_SE[k]->Fill(deltaEta, deltaPhi, it2->pt(), 1. / (pcorr * antipcorr)); - if (doQA && abs(deltaEta) < threta && abs(deltaPhi) < thrphi) { + if (doQA && std::abs(deltaEta) < threta && std::abs(deltaPhi) < thrphi) { QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_Debug"), it1->pt(), it1->tpcNSigmaPr()); QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_Debug"), -1.f * it2->pt(), it2->tpcNSigmaPr()); QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_Debug"), it1->pt(), it1->tofNSigmaPr()); @@ -496,7 +496,7 @@ struct hadronnucleicorrelation { hEtaPhi_AntiDeAntiPr_SE[k]->Fill(deltaEta, deltaPhi, it2->pt()); hCorrEtaPhi_AntiDeAntiPr_SE[k]->Fill(deltaEta, deltaPhi, it2->pt(), 1. / (antipcorr * antidcorr)); - if (doQA && abs(deltaEta) < threta && abs(deltaPhi) < thrphi) { + if (doQA && std::abs(deltaEta) < threta && std::abs(deltaPhi) < thrphi) { QA.fill(HIST("QA/hnSigmaTPCVsPt_De_Debug"), -1.f * it1->pt(), it1->tpcNSigmaDe()); QA.fill(HIST("QA/hnSigmaTPCVsPt_APrDe_Debug"), -1.f * it2->pt(), it2->tpcNSigmaPr()); QA.fill(HIST("QA/hnSigmaTOFVsPt_De_Debug"), -1.f * it1->pt(), it1->tofNSigmaDe()); @@ -566,9 +566,9 @@ struct hadronnucleicorrelation { void processData(FilteredCollisions const& collisions, FilteredTracks const& tracks) { for (auto track : tracks) { - if (abs(track.template singleCollSel_as().posZ()) > cutzvertex) + if (std::abs(track.template singleCollSel_as().posZ()) > cutzvertex) continue; - if (abs(track.dcaXY()) > max_dcaxy || abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported) + if (std::abs(track.dcaXY()) > max_dcaxy || std::abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported) continue; } if (track.tpcFractionSharedCls() > max_tpcSharedCls || track.itsNCls() < min_itsNCls) @@ -831,13 +831,13 @@ struct hadronnucleicorrelation { void processMC(FilteredCollisions const& collisions, FilteredTracksMC const& tracks) { for (auto track : tracks) { - if (abs(track.template singleCollSel_as().posZ()) > cutzvertex) + if (std::abs(track.template singleCollSel_as().posZ()) > cutzvertex) continue; - if (abs(track.dcaXY()) > max_dcaxy || abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported) + if (std::abs(track.dcaXY()) > max_dcaxy || std::abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported) continue; } - if (abs(track.pdgCode()) != pdgProton && abs(track.pdgCode()) != pdgDeuteron) + if (std::abs(track.pdgCode()) != pdgProton && std::abs(track.pdgCode()) != pdgDeuteron) continue; if (doQA) { diff --git a/PWGLF/Tasks/Nuspex/nuclei_in_jets.cxx b/PWGLF/Tasks/Nuspex/nuclei_in_jets.cxx index 4dbc3f33b96..b7eeea60e67 100644 --- a/PWGLF/Tasks/Nuspex/nuclei_in_jets.cxx +++ b/PWGLF/Tasks/Nuspex/nuclei_in_jets.cxx @@ -383,7 +383,7 @@ struct nuclei_in_jets { registryData.fill(HIST("number_of_events_data"), 1.5); // Cut on z-vertex - if (abs(collision.posZ()) > zVtx) + if (std::abs(collision.posZ()) > zVtx) return; // Event Counter: after z-vertex cut @@ -454,7 +454,7 @@ struct nuclei_in_jets { int n_jets_selected(0); for (int i = 0; i < static_cast(jet.size()); i++) { - if ((abs(jet[i].Eta()) + Rjet) > max_eta) + if ((std::abs(jet[i].Eta()) + Rjet) > max_eta) continue; // Perpendicular cones @@ -688,7 +688,7 @@ struct nuclei_in_jets { if (!collision.sel8()) continue; - if (abs(collision.posZ()) > 10) + if (std::abs(collision.posZ()) > 10) continue; // Event Counter (after event sel) @@ -792,7 +792,7 @@ struct nuclei_in_jets { continue; registryMC.fill(HIST("number_of_events_mc"), 4.5); - if (abs(collision.posZ()) > zVtx) + if (std::abs(collision.posZ()) > zVtx) continue; registryMC.fill(HIST("number_of_events_mc"), 5.5); @@ -859,7 +859,7 @@ struct nuclei_in_jets { int n_jets_selected(0); for (int i = 0; i < static_cast(jet.size()); i++) { - if ((abs(jet[i].Eta()) + Rjet) > max_eta) + if ((std::abs(jet[i].Eta()) + Rjet) > max_eta) continue; // Perpendicular cones @@ -973,7 +973,7 @@ struct nuclei_in_jets { registryMC.fill(HIST("number_of_events_mc"), 7.5); // Selection on z_{vertex} - if (abs(mccollision.posZ()) > 10) + if (std::abs(mccollision.posZ()) > 10) continue; registryMC.fill(HIST("number_of_events_mc"), 8.5); @@ -993,7 +993,7 @@ struct nuclei_in_jets { double dy = particle.vy() - mccollision.posY(); double dz = particle.vz() - mccollision.posZ(); double dcaxy = sqrt(dx * dx + dy * dy); - double dcaz = abs(dz); + double dcaz = std::abs(dz); if (setDCAselectionPtDep) { if (dcaxy > (0.004f + 0.013f / particle.pt())) @@ -1008,7 +1008,7 @@ struct nuclei_in_jets { continue; } - if (abs(particle.eta()) > 0.8) + if (std::abs(particle.eta()) > 0.8) continue; if (particle.pt() < 0.15) continue; @@ -1071,7 +1071,7 @@ struct nuclei_in_jets { int n_jets_selected(0); for (int i = 0; i < static_cast(jet.size()); i++) { - if ((abs(jet[i].Eta()) + Rjet) > max_eta) + if ((std::abs(jet[i].Eta()) + Rjet) > max_eta) continue; // Perpendicular cones @@ -1094,7 +1094,7 @@ struct nuclei_in_jets { double dy = particle.vy() - mccollision.posY(); double dz = particle.vz() - mccollision.posZ(); double dcaxy = sqrt(dx * dx + dy * dy); - double dcaz = abs(dz); + double dcaz = std::abs(dz); if (setDCAselectionPtDep) { if (dcaxy > (0.004f + 0.013f / particle.pt())) @@ -1109,7 +1109,7 @@ struct nuclei_in_jets { continue; } - if (abs(particle.eta()) > 0.8) + if (std::abs(particle.eta()) > 0.8) continue; if (particle.pt() < 0.15) continue; diff --git a/PWGLF/Tasks/Nuspex/spectraTOF.cxx b/PWGLF/Tasks/Nuspex/spectraTOF.cxx index 17495847d9c..5523f27efb5 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOF.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOF.cxx @@ -700,7 +700,7 @@ struct tofSpectra { template void fillParticleHistos(const T& track, const C& collision) { - if (abs(track.rapidity(PID::getMass(id))) > trkselOptions.cfgCutY) { + if (std::abs(track.rapidity(PID::getMass(id))) > trkselOptions.cfgCutY) { return; } if constexpr (id == PID::Kaon) { @@ -1025,7 +1025,7 @@ struct tofSpectra { histos.fill(HIST("evsel"), 12.f); } } - if (abs(collision.posZ()) > evselOptions.cfgCutVertex) { + if (std::abs(collision.posZ()) > evselOptions.cfgCutVertex) { return false; } if constexpr (fillHistograms) { @@ -1075,7 +1075,7 @@ struct tofSpectra { return false; } } - return (abs(track.dcaXY()) <= (maxDcaXYFactor.value * (0.0105f + 0.0350f / pow(track.pt(), 1.1f)))); + return (std::abs(track.dcaXY()) <= (maxDcaXYFactor.value * (0.0105f + 0.0350f / pow(track.pt(), 1.1f)))); } return track.isGlobalTrack(); } @@ -1843,7 +1843,7 @@ struct tofSpectra { const float multiplicity = getMultiplicityMC(mcCollision); if (mcParticle.isPhysicalPrimary()) { - if (abs(mcCollision.posZ()) < evselOptions.cfgCutVertex) { + if (std::abs(mcCollision.posZ()) < evselOptions.cfgCutVertex) { histos.fill(HIST(hpt_den_prm_mcgoodev[i]), mcParticle.pt(), multiplicity); } else { histos.fill(HIST(hpt_den_prm_mcbadev[i]), mcParticle.pt(), multiplicity); @@ -1962,7 +1962,7 @@ struct tofSpectra { // Loop on generated collisions for (const auto& mcCollision : mcCollisions) { - if (abs(mcCollision.posZ()) > evselOptions.cfgCutVertex) { + if (std::abs(mcCollision.posZ()) > evselOptions.cfgCutVertex) { continue; } histos.fill(HIST("MC/Multiplicity"), getMultiplicityMC(mcCollision)); diff --git a/PWGLF/Tasks/Nuspex/spectraTOFRun2.cxx b/PWGLF/Tasks/Nuspex/spectraTOFRun2.cxx index efcc58dd55d..9c31160f0a1 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOFRun2.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOFRun2.cxx @@ -348,7 +348,7 @@ struct tofSpectraRun2 { template void fillParticleHistos(const T& track, const C& /*collision*/) { - if (abs(track.rapidity(PID::getMass(id))) > cfgCutY) { + if (std::abs(track.rapidity(PID::getMass(id))) > cfgCutY) { return; } const auto& nsigmaTOF = o2::aod::pidutils::tofNSigma(track); @@ -468,7 +468,7 @@ struct tofSpectraRun2 { if constexpr (fillHistograms) { histos.fill(HIST("evsel"), 2); } - if (abs(collision.posZ()) > cfgCutVertex) { + if (std::abs(collision.posZ()) > cfgCutVertex) { return false; } if constexpr (fillHistograms) { @@ -496,7 +496,7 @@ struct tofSpectraRun2 { if constexpr (fillHistograms) { histos.fill(HIST("tracksel"), 1); } - if (abs(track.eta()) > cfgCutEta) { + if (std::abs(track.eta()) > cfgCutEta) { return false; } if constexpr (fillHistograms) { diff --git a/PWGLF/Tasks/Nuspex/spectraTPC.cxx b/PWGLF/Tasks/Nuspex/spectraTPC.cxx index 18f7275e523..fd929553fb6 100644 --- a/PWGLF/Tasks/Nuspex/spectraTPC.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTPC.cxx @@ -117,7 +117,7 @@ struct tpcSpectra { void fillParticleHistos(const T& track) { const float y = TMath::ASinH(track.pt() / TMath::Sqrt(PID::getMass2(id) + track.pt() * track.pt()) * TMath::SinH(track.eta())); - if (abs(y) > 0.5) { + if (std::abs(y) > 0.5) { return; } const auto& nsigma = o2::aod::pidutils::tpcNSigma(track); @@ -131,7 +131,7 @@ struct tpcSpectra { if (!track.isGlobalTrack()) { return; } - if (abs(nsigma) > cfgNSigmaCut) { + if (std::abs(nsigma) > cfgNSigmaCut) { return; } histos.fill(HIST(hp[id]), track.p()); @@ -155,7 +155,7 @@ struct tpcSpectra { return; } histos.fill(HIST("evsel"), 2); - if (abs(collision.posZ()) > cfgCutVertex) { + if (std::abs(collision.posZ()) > cfgCutVertex) { return; } histos.fill(HIST("evsel"), 3); @@ -163,7 +163,7 @@ struct tpcSpectra { for (const auto& track : tracks) { histos.fill(HIST("tracksel"), 1); - if (abs(track.eta()) > cfgCutEta) { + if (std::abs(track.eta()) > cfgCutEta) { continue; } histos.fill(HIST("tracksel"), 2); @@ -279,7 +279,7 @@ struct tpcPidQaSignalwTof { TrackCandidates const& tracks) { histos.fill(HIST("evsel"), 1); - if (abs(collision.posZ()) > cfgCutVertex) { + if (std::abs(collision.posZ()) > cfgCutVertex) { return; } histos.fill(HIST("evsel"), 2); @@ -287,7 +287,7 @@ struct tpcPidQaSignalwTof { for (const auto& track : tracks) { histos.fill(HIST("tracksel"), 1); - if (abs(track.eta()) > cfgCutEta) { + if (std::abs(track.eta()) > cfgCutEta) { continue; } histos.fill(HIST("tracksel"), 2); diff --git a/PWGLF/Tasks/Nuspex/spectraTPCtiny.cxx b/PWGLF/Tasks/Nuspex/spectraTPCtiny.cxx index 12fc53f6bfc..d58a8777771 100644 --- a/PWGLF/Tasks/Nuspex/spectraTPCtiny.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTPCtiny.cxx @@ -58,7 +58,7 @@ struct tpcSpectraTiny { template void fillParticleHistos(const T& track, const float& nsigma) { - if (abs(nsigma) > cfgNSigmaCut) { + if (std::abs(nsigma) > cfgNSigmaCut) { return; } histos.fill(HIST(hp[i]), track.p()); @@ -78,7 +78,7 @@ struct tpcSpectraTiny { TrackCandidates const& tracks) { histos.fill(HIST("evsel"), 1); - if (abs(collision.posZ()) > cfgCutVertex) { + if (std::abs(collision.posZ()) > cfgCutVertex) { return; } histos.fill(HIST("evsel"), 2); @@ -86,7 +86,7 @@ struct tpcSpectraTiny { for (const auto& track : tracks) { histos.fill(HIST("tracksel"), 1); - if (abs(track.eta()) > cfgCutEta) { + if (std::abs(track.eta()) > cfgCutEta) { continue; } histos.fill(HIST("tracksel"), 2); diff --git a/PWGLF/Tasks/Nuspex/spectraTPCtinyPiKaPr.cxx b/PWGLF/Tasks/Nuspex/spectraTPCtinyPiKaPr.cxx index 328b44d5477..9c9a340bfcf 100644 --- a/PWGLF/Tasks/Nuspex/spectraTPCtinyPiKaPr.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTPCtinyPiKaPr.cxx @@ -49,7 +49,7 @@ struct tpcSpectraTinyPiKaPr { template void fillParticleHistos(const T& track, const float& nsigma) { - if (abs(nsigma) > cfgNSigmaCut) { + if (std::abs(nsigma) > cfgNSigmaCut) { return; } histos.fill(HIST(hp[i]), track.p()); diff --git a/PWGLF/Tasks/QC/mcParticlePrediction.cxx b/PWGLF/Tasks/QC/mcParticlePrediction.cxx index 47802bd5f2b..83a4ac576e8 100644 --- a/PWGLF/Tasks/QC/mcParticlePrediction.cxx +++ b/PWGLF/Tasks/QC/mcParticlePrediction.cxx @@ -414,7 +414,7 @@ struct mcParticlePrediction { } histos.fill(HIST("collisions/generated"), 1); - if (abs(mcCollision.posZ()) > 10.f) { + if (std::abs(mcCollision.posZ()) > 10.f) { return; } histos.fill(HIST("collisions/generated"), 2); @@ -455,14 +455,14 @@ struct mcParticlePrediction { TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode()); if (p) { - if (abs(p->Charge()) > 1e-3) { + if (std::abs(p->Charge()) > 1e-3) { histos.fill(HIST("particles/eta/charged"), particle.eta()); } else { histos.fill(HIST("particles/eta/neutral"), particle.eta()); } } - if (abs(particle.y()) > 0.5) { + if (std::abs(particle.y()) > 0.5) { continue; } @@ -536,7 +536,7 @@ struct mcParticlePrediction { } histos.fill(HIST("collisions/reconstructed"), 8); - if (abs(collision.posZ()) > posZCut.value) { + if (std::abs(collision.posZ()) > posZCut.value) { return; } histos.fill(HIST("collisions/reconstructed"), 9); diff --git a/PWGLF/Tasks/QC/mcinelgt0.cxx b/PWGLF/Tasks/QC/mcinelgt0.cxx index cac4eff5bf7..40acd66a67f 100644 --- a/PWGLF/Tasks/QC/mcinelgt0.cxx +++ b/PWGLF/Tasks/QC/mcinelgt0.cxx @@ -48,7 +48,7 @@ struct mcInelGt0 { if (!track.isPVContributor()) { continue; } - if (abs(track.eta()) > 1) { + if (std::abs(track.eta()) > 1) { LOG(info) << "Track with eta > 1: " << track.eta() << (track.hasTPC() ? "hasTPC" diff --git a/PWGLF/Tasks/Strangeness/k0_mixed_events.cxx b/PWGLF/Tasks/Strangeness/k0_mixed_events.cxx index d43be490657..b76fbee0fa8 100644 --- a/PWGLF/Tasks/Strangeness/k0_mixed_events.cxx +++ b/PWGLF/Tasks/Strangeness/k0_mixed_events.cxx @@ -299,10 +299,10 @@ struct K0MixedEvents { registry.fill(HIST("Trks"), 1); const float& vtxZ = track.singleCollSel_as().posZ(); registry.fill(HIST("VTX"), vtxZ); - if (abs(vtxZ) > _vertexZ) + if (std::abs(vtxZ) > _vertexZ) continue; registry.fill(HIST("eta"), track.pt(), track.eta()); - if (abs(track.rapidity(particle_mass(_particlePDG_1))) > _maxy) { + if (std::abs(track.rapidity(particle_mass(_particlePDG_1))) > _maxy) { continue; } registry.fill(HIST("rapidity_first"), track.pt(), track.rapidity(particle_mass(_particlePDG_1))); diff --git a/PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx b/PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx index 07b8549e29e..bebddc16a72 100644 --- a/PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx +++ b/PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx @@ -660,10 +660,10 @@ struct strangeness_in_jets { template bool isHighPurityPion(const pionTrack& track) { - if (track.p() < 0.6 && abs(track.tpcNSigmaPi()) < 3.0) + if (track.p() < 0.6 && std::abs(track.tpcNSigmaPi()) < 3.0) return true; - if (track.p() > 0.6 && abs(track.tpcNSigmaPi()) < 3.0 && - abs(track.tofNSigmaPi()) < 3.0) + if (track.p() > 0.6 && std::abs(track.tpcNSigmaPi()) < 3.0 && + std::abs(track.tofNSigmaPi()) < 3.0) return true; return false; } @@ -779,7 +779,7 @@ struct strangeness_in_jets { registryData.fill(HIST("number_of_events_data"), 1.5); // Cut on z-vertex - if (abs(collision.posZ()) > zVtx) + if (std::abs(collision.posZ()) > zVtx) return; // Event Counter: after z-vertex cut @@ -847,7 +847,7 @@ struct strangeness_in_jets { int n_jets_selected(0); for (int i = 0; i < static_cast(jet.size()); i++) { - if ((abs(jet[i].Eta()) + Rjet) > etaMax) + if ((std::abs(jet[i].Eta()) + Rjet) > etaMax) continue; // Perpendicular cones @@ -1152,7 +1152,7 @@ struct strangeness_in_jets { continue; registryMC.fill(HIST("number_of_events_mc"), 1.5); - if (abs(collision.posZ()) > 10.0) + if (std::abs(collision.posZ()) > 10.0) continue; registryMC.fill(HIST("number_of_events_mc"), 2.5); @@ -1387,7 +1387,7 @@ struct strangeness_in_jets { registryMC.fill(HIST("number_of_events_mc"), 3.5); // Selection on z_{vertex} - if (abs(mccollision.posZ()) > 10) + if (std::abs(mccollision.posZ()) > 10) continue; registryMC.fill(HIST("number_of_events_mc"), 4.5); @@ -1422,12 +1422,12 @@ struct strangeness_in_jets { double dy = particle.vy() - mccollision.posY(); double dz = particle.vz() - mccollision.posZ(); double dcaxy = sqrt(dx * dx + dy * dy); - double dcaz = abs(dz); + double dcaz = std::abs(dz); if (dcaxy > (par0 + par1 / particle.pt())) continue; if (dcaz > (par0 + par1 / particle.pt())) continue; - if (abs(particle.eta()) > 0.8) + if (std::abs(particle.eta()) > 0.8) continue; if (particle.pt() < 0.15) continue; @@ -1489,7 +1489,7 @@ struct strangeness_in_jets { int n_jets_selected(0); for (int i = 0; i < static_cast(jet.size()); i++) { - if ((abs(jet[i].Eta()) + Rjet) > etaMax) + if ((std::abs(jet[i].Eta()) + Rjet) > etaMax) continue; // Perpendicular cones @@ -1512,13 +1512,13 @@ struct strangeness_in_jets { double dy = particle.vy() - mccollision.posY(); double dz = particle.vz() - mccollision.posZ(); double dcaxy = sqrt(dx * dx + dy * dy); - double dcaz = abs(dz); + double dcaz = std::abs(dz); if (dcaxy > (par0 + par1 / particle.pt())) continue; if (dcaz > (par0 + par1 / particle.pt())) continue; - if (abs(particle.eta()) > 0.8) + if (std::abs(particle.eta()) > 0.8) continue; if (particle.pt() < 0.15) continue; diff --git a/PWGLF/Utils/inelGt.h b/PWGLF/Utils/inelGt.h index 367e9917f8f..2ed513a902c 100644 --- a/PWGLF/Utils/inelGt.h +++ b/PWGLF/Utils/inelGt.h @@ -137,10 +137,10 @@ struct ParticleCounter { } // is neutral if (requireNeutral) { - if (abs(p->Charge()) > 1e-3) + if (std::abs(p->Charge()) > 1e-3) continue; } else { - if (abs(p->Charge()) <= 1e-3) + if (std::abs(p->Charge()) <= 1e-3) continue; } // in acceptance