diff --git a/PWGEM/PhotonMeson/Core/CMakeLists.txt b/PWGEM/PhotonMeson/Core/CMakeLists.txt index a24ef31ed5d..9e00a1a4604 100644 --- a/PWGEM/PhotonMeson/Core/CMakeLists.txt +++ b/PWGEM/PhotonMeson/Core/CMakeLists.txt @@ -10,7 +10,8 @@ # or submit itself to any jurisdiction. o2physics_add_library(PWGEMPhotonMesonCore - SOURCES V0PhotonCut.cxx + SOURCES EMEventCut.cxx + V0PhotonCut.cxx PHOSPhotonCut.cxx DalitzEECut.cxx EMCPhotonCut.cxx @@ -20,7 +21,8 @@ o2physics_add_library(PWGEMPhotonMesonCore PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore) o2physics_target_root_dictionary(PWGEMPhotonMesonCore - HEADERS V0PhotonCut.h + HEADERS EMEventCut.h + V0PhotonCut.h DalitzEECut.h PHOSPhotonCut.h EMCPhotonCut.h diff --git a/PWGEM/PhotonMeson/Core/CutsLibrary.cxx b/PWGEM/PhotonMeson/Core/CutsLibrary.cxx index bc54e0316cd..3265779db64 100644 --- a/PWGEM/PhotonMeson/Core/CutsLibrary.cxx +++ b/PWGEM/PhotonMeson/Core/CutsLibrary.cxx @@ -13,7 +13,33 @@ // #include "PWGEM/PhotonMeson/Core/CutsLibrary.h" -V0PhotonCut* o2::aod::pcmcuts::GetCut(const char* cutName) +EMEventCut* o2::aod::pwgem::photon::eventcuts::GetCut(const char* cutName) +{ + EMEventCut* cut = new EMEventCut(cutName, cutName); + std::string nameStr = cutName; + + if (!nameStr.compare("minbias")) { + cut->SetRequireFT0AND(true); + cut->SetZvtxRange(-10.f, +10.f); + cut->SetRequireNoTFB(true); + cut->SetRequireNoITSROFB(false); + return cut; + } + + if (!nameStr.compare("nocut")) { + cut->SetRequireFT0AND(false); + cut->SetZvtxRange(-1e+10, +1e+10); + cut->SetRequireNoTFB(false); + cut->SetRequireNoITSROFB(false); + return cut; + } + + delete cut; + LOGF(info, Form("Did not find cut %s", cutName)); + return nullptr; +} + +V0PhotonCut* o2::aod::pwgem::photon::pcmcuts::GetCut(const char* cutName) { V0PhotonCut* cut = new V0PhotonCut(cutName, cutName); std::string nameStr = cutName; @@ -351,7 +377,7 @@ V0PhotonCut* o2::aod::pcmcuts::GetCut(const char* cutName) return nullptr; } -DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName) +DalitzEECut* o2::aod::pwgem::photon::dalitzeecuts::GetCut(const char* cutName) { DalitzEECut* cut = new DalitzEECut(cutName, cutName); std::string nameStr = cutName; @@ -1269,7 +1295,7 @@ DalitzEECut* o2::aod::dalitzeecuts::GetCut(const char* cutName) return nullptr; } -PHOSPhotonCut* o2::aod::phoscuts::GetCut(const char* cutName) +PHOSPhotonCut* o2::aod::pwgem::photon::phoscuts::GetCut(const char* cutName) { PHOSPhotonCut* cut = new PHOSPhotonCut(cutName, cutName); std::string nameStr = cutName; @@ -1304,7 +1330,7 @@ PHOSPhotonCut* o2::aod::phoscuts::GetCut(const char* cutName) return nullptr; } -EMCPhotonCut* o2::aod::emccuts::GetCut(const char* cutName) +EMCPhotonCut* o2::aod::pwgem::photon::emccuts::GetCut(const char* cutName) { EMCPhotonCut* cut = new EMCPhotonCut(cutName, cutName); std::string nameStr = cutName; @@ -1363,7 +1389,7 @@ EMCPhotonCut* o2::aod::emccuts::GetCut(const char* cutName) return nullptr; } -PairCut* o2::aod::paircuts::GetCut(const char* cutName) +PairCut* o2::aod::pwgem::photon::paircuts::GetCut(const char* cutName) { PairCut* cut = new PairCut(cutName, cutName); std::string nameStr = cutName; diff --git a/PWGEM/PhotonMeson/Core/CutsLibrary.h b/PWGEM/PhotonMeson/Core/CutsLibrary.h index 2fe25725ded..60bb65bbdbb 100644 --- a/PWGEM/PhotonMeson/Core/CutsLibrary.h +++ b/PWGEM/PhotonMeson/Core/CutsLibrary.h @@ -16,6 +16,7 @@ #define PWGEM_PHOTONMESON_CORE_CUTSLIBRARY_H_ #include +#include "PWGEM/PhotonMeson/Core/EMEventCut.h" #include "PWGEM/PhotonMeson/Core/V0PhotonCut.h" #include "PWGEM/PhotonMeson/Core/DalitzEECut.h" #include "PWGEM/PhotonMeson/Core/PHOSPhotonCut.h" @@ -24,10 +25,23 @@ namespace o2::aod { +namespace pwgem::photon +{ +namespace eventcuts +{ +EMEventCut* GetCut(const char* cutName); +} // namespace eventcuts + namespace pcmcuts { V0PhotonCut* GetCut(const char* cutName); } // namespace pcmcuts + +namespace pcmcuts +{ +V0PhotonCut* GetCut(const char* cutName); +} // namespace pcmcuts + namespace dalitzeecuts { DalitzEECut* GetCut(const char* cutName); @@ -48,5 +62,6 @@ namespace paircuts PairCut* GetCut(const char* cutName); } // namespace paircuts +} // namespace pwgem::photon } // namespace o2::aod #endif // PWGEM_PHOTONMESON_CORE_CUTSLIBRARY_H_ diff --git a/PWGEM/PhotonMeson/Core/EMEventCut.cxx b/PWGEM/PhotonMeson/Core/EMEventCut.cxx new file mode 100644 index 00000000000..b605d2c7e8b --- /dev/null +++ b/PWGEM/PhotonMeson/Core/EMEventCut.cxx @@ -0,0 +1,70 @@ +// 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. + +// +// Class for em event selection +// + +#include "Framework/Logger.h" +#include "PWGEM/PhotonMeson/Core/EMEventCut.h" + +ClassImp(EMEventCut); + +const char* EMEventCut::mCutNames[static_cast(EMEventCut::EMEventCuts::kNCuts)] = {"RequireFT0AND", "Zvtx", "RequireNoTFB", "RequireNoITSROFB"}; + +void EMEventCut::SetRequireFT0AND(bool flag) +{ + mRequireFT0AND = flag; + LOG(info) << "EM Event Cut, require FT0AND: " << mRequireFT0AND; +} + +void EMEventCut::SetZvtxRange(float min, float max) +{ + mMinZvtx = min; + mMaxZvtx = max; + LOG(info) << "EM Event Cut, set z vtx range: " << mMinZvtx << " - " << mMaxZvtx; +} + +void EMEventCut::SetRequireNoTFB(bool flag) +{ + mRequireNoTFB = flag; + LOG(info) << "EM Event Cut, require No TF border: " << mRequireNoTFB; +} + +void EMEventCut::SetRequireNoITSROFB(bool flag) +{ + mRequireNoITSROFB = flag; + LOG(info) << "EM Event Cut, require No ITS ROF border: " << mRequireNoITSROFB; +} + +void EMEventCut::print() const +{ + LOG(info) << "EM Event Cut:"; + for (int i = 0; i < static_cast(EMEventCuts::kNCuts); i++) { + switch (static_cast(i)) { + case EMEventCuts::kFT0AND: + LOG(info) << mCutNames[i] << " = " << mRequireFT0AND; + break; + case EMEventCuts::kZvtx: + LOG(info) << mCutNames[i] << " in [" << mMinZvtx << ", " << mMaxZvtx << "]"; + break; + case EMEventCuts::kNoTFB: + LOG(info) << mCutNames[i] << " = " << mRequireNoTFB; + break; + case EMEventCuts::kNoITSROFB: + LOG(info) << mCutNames[i] << " = " << mRequireNoITSROFB; + break; + + default: + LOG(fatal) << "Cut unknown!"; + } + } +} diff --git a/PWGEM/PhotonMeson/Core/EMEventCut.h b/PWGEM/PhotonMeson/Core/EMEventCut.h new file mode 100644 index 00000000000..fc119894cf2 --- /dev/null +++ b/PWGEM/PhotonMeson/Core/EMEventCut.h @@ -0,0 +1,99 @@ +// 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. + +// +// Class for em photon event selection +// + +#ifndef PWGEM_PHOTONMESON_CORE_EMEVENTCUT_H_ +#define PWGEM_PHOTONMESON_CORE_EMEVENTCUT_H_ + +#include "TNamed.h" +#include "Common/CCDB/EventSelectionParams.h" +#include "Common/CCDB/TriggerAliases.h" + +using namespace std; + +class EMEventCut : public TNamed +{ + public: + EMEventCut() = default; + EMEventCut(const char* name, const char* title) : TNamed(name, title) {} + + enum class EMEventCuts : int { + kFT0AND, // i.e. sel8 + kZvtx, + kNoTFB, // no time frame border + kNoITSROFB, // no ITS read out frame border + kNCuts + }; + + static const char* mCutNames[static_cast(EMEventCuts::kNCuts)]; + + template + bool IsSelected(T const& collision) const + { + if (!IsSelected(collision, EMEventCuts::kFT0AND)) { + return false; + } + if (!IsSelected(collision, EMEventCuts::kZvtx)) { + return false; + } + if (!IsSelected(collision, EMEventCuts::kNoTFB)) { + return false; + } + if (!IsSelected(collision, EMEventCuts::kNoITSROFB)) { + return false; + } + return true; + } + + template + bool IsSelected(T const& collision, const EMEventCuts& cut) const + { + switch (cut) { + case EMEventCuts::kFT0AND: + return collision.sel8(); + // return collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); // alternative way. + + case EMEventCuts::kZvtx: + return mMinZvtx < collision.posZ() && collision.posZ() < mMaxZvtx; + + case EMEventCuts::kNoTFB: + return collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder); + + case EMEventCuts::kNoITSROFB: + return collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder); + + default: + return false; + } + } + + // Setters + void SetRequireFT0AND(bool flag); + void SetZvtxRange(float min, float max); + void SetRequireNoTFB(bool flag); + void SetRequireNoITSROFB(bool flag); + + /// @brief Print the track selection + void print() const; + + private: + bool mRequireFT0AND{true}; + float mMinZvtx{-10.f}, mMaxZvtx{+10.f}; // range in pT + bool mRequireNoTFB{true}; + bool mRequireNoITSROFB{true}; + + ClassDef(EMEventCut, 1); +}; + +#endif // PWGEM_PHOTONMESON_CORE_EMEVENTCUT_H_ diff --git a/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx b/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx index 477e6875938..674d2eb77ae 100644 --- a/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx +++ b/PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx @@ -32,12 +32,19 @@ using namespace std; #include "Framework/Logger.h" #include "PWGEM/PhotonMeson/Core/HistogramsLibrary.h" -void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char* histClass, const char* subGroup) +void o2::aod::pwgem::photon::histogram::DefineHistograms(THashList* list, const char* histClass, const char* subGroup) { if (TString(histClass) == "Event") { - list->Add(new TH1F("hCollisionCounter", "hCollisionCounter", 5, 0.5f, 5.5f)); - list->Add(new TH1F("hZvtx_before", "vertex z; Zvtx (cm)", 100, -50, +50)); - list->Add(new TH1F("hZvtx_after", "vertex z; Zvtx (cm)", 100, -50, +50)); + list->Add(new TH1F("hCollisionCounter", "hCollisionCounter", 10, 0.5f, 10.5f)); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(1, "all"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(2, "No TF border"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(3, "No ITS ROF border"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(4, "FT0AND"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(5, "N_{contrib}^{PV} > 0"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(6, "|Z_{vtx}| < 10 cm"); + reinterpret_cast(list->FindObject("hCollisionCounter"))->GetXaxis()->SetBinLabel(7, "accepted"); + + list->Add(new TH1F("hZvtx", "vertex z; Z_{vtx} (cm)", 100, -50, +50)); list->Add(new TH1F("hMultNTracksPV", "hMultNTracksPV; N_{track} to PV", 6001, -0.5, 6000.5)); list->Add(new TH1F("hMultNTracksPVeta1", "hMultNTracksPVeta1; N_{track} to PV", 6001, -0.5, 6000.5)); list->Add(new TH2F("hMultFT0", "hMultFT0;mult. FT0A;mult. FT0C", 300, 0, 6000, 300, 0, 6000)); @@ -592,7 +599,7 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char* } } } -THashList* o2::aod::emphotonhistograms::AddHistClass(THashList* list, const char* histClass) +THashList* o2::aod::pwgem::photon::histogram::AddHistClass(THashList* list, const char* histClass) { if (list->FindObject(histClass)) { LOGF(info, "HistogramsLibrary::AddHistClass(): Cannot add histogram class %s because it already exists.", histClass); diff --git a/PWGEM/PhotonMeson/Core/HistogramsLibrary.h b/PWGEM/PhotonMeson/Core/HistogramsLibrary.h index e5e9b90d1b0..bd884067940 100644 --- a/PWGEM/PhotonMeson/Core/HistogramsLibrary.h +++ b/PWGEM/PhotonMeson/Core/HistogramsLibrary.h @@ -47,15 +47,16 @@ enum class EMHistType : int { namespace o2::aod { -namespace emphotonhistograms +namespace pwgem::photon::histogram { void DefineHistograms(THashList* list, const char* histClass, const char* subGroup = ""); THashList* AddHistClass(THashList* list, const char* histClass); template -void FillHistClass(THashList* list, const char* subGroup, T const& obj) +void FillHistClass(THashList* list, const char* subGroup, T const& obj, const float weight = 1.f) { if constexpr (htype == EMHistType::kEvent) { + reinterpret_cast(list->FindObject("hZvtx"))->Fill(obj.posZ()); reinterpret_cast(list->FindObject("hMultNTracksPV"))->Fill(obj.multNTracksPV()); reinterpret_cast(list->FindObject("hMultNTracksPVeta1"))->Fill(obj.multNTracksPVeta1()); reinterpret_cast(list->FindObject("hMultFT0"))->Fill(obj.multFT0A(), obj.multFT0C()); @@ -164,7 +165,7 @@ void FillHistClass(THashList* list, const char* subGroup, T const& obj) } } } -} // namespace emphotonhistograms +} // namespace pwgem::photon::histogram } // namespace o2::aod #endif // PWGEM_PHOTONMESON_CORE_HISTOGRAMSLIBRARY_H_ diff --git a/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h b/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h index 963229d1d24..a77ec53929f 100644 --- a/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h +++ b/PWGEM/PhotonMeson/Core/PWGEMPhotonMesonCoreLinkDef.h @@ -16,6 +16,7 @@ #pragma link off all classes; #pragma link off all functions; +#pragma link C++ class EMEventCut + ; #pragma link C++ class V0PhotonCut + ; #pragma link C++ class DalitzEECut + ; #pragma link C++ class PHOSPhotonCut + ; diff --git a/PWGEM/PhotonMeson/Tasks/CheckMCV0.cxx b/PWGEM/PhotonMeson/Tasks/CheckMCV0.cxx index 7a7efcb3391..912e2ffc07a 100644 --- a/PWGEM/PhotonMeson/Tasks/CheckMCV0.cxx +++ b/PWGEM/PhotonMeson/Tasks/CheckMCV0.cxx @@ -209,17 +209,17 @@ struct CheckMCV0 { } registry.add("V0Counter", "V0 counter", HistType::kTH1F, {{cutsBinLabels.size(), 0.5, 0.5 + cutsBinLabels.size()}}); - for (int iBin = 0; iBin < cutsBinLabels.size(); ++iBin) { + for (size_t iBin = 0; iBin < cutsBinLabels.size(); ++iBin) { registry.get(HIST("V0Counter"))->GetXaxis()->SetBinLabel(iBin + 1, cutsBinLabels[iBin].data()); } registry.add("V0TypeCounter", "V0 Type counter", HistType::kTH1F, {{v0Types.size(), 0.5, 0.5 + v0Types.size()}}); - for (int iBin = 0; iBin < v0Types.size(); ++iBin) { + for (size_t iBin = 0; iBin < v0Types.size(); ++iBin) { registry.get(HIST("V0TypeCounter"))->GetXaxis()->SetBinLabel(iBin + 1, v0Types[iBin].data()); } registry.add("CheckV0Leg", "CheckV0Leg", HistType::kTH1F, {{checkV0legLabels.size(), 0.5, 0.5 + checkV0legLabels.size()}}); - for (int iBin = 0; iBin < checkV0legLabels.size(); ++iBin) { + for (size_t iBin = 0; iBin < checkV0legLabels.size(); ++iBin) { registry.get(HIST("CheckV0Leg"))->GetXaxis()->SetBinLabel(iBin + 1, checkV0legLabels[iBin].data()); } } @@ -455,7 +455,7 @@ struct CheckMCV0 { v0TypesPassed[3] = isITSTPC_TPConly(track0, track1); v0TypesPassed[4] = isITSTPC_ITSonly(track0, track1); v0TypesPassed[5] = isTPConly_ITSonly(track0, track1); - for (int i = 0; i < v0TypesPassed.size(); ++i) { + for (size_t i = 0; i < v0TypesPassed.size(); ++i) { if (v0TypesPassed[i]) { registry.fill(HIST("V0TypeCounter"), i + 1); } diff --git a/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx b/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx index 850f89e35c1..bf9d39922ce 100644 --- a/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx +++ b/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx @@ -42,6 +42,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -96,14 +97,14 @@ struct MaterialBudget { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "material_budget_study", "Pair"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "material_budget_study", "Pair"); } // end of cut3 loop pair cut } // end of cut2 loop } // end of cut1 loop @@ -116,30 +117,30 @@ struct MaterialBudget { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0"); THashList* list_v0 = reinterpret_cast(fMainList->FindObject("V0")); // for V0s for (const auto& cut : fProbeCuts) { const char* cutname = cut.GetName(); - THashList* list_v0_cut = o2::aod::emphotonhistograms::AddHistClass(list_v0, cutname); - o2::aod::emphotonhistograms::DefineHistograms(list_v0_cut, "material_budget_study", "V0"); + THashList* list_v0_cut = o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_v0_cut, "material_budget_study", "V0"); } for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair, pairname, fTagCuts, fProbeCuts, fPairCuts); @@ -205,7 +206,6 @@ struct MaterialBudget { THashList* list_v0 = static_cast(fMainList->FindObject("V0")); double value[4] = {0.f}; for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -218,9 +218,9 @@ struct MaterialBudget { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons_coll = photons.sliceBy(perCollision, collision.globalIndex()); for (auto& cut : cuts) { diff --git a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx index 6b69ab030f4..faf1591c5db 100644 --- a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx @@ -44,6 +44,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -109,14 +110,14 @@ struct MaterialBudgetMC { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "material_budget_study", "Pair"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "material_budget_study", "Pair"); } // end of cut3 loop pair cut } // end of probecut loop } // end of tagcut loop @@ -129,30 +130,30 @@ struct MaterialBudgetMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0"); THashList* list_v0 = reinterpret_cast(fMainList->FindObject("V0")); // for V0s for (const auto& cut : fProbeCuts) { const char* cutname = cut.GetName(); - THashList* list_v0_cut = o2::aod::emphotonhistograms::AddHistClass(list_v0, cutname); - o2::aod::emphotonhistograms::DefineHistograms(list_v0_cut, "material_budget_study", "V0"); + THashList* list_v0_cut = o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_v0_cut, "material_budget_study", "V0"); } for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair, pairname, fTagCuts, fProbeCuts, fPairCuts); @@ -160,9 +161,9 @@ struct MaterialBudgetMC { } // end of pair name loop - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); - o2::aod::emphotonhistograms::DefineHistograms(list_gen, "Generated", ""); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", ""); } void DefineTagCuts() @@ -222,7 +223,6 @@ struct MaterialBudgetMC { THashList* list_v0 = static_cast(fMainList->FindObject("V0")); double value[4] = {0.f}; for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -237,10 +237,10 @@ struct MaterialBudgetMC { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons_coll = photons.sliceBy(perCollision, collision.globalIndex()); for (auto& cut : cuts) { diff --git a/PWGEM/PhotonMeson/Tasks/PhotonHBT.cxx b/PWGEM/PhotonMeson/Tasks/PhotonHBT.cxx index 22d992714fa..6194aca3120 100644 --- a/PWGEM/PhotonMeson/Tasks/PhotonHBT.cxx +++ b/PWGEM/PhotonMeson/Tasks/PhotonHBT.cxx @@ -21,20 +21,11 @@ #include "Math/Vector4D.h" #include "Math/Vector3D.h" #include "Math/LorentzRotation.h" -#include "Math/Rotation3D.h" -#include "Math/AxisAngle.h" +#include "Math/GenVector/Boost.h" #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" #include "Framework/AnalysisDataModel.h" #include "Framework/ASoAHelpers.h" -#include "ReconstructionDataFormats/Track.h" -#include "Common/Core/trackUtilities.h" -#include "Common/Core/TrackSelection.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/DataModel/EventSelection.h" -#include "Common/DataModel/Centrality.h" -#include "Common/DataModel/PIDResponse.h" -#include "Common/Core/RecoDecay.h" #include "PWGEM/PhotonMeson/Utils/PairUtilities.h" #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" #include "PWGEM/PhotonMeson/Core/V0PhotonCut.h" @@ -50,6 +41,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -124,17 +116,17 @@ struct PhotonHBT { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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())); if (fConfigDo3D) { - o2::aod::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "photon_hbt", "3d"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "photon_hbt", "3d"); } else { - o2::aod::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "photon_hbt", "1d"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "photon_hbt", "1d"); } } // end of pair cut3 loop } // end of cut2 loop @@ -148,20 +140,20 @@ struct PhotonHBT { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair, pairname, fPCMCuts, fPCMCuts, fPairCuts); @@ -270,7 +262,6 @@ struct PhotonHBT { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -285,9 +276,9 @@ struct PhotonHBT { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx index 7839c019f0b..5691d7e5cdf 100644 --- a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx +++ b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx @@ -45,6 +45,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -92,6 +93,9 @@ struct Pi0EtaToGammaGamma { Configurable EMC_Eoverp{"EMC_Eoverp", 1.75, "Minimum cluster energy over track momentum for EMCal track matching"}; Configurable EMC_UseExoticCut{"EMC_UseExoticCut", true, "FLag to use the EMCal exotic cluster cut"}; + Configurable fConfigEMEventCut{"cfgEMEventCut", "minbias", "em event cut"}; // only 1 event cut per wagon + EMEventCut fEMEventCut; + OutputObj fOutputEvent{"Event"}; OutputObj fOutputPair{"Pair"}; // 2-photon pair THashList* fMainList = new THashList(); @@ -102,8 +106,10 @@ struct Pi0EtaToGammaGamma { std::vector fPHOSCuts; std::vector fEMCCuts; std::vector fPairCuts; - std::vector fPairNames; + + static constexpr std::string_view event_types[2] = {"before", "after"}; + void init(InitContext& context) { if (context.mOptions.get("processPCMPCM")) { @@ -139,6 +145,9 @@ struct Pi0EtaToGammaGamma { DefinePairCuts(); addhistograms(); + TString ev_cut_name = fConfigEMEventCut.value; + fEMEventCut = *eventcuts::GetCut(ev_cut_name.Data()); + fOutputEvent.setObject(reinterpret_cast(fMainList->FindObject("Event"))); fOutputPair.setObject(reinterpret_cast(fMainList->FindObject("Pair"))); } @@ -156,14 +165,14 @@ struct Pi0EtaToGammaGamma { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "gammagamma_mass_pt", pairname.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "gammagamma_mass_pt", pairname.data()); } // end of cut3 loop pair cut } // end of cut2 loop } // end of cut1 loop @@ -176,20 +185,22 @@ struct Pi0EtaToGammaGamma { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); - THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + THashList* list_ev_pair = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data())); + for (const auto& evtype : event_types) { + THashList* list_ev_type = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_ev_pair, evtype.data())); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_type, "Event", evtype.data()); + } - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair, pairname, fPCMCuts, fPCMCuts, fPairCuts); @@ -309,7 +320,7 @@ struct Pi0EtaToGammaGamma { custom_cut->SetUseExoticCut(EMC_UseExoticCut); fEMCCuts.push_back(*custom_cut); } else { - fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fEMCCuts.push_back(*emccuts::GetCut(cutname)); } } } @@ -365,7 +376,8 @@ struct Pi0EtaToGammaGamma { template void SameEventPairing(TEvents const& collisions, TPhotons1 const& photons1, TPhotons2 const& photons2, TPreslice1 const& perCollision1, TPreslice2 const& perCollision2, TCuts1 const& cuts1, TCuts2 const& cuts2, TPairCuts const& paircuts, TLegs const& legs, TEMPrimaryElectrons const& emprimaryelectrons, TEMPrimaryMuons const& emprimarymuons, TEMCMTs const& emcmatchedtracks) { - THashList* list_ev_pair = static_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())); + THashList* list_ev_pair_before = static_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject(event_types[0].data())); + THashList* list_ev_pair_after = static_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject(event_types[1].data())); THashList* list_pair_ss = static_cast(fMainList->FindObject("Pair")->FindObject(pairnames[pairtype].data())); for (auto& collision : collisions) { @@ -376,25 +388,30 @@ struct Pi0EtaToGammaGamma { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all - if (!collision.sel8()) { - continue; + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(1.0); + if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(2.0); } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(2.0); // FT0VX i.e. FT0and - - if (collision.numContrib() < 0.5) { - continue; + if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(3.0); + } + if (collision.numContrib() > 0.5) { + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(4.0); + } + if (collision.sel8()) { + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(5.0); + } + if (abs(collision.posZ()) < 10.0) { + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(6.0); } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(3.0); // Ncontrib > 0 - if (abs(collision.posZ()) > 10.0) { + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair_before, "", collision); + if (!fEMEventCut.IsSelected(collision)) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair_after, "", collision); + reinterpret_cast(list_ev_pair_before->FindObject("hCollisionCounter"))->Fill(7.0); + reinterpret_cast(list_ev_pair_after->FindObject("hCollisionCounter"))->Fill(7.0); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMC.cxx b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMC.cxx index 1c060c42173..91e8bde8623 100644 --- a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMC.cxx @@ -40,6 +40,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -139,14 +140,14 @@ struct Pi0EtaToGammaGammaMC { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "gammagamma_mass_pt_mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "gammagamma_mass_pt_mc"); } // end of cut3 loop } // end of cut2 loop } // end of cut1 loop @@ -160,13 +161,13 @@ struct Pi0EtaToGammaGammaMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); // for (auto& pairname : fPairNames) { // } // end of pair name loop @@ -175,16 +176,16 @@ struct Pi0EtaToGammaGammaMC { LOGF(info, "Enabled pairs = %s", pairname.data()); // for events - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); // for generated particles - THashList* list_gen_pair = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_gen, pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_gen_pair, "Generated", "Pi0Eta"); + THashList* list_gen_pair = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_gen, pairname.data())); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen_pair, "Generated", "Pi0Eta"); // for truely reconstructed particles - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair, pairname, fPCMCuts, fPCMCuts, fPairCuts); } @@ -331,7 +332,6 @@ struct Pi0EtaToGammaGammaMC { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { @@ -347,9 +347,9 @@ struct Pi0EtaToGammaGammaMC { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx index 4aee163d4d9..2288d586acc 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx @@ -43,6 +43,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -116,9 +117,9 @@ struct SinglePhoton { std::string cutname1 = cut1.GetName(); THashList* list_photon_subsys = reinterpret_cast(list_photon->FindObject(detname.data())); - o2::aod::emphotonhistograms::AddHistClass(list_photon_subsys, cutname1.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_photon_subsys, cutname1.data()); THashList* list_photon_subsys_cut = reinterpret_cast(list_photon_subsys->FindObject(cutname1.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_photon_subsys_cut, "singlephoton", detname.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_photon_subsys_cut, "singlephoton", detname.data()); } // end of cut1 loop } @@ -129,20 +130,20 @@ struct SinglePhoton { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Photon"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Photon"); THashList* list_photon = reinterpret_cast(fMainList->FindObject("Photon")); for (auto& detname : fDetNames) { LOGF(info, "Enabled detector = %s", detname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, detname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, detname.data()); THashList* list_ev_det = reinterpret_cast(list_ev->FindObject(detname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_det, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_det, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_photon, detname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_photon, detname.data()); if (detname == "PCM") { add_histograms(list_photon, detname, fPCMCuts); @@ -219,7 +220,7 @@ struct SinglePhoton { custom_cut->SetUseExoticCut(EMC_UseExoticCut); fEMCCuts.push_back(*custom_cut); } else { - fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fEMCCuts.push_back(*emccuts::GetCut(cutname)); } } } @@ -259,7 +260,6 @@ struct SinglePhoton { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -274,10 +274,10 @@ struct SinglePhoton { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_det, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_det, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); @@ -291,7 +291,7 @@ struct SinglePhoton { if (abs(v1.Rapidity()) > maxY) { continue; } - o2::aod::emphotonhistograms::FillHistClass(list_photon_det_cut, "", v1); + o2::aod::pwgem::photon::histogram::FillHistClass(list_photon_det_cut, "", v1); } // end of photon loop } // end of cut loop } // end of collision loop diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx index aaa1f814559..58a6919ae8d 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx @@ -46,6 +46,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -123,9 +124,9 @@ struct SinglePhotonMC { std::string cutname1 = cut1.GetName(); THashList* list_photon_subsys = reinterpret_cast(list_photon->FindObject(detname.data())); - o2::aod::emphotonhistograms::AddHistClass(list_photon_subsys, cutname1.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_photon_subsys, cutname1.data()); THashList* list_photon_subsys_cut = reinterpret_cast(list_photon_subsys->FindObject(cutname1.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_photon_subsys_cut, "singlephoton", "mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_photon_subsys_cut, "singlephoton", "mc"); } // end of cut1 loop } @@ -136,24 +137,24 @@ struct SinglePhotonMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Photon"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Photon"); THashList* list_photon = reinterpret_cast(fMainList->FindObject("Photon")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); - o2::aod::emphotonhistograms::DefineHistograms(list_gen, "Generated", "Photon"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", "Photon"); for (auto& detname : fDetNames) { LOGF(info, "Enabled detector = %s", detname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, detname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, detname.data()); THashList* list_ev_det = reinterpret_cast(list_ev->FindObject(detname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_det, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_det, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_photon, detname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_photon, detname.data()); if (detname == "PCM") { add_photon_histograms(list_photon, detname, fPCMCuts); @@ -231,7 +232,7 @@ struct SinglePhotonMC { // custom_cut->SetUseExoticCut(EMC_UseExoticCut); // fEMCCuts.push_back(*custom_cut); // } else { - // fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + // fEMCCuts.push_back(*emccuts::GetCut(cutname)); // } // } // } @@ -271,7 +272,6 @@ struct SinglePhotonMC { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -286,10 +286,10 @@ struct SinglePhotonMC { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(detnames[photontype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_det, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_det, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); @@ -303,7 +303,7 @@ struct SinglePhotonMC { if (abs(v1.Rapidity()) > maxY) { continue; } - o2::aod::emphotonhistograms::FillHistClass(list_photon_det_cut, "", v1); // photon candidates. + o2::aod::pwgem::photon::histogram::FillHistClass(list_photon_det_cut, "", v1); // photon candidates. int photonid = -1; if constexpr (photontype == EMDetType::kPCM) { diff --git a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx index 98656495078..5bb046e583a 100644 --- a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx +++ b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx @@ -43,6 +43,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -112,13 +113,13 @@ struct TagAndProbe { for (auto& cut2 : probecuts) { std::string cutname2 = cut2.GetName(); std::string photon_cut_name = cutname1 + "_" + cutname2; - THashList* list_pair_subsys_photoncut = o2::aod::emphotonhistograms::AddHistClass(list_pair, photon_cut_name.data()); + 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(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "tag_and_probe", pairname.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "tag_and_probe", pairname.data()); } // end of cut3 loop pair cut } // end of cut2 loop } @@ -129,10 +130,10 @@ struct TagAndProbe { fMainList->SetOwner(true); fMainList->SetName("fMainList"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); // create sub lists first. @@ -140,10 +141,10 @@ struct TagAndProbe { for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - THashList* list_ev_ss = o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_ss, "Event"); + THashList* list_ev_ss = o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_ss, "Event"); - THashList* list_pair_ss = o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + THashList* list_pair_ss = o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPCM") { add_pair_histograms(list_pair_ss, pairname, fTagPCMCut, fProbePCMCuts, fPairCuts); @@ -199,7 +200,7 @@ struct TagAndProbe { for (int icut = 0; icut < objArray->GetEntries(); ++icut) { const char* cutname = objArray->At(icut)->GetName(); LOGF(info, "add cut : %s", cutname); - fProbeEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fProbeEMCCuts.push_back(*emccuts::GetCut(cutname)); } } LOGF(info, "Number of EMCal cuts = %d", fProbeEMCCuts.size()); @@ -237,7 +238,6 @@ struct TagAndProbe { continue; } - reinterpret_cast(list_ev_pair->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(list_ev_pair->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -252,9 +252,9 @@ struct TagAndProbe { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(list_ev_pair->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(list_ev_pair->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(list_ev_pair->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/TaggingPi0.cxx b/PWGEM/PhotonMeson/Tasks/TaggingPi0.cxx index 7b099c0b6d7..2f824307675 100644 --- a/PWGEM/PhotonMeson/Tasks/TaggingPi0.cxx +++ b/PWGEM/PhotonMeson/Tasks/TaggingPi0.cxx @@ -40,6 +40,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -121,14 +122,14 @@ struct TaggingPi0 { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "tagging_pi0"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "tagging_pi0"); } // end of cut3 loop } // end of cut2 loop } // end of cut1 loop @@ -141,20 +142,20 @@ struct TaggingPi0 { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMPHOS") { add_pair_histograms(list_pair, pairname, fPCMCuts, fPHOSCuts, fPairCuts); @@ -246,7 +247,7 @@ struct TaggingPi0 { custom_cut->SetUseExoticCut(EMC_UseExoticCut); fEMCCuts.push_back(*custom_cut); } else { - fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fEMCCuts.push_back(*emccuts::GetCut(cutname)); } } } @@ -298,7 +299,6 @@ struct TaggingPi0 { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -313,9 +313,9 @@ struct TaggingPi0 { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/TaggingPi0MC.cxx b/PWGEM/PhotonMeson/Tasks/TaggingPi0MC.cxx index df86354268c..30cac218201 100644 --- a/PWGEM/PhotonMeson/Tasks/TaggingPi0MC.cxx +++ b/PWGEM/PhotonMeson/Tasks/TaggingPi0MC.cxx @@ -44,6 +44,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::photonpair; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; @@ -126,14 +127,14 @@ struct TaggingPi0MC { THashList* list_pair_subsys = reinterpret_cast(list_pair->FindObject(pairname.data())); std::string photon_cut_name = cutname1 + "_" + cutname2; - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys, photon_cut_name.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair_subsys, photon_cut_name.data()); THashList* list_pair_subsys_photoncut = reinterpret_cast(list_pair_subsys->FindObject(photon_cut_name.data())); for (auto& cut3 : cuts3) { std::string pair_cut_name = cut3.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_pair_subsys_photoncut, pair_cut_name.data()); + 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::emphotonhistograms::DefineHistograms(list_pair_subsys_paircut, "tagging_pi0_mc", "pair"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pair_subsys_paircut, "tagging_pi0_mc", "pair"); } // end of pair cut loop } // end of cut2 loop } // end of cut1 loop @@ -146,27 +147,27 @@ struct TaggingPi0MC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "PCM"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "PCM"); THashList* list_pcm = reinterpret_cast(fMainList->FindObject("PCM")); for (auto& cut : fPCMCuts) { - THashList* list_pcm_cut = o2::aod::emphotonhistograms::AddHistClass(list_pcm, cut.GetName()); - o2::aod::emphotonhistograms::DefineHistograms(list_pcm_cut, "tagging_pi0_mc", "pcm"); + THashList* list_pcm_cut = o2::aod::pwgem::photon::histogram::AddHistClass(list_pcm, cut.GetName()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_pcm_cut, "tagging_pi0_mc", "pcm"); } - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Pair"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Pair"); THashList* list_pair = reinterpret_cast(fMainList->FindObject("Pair")); for (auto& pairname : fPairNames) { LOGF(info, "Enabled pairs = %s", pairname.data()); - o2::aod::emphotonhistograms::AddHistClass(list_ev, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, pairname.data()); THashList* list_ev_pair = reinterpret_cast(list_ev->FindObject(pairname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_pair, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_pair, "Event"); - o2::aod::emphotonhistograms::AddHistClass(list_pair, pairname.data()); + o2::aod::pwgem::photon::histogram::AddHistClass(list_pair, pairname.data()); if (pairname == "PCMDalitzEE") { add_pair_histograms(list_pair, pairname, fPCMCuts, fDalitzEECuts, fPairCuts); @@ -258,7 +259,7 @@ struct TaggingPi0MC { custom_cut->SetUseExoticCut(EMC_UseExoticCut); fEMCCuts.push_back(*custom_cut); } else { - fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fEMCCuts.push_back(*emccuts::GetCut(cutname)); } } } @@ -310,7 +311,6 @@ struct TaggingPi0MC { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(1.0); // all if (!collision.sel8()) { continue; @@ -325,10 +325,10 @@ struct TaggingPi0MC { if (abs(collision.posZ()) > 10.0) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hZvtx"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject(pairnames[pairtype].data())->FindObject("hCollisionCounter"))->Fill(4.0); // |Zvtx| < 10 cm - o2::aod::emphotonhistograms::FillHistClass(list_ev_pair, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_pair, "", collision); auto photons1_coll = photons1.sliceBy(perCollision1, collision.globalIndex()); auto photons2_coll = photons2.sliceBy(perCollision2, collision.globalIndex()); diff --git a/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx index 6effd822cbc..e948dc00203 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx @@ -35,6 +35,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -70,25 +71,25 @@ struct DalitzEEQC { fMainList->SetName("fMainList"); // create sub lists first. - THashList* list_ev = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event")); - THashList* list_track = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(fMainList, "Track")); - THashList* list_dalitzee = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(fMainList, "DalitzEE")); + THashList* list_ev = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event")); + THashList* list_track = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Track")); + THashList* list_dalitzee = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "DalitzEE")); for (size_t icen = 0; icen < vec_cent_min.size(); icen++) { float cen_min = vec_cent_min[icen]; float cen_max = vec_cent_max[icen]; const char* cent_name = Form("Cent_%s_%3.2f_%3.2f", cent_det_names[cfgCentEstimator].data(), cen_min, cen_max); - THashList* list_ev_cent = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_ev, cent_name)); - o2::aod::emphotonhistograms::DefineHistograms(list_ev_cent, "Event"); + THashList* list_ev_cent = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, cent_name)); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_cent, "Event"); - THashList* list_track_cent = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_track, cent_name)); - THashList* list_dalitzee_cent = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_dalitzee, cent_name)); + THashList* list_track_cent = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_track, cent_name)); + THashList* list_dalitzee_cent = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_dalitzee, cent_name)); for (const auto& cut : fDalitzEECuts) { const char* cutname = cut.GetName(); - THashList* list_track_cent_cut = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_track_cent, cutname)); - o2::aod::emphotonhistograms::DefineHistograms(list_track_cent_cut, "Track"); + THashList* list_track_cent_cut = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_track_cent, cutname)); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_track_cent_cut, "Track"); - THashList* list_dalitzee_cent_cut = reinterpret_cast(o2::aod::emphotonhistograms::AddHistClass(list_dalitzee_cent, cutname)); + THashList* list_dalitzee_cent_cut = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_dalitzee_cent, cutname)); std::string histo_sub_group = ""; if (doMix) { histo_sub_group += "mix"; @@ -96,7 +97,7 @@ struct DalitzEEQC { if (cfgDoDCAstudy) { histo_sub_group += "dca"; } - o2::aod::emphotonhistograms::DefineHistograms(list_dalitzee_cent_cut, "DalitzEE", histo_sub_group.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_dalitzee_cent_cut, "DalitzEE", histo_sub_group.data()); } // end of cut loop } // end of centrality loop } @@ -176,7 +177,6 @@ struct DalitzEEQC { THashList* list_dalitzee_cent = static_cast(list_dalitzee->FindObject(cent_name)); THashList* list_track_cent = static_cast(list_track->FindObject(cent_name)); - reinterpret_cast(list_ev_cent->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(list_ev_cent->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -192,9 +192,9 @@ struct DalitzEEQC { continue; } reinterpret_cast(list_ev_cent->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(list_ev_cent->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(list_ev_cent->FindObject("hZvtx"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev_cent, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_cent, "", collision); for (const auto& cut : fDalitzEECuts) { THashList* list_dalitzee_cent_cut = static_cast(list_dalitzee_cent->FindObject(cut.GetName())); @@ -234,7 +234,7 @@ struct DalitzEEQC { nuls++; for (auto& track : {pos, ele}) { if (std::find(used_trackIds.begin(), used_trackIds.end(), track.globalIndex()) == used_trackIds.end()) { - o2::aod::emphotonhistograms::FillHistClass(list_track_cent_cut, "", track); + o2::aod::pwgem::photon::histogram::FillHistClass(list_track_cent_cut, "", track); used_trackIds.emplace_back(track.globalIndex()); } } diff --git a/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx index 75f10f1db46..699227e91a5 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx @@ -36,6 +36,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -65,43 +66,43 @@ struct DalitzEEQCMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Track"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Track"); THashList* list_track = reinterpret_cast(fMainList->FindObject("Track")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "DalitzEE"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "DalitzEE"); THashList* list_dalitzee = reinterpret_cast(fMainList->FindObject("DalitzEE")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); - o2::aod::emphotonhistograms::DefineHistograms(list_gen, "Generated", "dielectron"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", "dielectron"); for (const auto& cut : fDalitzEECuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_track, cutname); - o2::aod::emphotonhistograms::AddHistClass(list_dalitzee, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_track, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_dalitzee, cutname); } // for single tracks for (auto& cut : fDalitzEECuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("Track")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "Track", "mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Track", "mc"); } // for DalitzEEs for (auto& cut : fDalitzEECuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("DalitzEE")->FindObject(cutname.data())); - // o2::aod::emphotonhistograms::DefineHistograms(list, "DalitzEE", "mc"); + // o2::aod::pwgem::photon::histogram::DefineHistograms(list, "DalitzEE", "mc"); std::string histo_sub_group = "mc,"; if (cfgDoDCAstudy) { histo_sub_group += "dca"; } - o2::aod::emphotonhistograms::DefineHistograms(list, "DalitzEE", histo_sub_group.data()); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "DalitzEE", histo_sub_group.data()); } } @@ -158,7 +159,6 @@ struct DalitzEEQCMC { float det_pos = 999.f, det_ele = 999.f; for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -174,8 +174,8 @@ struct DalitzEEQCMC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); auto uls_pairs_per_coll = uls_pairs->sliceByCached(o2::aod::dalitzee::emreducedeventId, collision.globalIndex(), cache); @@ -240,7 +240,7 @@ struct DalitzEEQCMC { nuls++; for (auto& track : {pos, ele}) { if (std::find(used_trackIds.begin(), used_trackIds.end(), track.globalIndex()) == used_trackIds.end()) { - o2::aod::emphotonhistograms::FillHistClass(list_track_cut, "", track); + o2::aod::pwgem::photon::histogram::FillHistClass(list_track_cut, "", track); used_trackIds.emplace_back(track.globalIndex()); auto mctrack = track.template emmcparticle_as(); reinterpret_cast(fMainList->FindObject("Track")->FindObject(cut.GetName())->FindObject("hPtGen_DeltaPtOverPtGen"))->Fill(mctrack.pt(), (track.pt() - mctrack.pt()) / mctrack.pt()); diff --git a/PWGEM/PhotonMeson/Tasks/dalitzMuMuQC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzMuMuQC.cxx index f2fffd1935d..db6ac705991 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzMuMuQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzMuMuQC.cxx @@ -34,6 +34,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -61,27 +62,27 @@ struct DalitzMuMuQC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Track"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Track"); THashList* list_track = reinterpret_cast(fMainList->FindObject("Track")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "DalitzMuMu"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "DalitzMuMu"); THashList* list_dalitzmumu = reinterpret_cast(fMainList->FindObject("DalitzMuMu")); for (const auto& cut : fDalitzMuMuCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_track, cutname); - o2::aod::emphotonhistograms::AddHistClass(list_dalitzmumu, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_track, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_dalitzmumu, cutname); } // for single tracks for (auto& cut : fDalitzMuMuCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("Track")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "Track", "Mu"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Track", "Mu"); } // for DalitzMuMus @@ -90,9 +91,9 @@ struct DalitzMuMuQC { THashList* list = reinterpret_cast(fMainList->FindObject("DalitzMuMu")->FindObject(cutname.data())); if (doMix) { - o2::aod::emphotonhistograms::DefineHistograms(list, "DalitzMuMu", "mix"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "DalitzMuMu", "mix"); } else { - o2::aod::emphotonhistograms::DefineHistograms(list, "DalitzMuMu", ""); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "DalitzMuMu", ""); } } } @@ -145,7 +146,6 @@ struct DalitzMuMuQC { float det_pos = 999.f, det_ele = 999.f; for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -161,8 +161,8 @@ struct DalitzMuMuQC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); auto uls_pairs_per_coll = uls_pairs->sliceByCached(o2::aod::dalitzmumu::emreducedeventId, collision.globalIndex(), cache); auto lspp_pairs_per_coll = lspp_pairs->sliceByCached(o2::aod::dalitzmumu::emreducedeventId, collision.globalIndex(), cache); @@ -199,7 +199,7 @@ struct DalitzMuMuQC { nuls++; for (auto& track : {pos, ele}) { if (std::find(used_trackIds.begin(), used_trackIds.end(), track.globalIndex()) == used_trackIds.end()) { - o2::aod::emphotonhistograms::FillHistClass(list_track_cut, "", track); + o2::aod::pwgem::photon::histogram::FillHistClass(list_track_cut, "", track); used_trackIds.emplace_back(track.globalIndex()); } } diff --git a/PWGEM/PhotonMeson/Tasks/dalitzMuMuQCMC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzMuMuQCMC.cxx index 4c2eb8eb3b8..05bcaaa5ab9 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzMuMuQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzMuMuQCMC.cxx @@ -36,6 +36,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -63,38 +64,38 @@ struct DalitzMuMuQCMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Track"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Track"); THashList* list_track = reinterpret_cast(fMainList->FindObject("Track")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "DalitzMuMu"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "DalitzMuMu"); THashList* list_dalitzmumu = reinterpret_cast(fMainList->FindObject("DalitzMuMu")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); - o2::aod::emphotonhistograms::DefineHistograms(list_gen, "Generated", "dimuon"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", "dimuon"); for (const auto& cut : fDalitzMuMuCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_track, cutname); - o2::aod::emphotonhistograms::AddHistClass(list_dalitzmumu, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_track, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_dalitzmumu, cutname); } // for single tracks for (auto& cut : fDalitzMuMuCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("Track")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "Track", "Mu,mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Track", "Mu,mc"); } // for DalitzMuMus for (auto& cut : fDalitzMuMuCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("DalitzMuMu")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "DalitzMuMu", "mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "DalitzMuMu", "mc"); } } @@ -150,7 +151,6 @@ struct DalitzMuMuQCMC { float det_pos = 999.f, det_ele = 999.f; for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -166,8 +166,8 @@ struct DalitzMuMuQCMC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); auto uls_pairs_per_coll = uls_pairs->sliceByCached(o2::aod::dalitzmumu::emreducedeventId, collision.globalIndex(), cache); @@ -217,7 +217,7 @@ struct DalitzMuMuQCMC { nuls++; for (auto& track : {pos, ele}) { if (std::find(used_trackIds.begin(), used_trackIds.end(), track.globalIndex()) == used_trackIds.end()) { - o2::aod::emphotonhistograms::FillHistClass(list_track_cut, "", track); + o2::aod::pwgem::photon::histogram::FillHistClass(list_track_cut, "", track); used_trackIds.emplace_back(track.globalIndex()); auto mctrack = track.template emmcparticle_as(); reinterpret_cast(fMainList->FindObject("Track")->FindObject(cut.GetName())->FindObject("hPtGen_DeltaPtOverPtGen"))->Fill(mctrack.pt(), (track.pt() - mctrack.pt()) / mctrack.pt()); diff --git a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx index 2daf9eafe4d..f6c69e163b3 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx @@ -39,6 +39,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -71,23 +72,23 @@ struct emcalQC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Cluster"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Cluster"); THashList* list_cluster = reinterpret_cast(fMainList->FindObject("Cluster")); for (const auto& cut : fEMCCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_cluster, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_cluster, cutname); } // for Clusters for (auto& cut : fEMCCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "Cluster", fDo2DQC ? "2D_EMC" : "EMC"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Cluster", fDo2DQC ? "2D_EMC" : "EMC"); } } @@ -126,7 +127,7 @@ struct emcalQC { custom_cut->SetUseExoticCut(EMC_UseExoticCut); fEMCCuts.push_back(*custom_cut); } else { - fEMCCuts.push_back(*aod::emccuts::GetCut(cutname)); + fEMCCuts.push_back(*emccuts::GetCut(cutname)); } } } @@ -156,7 +157,6 @@ struct emcalQC { THashList* list_cluster = static_cast(fMainList->FindObject("Cluster")); for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8() || collision.isEMCreadout() == 0) { // Check sel8 and whether EMC was read out continue; @@ -172,14 +172,14 @@ struct emcalQC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); if (collision.ncollsPerBC() != 1) { // Check that the collision is unique (the only one in the bc) continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(5.0); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); // Fill event histograms + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); // Fill event histograms auto clusters_per_coll = clusters.sliceBy(perCollision, collision.collisionId()); for (const auto& cut : fEMCCuts) { @@ -209,7 +209,7 @@ struct emcalQC { } if (survivesIsSelectedCuts) { - o2::aod::emphotonhistograms::FillHistClass(list_cluster_cut, fDo2DQC ? "2D" : "1D", cluster); + o2::aod::pwgem::photon::histogram::FillHistClass(list_cluster_cut, fDo2DQC ? "2D" : "1D", cluster); reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cut.GetName())->FindObject("hClusterQualityCuts"))->Fill(7., cluster.e()); ng++; } diff --git a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx index 941ebdb4bc9..a28ed7d539a 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx @@ -46,6 +46,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -57,49 +58,55 @@ using MyV0Photon = MyV0Photons::iterator; struct PCMQC { Configurable fConfigPCMCuts{"cfgPCMCuts", "qc,qc_ITSTPC,qc_ITSonly,qc_TPConly,wwire_ib,nocut", "Comma separated list of v0 photon cuts"}; - std::vector fPCMCuts; + Configurable fConfigEMEventCut{"cfgEMEventCut", "minbias", "em event cut"}; // only 1 event cut per wagon + EMEventCut fEMEventCut; + OutputObj fOutputEvent{"Event"}; OutputObj fOutputV0Leg{"V0Leg"}; OutputObj fOutputV0{"V0"}; THashList* fMainList = new THashList(); - // static constexpr std::string_view ambtracktypes[2] = {"NonAmb", "Amb"}; + static constexpr std::string_view event_types[2] = {"before", "after"}; void addhistograms() { fMainList->SetOwner(true); fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0Leg"); + for (const auto& evtype : event_types) { + THashList* list_ev_type = reinterpret_cast(o2::aod::pwgem::photon::histogram::AddHistClass(list_ev, evtype.data())); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev_type, "Event", evtype.data()); + } + + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0Leg"); THashList* list_v0leg = reinterpret_cast(fMainList->FindObject("V0Leg")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0"); THashList* list_v0 = reinterpret_cast(fMainList->FindObject("V0")); for (const auto& cut : fPCMCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_v0leg, cutname); - o2::aod::emphotonhistograms::AddHistClass(list_v0, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_v0leg, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname); } // for single tracks for (auto& cut : fPCMCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("V0Leg")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "V0Leg"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "V0Leg"); } // for V0s for (auto& cut : fPCMCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("V0")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "V0"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "V0"); } } @@ -121,7 +128,8 @@ struct PCMQC { { DefineCuts(); addhistograms(); // please call this after DefinCuts(); - + TString ev_cut_name = fConfigEMEventCut.value; + fEMEventCut = *eventcuts::GetCut(ev_cut_name.Data()); fOutputEvent.setObject(reinterpret_cast(fMainList->FindObject("Event"))); fOutputV0Leg.setObject(reinterpret_cast(fMainList->FindObject("V0Leg"))); fOutputV0.setObject(reinterpret_cast(fMainList->FindObject("V0"))); @@ -130,29 +138,37 @@ struct PCMQC { Preslice perCollision = aod::v0photonkf::emreducedeventId; void processQC(MyCollisions const& collisions, MyV0Photons const& v0photons, aod::V0Legs const& v0legs) { - THashList* list_ev = static_cast(fMainList->FindObject("Event")); + THashList* list_ev_before = static_cast(fMainList->FindObject("Event")->FindObject(event_types[0].data())); + THashList* list_ev_after = static_cast(fMainList->FindObject("Event")->FindObject(event_types[1].data())); THashList* list_v0 = static_cast(fMainList->FindObject("V0")); THashList* list_v0leg = static_cast(fMainList->FindObject("V0Leg")); for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); - if (!collision.sel8()) { - continue; - } - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(2.0); - if (collision.numContrib() < 0.5) { - continue; + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(1.0); + if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(2.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(3.0); + } + if (collision.numContrib() > 0.5) { + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(4.0); + } + if (collision.sel8()) { + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(5.0); + } + if (abs(collision.posZ()) < 10.0) { + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(6.0); } - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(3.0); - if (abs(collision.posZ()) > 10.0) { + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_before, "", collision); + if (!fEMEventCut.IsSelected(collision)) { continue; } - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev_after, "", collision); + reinterpret_cast(list_ev_before->FindObject("hCollisionCounter"))->Fill(7.0); + reinterpret_cast(list_ev_after->FindObject("hCollisionCounter"))->Fill(7.0); auto V0Photons_coll = v0photons.sliceBy(perCollision, collision.globalIndex()); for (const auto& cut : fPCMCuts) { @@ -164,11 +180,11 @@ struct PCMQC { auto pos = v0.posTrack_as(); auto ele = v0.negTrack_as(); if (cut.IsSelected(v0)) { - o2::aod::emphotonhistograms::FillHistClass(list_v0_cut, "", v0); + o2::aod::pwgem::photon::histogram::FillHistClass(list_v0_cut, "", v0); nv0++; for (auto& leg : {pos, ele}) { - o2::aod::emphotonhistograms::FillHistClass(list_v0leg_cut, "", leg); + o2::aod::pwgem::photon::histogram::FillHistClass(list_v0leg_cut, "", leg); } } } // end of v0 loop diff --git a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx index a135c8192a2..bbe989c534f 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx @@ -47,6 +47,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::mcutil; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -77,38 +78,38 @@ struct PCMQCMC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0Leg"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0Leg"); THashList* list_v0leg = reinterpret_cast(fMainList->FindObject("V0Leg")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "V0"); THashList* list_v0 = reinterpret_cast(fMainList->FindObject("V0")); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Generated"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Generated"); THashList* list_gen = reinterpret_cast(fMainList->FindObject("Generated")); - o2::aod::emphotonhistograms::DefineHistograms(list_gen, "Generated", "Photon"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_gen, "Generated", "Photon"); for (const auto& cut : fPCMCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_v0leg, cutname); - o2::aod::emphotonhistograms::AddHistClass(list_v0, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_v0leg, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_v0, cutname); } // for single tracks for (auto& cut : fPCMCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("V0Leg")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "V0Leg", "mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "V0Leg", "mc"); } // for V0s for (auto& cut : fPCMCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("V0")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "V0", "mc"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "V0", "mc"); } } @@ -145,7 +146,6 @@ struct PCMQCMC { THashList* list_v0leg = static_cast(fMainList->FindObject("V0Leg")); for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -161,8 +161,8 @@ struct PCMQCMC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); auto V0Photons_coll = v0photons.sliceBy(perCollision, collision.globalIndex()); for (const auto& cut : fPCMCuts) { @@ -188,7 +188,7 @@ struct PCMQCMC { float rxy_mc = sqrt(posmc.vx() * posmc.vx() + posmc.vy() * posmc.vy()); float eta_cp = std::atanh(v0.vz() / sqrt(pow(v0.vx(), 2) + pow(v0.vy(), 2) + pow(v0.vz(), 2))); - o2::aod::emphotonhistograms::FillHistClass(list_v0_cut, "", v0); + o2::aod::pwgem::photon::histogram::FillHistClass(list_v0_cut, "", v0); if (IsPhysicalPrimary(mcphoton.emreducedmcevent(), mcphoton, mcparticles)) { reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hPt_Photon_Primary"))->Fill(v0.pt()); reinterpret_cast(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hEtaPhi_Photon_Primary"))->Fill(v0.phi(), v0.eta()); @@ -228,7 +228,7 @@ struct PCMQCMC { nv0++; for (auto& leg : {pos, ele}) { - o2::aod::emphotonhistograms::FillHistClass(list_v0leg_cut, "", leg); + o2::aod::pwgem::photon::histogram::FillHistClass(list_v0leg_cut, "", leg); auto mcleg = leg.template emmcparticle_as(); reinterpret_cast(fMainList->FindObject("V0Leg")->FindObject(cut.GetName())->FindObject("hPtGen_DeltaPtOverPtGen"))->Fill(mcleg.pt(), (leg.pt() - mcleg.pt()) / mcleg.pt()); reinterpret_cast(fMainList->FindObject("V0Leg")->FindObject(cut.GetName())->FindObject("hPtGen_DeltaEta"))->Fill(mcleg.pt(), leg.eta() - mcleg.eta()); diff --git a/PWGEM/PhotonMeson/Tasks/phosQC.cxx b/PWGEM/PhotonMeson/Tasks/phosQC.cxx index cacb65a6375..014fc001759 100644 --- a/PWGEM/PhotonMeson/Tasks/phosQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/phosQC.cxx @@ -39,6 +39,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; +using namespace o2::aod::pwgem::photon; using std::array; using MyCollisions = soa::Join; @@ -60,23 +61,23 @@ struct phosQC { fMainList->SetName("fMainList"); // create sub lists first. - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Event"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Event"); THashList* list_ev = reinterpret_cast(fMainList->FindObject("Event")); - o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list_ev, "Event"); - o2::aod::emphotonhistograms::AddHistClass(fMainList, "Cluster"); + o2::aod::pwgem::photon::histogram::AddHistClass(fMainList, "Cluster"); THashList* list_cluster = reinterpret_cast(fMainList->FindObject("Cluster")); for (const auto& cut : fPHOSCuts) { const char* cutname = cut.GetName(); - o2::aod::emphotonhistograms::AddHistClass(list_cluster, cutname); + o2::aod::pwgem::photon::histogram::AddHistClass(list_cluster, cutname); } // for Clusters for (auto& cut : fPHOSCuts) { std::string_view cutname = cut.GetName(); THashList* list = reinterpret_cast(fMainList->FindObject("Cluster")->FindObject(cutname.data())); - o2::aod::emphotonhistograms::DefineHistograms(list, "Cluster", "PHOS"); + o2::aod::pwgem::photon::histogram::DefineHistograms(list, "Cluster", "PHOS"); } } @@ -113,7 +114,6 @@ struct phosQC { THashList* list_cluster = static_cast(fMainList->FindObject("Cluster")); for (auto& collision : collisions) { - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ()); reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(1.0); if (!collision.sel8()) { continue; @@ -129,8 +129,8 @@ struct phosQC { continue; } reinterpret_cast(fMainList->FindObject("Event")->FindObject("hCollisionCounter"))->Fill(4.0); - reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx_after"))->Fill(collision.posZ()); - o2::aod::emphotonhistograms::FillHistClass(list_ev, "", collision); + reinterpret_cast(fMainList->FindObject("Event")->FindObject("hZvtx"))->Fill(collision.posZ()); + o2::aod::pwgem::photon::histogram::FillHistClass(list_ev, "", collision); auto clusters_per_coll = clusters.sliceBy(perCollision, collision.collisionId()); for (const auto& cut : fPHOSCuts) { @@ -139,7 +139,7 @@ struct phosQC { for (auto& cluster : clusters_per_coll) { if (cut.IsSelected(cluster)) { - o2::aod::emphotonhistograms::FillHistClass(list_cluster_cut, "", cluster); + o2::aod::pwgem::photon::histogram::FillHistClass(list_cluster_cut, "", cluster); ng++; } } // end of v0 loop