From ce6fbe7996443c262067268e938fba5285caa3d2 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Mon, 7 Sep 2026 17:07:51 +0200 Subject: [PATCH 1/3] [PWGEM,Photon] Remove unnecessary registry argument from task function --- PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx index d71493102f3..00d9b68e35b 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx @@ -297,13 +297,13 @@ struct EmcalMcTask { // One templated fill function instead of 9 copy-pasted blocks template - void fillClusterHistos(HistogramRegistry& histRegistry, TCluster const& clu, TMC const& mcPart, float centOrMult) + void fillClusterHistos(TCluster const& cluster, TMC const& mcPart, float centOrMult) { static constexpr std::string_view subDir = kSubDirs[type]; - histRegistry.fill(HIST(subDir) + HIST("hM02"), clu.m02(), clu.e(), centOrMult); - histRegistry.fill(HIST(subDir) + HIST("hEtaRel"), clu.eta() - mcPart.eta(), clu.e(), centOrMult); - histRegistry.fill(HIST(subDir) + HIST("hPhiRel"), clu.phi() - mcPart.phi(), clu.e(), centOrMult); + registry.fill(HIST(subDir) + HIST("hM02"), cluster.m02(), cluster.e(), centOrMult); + registry.fill(HIST(subDir) + HIST("hEtaRel"), cluster.eta() - mcPart.eta(), cluster.e(), centOrMult); + registry.fill(HIST(subDir) + HIST("hPhiRel"), cluster.phi() - mcPart.phi(), cluster.e(), centOrMult); } // PCM-EMCal same event @@ -340,23 +340,23 @@ struct EmcalMcTask { mcPhoton1.setCursor(photonEMC.emmcparticleIds()[0]); if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kGamma) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kElectron) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (mcPhoton1.pdgCode() == -PDG_t::kElectron) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kPi0) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == o2::constants::physics::Pdg::kEta) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == o2::constants::physics::Pdg::kOmega) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kPiPlus) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kKPlus) { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else { - fillClusterHistos(registry, photonEMC, mcPhoton1, centOrMult); + fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } } // for (const auto& photonEMC : photonsEMCPerCollision) { } From 66bfa803d077d24d1a14991dd595db25eec61712 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Tue, 8 Sep 2026 10:03:30 +0200 Subject: [PATCH 2/3] [PWGEM,Photon] Update `EMEMCClusterMCLabels` in all tasks to latest version `EMEMCClusterMCLabels_001` --- PWGEM/PhotonMeson/Core/TaggingPi0MC.h | 2 +- PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCEMCEMC.cxx | 2 +- PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx | 10 +++++----- PWGEM/PhotonMeson/Tasks/photonResoTask.cxx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PWGEM/PhotonMeson/Core/TaggingPi0MC.h b/PWGEM/PhotonMeson/Core/TaggingPi0MC.h index e6248abe388..4588f70182d 100644 --- a/PWGEM/PhotonMeson/Core/TaggingPi0MC.h +++ b/PWGEM/PhotonMeson/Core/TaggingPi0MC.h @@ -77,7 +77,7 @@ using MyMCCollision = MyMCCollisions::iterator; using MyV0Photons = o2::soa::Join; using MyV0Photon = MyV0Photons::iterator; -using MyEMCClusters = o2::soa::Join; +using MyEMCClusters = o2::soa::Join; using MyEMCCluster = MyEMCClusters::iterator; // using MyPHOSClusters = o2::soa::Join; diff --git a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCEMCEMC.cxx b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCEMCEMC.cxx index 0857f27f1a5..9c4398e75a3 100644 --- a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCEMCEMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCEMCEMC.cxx @@ -27,7 +27,7 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::aod::pwgem::photonmeson::photonpair; -using MyEMCClusters = soa::Join; +using MyEMCClusters = soa::Join; WorkflowSpec defineDataProcessing(ConfigContext const& context) { diff --git a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx index 00d9b68e35b..182ae1dccfd 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx @@ -133,7 +133,7 @@ struct EmcalMcTask { SliceCache cache; - using EMCalPhotons = soa::Join; + using EMCalPhotons = soa::Join; using Colls = soa::Join; @@ -299,11 +299,11 @@ struct EmcalMcTask { template void fillClusterHistos(TCluster const& cluster, TMC const& mcPart, float centOrMult) { - static constexpr std::string_view subDir = kSubDirs[type]; + static constexpr std::string_view SubDir = kSubDirs[type]; - registry.fill(HIST(subDir) + HIST("hM02"), cluster.m02(), cluster.e(), centOrMult); - registry.fill(HIST(subDir) + HIST("hEtaRel"), cluster.eta() - mcPart.eta(), cluster.e(), centOrMult); - registry.fill(HIST(subDir) + HIST("hPhiRel"), cluster.phi() - mcPart.phi(), cluster.e(), centOrMult); + registry.fill(HIST(SubDir) + HIST("hM02"), cluster.m02(), cluster.e(), centOrMult); + registry.fill(HIST(SubDir) + HIST("hEtaRel"), cluster.eta() - mcPart.eta(), cluster.e(), centOrMult); + registry.fill(HIST(SubDir) + HIST("hPhiRel"), cluster.phi() - mcPart.phi(), cluster.e(), centOrMult); } // PCM-EMCal same event diff --git a/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx b/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx index 05f6c409a70..a51c8533f95 100644 --- a/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx @@ -177,7 +177,7 @@ struct PhotonResoTask { SliceCache cache; - using EMCalPhotons = soa::Join; + using EMCalPhotons = soa::Join; using PcmPhotons = soa::Join; using PcmMcLegs = soa::Join; From 1f3d0a5e0ef4532f0452a8aa70029fc7a6c96ca3 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Tue, 8 Sep 2026 10:07:50 +0200 Subject: [PATCH 3/3] Fix electron PDG check --- PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx index 182ae1dccfd..073479c2c9e 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalMcTask.cxx @@ -341,9 +341,9 @@ struct EmcalMcTask { if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kGamma) { fillClusterHistos(photonEMC, mcPhoton1, centOrMult); - } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kElectron) { + } else if (mcPhoton1.pdgCode() == PDG_t::kElectron) { fillClusterHistos(photonEMC, mcPhoton1, centOrMult); - } else if (mcPhoton1.pdgCode() == -PDG_t::kElectron) { + } else if (mcPhoton1.pdgCode() == PDG_t::kPositron) { fillClusterHistos(photonEMC, mcPhoton1, centOrMult); } else if (std::abs(mcPhoton1.pdgCode()) == PDG_t::kPi0) { fillClusterHistos(photonEMC, mcPhoton1, centOrMult);