From 2bd36406d9b0e92d78939d5d2aee801f5af7bf28 Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Sun, 24 Aug 2025 16:46:22 +0200 Subject: [PATCH 1/4] [PWGLF] added histogram for spectra normalization --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index c710fce3735..737ea41e74d 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -256,6 +256,9 @@ struct AntinucleiInJets { // Generated spectra of antiprotons registryMC.add("antiproton_gen_jet", "antiproton_gen_jet", HistType::kTH1F, {{nbins, min, max, "#it{p}_{T} (GeV/#it{c})"}}); registryMC.add("antiproton_gen_ue", "antiproton_gen_ue", HistType::kTH1F, {{nbins, min, max, "#it{p}_{T} (GeV/#it{c})"}}); + + // Normalization histogram + registryMC.add("antiproton_y_phi", "antiproton_y_phi", HistType::kTH2F, {{2000, -1.0, 1.0, "#it{y}"}, {2000, 0.0, TwoPI, "#Delta#phi"}}); } // Reconstructed antiproton spectra in jets and UE (MC-matched) with TPC/TOF PID @@ -1459,6 +1462,9 @@ struct AntinucleiInJets { if (particle.eta() < minEta || particle.eta() > maxEta) continue; + // Fill normalization histogram + registryMC.fill(HIST("antiproton_y_phi"), particle.y(), getDeltaPhi(particle.phi(), jet.phi())); + // Fill histogram for generated antiprotons registryMC.fill(HIST("antiproton_gen_jet"), particle.pt()); } From b38d464508d2d32f71ef7d037751eee0705a441a Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Sun, 24 Aug 2025 16:48:52 +0200 Subject: [PATCH 2/4] removed whitespace --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index 737ea41e74d..50bf2179b54 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -1464,7 +1464,7 @@ struct AntinucleiInJets { // Fill normalization histogram registryMC.fill(HIST("antiproton_y_phi"), particle.y(), getDeltaPhi(particle.phi(), jet.phi())); - + // Fill histogram for generated antiprotons registryMC.fill(HIST("antiproton_gen_jet"), particle.pt()); } From 9005306e8f5f5a42f3a3e7b3fa946d209cb44bef Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Sun, 24 Aug 2025 20:20:41 +0200 Subject: [PATCH 3/4] fixed rapidity calculation --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index 50bf2179b54..739c989491e 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -258,7 +258,8 @@ struct AntinucleiInJets { registryMC.add("antiproton_gen_ue", "antiproton_gen_ue", HistType::kTH1F, {{nbins, min, max, "#it{p}_{T} (GeV/#it{c})"}}); // Normalization histogram - registryMC.add("antiproton_y_phi", "antiproton_y_phi", HistType::kTH2F, {{2000, -1.0, 1.0, "#it{y}"}, {2000, 0.0, TwoPI, "#Delta#phi"}}); + registryMC.add("antiproton_y_phi_jet", "antiproton_y_phi_jet", HistType::kTH2F, {{2000, -1.0, 1.0, "#it{y}"}, {2000, 0.0, TwoPI, "#Delta#phi"}}); + registryMC.add("antiproton_y_phi_ue", "antiproton_y_phi_ue", HistType::kTH2F, {{2000, -1.0, 1.0, "#it{y}"}, {2000, 0.0, TwoPI, "#Delta#phi"}}); } // Reconstructed antiproton spectra in jets and UE (MC-matched) with TPC/TOF PID @@ -1463,7 +1464,12 @@ struct AntinucleiInJets { continue; // Fill normalization histogram - registryMC.fill(HIST("antiproton_y_phi"), particle.y(), getDeltaPhi(particle.phi(), jet.phi())); + double px = particle.px(); + double py = particle.py(); + double pz = particle.pz(); + double E = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); + double y = 0.5 * std::log((E + pz) / (E - pz)); + registryMC.fill(HIST("antiproton_y_phi_jet"), y, getDeltaPhi(particle.phi(), jet.phi())); // Fill histogram for generated antiprotons registryMC.fill(HIST("antiproton_gen_jet"), particle.pt()); @@ -1497,6 +1503,20 @@ struct AntinucleiInJets { if (deltaRUe1 > maxConeRadius && deltaRUe2 > maxConeRadius) continue; + // Fill normalization histogram + double px = protonVec.Px(); + double py = protonVec.Py(); + double pz = protonVec.Pz(); + double E = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); + double y = 0.5 * std::log((E + pz) / (E - pz)); + + if (deltaRUe1 < maxConeRadius) { + registryMC.fill(HIST("antiproton_y_phi_ue"), y, getDeltaPhi(protonVec.Phi(), ueAxis1.Phi())); + } + if (deltaRUe2 < maxConeRadius) { + registryMC.fill(HIST("antiproton_y_phi_ue"), y, getDeltaPhi(protonVec.Phi(), ueAxis2.Phi())); + } + // Fill histogram for antiprotons in the UE registryMC.fill(HIST("antiproton_gen_ue"), protonVec.Pt()); } From ff0069bcf4290344f3f9e12ce88256c77897a4ac Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Sun, 24 Aug 2025 23:52:06 +0200 Subject: [PATCH 4/4] fixed linter --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index 739c989491e..3cb75e35c62 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -1467,8 +1467,8 @@ struct AntinucleiInJets { double px = particle.px(); double py = particle.py(); double pz = particle.pz(); - double E = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); - double y = 0.5 * std::log((E + pz) / (E - pz)); + double energy = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); + double y = 0.5 * std::log((energy + pz) / (energy - pz)); registryMC.fill(HIST("antiproton_y_phi_jet"), y, getDeltaPhi(particle.phi(), jet.phi())); // Fill histogram for generated antiprotons @@ -1507,8 +1507,8 @@ struct AntinucleiInJets { double px = protonVec.Px(); double py = protonVec.Py(); double pz = protonVec.Pz(); - double E = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); - double y = 0.5 * std::log((E + pz) / (E - pz)); + double energy = std::sqrt(MassProton * MassProton + px * px + py * py + pz * pz); + double y = 0.5 * std::log((energy + pz) / (energy - pz)); if (deltaRUe1 < maxConeRadius) { registryMC.fill(HIST("antiproton_y_phi_ue"), y, getDeltaPhi(protonVec.Phi(), ueAxis1.Phi()));