Skip to content

Commit a0551b1

Browse files
committed
Fix error messages relevant to namespaces
1 parent aafd6bb commit a0551b1

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

PWGUD/Tasks/ProcessMCDPMJetSGv3.cxx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -167,34 +167,34 @@ struct ProcessMCDPMJetSGv3 {
167167
// if(mcParticle.isPhysicalPrimary()) counterMC += 1;
168168
TLorentzVector protoMC;
169169
protoMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massPion);
170-
if (fabs(protoMC.Eta()) < 0.8 && protoMC.Pt() > 0.1) {
170+
if (std::fabs(protoMC.Eta()) < 0.8 && protoMC.Pt() > 0.1) {
171171
counter += 1;
172172
}
173173
if (!mcParticle.isPhysicalPrimary())
174174
continue;
175175
// if(mcParticle.isPhysicalPrimary() && fabs(mcParticle.eta())<0.9){ // do this in the context of the MC loop ! (context matters!!!)
176176
TLorentzVector pMC;
177-
if (abs(mcParticle.pdgCode()) == 211) {
177+
if (std::abs(mcParticle.pdgCode()) == 211) {
178178
// histos.fill(HIST("ptGeneratedPion"), mcParticle.pt());
179179
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massPion);
180180
histos.fill(HIST("ptGeneratedPion"), pMC.Pt());
181181
}
182-
if (abs(mcParticle.pdgCode()) == 321) {
182+
if (std::abs(mcParticle.pdgCode()) == 321) {
183183
// histos.fill(HIST("ptGenerateKaon"), mcParticle.pt());
184184
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massKaon);
185185
histos.fill(HIST("ptGeneratedKaon"), pMC.Pt());
186186
}
187-
if (abs(mcParticle.pdgCode()) == 2212) {
187+
if (std::abs(mcParticle.pdgCode()) == 2212) {
188188
// histos.fill(HIST("ptGeneratedProton"), mcParticle.pt());
189189
pMC.SetXYZM(mcParticle.px(), mcParticle.py(), mcParticle.pz(), massProton);
190190
histos.fill(HIST("ptGeneratedProton"), pMC.Pt());
191191
}
192-
if (abs(pMC.Rapidity()) < 0.8) {
193-
if (abs(mcParticle.pdgCode()) == 211)
192+
if (std::abs(pMC.Rapidity()) < 0.8) {
193+
if (std::abs(mcParticle.pdgCode()) == 211)
194194
histos.fill(HIST("ptGeneratedPionAxE"), pMC.Pt());
195-
if (abs(mcParticle.pdgCode()) == 321)
195+
if (std::abs(mcParticle.pdgCode()) == 321)
196196
histos.fill(HIST("ptGeneratedKaonAxE"), pMC.Pt());
197-
if (abs(mcParticle.pdgCode()) == 2212)
197+
if (std::abs(mcParticle.pdgCode()) == 2212)
198198
histos.fill(HIST("ptGeneratedProtonAxE"), pMC.Pt());
199199
if (mcParticle.pdgCode() == 2212) {
200200
histos.fill(HIST("ptGeneratedProtonAxEPos"), pMC.Pt());
@@ -246,7 +246,7 @@ struct ProcessMCDPMJetSGv3 {
246246
// if (!(std::abs(track.dcaZ()) < 2.)) {
247247
// continue;
248248
// }
249-
double dcaLimit = 0.0105 + 0.035 / pow(track.pt(), 1.1);
249+
double dcaLimit = 0.0105 + 0.035 / std::pow(track.pt(), 1.1);
250250
// if (!(std::abs(track.dcaXY()) < dcaLimit)) {
251251
// continue;
252252
// }
@@ -272,12 +272,12 @@ struct ProcessMCDPMJetSGv3 {
272272
nSigmaPi = track.tpcNSigmaPi();
273273
nSigmaKa = track.tpcNSigmaKa();
274274
nSigmaPr = track.tpcNSigmaPr();
275-
if (abs(nSigmaPi) < 3. && abs(pion.Rapidity()) < 0.8) {
275+
if (std::abs(nSigmaPi) < 3. && std::abs(pion.Rapidity()) < 0.8) {
276276
histos.fill(HIST("hSigmaPion"), track.pt(), nSigmaPi);
277277
if (track.has_udMcParticle()) {
278278
auto mcParticle = track.udMcParticle();
279279
// if(abs(mcParticle.pdgCode())==211 && mcParticle.isPhysicalPrimary()) howManyPionsHavePionMCandPrimaries += 1;
280-
if (abs(mcParticle.pdgCode()) == 211) {
280+
if (std::abs(mcParticle.pdgCode()) == 211) {
281281
histos.fill(HIST("hSigmaPionTruth"), track.pt(), nSigmaPi);
282282
histos.fill(HIST("allreconstructedPFPion"), track.pt());
283283
if (mcParticle.isPhysicalPrimary()) {
@@ -286,11 +286,11 @@ struct ProcessMCDPMJetSGv3 {
286286
}
287287
}
288288
}
289-
if (abs(nSigmaKa) < 3. && abs(kaon.Rapidity()) < 0.8) {
289+
if (std::abs(nSigmaKa) < 3. && std::abs(kaon.Rapidity()) < 0.8) {
290290
histos.fill(HIST("hSigmaKaon"), track.pt(), nSigmaKa);
291291
if (track.has_udMcParticle()) {
292292
auto mcParticle = track.udMcParticle();
293-
if (abs(mcParticle.pdgCode()) == 321) {
293+
if (std::abs(mcParticle.pdgCode()) == 321) {
294294
histos.fill(HIST("hSigmaKaonTruth"), track.pt(), nSigmaKa);
295295
histos.fill(HIST("allreconstructedPFKaon"), track.pt());
296296
if (mcParticle.isPhysicalPrimary()) {
@@ -299,11 +299,11 @@ struct ProcessMCDPMJetSGv3 {
299299
}
300300
}
301301
}
302-
if (abs(nSigmaPr) < 3. && abs(proton.Rapidity()) < 0.8) {
302+
if (std::abs(nSigmaPr) < 3. && std::abs(proton.Rapidity()) < 0.8) {
303303
histos.fill(HIST("hSigmaProton"), track.pt(), nSigmaPr);
304304
if (track.has_udMcParticle()) {
305305
auto mcParticle = track.udMcParticle();
306-
if (abs(mcParticle.pdgCode()) == 2212) {
306+
if (std::abs(mcParticle.pdgCode()) == 2212) {
307307
histos.fill(HIST("hSigmaProtonTruth"), track.pt(), nSigmaPr);
308308
histos.fill(HIST("allreconstructedPFProton"), track.pt());
309309
if (mcParticle.pdgCode() == 2212) {
@@ -328,12 +328,12 @@ struct ProcessMCDPMJetSGv3 {
328328
nSigmaPiTOF = track.tofNSigmaPi();
329329
nSigmaKaTOF = track.tofNSigmaKa();
330330
nSigmaPrTOF = track.tofNSigmaPr();
331-
if (abs(nSigmaPiTOF) < 3. && abs(pion.Rapidity()) < 0.8) {
331+
if (std::abs(nSigmaPiTOF) < 3. && std::abs(pion.Rapidity()) < 0.8) {
332332
histos.fill(HIST("hSigmaPionTOF"), track.pt(), nSigmaPiTOF);
333333
if (track.has_udMcParticle()) {
334334
auto mcParticle = track.udMcParticle();
335335
// if(abs(mcParticle.pdgCode())==211 && mcParticle.isPhysicalPrimary()) howManyPionsHavePionMCandPrimaries += 1;
336-
if (abs(mcParticle.pdgCode()) == 211) {
336+
if (std::abs(mcParticle.pdgCode()) == 211) {
337337
histos.fill(HIST("hSigmaPionTruthTOF"), track.pt(), nSigmaPiTOF);
338338
histos.fill(HIST("allreconstructedPFPionTOF"), track.pt());
339339
if (mcParticle.isPhysicalPrimary()) {
@@ -342,11 +342,11 @@ struct ProcessMCDPMJetSGv3 {
342342
}
343343
}
344344
}
345-
if (abs(nSigmaKaTOF) < 3. && abs(kaon.Rapidity()) < 0.8) {
345+
if (std::abs(nSigmaKaTOF) < 3. && std::abs(kaon.Rapidity()) < 0.8) {
346346
histos.fill(HIST("hSigmaKaonTOF"), track.pt(), nSigmaKaTOF);
347347
if (track.has_udMcParticle()) {
348348
auto mcParticle = track.udMcParticle();
349-
if (abs(mcParticle.pdgCode()) == 321) {
349+
if (std::abs(mcParticle.pdgCode()) == 321) {
350350
histos.fill(HIST("hSigmaKaonTruthTOF"), track.pt(), nSigmaKaTOF);
351351
histos.fill(HIST("allreconstructedPFKaonTOF"), track.pt());
352352
if (mcParticle.isPhysicalPrimary()) {
@@ -355,11 +355,11 @@ struct ProcessMCDPMJetSGv3 {
355355
}
356356
}
357357
}
358-
if (abs(nSigmaPrTOF) < 3. && abs(proton.Rapidity()) < 0.8) {
358+
if (std::abs(nSigmaPrTOF) < 3. && std::abs(proton.Rapidity()) < 0.8) {
359359
histos.fill(HIST("hSigmaProtonTOF"), track.pt(), nSigmaPrTOF);
360360
if (track.has_udMcParticle()) {
361361
auto mcParticle = track.udMcParticle();
362-
if (abs(mcParticle.pdgCode()) == 2212) {
362+
if (std::abs(mcParticle.pdgCode()) == 2212) {
363363
histos.fill(HIST("hSigmaProtonTruthTOF"), track.pt(), nSigmaPrTOF);
364364
histos.fill(HIST("allreconstructedPFProtonTOF"), track.pt());
365365
if (mcParticle.isPhysicalPrimary()) {

0 commit comments

Comments
 (0)