Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions PWGEM/PhotonMeson/Tasks/photonMcTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> useCent{"useCent", false, "flag to enable usage of centrality instead of multiplicity as axis."};
Expand Down Expand Up @@ -276,20 +272,6 @@ struct PhotonMcTask {
fEMEventCut.addEventHistograms(&registry);

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) {
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -545,6 +533,7 @@ struct PhotonMcTask {
}

registry.fill(HIST("EMCal/hMeasuredTruePhoton"), photonEMC.pt(), centOrMult);
registry.fill(HIST("EMCal/hMeasuredTruePhotonGenPt"), mcPhoton.pt(), centOrMult);
}
}
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
}
}
}
Expand Down
Loading