Skip to content

Commit e4fe946

Browse files
committed
Fix use of o2::constants::math
1 parent c5011ac commit e4fe946

10 files changed

Lines changed: 25 additions & 23 deletions

File tree

DPG/Tasks/AOTTrack/qaMatchEff.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
//
3232
// base namespaces
3333
using namespace o2;
34+
using namespace o2::constants::math;
3435
using namespace o2::framework;
3536
using namespace o2::framework::expressions;
3637
using std::array;

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static const o2::framework::AxisSpec nSigmaAxis{100, -10.f, 10.f};
156156
static const o2::framework::AxisSpec alphaAxis{100, -1.f, 1.f};
157157
static const o2::framework::AxisSpec qtAxis{100, 0.f, 0.25f};
158158
static const o2::framework::AxisSpec bdtAxis{100, 0.f, 1.f};
159-
static const o2::framework::AxisSpec phiAxis{36, 0., TwoPI};
159+
static const o2::framework::AxisSpec phiAxis{36, 0., o2::constants::math::TwoPI};
160160
static const std::array<o2::framework::AxisSpec, kNCharmParticles + 8> massAxisC = {o2::framework::AxisSpec{100, 1.65f, 2.05f}, o2::framework::AxisSpec{100, 1.65f, 2.05f}, o2::framework::AxisSpec{100, 1.75f, 2.15f}, o2::framework::AxisSpec{100, 2.05f, 2.45f}, o2::framework::AxisSpec{100, 2.25f, 2.65f}, o2::framework::AxisSpec{100, 0.139f, 0.159f}, o2::framework::AxisSpec{100, 0.f, 0.25f}, o2::framework::AxisSpec{100, 0.f, 0.25f}, o2::framework::AxisSpec{100, 0.48f, 0.88f}, o2::framework::AxisSpec{100, 0.48f, 0.88f}, o2::framework::AxisSpec{100, 1.1f, 1.4f}, o2::framework::AxisSpec{100, 2.3f, 2.9f}, o2::framework::AxisSpec{100, 2.3f, 2.9f}};
161161
static const std::array<o2::framework::AxisSpec, kNBeautyParticles> massAxisB = {o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 5.0f, 6.2f}, o2::framework::AxisSpec{240, 5.0f, 6.2f}};
162162

PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ class FemtoUniverseAngularContainer
120120
framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"};
121121

122122
// angular correlations
123-
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
124-
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
123+
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
124+
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
125125
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
126126
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
127127

@@ -159,10 +159,10 @@ class FemtoUniverseAngularContainer
159159
delta_phi = part1.phi() - part2.phi();
160160

161161
while (delta_phi < mPhiLow) {
162-
delta_phi += TwoPI;
162+
delta_phi += o2::constants::math::TwoPI;
163163
}
164164
while (delta_phi > mPhiHigh) {
165-
delta_phi -= TwoPI;
165+
delta_phi -= o2::constants::math::TwoPI;
166166
}
167167

168168
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), delta_phi, delta_eta);

PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ class FemtoUniverseContainer
135135
framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"};
136136

137137
// angular correlations
138-
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
139-
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
138+
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
139+
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
140140
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
141141
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
142142

@@ -175,10 +175,10 @@ class FemtoUniverseContainer
175175
delta_phi = part1.phi() - part2.phi();
176176

177177
while (delta_phi < mPhiLow) {
178-
delta_phi += TwoPI;
178+
delta_phi += o2::constants::math::TwoPI;
179179
}
180180
while (delta_phi > mPhiHigh) {
181-
delta_phi -= TwoPI;
181+
delta_phi -= o2::constants::math::TwoPI;
182182
}
183183

184184
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs);

PWGCF/FemtoWorld/Core/FemtoWorldContainer.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "TRandom.h"
3333

3434
using namespace o2::framework;
35-
using namespace o2::constants::math;
3635

3736
namespace o2::analysis::femtoWorld
3837
{
@@ -87,8 +86,8 @@ class FemtoWorldContainer
8786
framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"};
8887
framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"};
8988

90-
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
91-
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
89+
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
90+
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
9291

9392
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
9493
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
@@ -154,10 +153,10 @@ class FemtoWorldContainer
154153
double delta_phi = part1.phi() - part2.phi();
155154

156155
while (delta_phi < mPhiLow) {
157-
delta_phi += TwoPI;
156+
delta_phi += o2::constants::math::TwoPI;
158157
}
159158
while (delta_phi > mPhiHigh) {
160-
delta_phi -= TwoPI;
159+
delta_phi -= o2::constants::math::TwoPI;
161160
}
162161
TLorentzVector part1Vec;
163162
part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne);

PWGCF/FemtoWorld/Core/FemtoWorldPionContainer.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "TRandom.h"
3333

3434
using namespace o2::framework;
35-
using namespace o2::constants::math;
3635

3736
namespace o2::analysis::femtoWorld
3837
{
@@ -91,8 +90,8 @@ class FemtoWorldPionContainer
9190
framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"};
9291
framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"};
9392

94-
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
95-
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
93+
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
94+
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
9695

9796
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
9897
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
@@ -141,10 +140,10 @@ class FemtoWorldPionContainer
141140
double delta_phi = part1.phi() - part2.phi();
142141

143142
while (delta_phi < mPhiLow) {
144-
delta_phi += TwoPI;
143+
delta_phi += o2::constants::math::TwoPI;
145144
}
146145
while (delta_phi > mPhiHigh) {
147-
delta_phi -= TwoPI;
146+
delta_phi -= o2::constants::math::TwoPI;
148147
}
149148
TLorentzVector part1Vec;
150149
part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne);

PWGEM/PhotonMeson/Utils/gammaConvDefinitions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ AxisSpec const gAxis_zColl{800, -50.f, 50.f};
2323
AxisSpec const gAxis_pT{800, 0.f, 25.f};
2424
AxisSpec const gAxis_pT_armenteros{400, 0.f, 1.f};
2525
AxisSpec const gAxis_pT2d{400, 0.f, 25.f};
26-
AxisSpec const gAxis_eta{800, -PIHalf, PIHalf};
27-
AxisSpec const gAxis_eta2d{400, -PIHalf, PIHalf};
28-
AxisSpec const gAxis_phi{800, 0.f, TwoPI};
26+
AxisSpec const gAxis_eta{800, -o2::constants::math::PIHalf, o2::constants::math::PIHalf};
27+
AxisSpec const gAxis_eta2d{400, -o2::constants::math::PIHalf, o2::constants::math::PIHalf};
28+
AxisSpec const gAxis_phi{800, 0.f, o2::constants::math::TwoPI};
2929
AxisSpec const gAxis_r{800, 0.f, 200.f};
3030
AxisSpec const gAxis_r_extended{800, 0.f, 500.f};
3131
AxisSpec const gAxis_dr{200, -100.f, 100.f};
3232
AxisSpec const gAxis_r2d{400, 0.f, 250.f};
3333
AxisSpec const gAxis_z2d{1000, -250.f, 250.f};
3434
AxisSpec const gAxis_TPCdEdxSig{401, -10.025f, 10.025f};
35-
AxisSpec const gAxis_radRes{800, -PI, PI};
35+
AxisSpec const gAxis_radRes{800, -o2::constants::math::PI, o2::constants::math::PI};
3636
AxisSpec const gAxis_xyz{2400, -300.f, 300.f};
3737
AxisSpec const gAxis_chi2{501, -1.f, 500.f};
3838
AxisSpec gAxis_pT_log{800, 0.01f, 25.f};

PWGLF/Tasks/cascadecorrelations.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <TDatabasePDG.h>
4242

4343
using namespace o2;
44+
using namespace o2::constants::math;
4445
using namespace o2::framework;
4546
using namespace o2::framework::expressions;
4647
using std::array;

PWGLF/Tasks/hStrangeCorrelation.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "Framework/StaticFor.h"
3434

3535
using namespace o2;
36+
using namespace o2::constants::math;
3637
using namespace o2::framework;
3738
using namespace o2::framework::expressions;
3839

Tutorials/src/propagatedTracks.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "Framework/runDataProcessing.h"
2929

3030
using namespace o2;
31+
using namespace o2::constants::math;
3132
using namespace o2::framework;
3233
using namespace o2::framework::expressions;
3334

0 commit comments

Comments
 (0)