Skip to content

Commit 14b4211

Browse files
committed
Remove using directives from headers
1 parent 5cc7517 commit 14b4211

File tree

8 files changed

+114
-126
lines changed

8 files changed

+114
-126
lines changed

PWGUD/Core/SGTrackSelector.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@
1616
#ifndef PWGUD_CORE_SGTRACKSELECTOR_H_
1717
#define PWGUD_CORE_SGTRACKSELECTOR_H_
1818

19-
#include <vector>
20-
#include "Framework/runDataProcessing.h"
21-
#include "Framework/AnalysisTask.h"
19+
#include "PWGUD/Core/SGSelector.h"
20+
#include "PWGUD/DataModel/UDTables.h"
21+
2222
#include "Framework/AnalysisDataModel.h"
23+
#include "Framework/AnalysisTask.h"
2324
#include "Framework/O2DatabasePDGPlugin.h"
24-
#include <iostream>
25-
#include "PWGUD/DataModel/UDTables.h"
26-
#include "PWGUD/Core/SGSelector.h"
27-
#include <TString.h>
25+
#include "Framework/runDataProcessing.h"
26+
2827
#include "TVector3.h"
29-
using namespace std;
30-
using namespace o2;
31-
using namespace o2::aod;
32-
using namespace o2::framework;
33-
using namespace o2::framework::expressions;
28+
#include <TString.h>
29+
30+
#include <iostream>
31+
#include <vector>
32+
3433
template <typename T>
3534
int trackselector(const T& track, const std::vector<float>& params)
3635
{

PWGUD/Core/UDHelpers.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
#ifndef PWGUD_CORE_UDHELPERS_H_
1717
#define PWGUD_CORE_UDHELPERS_H_
1818

19-
#include <vector>
20-
#include <bitset>
19+
#include "PWGUD/Core/DGCutparHolder.h"
20+
#include "PWGUD/Core/UPCHelpers.h"
2121

22-
#include "TLorentzVector.h"
23-
#include "Framework/Logger.h"
24-
#include "DataFormatsFT0/Digit.h"
25-
#include "DataFormatsFIT/Triggers.h"
26-
#include "CommonConstants/LHCConstants.h"
2722
#include "Common/DataModel/EventSelection.h"
28-
#include "Common/DataModel/TrackSelectionTables.h"
2923
#include "Common/DataModel/PIDResponse.h"
30-
#include "PWGUD/Core/UPCHelpers.h"
31-
#include "PWGUD/Core/DGCutparHolder.h"
24+
#include "Common/DataModel/TrackSelectionTables.h"
3225

33-
using namespace o2;
34-
using namespace o2::framework;
26+
#include "CommonConstants/LHCConstants.h"
27+
#include "DataFormatsFIT/Triggers.h"
28+
#include "DataFormatsFT0/Digit.h"
29+
#include "Framework/Logger.h"
30+
31+
#include "TLorentzVector.h"
32+
33+
#include <bitset>
34+
#include <vector>
3535

3636
// namespace with helpers for UD framework
3737
namespace udhelpers
@@ -674,7 +674,7 @@ void fillBGBBFlags(upchelpers::FITInfo& info, uint64_t const& minbc, BCR const&
674674
// -----------------------------------------------------------------------------
675675
// extract FIT information
676676
template <typename BC, typename BCS>
677-
void getFITinfo(upchelpers::FITInfo& info, BC& bc, BCS const& bcs, aod::FT0s const& ft0s, aod::FV0As const& fv0as, aod::FDDs const& fdds)
677+
void getFITinfo(upchelpers::FITInfo& info, BC& bc, BCS const& bcs, o2::aod::FT0s const& ft0s, o2::aod::FV0As const& fv0as, o2::aod::FDDs const& fdds)
678678
{
679679
// FV0A
680680
if (bc.has_foundFV0()) {
@@ -713,24 +713,24 @@ void getFITinfo(upchelpers::FITInfo& info, BC& bc, BCS const& bcs, aod::FT0s con
713713

714714
// -----------------------------------------------------------------------------
715715
template <typename T>
716-
bool cleanZDC(T const& bc, aod::Zdcs& zdcs, std::vector<float>& /*lims*/, SliceCache& cache)
716+
bool cleanZDC(T const& bc, o2::aod::Zdcs& zdcs, std::vector<float>& /*lims*/, o2::framework::SliceCache& cache)
717717
{
718-
const auto& ZdcBC = zdcs.sliceByCached(aod::zdc::bcId, bc.globalIndex(), cache);
718+
const auto& ZdcBC = zdcs.sliceByCached(o2::aod::zdc::bcId, bc.globalIndex(), cache);
719719
return (ZdcBC.size() == 0);
720720
}
721721

722722
// -----------------------------------------------------------------------------
723723
template <typename T>
724-
bool cleanCalo(T const& bc, aod::Calos& calos, std::vector<float>& /*lims*/, SliceCache& cache)
724+
bool cleanCalo(T const& bc, o2::aod::Calos& calos, std::vector<float>& /*lims*/, o2::framework::SliceCache& cache)
725725
{
726-
const auto& CaloBC = calos.sliceByCached(aod::calo::bcId, bc.globalIndex(), cache);
726+
const auto& CaloBC = calos.sliceByCached(o2::aod::calo::bcId, bc.globalIndex(), cache);
727727
return (CaloBC.size() == 0);
728728
}
729729

730730
// -----------------------------------------------------------------------------
731731
// check if all tracks come from same MCCollision
732732
template <typename T>
733-
int64_t sameMCCollision(T tracks, aod::McCollisions, aod::McParticles)
733+
int64_t sameMCCollision(T tracks, o2::aod::McCollisions, o2::aod::McParticles)
734734
{
735735
int64_t colID = -1;
736736
for (auto const& track : tracks) {

PWGUD/Core/UPCHelpers.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212
#ifndef PWGUD_CORE_UPCHELPERS_H_
1313
#define PWGUD_CORE_UPCHELPERS_H_
1414

15-
#include "Framework/AnalysisDataModel.h"
16-
#include "Common/DataModel/EventSelection.h"
17-
#include "Common/CCDB/EventSelectionParams.h"
18-
#include "CommonConstants/LHCConstants.h"
19-
#include "TLorentzVector.h"
2015
#include "UPCCutparHolder.h"
16+
2117
#include "PWGUD/DataModel/UDTables.h"
2218

23-
using namespace o2::framework;
24-
using namespace o2::framework::expressions;
19+
#include "Common/CCDB/EventSelectionParams.h"
20+
#include "Common/DataModel/EventSelection.h"
21+
22+
#include "CommonConstants/LHCConstants.h"
23+
#include "Framework/AnalysisDataModel.h"
24+
25+
#include "TLorentzVector.h"
2526

2627
using BCsWithBcSels = o2::soa::Join<o2::aod::BCs, o2::aod::BcSels>;
2728

PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
#ifndef PWGUD_CORE_UPCJPSICENTRALBARRELCORRHELPER_H_
1717
#define PWGUD_CORE_UPCJPSICENTRALBARRELCORRHELPER_H_
1818

19-
#include <vector>
20-
#include <algorithm>
2119
#include "CommonConstants/MathConstants.h"
22-
#include <random>
2320

24-
using namespace o2;
25-
using namespace o2::framework;
26-
using namespace o2::framework::expressions;
27-
using namespace std;
21+
#include <algorithm>
22+
#include <random>
23+
#include <vector>
2824

2925
/*enum ParticleType {
3026
P_ELECTRON = 0,

PWGUD/Core/UPCPairCuts.h

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@
1616
#ifndef PWGUD_CORE_UPCPAIRCUTS_H_
1717
#define PWGUD_CORE_UPCPAIRCUTS_H_
1818

19-
#include <cmath>
19+
#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
2020

21-
#include "Framework/Logger.h"
22-
#include "Framework/HistogramRegistry.h"
2321
#include "CommonConstants/MathConstants.h"
2422
#include "CommonConstants/PhysicsConstants.h"
23+
#include "Framework/HistogramRegistry.h"
24+
#include "Framework/Logger.h"
2525

26-
#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
27-
28-
using namespace o2;
29-
using namespace o2::framework;
30-
using namespace constants::math;
26+
#include <cmath>
3127

3228
class UPCPairCuts
3329
{
@@ -39,14 +35,14 @@ class UPCPairCuts
3935
Rho,
4036
ParticlesLastEntry };
4137

42-
void setHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
38+
void setHistogramRegistry(o2::framework::HistogramRegistry* registry) { histogramRegistry = registry; }
4339

4440
void setPairCut(Particle particle, float cut)
4541
{
4642
LOGF(info, "Enabled pair cut for %d with value %f", static_cast<int>(particle), cut);
4743
mCuts[particle] = cut;
4844
if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("ControlConvResonances")) == false) {
49-
histogramRegistry->add("ControlConvResonances", "", {HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}});
45+
histogramRegistry->add("ControlConvResonances", "", {o2::framework::HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}});
5046
}
5147
}
5248

@@ -57,7 +53,7 @@ class UPCPairCuts
5753
mTwoTrackRadius = radius;
5854

5955
if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("TwoTrackDistancePt_0")) == false) {
60-
histogramRegistry->add("TwoTrackDistancePt_0", "", {HistType::kTH3F, {{100, -0.15, 0.15, "#Delta#eta"}, {100, -0.05, 0.05, "#Delta#varphi^{*}_{min}"}, {20, 0, 10, "#Delta p_{T}"}}});
56+
histogramRegistry->add("TwoTrackDistancePt_0", "", {o2::framework::HistType::kTH3F, {{100, -0.15, 0.15, "#Delta#eta"}, {100, -0.05, 0.05, "#Delta#varphi^{*}_{min}"}, {20, 0, 10, "#Delta p_{T}"}}});
6157
histogramRegistry->addClone("TwoTrackDistancePt_0", "TwoTrackDistancePt_1");
6258
}
6359
}
@@ -74,7 +70,7 @@ class UPCPairCuts
7470
float mTwoTrackRadius = 0.8f; // radius at which the two track cuts are applied
7571
int magField = 5; // magField: B field in kG
7672

77-
HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here
73+
o2::framework::HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here
7874

7975
template <typename T>
8076
bool conversionCut(T const& track1, T const& track2, Particle conv, double cut);
@@ -290,20 +286,20 @@ double UPCPairCuts::getInvMassSquaredFast(T const& track1, double m0_1, T const&
290286

291287
// fold onto 0...pi
292288
float deltaPhi = std::fabs(phi1 - phi2);
293-
while (deltaPhi > TwoPI) {
294-
deltaPhi -= TwoPI;
289+
while (deltaPhi > o2::constants::math::TwoPI) {
290+
deltaPhi -= o2::constants::math::TwoPI;
295291
}
296-
if (deltaPhi > PI) {
297-
deltaPhi = TwoPI - deltaPhi;
292+
if (deltaPhi > o2::constants::math::PI) {
293+
deltaPhi = o2::constants::math::TwoPI - deltaPhi;
298294
}
299295

300296
float cosDeltaPhi = 0;
301-
if (deltaPhi < PI / 3.0f) {
297+
if (deltaPhi < o2::constants::math::PI / 3.0f) {
302298
cosDeltaPhi = 1.0 - deltaPhi * deltaPhi / 2 + deltaPhi * deltaPhi * deltaPhi * deltaPhi / 24;
303-
} else if (deltaPhi < 2.0f * PI / 3.0f) {
304-
cosDeltaPhi = -(deltaPhi - PI / 2) + 1.0 / 6 * std::pow((deltaPhi - PI / 2), 3);
299+
} else if (deltaPhi < 2.0f * o2::constants::math::PI / 3.0f) {
300+
cosDeltaPhi = -(deltaPhi - o2::constants::math::PI / 2) + 1.0 / 6 * std::pow((deltaPhi - o2::constants::math::PI / 2), 3);
305301
} else {
306-
cosDeltaPhi = -1.0f + 1.0f / 2.0f * (deltaPhi - PI) * (deltaPhi - PI) - 1.0f / 24.0f * std::pow(deltaPhi - PI, 4.0f);
302+
cosDeltaPhi = -1.0f + 1.0f / 2.0f * (deltaPhi - o2::constants::math::PI) * (deltaPhi - o2::constants::math::PI) - 1.0f / 24.0f * std::pow(deltaPhi - o2::constants::math::PI, 4.0f);
307303
}
308304

309305
double mass2 = m0_1 * m0_1 + m0_2 * m0_2 + 2.0f * (std::sqrt(e1squ * e2squ) - (pt1 * pt2 * (cosDeltaPhi + 1.0f / tantheta1 / tantheta2)));
@@ -330,14 +326,14 @@ float UPCPairCuts::getDPhiStar(T const& track1, T const& track2, float radius, i
330326

331327
float dphistar = phi1 - phi2 - charge1 * std::asin(0.015 * magField * radius / pt1) + charge2 * std::asin(0.015 * magField * radius / pt2);
332328

333-
if (dphistar > PI) {
334-
dphistar = TwoPI - dphistar;
329+
if (dphistar > o2::constants::math::PI) {
330+
dphistar = o2::constants::math::TwoPI - dphistar;
335331
}
336-
if (dphistar < -PI) {
337-
dphistar = -TwoPI - dphistar;
332+
if (dphistar < -o2::constants::math::PI) {
333+
dphistar = -o2::constants::math::TwoPI - dphistar;
338334
}
339-
if (dphistar > PI) { // might look funny but is needed
340-
dphistar = TwoPI - dphistar;
335+
if (dphistar > o2::constants::math::PI) { // might look funny but is needed
336+
dphistar = o2::constants::math::TwoPI - dphistar;
341337
}
342338

343339
return dphistar;

PWGUD/Core/decayTree.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#include <utility>
12+
#include "decayTree.h"
13+
14+
#include <rapidjson/document.h>
15+
#include <rapidjson/filereadstream.h>
16+
1317
#include <cstdio>
1418
#include <map>
1519
#include <string>
20+
#include <utility>
1621
#include <vector>
1722

18-
#include "rapidjson/document.h"
19-
#include "rapidjson/filereadstream.h"
20-
#include "decayTree.h"
21-
2223
using namespace rapidjson;
2324

2425
// -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)