From d462961f32f239f4235b89b9290278677ce73a85 Mon Sep 17 00:00:00 2001 From: lorber98 <95907752+lorber98@users.noreply.github.com> Date: Wed, 23 Sep 2026 13:36:19 +0200 Subject: [PATCH 1/3] Fix MB histograms filling for cascade in MC reco --- .../Tasks/Strangeness/strangenessInJetsIons.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx index 4542d3ed6ce..f9904b6cf2d 100644 --- a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx +++ b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx @@ -1582,7 +1582,7 @@ struct StrangenessInJetsIons { } break; case kXiMinus: - if (particleOfInterestDict[ParticleOfInterest::kCascades] || calculateFeeddownMatrix) { + if (particleOfInterestDict[ParticleOfInterest::kCascades]) { registryMC.fill(HIST("XiNeg_generated_MB"), genMultiplicity, particle.pt()); if (hasReco) { registryMC.fill(HIST("XiNeg_generated_w_reco_MB"), genMultiplicity, particle.pt()); @@ -1775,30 +1775,30 @@ struct StrangenessInJetsIons { continue; if (std::abs(motherPos.pdgCode()) != kLambda0) continue; - if (std::abs(motherPos.eta()) > 0.8) + if (std::abs(motherBach.eta()) > 0.8) continue; // Xi+ if (passedXiSelection(casc, pos, neg, bach, collision) && bach.sign() > 0 && - motherPos.pdgCode() == kXiPlusBar && + motherBach.pdgCode() == kXiPlusBar && passedRapidityCut(casc.yXi(), configV0.rapidityMax)) { registryMC.fill(HIST("XiPos_reconstructed_MB_incl"), multiplicity, casc.pt()); } // Xi- if (passedXiSelection(casc, pos, neg, bach, collision) && bach.sign() < 0 && - motherPos.pdgCode() == kXiMinus && + motherBach.pdgCode() == kXiMinus && passedRapidityCut(casc.yXi(), configV0.rapidityMax)) { registryMC.fill(HIST("XiNeg_reconstructed_MB_incl"), multiplicity, casc.pt()); } // Omega+ if (passedOmegaSelection(casc, pos, neg, bach, collision) && bach.sign() > 0 && - motherPos.pdgCode() == kOmegaPlusBar && + motherBach.pdgCode() == kOmegaPlusBar && passedRapidityCut(casc.yOmega(), configV0.rapidityMax)) { registryMC.fill(HIST("OmegaPos_reconstructed_MB_incl"), multiplicity, casc.pt()); } // Omega- if (passedOmegaSelection(casc, pos, neg, bach, collision) && bach.sign() < 0 && - motherPos.pdgCode() == kOmegaMinus && + motherBach.pdgCode() == kOmegaMinus && passedRapidityCut(casc.yOmega(), configV0.rapidityMax)) { registryMC.fill(HIST("OmegaNeg_reconstructed_MB_incl"), multiplicity, casc.pt()); } @@ -1807,11 +1807,11 @@ struct StrangenessInJetsIons { continue; // Rapidity generated particle - double yGen = motherPos.y(); + double yGen = motherBach.y(); // Histograms below are filled only for PhysicalPrimary particles // Xi+ (primary) - if (motherPos.pdgCode() == kXiPlusBar) { + if (motherBach.pdgCode() == kXiPlusBar) { if (passedRapidityCut(yGen, configV0.rapidityMax)) { registryMC.fill(HIST("XiPos_gen_recoEvent_MB"), multiplicity, casc.pt()); } From a4b8e49856f1421b31729f1ef72f20ec8958624f Mon Sep 17 00:00:00 2001 From: lorber98 <95907752+lorber98@users.noreply.github.com> Date: Wed, 23 Sep 2026 14:01:59 +0200 Subject: [PATCH 2/3] Fix fill of Xi MB histograms in MC gen --- PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx index f9904b6cf2d..f7184d13713 100644 --- a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx +++ b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx @@ -1582,9 +1582,9 @@ struct StrangenessInJetsIons { } break; case kXiMinus: - if (particleOfInterestDict[ParticleOfInterest::kCascades]) { + if (particleOfInterestDict[ParticleOfInterest::kCascades] || calculateFeeddownMatrix) { registryMC.fill(HIST("XiNeg_generated_MB"), genMultiplicity, particle.pt()); - if (hasReco) { + if (hasReco && particleOfInterestDict[ParticleOfInterest::kCascades]) { registryMC.fill(HIST("XiNeg_generated_w_reco_MB"), genMultiplicity, particle.pt()); } } @@ -1592,7 +1592,7 @@ struct StrangenessInJetsIons { case kXiPlusBar: if (particleOfInterestDict[ParticleOfInterest::kCascades] || calculateFeeddownMatrix) { registryMC.fill(HIST("XiPos_generated_MB"), genMultiplicity, particle.pt()); - if (hasReco) { + if (hasReco && particleOfInterestDict[ParticleOfInterest::kCascades]) { registryMC.fill(HIST("XiPos_generated_w_reco_MB"), genMultiplicity, particle.pt()); } } From 61167d884c9c37b2397a0c617640602b28fda9be Mon Sep 17 00:00:00 2001 From: lorber98 <95907752+lorber98@users.noreply.github.com> Date: Wed, 23 Sep 2026 14:09:11 +0200 Subject: [PATCH 3/3] Refactoring fill of Xi MB histograms in MC gen --- PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx index f7184d13713..47769cced1e 100644 --- a/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx +++ b/PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx @@ -1584,17 +1584,17 @@ struct StrangenessInJetsIons { case kXiMinus: if (particleOfInterestDict[ParticleOfInterest::kCascades] || calculateFeeddownMatrix) { registryMC.fill(HIST("XiNeg_generated_MB"), genMultiplicity, particle.pt()); - if (hasReco && particleOfInterestDict[ParticleOfInterest::kCascades]) { - registryMC.fill(HIST("XiNeg_generated_w_reco_MB"), genMultiplicity, particle.pt()); - } + } + if (particleOfInterestDict[ParticleOfInterest::kCascades] && hasReco) { + registryMC.fill(HIST("XiNeg_generated_w_reco_MB"), genMultiplicity, particle.pt()); } break; case kXiPlusBar: if (particleOfInterestDict[ParticleOfInterest::kCascades] || calculateFeeddownMatrix) { registryMC.fill(HIST("XiPos_generated_MB"), genMultiplicity, particle.pt()); - if (hasReco && particleOfInterestDict[ParticleOfInterest::kCascades]) { - registryMC.fill(HIST("XiPos_generated_w_reco_MB"), genMultiplicity, particle.pt()); - } + } + if (particleOfInterestDict[ParticleOfInterest::kCascades] && hasReco) { + registryMC.fill(HIST("XiPos_generated_w_reco_MB"), genMultiplicity, particle.pt()); } break; case kOmegaMinus: