From 770ef29fd23532c43cc4b10a86f5816c8540fe6f Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Thu, 12 Nov 2026 15:47:43 +0100 Subject: [PATCH] [PWGEM] Add histogram for measured photons using the MC pT instead of the reconstructed pT This added histogram should help see the effect of pT smearing onto the efficiency --- PWGEM/PhotonMeson/Tasks/photonMcTask.cxx | 28 +++++++++--------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/PWGEM/PhotonMeson/Tasks/photonMcTask.cxx b/PWGEM/PhotonMeson/Tasks/photonMcTask.cxx index 6378574b705..144274db5c8 100644 --- a/PWGEM/PhotonMeson/Tasks/photonMcTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/photonMcTask.cxx @@ -80,10 +80,6 @@ struct PhotonMcTask { // configurable axis ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {400, 0., 20.}, "pT axis for the neutral meson"}; - ConfigurableAxis thnConfigAxisERelative{"thnConfigAxisERelative", {600, -1., 5.}, "(E rec - E true) / E true axis"}; - ConfigurableAxis thnConfigAxisPRelative{"thnConfigAxisPRelative", {300, -1., 2.}, "(P rec - P true) / P true axis"}; - ConfigurableAxis thnConfigAxisEtaRelative{"thnConfigAxisEtaRelative", {300, -1., 2.}, "(eta rec - eta true) / eta true axis"}; - ConfigurableAxis thnConfigAxisPhiRelative{"thnConfigAxisPhiRelative", {300, -1., 2.}, "(phi rec - phi true) / phi true axis"}; ConfigurableAxis thnConfigAxisCent{"thnConfigAxisCent", {20, 0., 100.}, "centrality axis for the current event"}; ConfigurableAxis thnConfigAxisMult{"thnConfigAxisMult", {60, 0., 60000.}, "multiplicity axis for the current event"}; Configurable useCent{"useCent", false, "flag to enable usage of centrality instead of multiplicity as axis."}; @@ -276,20 +272,6 @@ struct PhotonMcTask { fEMEventCut.addEventHistograms(®istry); const AxisSpec thnAxisPt{thnConfigAxisPt, "#it{p}_{T} (GeV/#it{c})"}; - const AxisSpec thnAxisPtGen{thnConfigAxisPt, "#it{p}_{T,Gen} (GeV/#it{c})"}; - const AxisSpec thnAxisPtRec{thnConfigAxisPt, "#it{p}_{T,Rec} (GeV/#it{c})"}; - const AxisSpec thnAxisPGen{thnConfigAxisPt, "#it{p}_{Gen} (GeV/#it{c})"}; - const AxisSpec thnAxisPRec{thnConfigAxisPt, "#it{p}_{Rec} (GeV/#it{c})"}; - const AxisSpec thnAxisPRelative{thnConfigAxisPRelative, "#it{p}_{Rec} - #it{p}_{Gen} / #it{p}_{Gen}"}; - const AxisSpec thnAxisEGen{thnConfigAxisPt, "#it{E}_{Gen} (GeV)"}; - const AxisSpec thnAxisERec{thnConfigAxisPt, "#it{E}_{Rec} (GeV)"}; - const AxisSpec thnAxisERelative{thnConfigAxisERelative, "#it{E}_{Rec} - #it{E}_{Gen} / #it{E}_{Gen}"}; - - const AxisSpec thnAxisEtaRelative{thnConfigAxisEtaRelative, "#it{#eta}_{Rec} - #it{#eta}_{Gen} / #it{#eta}_{Gen}"}; - const AxisSpec thnAxisPhiRelative{thnConfigAxisPhiRelative, "#it{#varphi}_{Rec} - #it{#varphi}_{Gen} / #it{#varphi}_{Gen}"}; - - const AxisSpec thnAxisEtaGen{280, -0.7, 0.7, "#it{#eta}_{Gen}"}; - const AxisSpec thnAxisPhiGen{360, 0., o2::constants::math::TwoPI, "#it{#varphi}_{Gen} (rad)"}; AxisSpec thnAxisCentOrMult{1, 0., 1., "Centrality/Multiplicity"}; // placeholder, overwritten in init if (useCent.value) { @@ -306,12 +288,14 @@ struct PhotonMcTask { registry.add("EMCal/hAccepted", "EMCal accepted photon pt vs cent/mult", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); registry.add("EMCal/hMeasured", "EMCal measured photon candidate pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); registry.add("EMCal/hMeasuredTruePhoton", "EMCal measured and validated photon pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); + registry.add("EMCal/hMeasuredTruePhotonGenPt", "EMCal measured and validated photon gen pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); } if (doprocessPcm || doprocessPcmEmcal) { registry.add("PCM/hAccepted", "PCM accepted photon pt vs cent/mult", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); registry.add("PCM/hMeasured", "PCM measured photon candidate pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); registry.add("PCM/hMeasuredTruePhoton", "PCM measured and validated photon pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); + registry.add("PCM/hMeasuredTruePhotonGenPt", "PCM measured and validated photon gen pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult}); } }; // end init @@ -450,6 +434,8 @@ struct PhotonMcTask { auto pos1mc = mcParticles.begin(); auto ele1mc = mcParticles.begin(); + auto mcPhoton = mcParticles.begin(); + for (const auto& collision : collisions) { initCCDB(collision); @@ -487,7 +473,9 @@ struct PhotonMcTask { if (photonid1 < 0) { continue; } + mcPhoton.setCursor(photonid1); registry.fill(HIST("PCM/hMeasuredTruePhoton"), photon.pt(), centOrMult); + registry.fill(HIST("PCM/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult); } } } @@ -545,6 +533,7 @@ struct PhotonMcTask { } registry.fill(HIST("EMCal/hMeasuredTruePhoton"), photonEMC.pt(), centOrMult); + registry.fill(HIST("EMCal/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult); } } } @@ -616,6 +605,7 @@ struct PhotonMcTask { } registry.fill(HIST("EMCal/hMeasuredTruePhoton"), photonEMC.pt(), centOrMult); + registry.fill(HIST("EMCal/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult); } for (const auto& photon : photonsPCMPerCollision) { @@ -635,7 +625,9 @@ struct PhotonMcTask { if (photonid1 < 0) { continue; } + mcPhoton.setCursor(photonid1); registry.fill(HIST("PCM/hMeasuredTruePhoton"), photon.pt(), centOrMult); + registry.fill(HIST("PCM/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult); } } }