Skip to content

Commit 6fe9ba4

Browse files
authored
[PWGEM] Add histogram for measured photons using the MC pT instead of… (#18717)
1 parent ebf02dd commit 6fe9ba4

1 file changed

Lines changed: 10 additions & 22 deletions

File tree

‎PWGEM/PhotonMeson/Tasks/photonMcTask.cxx‎

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
2424

2525
#include <CCDB/BasicCCDBManager.h>
26-
#include <CommonConstants/MathConstants.h>
2726
#include <Framework/ASoA.h>
2827
#include <Framework/AnalysisDataModel.h>
2928
#include <Framework/AnalysisHelpers.h>
@@ -80,10 +79,6 @@ struct PhotonMcTask {
8079

8180
// configurable axis
8281
ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {400, 0., 20.}, "pT axis for the neutral meson"};
83-
ConfigurableAxis thnConfigAxisERelative{"thnConfigAxisERelative", {600, -1., 5.}, "(E rec - E true) / E true axis"};
84-
ConfigurableAxis thnConfigAxisPRelative{"thnConfigAxisPRelative", {300, -1., 2.}, "(P rec - P true) / P true axis"};
85-
ConfigurableAxis thnConfigAxisEtaRelative{"thnConfigAxisEtaRelative", {300, -1., 2.}, "(eta rec - eta true) / eta true axis"};
86-
ConfigurableAxis thnConfigAxisPhiRelative{"thnConfigAxisPhiRelative", {300, -1., 2.}, "(phi rec - phi true) / phi true axis"};
8782
ConfigurableAxis thnConfigAxisCent{"thnConfigAxisCent", {20, 0., 100.}, "centrality axis for the current event"};
8883
ConfigurableAxis thnConfigAxisMult{"thnConfigAxisMult", {60, 0., 60000.}, "multiplicity axis for the current event"};
8984
Configurable<bool> useCent{"useCent", false, "flag to enable usage of centrality instead of multiplicity as axis."};
@@ -276,20 +271,6 @@ struct PhotonMcTask {
276271
fEMEventCut.addEventHistograms(&registry);
277272

278273
const AxisSpec thnAxisPt{thnConfigAxisPt, "#it{p}_{T} (GeV/#it{c})"};
279-
const AxisSpec thnAxisPtGen{thnConfigAxisPt, "#it{p}_{T,Gen} (GeV/#it{c})"};
280-
const AxisSpec thnAxisPtRec{thnConfigAxisPt, "#it{p}_{T,Rec} (GeV/#it{c})"};
281-
const AxisSpec thnAxisPGen{thnConfigAxisPt, "#it{p}_{Gen} (GeV/#it{c})"};
282-
const AxisSpec thnAxisPRec{thnConfigAxisPt, "#it{p}_{Rec} (GeV/#it{c})"};
283-
const AxisSpec thnAxisPRelative{thnConfigAxisPRelative, "#it{p}_{Rec} - #it{p}_{Gen} / #it{p}_{Gen}"};
284-
const AxisSpec thnAxisEGen{thnConfigAxisPt, "#it{E}_{Gen} (GeV)"};
285-
const AxisSpec thnAxisERec{thnConfigAxisPt, "#it{E}_{Rec} (GeV)"};
286-
const AxisSpec thnAxisERelative{thnConfigAxisERelative, "#it{E}_{Rec} - #it{E}_{Gen} / #it{E}_{Gen}"};
287-
288-
const AxisSpec thnAxisEtaRelative{thnConfigAxisEtaRelative, "#it{#eta}_{Rec} - #it{#eta}_{Gen} / #it{#eta}_{Gen}"};
289-
const AxisSpec thnAxisPhiRelative{thnConfigAxisPhiRelative, "#it{#varphi}_{Rec} - #it{#varphi}_{Gen} / #it{#varphi}_{Gen}"};
290-
291-
const AxisSpec thnAxisEtaGen{280, -0.7, 0.7, "#it{#eta}_{Gen}"};
292-
const AxisSpec thnAxisPhiGen{360, 0., o2::constants::math::TwoPI, "#it{#varphi}_{Gen} (rad)"};
293274

294275
AxisSpec thnAxisCentOrMult{1, 0., 1., "Centrality/Multiplicity"}; // placeholder, overwritten in init
295276
if (useCent.value) {
@@ -306,12 +287,14 @@ struct PhotonMcTask {
306287
registry.add("EMCal/hAccepted", "EMCal accepted photon pt vs cent/mult", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
307288
registry.add("EMCal/hMeasured", "EMCal measured photon candidate pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
308289
registry.add("EMCal/hMeasuredTruePhoton", "EMCal measured and validated photon pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
290+
registry.add("EMCal/hMeasuredTruePhotonGenPt", "EMCal measured and validated photon gen pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
309291
}
310292

311293
if (doprocessPcm || doprocessPcmEmcal) {
312294
registry.add("PCM/hAccepted", "PCM accepted photon pt vs cent/mult", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
313295
registry.add("PCM/hMeasured", "PCM measured photon candidate pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
314296
registry.add("PCM/hMeasuredTruePhoton", "PCM measured and validated photon pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
297+
registry.add("PCM/hMeasuredTruePhotonGenPt", "PCM measured and validated photon gen pt vs cent/mult ", HistType::kTH2D, {thnAxisPt, thnAxisCentOrMult});
315298
}
316299

317300
}; // end init
@@ -426,9 +409,6 @@ struct PhotonMcTask {
426409
}
427410

428411
// TODO:
429-
// - efficiency: number of found photon candidates / number of photons within accpetance
430-
// - acceptance: number of photons in acceptance / number of photons generated
431-
// - photon Purity: number of actual photons / number of photon candidates
432412
// - How to handle EMCal cluster in this regard? Sometimes both conversion leptons can end up in the same cluster.
433413
// What is a good check when to start treating them as a photon?
434414
// When they both deposite at least X% of their momentum into the cluster?
@@ -450,6 +430,8 @@ struct PhotonMcTask {
450430
auto pos1mc = mcParticles.begin();
451431
auto ele1mc = mcParticles.begin();
452432

433+
auto mcPhoton = mcParticles.begin();
434+
453435
for (const auto& collision : collisions) {
454436

455437
initCCDB(collision);
@@ -487,7 +469,9 @@ struct PhotonMcTask {
487469
if (photonid1 < 0) {
488470
continue;
489471
}
472+
mcPhoton.setCursor(photonid1);
490473
registry.fill(HIST("PCM/hMeasuredTruePhoton"), photon.pt(), centOrMult);
474+
registry.fill(HIST("PCM/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult);
491475
}
492476
}
493477
}
@@ -545,6 +529,7 @@ struct PhotonMcTask {
545529
}
546530

547531
registry.fill(HIST("EMCal/hMeasuredTruePhoton"), photonEMC.pt(), centOrMult);
532+
registry.fill(HIST("EMCal/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult);
548533
}
549534
}
550535
}
@@ -616,6 +601,7 @@ struct PhotonMcTask {
616601
}
617602

618603
registry.fill(HIST("EMCal/hMeasuredTruePhoton"), photonEMC.pt(), centOrMult);
604+
registry.fill(HIST("EMCal/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult);
619605
}
620606

621607
for (const auto& photon : photonsPCMPerCollision) {
@@ -635,7 +621,9 @@ struct PhotonMcTask {
635621
if (photonid1 < 0) {
636622
continue;
637623
}
624+
mcPhoton.setCursor(photonid1);
638625
registry.fill(HIST("PCM/hMeasuredTruePhoton"), photon.pt(), centOrMult);
626+
registry.fill(HIST("PCM/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult);
639627
}
640628
}
641629
}

0 commit comments

Comments
 (0)