Skip to content

Commit 0896043

Browse files
author
ariffero
committed
Fix some other O2 linter warnings
1 parent 690133c commit 0896043

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

PWGUD/Tasks/fwdMuonsUPC.cxx

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ DECLARE_SOA_COLUMN(Phi, phi, float);
4848
DECLARE_SOA_COLUMN(PhiAv, phiAv, float);
4949
DECLARE_SOA_COLUMN(PhiCh, phiCh, float);
5050
// tracks positive (p) and negative (n)
51-
DECLARE_SOA_COLUMN(EnergyP, energyp, float);
51+
DECLARE_SOA_COLUMN(EnergyP, energyP, float);
5252
DECLARE_SOA_COLUMN(Pxp, pxp, float);
5353
DECLARE_SOA_COLUMN(Pyp, pyp, float);
5454
DECLARE_SOA_COLUMN(Pzp, pzp, float);
5555
DECLARE_SOA_COLUMN(Ptp, ptp, float);
5656
DECLARE_SOA_COLUMN(Etap, etap, float);
5757
DECLARE_SOA_COLUMN(Phip, phip, float);
58-
DECLARE_SOA_COLUMN(EnergyN, energyn, float);
58+
DECLARE_SOA_COLUMN(EnergyN, energyN, float);
5959
DECLARE_SOA_COLUMN(Pxn, pxn, float);
6060
DECLARE_SOA_COLUMN(Pyn, pyn, float);
6161
DECLARE_SOA_COLUMN(Pzn, pzn, float);
@@ -186,6 +186,7 @@ struct fwdMuonsUPC {
186186
HistogramRegistry mcRecoRegistry{"mcRecoRegistry", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
187187

188188
// CONFIGURABLES
189+
static constexpr double pi = o2::constants::math::PI;
189190
// pT of muon pairs
190191
Configurable<int> nBinsPt{"nBinsPt", 250, "N bins in pT histo"};
191192
Configurable<float> lowPt{"lowPt", 0., "lower limit in pT histo"};
@@ -204,8 +205,8 @@ struct fwdMuonsUPC {
204205
Configurable<float> highRapidity{"highRapidity", -2., "upper limit in rapidity histo"};
205206
// phi of muon pairs
206207
Configurable<int> nBinsPhi{"nBinsPhi", 600, "N bins in phi histo"};
207-
Configurable<float> lowPhi{"lowPhi", -TMath::Pi(), "lower limit in phi histo"};
208-
Configurable<float> highPhi{"highPhi", TMath::Pi(), "upper limit in phi histo"};
208+
Configurable<float> lowPhi{"lowPhi", -pi, "lower limit in phi histo"};
209+
Configurable<float> highPhi{"highPhi", pi, "upper limit in phi histo"};
209210
// pT of single muons
210211
Configurable<int> nBinsPtSingle{"nBinsPtSingle", 500, "N bins in pT histo single muon"};
211212
Configurable<float> lowPtSingle{"lowPtSingle", 0., "lower limit in pT histo single muon"};
@@ -216,8 +217,8 @@ struct fwdMuonsUPC {
216217
Configurable<float> highEtaSingle{"highEtaSingle", -2., "upper limit in eta histo single muon"};
217218
// phi of single muons
218219
Configurable<int> nBinsPhiSingle{"nBinsPhiSingle", 600, "N bins in phi histo single muon"};
219-
Configurable<float> lowPhiSingle{"lowPhiSingle", -TMath::Pi(), "lower limit in phi histo single muon"};
220-
Configurable<float> highPhiSingle{"highPhiSingle", TMath::Pi(), "upper limit in phi histo single muon"};
220+
Configurable<float> lowPhiSingle{"lowPhiSingle", -pi, "lower limit in phi histo single muon"};
221+
Configurable<float> highPhiSingle{"highPhiSingle", pi, "upper limit in phi histo single muon"};
221222
// ZDC
222223
Configurable<int> nBinsZDCen{"nBinsZDCen", 200, "N bins in ZN energy"};
223224
Configurable<float> lowEnZN{"lowEnZN", -50., "lower limit in ZN energy histo"};
@@ -564,40 +565,40 @@ struct fwdMuonsUPC {
564565
registry.fill(HIST("hEnergyZN"), zdc.enA, zdc.enC);
565566

566567
// divide the events in neutron classes
567-
bool neutron_A = false;
568-
bool neutron_C = false;
568+
bool neutronA = false;
569+
bool neutronC = false;
569570
int znClass = -1;
570571

571572
if (std::abs(zdc.timeA) < 2)
572-
neutron_A = true;
573+
neutronA = true;
573574
if (std::abs(zdc.timeC) < 2)
574-
neutron_C = true;
575+
neutronC = true;
575576

576577
if (std::isinf(zdc.timeC))
577-
neutron_C = false;
578+
neutronC = false;
578579
if (std::isinf(zdc.timeA))
579-
neutron_A = false;
580+
neutronA = false;
580581

581582
// fill the histos in neutron classes and assign neutron class label
582583
// 0n0n
583-
if (neutron_C == false && neutron_A == false) {
584+
if (neutronC == false && neutronA == false) {
584585
znClass = 1;
585586
reg0n0n.fill(HIST("hMass"), p.M());
586587
reg0n0n.fill(HIST("hPt"), p.Pt());
587588
reg0n0n.fill(HIST("hPtFit"), p.Pt());
588589
reg0n0n.fill(HIST("hEta"), p.Eta());
589590
reg0n0n.fill(HIST("hRapidity"), p.Rapidity());
590-
} else if (neutron_A ^ neutron_C) { // Xn0n + 0nXn
591-
if (neutron_A)
591+
} else if (neutronA ^ neutronC) { // Xn0n + 0nXn
592+
if (neutronA)
592593
znClass = 2;
593-
else if (neutron_C)
594+
else if (neutronC)
594595
znClass = 3;
595596
regXn0n.fill(HIST("hMass"), p.M());
596597
regXn0n.fill(HIST("hPt"), p.Pt());
597598
regXn0n.fill(HIST("hPtFit"), p.Pt());
598599
regXn0n.fill(HIST("hEta"), p.Eta());
599600
regXn0n.fill(HIST("hRapidity"), p.Rapidity());
600-
} else if (neutron_A && neutron_C) { // XnXn
601+
} else if (neutronA && neutronC) { // XnXn
601602
znClass = 4;
602603
regXnXn.fill(HIST("hMass"), p.M());
603604
regXnXn.fill(HIST("hPt"), p.Pt());

0 commit comments

Comments
 (0)