diff --git a/PWGEM/PhotonMeson/Core/CMakeLists.txt b/PWGEM/PhotonMeson/Core/CMakeLists.txt index 1eb9558356d..0150236c53e 100644 --- a/PWGEM/PhotonMeson/Core/CMakeLists.txt +++ b/PWGEM/PhotonMeson/Core/CMakeLists.txt @@ -21,16 +21,3 @@ o2physics_add_library(PWGEMPhotonMesonCore EMBitFlags.cxx EMNonLin.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::MLCore O2Physics::PWGEMDileptonCore KFParticle::KFParticle) - -o2physics_target_root_dictionary(PWGEMPhotonMesonCore - HEADERS V0PhotonCut.h - DalitzEECut.h - PHOSPhotonCut.h - EMCPhotonCut.h - PairCut.h - EMPhotonEventCut.h - CutsLibrary.h - HistogramsLibrary.h - EMBitFlags.h - EMNonLin.h - LINKDEF PWGEMPhotonMesonCoreLinkDef.h) diff --git a/PWGEM/PhotonMeson/Core/DalitzEECut.h b/PWGEM/PhotonMeson/Core/DalitzEECut.h index 94b13b32612..2632980a8dd 100644 --- a/PWGEM/PhotonMeson/Core/DalitzEECut.h +++ b/PWGEM/PhotonMeson/Core/DalitzEECut.h @@ -24,21 +24,19 @@ #include // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) #include -#include - -#include #include #include #include #include +#include #include -class DalitzEECut : public TNamed +class DalitzEECut { public: DalitzEECut() = default; - DalitzEECut(const char* name, const char* title) : TNamed(name, title) {} + DalitzEECut(const char* name, const char* title) : name(name), title(title) {} enum class DalitzEECuts : int { // pair cut @@ -71,6 +69,9 @@ class DalitzEECut : public TNamed kTPConly = 1, }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + template bool IsSelected(TTrack1 const& t1, TTrack2 const& t2, float bz) const { @@ -311,6 +312,8 @@ class DalitzEECut : public TNamed bool IsPhotonConversionSelected() const { return mSelectPC; } private: + std::string name; + std::string title; static const std::pair> its_ib_any_Requirement; static const std::pair> its_ib_1st_Requirement; // pair cuts @@ -353,8 +356,6 @@ class DalitzEECut : public TNamed float mMinTPCNsigmaEl{-1e+10}, mMaxTPCNsigmaEl{+1e+10}; float mMinTPCNsigmaPi{0}, mMaxTPCNsigmaPi{0}; float mMinTOFNsigmaEl{-1e+10}, mMaxTOFNsigmaEl{+1e+10}; - - ClassDef(DalitzEECut, 2); }; #endif // PWGEM_PHOTONMESON_CORE_DALITZEECUT_H_ diff --git a/PWGEM/PhotonMeson/Core/EMCPhotonCut.h b/PWGEM/PhotonMeson/Core/EMCPhotonCut.h index d22f19ef786..8260cc1889f 100644 --- a/PWGEM/PhotonMeson/Core/EMCPhotonCut.h +++ b/PWGEM/PhotonMeson/Core/EMCPhotonCut.h @@ -24,12 +24,9 @@ #include #include -#include #include -#include - #include #include #include @@ -102,11 +99,11 @@ struct TrackMatchingParams { float c{-2.5f}; }; -class EMCPhotonCut : public TNamed +class EMCPhotonCut { public: EMCPhotonCut() = default; - EMCPhotonCut(const char* name, const char* title) : TNamed(name, title) {} + EMCPhotonCut(const char* name, const char* title) : name(name), title(title) {} enum class EMCPhotonCuts : std::uint8_t { // cluster cut @@ -127,6 +124,9 @@ class EMCPhotonCut : public TNamed kSecondary, }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + static const char* mCutNames[static_cast(EMCPhotonCuts::kNCuts)]; static constexpr auto getClusterId(IsTrackIterator auto const& t) @@ -651,6 +651,8 @@ class EMCPhotonCut : public TNamed void print() const; private: + std::string name; + std::string title; // EMCal cluster cuts int mDefinition{10}; ///< clusterizer definition float mMinE{0.7f}; ///< minimum energy @@ -673,8 +675,6 @@ class EMCPhotonCut : public TNamed TrackMatchingParams mTrackMatchingPhiParams = {-1.f, 0.f, 0.f}; TrackMatchingParams mSecTrackMatchingEtaParams = {-1.f, 0.f, 0.f}; TrackMatchingParams mSecTrackMatchingPhiParams = {-1.f, 0.f, 0.f}; - - ClassDef(EMCPhotonCut, 3); }; #endif // PWGEM_PHOTONMESON_CORE_EMCPHOTONCUT_H_ diff --git a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h index 5b14aa8d2ef..1056de45a76 100644 --- a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h +++ b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h @@ -19,15 +19,13 @@ #include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/TriggerAliases.h" -#include +#include -#include - -class EMPhotonEventCut : public TNamed +class EMPhotonEventCut { public: EMPhotonEventCut() = default; - EMPhotonEventCut(const char* name, const char* title) : TNamed(name, title) {} + EMPhotonEventCut(const char* name, const char* title) : name(name), title(title) {} enum class EMPhotonEventCuts : int { kSel8 = 0, @@ -52,6 +50,9 @@ class EMPhotonEventCut : public TNamed kNCuts }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + template bool IsSelected(T const& collision) const { @@ -203,6 +204,8 @@ class EMPhotonEventCut : public TNamed void SetRequireEMCHardwareTriggered(bool flag); private: + std::string name; + std::string title; bool mRequireSel8{false}; bool mRequireFT0AND{true}; float mMinZvtx{-10.f}, mMaxZvtx{+10.f}; @@ -222,8 +225,6 @@ class EMPhotonEventCut : public TNamed bool mRequireGoodITSLayersAll{false}; bool mRequireEMCReadoutInMB{false}; bool mRequireEMCHardwareTriggered{false}; - - ClassDef(EMPhotonEventCut, 1); }; #endif // PWGEM_PHOTONMESON_CORE_EMPHOTONEVENTCUT_H_ diff --git a/PWGEM/PhotonMeson/Core/PHOSPhotonCut.h b/PWGEM/PhotonMeson/Core/PHOSPhotonCut.h index 8c0287bc71b..3c3a56a5cd3 100644 --- a/PWGEM/PhotonMeson/Core/PHOSPhotonCut.h +++ b/PWGEM/PhotonMeson/Core/PHOSPhotonCut.h @@ -18,15 +18,13 @@ #include "PWGEM/PhotonMeson/Utils/TrackSelection.h" -#include +#include -#include - -class PHOSPhotonCut : public TNamed +class PHOSPhotonCut { public: PHOSPhotonCut() = default; - PHOSPhotonCut(const char* name, const char* title) : TNamed(name, title) {} + PHOSPhotonCut(const char* name, const char* title) : name(name), title(title) {} enum class PHOSPhotonCuts : int { kEnergy = 0, @@ -35,6 +33,9 @@ class PHOSPhotonCut : public TNamed kNCuts }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + static const char* mCutNames[static_cast(PHOSPhotonCuts::kNCuts)]; // Temporary function to check if track passes selection criteria. To be replaced by framework filters. @@ -96,9 +97,9 @@ class PHOSPhotonCut : public TNamed void print() const; private: + std::string name; + std::string title; float mMinEnergy{0.1f}, mMaxEnergy{1e+10f}; - - ClassDef(PHOSPhotonCut, 2); }; #endif // PWGEM_PHOTONMESON_CORE_PHOSPHOTONCUT_H_ diff --git a/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h b/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h deleted file mode 100644 index 2a1a0ff7226..00000000000 --- a/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -#ifndef PWGEM_PHOTONMESON_CORE_PWGEMPHOTONMESONCORELINKDEF_H_ -#define PWGEM_PHOTONMESON_CORE_PWGEMPHOTONMESONCORELINKDEF_H_ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class V0PhotonCut + ; -#pragma link C++ class DalitzEECut + ; -#pragma link C++ class PHOSPhotonCut + ; -#pragma link C++ class EMCPhotonCut + ; -#pragma link C++ class EMPhotonEventCut + ; -#pragma link C++ class PairCut + ; -#pragma link C++ class EMBitFlags + ; - -#endif // PWGEM_PHOTONMESON_CORE_PWGEMPHOTONMESONCORELINKDEF_H_ diff --git a/PWGEM/PhotonMeson/Core/PairCut.h b/PWGEM/PhotonMeson/Core/PairCut.h index f30f7dae7a9..63dfddf2bd4 100644 --- a/PWGEM/PhotonMeson/Core/PairCut.h +++ b/PWGEM/PhotonMeson/Core/PairCut.h @@ -16,15 +16,13 @@ #ifndef PWGEM_PHOTONMESON_CORE_PAIRCUT_H_ #define PWGEM_PHOTONMESON_CORE_PAIRCUT_H_ -#include +#include -#include - -class PairCut : public TNamed +class PairCut { public: PairCut() = default; - PairCut(const char* name, const char* title) : TNamed(name, title) {} + PairCut(const char* name, const char* title) : name(name), title(title) {} enum class PairCuts : int { // v0 cut @@ -32,6 +30,9 @@ class PairCut : public TNamed kNCuts }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + static const char* mCutNames[static_cast(PairCuts::kNCuts)]; template @@ -66,9 +67,9 @@ class PairCut : public TNamed void print() const; private: + std::string name; + std::string title; float mMinAsym{-1e+10}, mMaxAsym{1e+10}; - - ClassDef(PairCut, 1); }; #endif // PWGEM_PHOTONMESON_CORE_PAIRCUT_H_ diff --git a/PWGEM/PhotonMeson/Core/V0PhotonCut.h b/PWGEM/PhotonMeson/Core/V0PhotonCut.h index c371b2e0a71..a76b659847c 100644 --- a/PWGEM/PhotonMeson/Core/V0PhotonCut.h +++ b/PWGEM/PhotonMeson/Core/V0PhotonCut.h @@ -29,12 +29,9 @@ #include #include -#include #include -#include - #include #include #include @@ -172,7 +169,7 @@ class V0PhotonCut : public TNamed { public: V0PhotonCut() = default; - V0PhotonCut(const char* name, const char* title) : TNamed(name, title) {} + V0PhotonCut(const char* name, const char* title) : name(name), title(title) {} ~V0PhotonCut() override { delete mEmMlResponse; }; enum class V0PhotonCuts : int { @@ -220,6 +217,9 @@ class V0PhotonCut : public TNamed kRadAndAngle = 2 }; + const std::string getName() const { return name; } + const std::string getTitle() const { return title; } + /// \brief add histograms to registry /// \param fRegistry pointer to histogram registry void addQAHistograms(o2::framework::HistogramRegistry* fRegistry = nullptr) const @@ -1159,6 +1159,8 @@ class V0PhotonCut : public TNamed void setDoQA(bool flag = false); private: + std::string name; + std::string title; static const std::pair> its_ib_Requirement; static const std::pair> its_ob_Requirement; static const std::pair> its_ob_Requirement_ITSTPC; @@ -1242,8 +1244,6 @@ class V0PhotonCut : public TNamed bool mDoQA{false}; ///< flag to decide if QA should be done or not mutable uint nAccV0PerColl{0}; ///< running number of accepted v0 photons per collision used for QA mutable int currentCollID{-1}; ///< running collision ID of v0 photon used for QA - - ClassDef(V0PhotonCut, 5); }; #endif // PWGEM_PHOTONMESON_CORE_V0PHOTONCUT_H_ diff --git a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx index 463bc9045a8..b1a87c480e2 100644 --- a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx @@ -120,8 +120,8 @@ struct MaterialBudgetMC { { for (const auto& tagcut : tagcuts) { for (const auto& probecut : probecuts) { - std::string cutname1 = tagcut.GetName(); - std::string cutname2 = probecut.GetName(); + std::string cutname1 = tagcut.getName(); + std::string cutname2 = probecut.getName(); // if (cutname1 == cutname2) { // continue; @@ -133,7 +133,7 @@ struct MaterialBudgetMC { THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (const auto& cut3 : cuts3) { - std::string pair_cut_name = cut3.GetName(); + std::string pair_cut_name = cut3.getName(); o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); THashList* list_pair_subsys_paircut = reinterpret_cast(list_pair_subsys_photoncut->FindObject(pair_cut_name.data())); o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "material_budget_study", "Pair"); @@ -160,8 +160,8 @@ struct MaterialBudgetMC { // for V0s for (const auto& cut : fProbeCuts) { - const char* cutname = cut.GetName(); - THashList* list_v0_cut = o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname); + std::string cutname = cut.getName(); + THashList* list_v0_cut = o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname.c_str()); o2::aod::pwgem::photon::histogram::DefineHistograms(list_v0_cut, "material_budget_study", "V0"); } @@ -288,7 +288,7 @@ struct MaterialBudgetMC { value[1] = photon.v0radius(); value[2] = RecoDecay::constrainAngle(phi_cp); value[3] = eta_cp; - reinterpret_cast(list_v0->FindObject(cut.GetName())->FindObject("hs_conv_point"))->Fill(value); + reinterpret_cast(list_v0->FindObject(cut.getName().c_str())->FindObject("hs_conv_point"))->Fill(value); } // end of photon loop } // end of cut loop @@ -381,7 +381,7 @@ struct MaterialBudgetMC { value[3] = g2.v0radius(); value[4] = RecoDecay::constrainAngle(phi_cp2); value[5] = eta_cp2; - reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.GetName(), probecut.GetName()))->FindObject(paircut.GetName())->FindObject("hs_conv_point_same"))->Fill(value); + reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.getName().c_str(), probecut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hs_conv_point_same"))->Fill(value); } // end of pair cut loop } // end of g2 loop } // end of g1 loop diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx index 62d2e47a234..49ebac9d598 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx @@ -130,7 +130,7 @@ struct SinglePhoton { void add_histograms(THashList* list_photon, const std::string detname, TCuts1 const& cuts1) { for (auto& cut1 : cuts1) { - std::string cutname1 = cut1.GetName(); + std::string cutname1 = cut1.getName(); THashList* list_photon_subsys = reinterpret_cast(list_photon->FindObject(detname.data())); o2::aod::pwgem::photon::histogram::AddHistClass(list_photon_subsys, cutname1.data()); @@ -306,7 +306,7 @@ struct SinglePhoton { auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); for (auto& cut : cuts1) { - THashList* list_photon_det_cut = static_cast(list_photon_det->FindObject(cut.GetName())); + THashList* list_photon_det_cut = static_cast(list_photon_det->FindObject(cut.getName().c_str())); for (auto& photon : photons1_coll) { if (!IsSelected(photon, cut)) { continue; diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx index e8e083dca28..676894ccaa0 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx @@ -293,7 +293,7 @@ struct SinglePhotonMC { auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); for (auto& cut : cuts1) { - THashList* list_photon_det_cut = static_cast(list_photon_det->FindObject(cut.GetName())); + THashList* list_photon_det_cut = static_cast(list_photon_det->FindObject(cut.getName().c_str())); for (auto& photon : photons1_coll) { if (!IsSelected(photon, cut)) { continue; diff --git a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx index 818eb101285..b99d863cf06 100644 --- a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx +++ b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx @@ -133,14 +133,14 @@ struct TagAndProbe { template void add_pair_histograms(THashList* list_pair, const std::string pairname, TTagCut const& tagcut, TProbeCuts const& probecuts, TPairCuts const& paircuts) { - std::string cutname1 = tagcut.GetName(); + std::string cutname1 = tagcut.getName(); for (auto& cut2 : probecuts) { - std::string cutname2 = cut2.GetName(); + std::string cutname2 = cut2.getName(); std::string photon_cut_name = cutname1 + "_" + cutname2; THashList* list_pair_subsys_photoncut = o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, photon_cut_name.data()); for (auto& cut3 : paircuts) { - std::string pair_cut_name = cut3.GetName(); + std::string pair_cut_name = cut3.getName(); o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); THashList* list_pair_subsys_paircut = reinterpret_cast(list_pair_subsys_photoncut->FindObject(pair_cut_name.data())); o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "tag_and_probe", pairname.data()); @@ -315,7 +315,7 @@ struct TagAndProbe { if (abs(v12.Rapidity()) > maxY) { continue; } - reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.GetName(), probecut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_Probe_Same"))->Fill(v12.M(), v2.Pt()); + reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.getName().c_str(), probecut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_Probe_Same"))->Fill(v12.M(), v2.Pt()); if constexpr (pairtype == PairType::kPCMPCM) { if (!probecut.template IsSelected(g2)) { @@ -331,7 +331,7 @@ struct TagAndProbe { } } - reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.GetName(), probecut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_PassingProbe_Same"))->Fill(v12.M(), v2.Pt()); + reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.getName().c_str(), probecut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_PassingProbe_Same"))->Fill(v12.M(), v2.Pt()); if constexpr (pairtype == PairType::kEMCEMC) { RotationBackground(v12, v1, v2, photons2_coll, g1.globalIndex(), g2.globalIndex(), probecut, paircut); @@ -406,7 +406,7 @@ struct TagAndProbe { if (abs(v12.Rapidity()) > maxY) { continue; } - reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.GetName(), probecut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_Probe_Mixed"))->Fill(v12.M(), v2.Pt()); + reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.getName().c_str(), probecut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_Probe_Mixed"))->Fill(v12.M(), v2.Pt()); if constexpr (pairtype == PairType::kPCMPCM) { if (!probecut.template IsSelected(g2)) { @@ -422,7 +422,7 @@ struct TagAndProbe { } } - reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.GetName(), probecut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_PassingProbe_Mixed"))->Fill(v12.M(), v2.Pt()); + reinterpret_cast(list_pair_ss->FindObject(Form("%s_%s", tagcut.getName().c_str(), probecut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_PassingProbe_Mixed"))->Fill(v12.M(), v2.Pt()); } // end of probe cut loop } // end of pair cut loop @@ -484,10 +484,10 @@ struct TagAndProbe { // LOG(info) << "openingAngle2_2 = " << openingAngle2_2; if (openingAngle1 > minOpenAngle) { - reinterpret_cast(fMainList->FindObject("Pair")->FindObject("EMCEMC")->FindObject(Form("%s_%s", cut.GetName(), cut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_Same_RotatedBkg"))->Fill(mother1.M(), mother1.Pt()); + reinterpret_cast(fMainList->FindObject("Pair")->FindObject("EMCEMC")->FindObject(Form("%s_%s", cut.getName().c_str(), cut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_Same_RotatedBkg"))->Fill(mother1.M(), mother1.Pt()); } if (openingAngle2 > minOpenAngle) { - reinterpret_cast(fMainList->FindObject("Pair")->FindObject("EMCEMC")->FindObject(Form("%s_%s", cut.GetName(), cut.GetName()))->FindObject(paircut.GetName())->FindObject("hMggPt_Same_RotatedBkg"))->Fill(mother2.M(), mother2.Pt()); + reinterpret_cast(fMainList->FindObject("Pair")->FindObject("EMCEMC")->FindObject(Form("%s_%s", cut.getName().c_str(), cut.getName().c_str()))->FindObject(paircut.getName().c_str())->FindObject("hMggPt_Same_RotatedBkg"))->Fill(mother2.M(), mother2.Pt()); } } } diff --git a/PWGEM/PhotonMeson/Tasks/phosQC.cxx b/PWGEM/PhotonMeson/Tasks/phosQC.cxx index 56c7adb50b6..38763554553 100644 --- a/PWGEM/PhotonMeson/Tasks/phosQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/phosQC.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include using namespace o2; @@ -72,14 +71,14 @@ struct phosQC { THashList* list_cluster = reinterpret_cast(fMainList->FindObject("Cluster")); for (const auto& cut : fPHOSCuts) { - const char* cutname = cut.GetName(); - o2::aod::pwgem::photon::histogram::AddHistClass(list_cluster, cutname); + std::string cutname = cut.getName(); + o2::aod::pwgem::photon::histogram::AddHistClass(list_cluster, cutname.c_str()); } // for Clusters for (auto& cut : fPHOSCuts) { - std::string_view cutname = cut.GetName(); - THashList* list = reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cutname.data())); + std::string cutname = cut.getName(); + THashList* list = reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cutname.c_str())); o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Cluster", "PHOS"); } } @@ -140,7 +139,7 @@ struct phosQC { auto clusters_per_coll = clusters.sliceBy(perCollision, collision.collisionId()); for (const auto& cut : fPHOSCuts) { - THashList* list_cluster_cut = static_cast(list_cluster->FindObject(cut.GetName())); + THashList* list_cluster_cut = static_cast(list_cluster->FindObject(cut.getName().c_str())); int ng = 0; for (auto& cluster : clusters_per_coll) { @@ -149,7 +148,7 @@ struct phosQC { ng++; } } // end of v0 loop - reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cut.GetName())->FindObject("hNgamma"))->Fill(ng); + reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cut.getName().c_str())->FindObject("hNgamma"))->Fill(ng); } // end of cut loop } // end of collision loop } // end of process