From 14b421148549982d201639b99d9442db786073df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:13:44 +0200 Subject: [PATCH] Remove using directives from headers --- PWGUD/Core/SGTrackSelector.h | 23 +++--- PWGUD/Core/UDHelpers.h | 36 ++++----- PWGUD/Core/UPCHelpers.h | 15 ++-- PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h | 10 +-- PWGUD/Core/UPCPairCuts.h | 48 +++++------ PWGUD/Core/decayTree.cxx | 11 +-- PWGUD/Core/decayTree.h | 89 ++++++++++----------- PWGUD/TableProducer/DGBCCandProducer.h | 8 +- 8 files changed, 114 insertions(+), 126 deletions(-) diff --git a/PWGUD/Core/SGTrackSelector.h b/PWGUD/Core/SGTrackSelector.h index 4288ef89e80..455eaf24ac1 100644 --- a/PWGUD/Core/SGTrackSelector.h +++ b/PWGUD/Core/SGTrackSelector.h @@ -16,21 +16,20 @@ #ifndef PWGUD_CORE_SGTRACKSELECTOR_H_ #define PWGUD_CORE_SGTRACKSELECTOR_H_ -#include -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisTask.h" +#include "PWGUD/Core/SGSelector.h" +#include "PWGUD/DataModel/UDTables.h" + #include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" #include "Framework/O2DatabasePDGPlugin.h" -#include -#include "PWGUD/DataModel/UDTables.h" -#include "PWGUD/Core/SGSelector.h" -#include +#include "Framework/runDataProcessing.h" + #include "TVector3.h" -using namespace std; -using namespace o2; -using namespace o2::aod; -using namespace o2::framework; -using namespace o2::framework::expressions; +#include + +#include +#include + template int trackselector(const T& track, const std::vector& params) { diff --git a/PWGUD/Core/UDHelpers.h b/PWGUD/Core/UDHelpers.h index 4b692f7c5c1..a4137784ac5 100644 --- a/PWGUD/Core/UDHelpers.h +++ b/PWGUD/Core/UDHelpers.h @@ -16,22 +16,22 @@ #ifndef PWGUD_CORE_UDHELPERS_H_ #define PWGUD_CORE_UDHELPERS_H_ -#include -#include +#include "PWGUD/Core/DGCutparHolder.h" +#include "PWGUD/Core/UPCHelpers.h" -#include "TLorentzVector.h" -#include "Framework/Logger.h" -#include "DataFormatsFT0/Digit.h" -#include "DataFormatsFIT/Triggers.h" -#include "CommonConstants/LHCConstants.h" #include "Common/DataModel/EventSelection.h" -#include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/PIDResponse.h" -#include "PWGUD/Core/UPCHelpers.h" -#include "PWGUD/Core/DGCutparHolder.h" +#include "Common/DataModel/TrackSelectionTables.h" -using namespace o2; -using namespace o2::framework; +#include "CommonConstants/LHCConstants.h" +#include "DataFormatsFIT/Triggers.h" +#include "DataFormatsFT0/Digit.h" +#include "Framework/Logger.h" + +#include "TLorentzVector.h" + +#include +#include // namespace with helpers for UD framework namespace udhelpers @@ -674,7 +674,7 @@ void fillBGBBFlags(upchelpers::FITInfo& info, uint64_t const& minbc, BCR const& // ----------------------------------------------------------------------------- // extract FIT information template -void getFITinfo(upchelpers::FITInfo& info, BC& bc, BCS const& bcs, aod::FT0s const& ft0s, aod::FV0As const& fv0as, aod::FDDs const& fdds) +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) { // FV0A if (bc.has_foundFV0()) { @@ -713,24 +713,24 @@ void getFITinfo(upchelpers::FITInfo& info, BC& bc, BCS const& bcs, aod::FT0s con // ----------------------------------------------------------------------------- template -bool cleanZDC(T const& bc, aod::Zdcs& zdcs, std::vector& /*lims*/, SliceCache& cache) +bool cleanZDC(T const& bc, o2::aod::Zdcs& zdcs, std::vector& /*lims*/, o2::framework::SliceCache& cache) { - const auto& ZdcBC = zdcs.sliceByCached(aod::zdc::bcId, bc.globalIndex(), cache); + const auto& ZdcBC = zdcs.sliceByCached(o2::aod::zdc::bcId, bc.globalIndex(), cache); return (ZdcBC.size() == 0); } // ----------------------------------------------------------------------------- template -bool cleanCalo(T const& bc, aod::Calos& calos, std::vector& /*lims*/, SliceCache& cache) +bool cleanCalo(T const& bc, o2::aod::Calos& calos, std::vector& /*lims*/, o2::framework::SliceCache& cache) { - const auto& CaloBC = calos.sliceByCached(aod::calo::bcId, bc.globalIndex(), cache); + const auto& CaloBC = calos.sliceByCached(o2::aod::calo::bcId, bc.globalIndex(), cache); return (CaloBC.size() == 0); } // ----------------------------------------------------------------------------- // check if all tracks come from same MCCollision template -int64_t sameMCCollision(T tracks, aod::McCollisions, aod::McParticles) +int64_t sameMCCollision(T tracks, o2::aod::McCollisions, o2::aod::McParticles) { int64_t colID = -1; for (auto const& track : tracks) { diff --git a/PWGUD/Core/UPCHelpers.h b/PWGUD/Core/UPCHelpers.h index 03ff2475c8c..a7ca4b63af4 100644 --- a/PWGUD/Core/UPCHelpers.h +++ b/PWGUD/Core/UPCHelpers.h @@ -12,16 +12,17 @@ #ifndef PWGUD_CORE_UPCHELPERS_H_ #define PWGUD_CORE_UPCHELPERS_H_ -#include "Framework/AnalysisDataModel.h" -#include "Common/DataModel/EventSelection.h" -#include "Common/CCDB/EventSelectionParams.h" -#include "CommonConstants/LHCConstants.h" -#include "TLorentzVector.h" #include "UPCCutparHolder.h" + #include "PWGUD/DataModel/UDTables.h" -using namespace o2::framework; -using namespace o2::framework::expressions; +#include "Common/CCDB/EventSelectionParams.h" +#include "Common/DataModel/EventSelection.h" + +#include "CommonConstants/LHCConstants.h" +#include "Framework/AnalysisDataModel.h" + +#include "TLorentzVector.h" using BCsWithBcSels = o2::soa::Join; diff --git a/PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h b/PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h index 955601495e6..2a53f2f41f8 100644 --- a/PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h +++ b/PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h @@ -16,15 +16,11 @@ #ifndef PWGUD_CORE_UPCJPSICENTRALBARRELCORRHELPER_H_ #define PWGUD_CORE_UPCJPSICENTRALBARRELCORRHELPER_H_ -#include -#include #include "CommonConstants/MathConstants.h" -#include -using namespace o2; -using namespace o2::framework; -using namespace o2::framework::expressions; -using namespace std; +#include +#include +#include /*enum ParticleType { P_ELECTRON = 0, diff --git a/PWGUD/Core/UPCPairCuts.h b/PWGUD/Core/UPCPairCuts.h index 6b0e37adca0..f53b419ffda 100644 --- a/PWGUD/Core/UPCPairCuts.h +++ b/PWGUD/Core/UPCPairCuts.h @@ -16,18 +16,14 @@ #ifndef PWGUD_CORE_UPCPAIRCUTS_H_ #define PWGUD_CORE_UPCPAIRCUTS_H_ -#include +#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h" -#include "Framework/Logger.h" -#include "Framework/HistogramRegistry.h" #include "CommonConstants/MathConstants.h" #include "CommonConstants/PhysicsConstants.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/Logger.h" -#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h" - -using namespace o2; -using namespace o2::framework; -using namespace constants::math; +#include class UPCPairCuts { @@ -39,14 +35,14 @@ class UPCPairCuts Rho, ParticlesLastEntry }; - void setHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; } + void setHistogramRegistry(o2::framework::HistogramRegistry* registry) { histogramRegistry = registry; } void setPairCut(Particle particle, float cut) { LOGF(info, "Enabled pair cut for %d with value %f", static_cast(particle), cut); mCuts[particle] = cut; if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("ControlConvResonances")) == false) { - histogramRegistry->add("ControlConvResonances", "", {HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}}); + histogramRegistry->add("ControlConvResonances", "", {o2::framework::HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}}); } } @@ -57,7 +53,7 @@ class UPCPairCuts mTwoTrackRadius = radius; if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("TwoTrackDistancePt_0")) == false) { - 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}"}}}); + 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}"}}}); histogramRegistry->addClone("TwoTrackDistancePt_0", "TwoTrackDistancePt_1"); } } @@ -74,7 +70,7 @@ class UPCPairCuts float mTwoTrackRadius = 0.8f; // radius at which the two track cuts are applied int magField = 5; // magField: B field in kG - HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here + o2::framework::HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here template 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& // fold onto 0...pi float deltaPhi = std::fabs(phi1 - phi2); - while (deltaPhi > TwoPI) { - deltaPhi -= TwoPI; + while (deltaPhi > o2::constants::math::TwoPI) { + deltaPhi -= o2::constants::math::TwoPI; } - if (deltaPhi > PI) { - deltaPhi = TwoPI - deltaPhi; + if (deltaPhi > o2::constants::math::PI) { + deltaPhi = o2::constants::math::TwoPI - deltaPhi; } float cosDeltaPhi = 0; - if (deltaPhi < PI / 3.0f) { + if (deltaPhi < o2::constants::math::PI / 3.0f) { cosDeltaPhi = 1.0 - deltaPhi * deltaPhi / 2 + deltaPhi * deltaPhi * deltaPhi * deltaPhi / 24; - } else if (deltaPhi < 2.0f * PI / 3.0f) { - cosDeltaPhi = -(deltaPhi - PI / 2) + 1.0 / 6 * std::pow((deltaPhi - PI / 2), 3); + } else if (deltaPhi < 2.0f * o2::constants::math::PI / 3.0f) { + cosDeltaPhi = -(deltaPhi - o2::constants::math::PI / 2) + 1.0 / 6 * std::pow((deltaPhi - o2::constants::math::PI / 2), 3); } else { - cosDeltaPhi = -1.0f + 1.0f / 2.0f * (deltaPhi - PI) * (deltaPhi - PI) - 1.0f / 24.0f * std::pow(deltaPhi - PI, 4.0f); + 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); } 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 float dphistar = phi1 - phi2 - charge1 * std::asin(0.015 * magField * radius / pt1) + charge2 * std::asin(0.015 * magField * radius / pt2); - if (dphistar > PI) { - dphistar = TwoPI - dphistar; + if (dphistar > o2::constants::math::PI) { + dphistar = o2::constants::math::TwoPI - dphistar; } - if (dphistar < -PI) { - dphistar = -TwoPI - dphistar; + if (dphistar < -o2::constants::math::PI) { + dphistar = -o2::constants::math::TwoPI - dphistar; } - if (dphistar > PI) { // might look funny but is needed - dphistar = TwoPI - dphistar; + if (dphistar > o2::constants::math::PI) { // might look funny but is needed + dphistar = o2::constants::math::TwoPI - dphistar; } return dphistar; diff --git a/PWGUD/Core/decayTree.cxx b/PWGUD/Core/decayTree.cxx index 026c77af706..ed05772364e 100644 --- a/PWGUD/Core/decayTree.cxx +++ b/PWGUD/Core/decayTree.cxx @@ -9,16 +9,17 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include +#include "decayTree.h" + +#include +#include + #include #include #include +#include #include -#include "rapidjson/document.h" -#include "rapidjson/filereadstream.h" -#include "decayTree.h" - using namespace rapidjson; // ----------------------------------------------------------------------------- diff --git a/PWGUD/Core/decayTree.h b/PWGUD/Core/decayTree.h index 3dd4f53578b..59421098605 100644 --- a/PWGUD/Core/decayTree.h +++ b/PWGUD/Core/decayTree.h @@ -12,21 +12,18 @@ #ifndef PWGUD_CORE_DECAYTREE_H_ #define PWGUD_CORE_DECAYTREE_H_ -#include -#include -#include -#include - #include "Framework/AnalysisTask.h" -#include "Framework/O2DatabasePDGPlugin.h" #include "Framework/HistogramRegistry.h" #include "Framework/Logger.h" -#include "TLorentzVector.h" +#include "Framework/O2DatabasePDGPlugin.h" + #include "TDatabasePDG.h" +#include "TLorentzVector.h" -using namespace o2; -using namespace o2::framework; -using namespace o2::framework::expressions; +#include +#include +#include +#include // ----------------------------------------------------------------------------- class pidSelector @@ -463,7 +460,7 @@ class decayTree // setters // read decay tree from json file - bool init(std::string const& filename, HistogramRegistry& registry); + bool init(std::string const& filename, o2::framework::HistogramRegistry& registry); // reset status of all resonances to 0 void reset(); @@ -765,7 +762,7 @@ class decayTree std::vector fccs; std::vector fdets; std::vector fparts; - std::map fhistPointers; + std::map fhistPointers; // generate parent information for all resonances void updateParents(); @@ -834,25 +831,25 @@ class decayTree } // create histograms - void createHistograms(HistogramRegistry& registry) + void createHistograms(o2::framework::HistogramRegistry& registry) { // definitions - auto etax = AxisSpec(100, -1.5, 1.5); - auto nSax = AxisSpec(300, -15.0, 15.0); - auto chi2ax = AxisSpec(100, 0.0, 5.0); - auto nClax = AxisSpec(170, 0.0, 170.0); - auto angax = AxisSpec(315, 0.0, 3.15); - auto dcaxyax = AxisSpec(400, -0.2, 0.2); - auto dcazax = AxisSpec(600, -0.3, 0.3); - auto sTPCax = AxisSpec(1000, 0., 1000.); + auto etax = o2::framework::AxisSpec(100, -1.5, 1.5); + auto nSax = o2::framework::AxisSpec(300, -15.0, 15.0); + auto chi2ax = o2::framework::AxisSpec(100, 0.0, 5.0); + auto nClax = o2::framework::AxisSpec(170, 0.0, 170.0); + auto angax = o2::framework::AxisSpec(315, 0.0, 3.15); + auto dcaxyax = o2::framework::AxisSpec(400, -0.2, 0.2); + auto dcazax = o2::framework::AxisSpec(600, -0.3, 0.3); + auto sTPCax = o2::framework::AxisSpec(1000, 0., 1000.); std::string base; std::string hname; std::string annot; fhistPointers.clear(); for (const auto& res : getResonances()) { - auto max = AxisSpec(res->nmassBins(), res->massHistRange()[0], res->massHistRange()[1]); - auto momax = AxisSpec(res->nmomBins(), res->momHistRange()[0], res->momHistRange()[1]); + auto max = o2::framework::AxisSpec(res->nmassBins(), res->massHistRange()[0], res->massHistRange()[1]); + auto momax = o2::framework::AxisSpec(res->nmomBins(), res->momHistRange()[0], res->momHistRange()[1]); // M-pT, M-eta, pT-eta for (const auto& cc : fccs) { @@ -860,13 +857,13 @@ class decayTree base.append("/").append(res->name()).append("/"); hname = base + "mpt"; annot = "M versus pT; M (" + res->name() + ") GeV/c^{2}; pT (" + res->name() + ") GeV/c"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, momax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, momax}})}); hname = base + "meta"; annot = "M versus eta; M (" + res->name() + ") GeV/c^{2}; eta (" + res->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, etax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, etax}})}); hname = base + "pteta"; annot = "pT versus eta; pT (" + res->name() + ") GeV/c; eta (" + res->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {momax, etax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {momax, etax}})}); // M versus daughters auto daughs = res->getDaughters(); @@ -878,85 +875,85 @@ class decayTree hname = base; hname.append("MvspT_").append(res->name()).append(d1->name()); annot = "M versus pT; M (" + res->name() + ") GeV/c^{2}; pT (" + d1->name() + ") GeV/c"; - auto momax1 = AxisSpec(d1->nmomBins(), d1->momHistRange()[0], d1->momHistRange()[1]); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, momax1}})}); + auto momax1 = o2::framework::AxisSpec(d1->nmomBins(), d1->momHistRange()[0], d1->momHistRange()[1]); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, momax1}})}); // M vs eta daughter hname = base; hname.append("Mvseta_").append(res->name()).append(d1->name()); annot = "M versus eta; M (" + res->name() + ") GeV/c^{2}; eta (" + d1->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, etax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, etax}})}); if (d1->isFinal()) { // M vs dcaXYZ hname = base; hname.append("MvsdcaXY_").append(res->name()).append(d1->name()); annot = "M versus dcaXY; M (" + res->name() + ") GeV/c^{2}; dca_{XY} (" + d1->name() + ") #mu m"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, dcaxyax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, dcaxyax}})}); hname = base; hname.append("MvsdcaZ_").append(res->name()).append(d1->name()); annot = "M versus dcaZ; M (" + res->name() + ") GeV/c^{2}; dca_{Z} (" + d1->name() + ") #mu m"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, dcazax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, dcazax}})}); // M vs chi2 track hname = base; hname.append("Mvschi2_").append(res->name()).append(d1->name()); annot = "M versus chi2; M (" + res->name() + ") GeV/c^{2}; chi2 (" + d1->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, chi2ax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, chi2ax}})}); // M vs nCl track hname = base; hname.append("MvsnCl_").append(res->name()).append(d1->name()); annot = "M versus nCl; M (" + res->name() + ") GeV/c^{2}; nCl (" + d1->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, nClax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, nClax}})}); // M versus detector hits hname = base; hname.append("MvsdetHits_").append(res->name()).append(d1->name()); annot = "M versus detector hits; M (" + res->name() + ") GeV/c^{2}; ITS + 2*TPC + 4*TRD + 8*TOF (" + d1->name() + ")"; - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, {16, -0.5, 15.5}}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, {16, -0.5, 15.5}}})}); } else { // M vs Mi hname = base; hname.append("MvsM_").append(res->name()).append(d1->name()); annot = "M versus M; M (" + res->name() + ") GeV/c^{2}; M (" + d1->name() + ") GeV/c^{2}"; - auto max1 = AxisSpec(res->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, max1}})}); + auto max1 = o2::framework::AxisSpec(res->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, max1}})}); } } // daughters vs daughters for (auto i = 0; i < static_cast(ndaughs - 1); i++) { auto d1 = getResonance(daughs[i]); - auto max1 = AxisSpec(d1->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); + auto max1 = o2::framework::AxisSpec(d1->nmassBins(), d1->massHistRange()[0], d1->massHistRange()[1]); for (auto j = i + 1; j < static_cast(ndaughs); j++) { auto d2 = getResonance(daughs[j]); - auto max2 = AxisSpec(d2->nmassBins(), d2->massHistRange()[0], d2->massHistRange()[1]); + auto max2 = o2::framework::AxisSpec(d2->nmassBins(), d2->massHistRange()[0], d2->massHistRange()[1]); // M1 vs M2 hname = base; hname.append("MvsM_").append(d1->name()).append(d2->name()); annot = std::string("M versus M; M (").append(d1->name()).append(") GeV/c^{2}; M (").append(d2->name()).append(") GeV/c^{2}"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max1, max2}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max1, max2}})}); // angle(d1, d2) hname = base; hname.append("angle_").append(d1->name()).append(d2->name()); annot = std::string("angle; Angle (").append(d1->name()).append(", ").append(d2->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH1F, {angax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {angax}})}); // M vs angle(d1, d2) hname = base; hname.append("Mvsangle_").append(d1->name()).append(d2->name()); annot = std::string("M versus angle; M (").append(res->name()).append(") GeV/c^{2}; Angle (").append(d1->name()).append(", ").append(d2->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {max, angax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {max, angax}})}); // both daughters are finals if (d1->isFinal() && d2->isFinal()) { hname = base; hname.append("TPCsignal_").append(d1->name()).append(d2->name()); annot = std::string("TPC signal of both tracks; TPCsignal (").append(d1->name()).append("); TPCsignal (").append(d2->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {sTPCax, sTPCax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {sTPCax, sTPCax}})}); } } } @@ -967,11 +964,11 @@ class decayTree hname = base; hname.append("dcaXY"); annot = std::string("dcaXY; dca_{XY}(").append(res->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH1F, {dcaxyax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {dcaxyax}})}); hname = base; hname.append("dcaZ"); annot = std::string("dcaZ; dca_{Z}(").append(res->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH1F, {dcazax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {dcazax}})}); // nSIgma[TPC, TOF] vs pT for (const auto& det : fdets) { @@ -979,7 +976,7 @@ class decayTree hname = base; hname.append("nS").append(part).append(det); annot = std::string("nSigma_").append(det).append(" versus p; p (").append(res->name()).append(") GeV/c; nSigma_{").append(det).append(", ").append(part).append("} (").append(res->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH2F, {momax, nSax}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH2F, {momax, nSax}})}); } } @@ -987,7 +984,7 @@ class decayTree hname = base; hname.append("detectorHits"); annot = std::string("detectorHits; Detector(").append(res->name()).append(")"); - fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {HistType::kTH1F, {{4, 0.5, 4.5}}})}); + fhistPointers.insert({hname, registry.add(hname.c_str(), annot.c_str(), {o2::framework::HistType::kTH1F, {{4, 0.5, 4.5}}})}); } } } diff --git a/PWGUD/TableProducer/DGBCCandProducer.h b/PWGUD/TableProducer/DGBCCandProducer.h index 07717afbfde..5bdc09498c6 100644 --- a/PWGUD/TableProducer/DGBCCandProducer.h +++ b/PWGUD/TableProducer/DGBCCandProducer.h @@ -16,15 +16,13 @@ #ifndef PWGUD_TABLEPRODUCER_DGBCCANDPRODUCER_H_ #define PWGUD_TABLEPRODUCER_DGBCCANDPRODUCER_H_ -#include -#include #include "Framework/ASoA.h" #include "Framework/AnalysisDataModel.h" -#include "MathUtils/Utils.h" #include "Framework/DataTypes.h" +#include "MathUtils/Utils.h" -using namespace o2; -using namespace o2::framework; +#include +#include namespace o2::aod {