From 13e2181695b5d2c7037d6fd61297585d860a0686 Mon Sep 17 00:00:00 2001 From: Lucia Anna Tarasovicova Date: Mon, 13 Oct 2025 08:43:53 +0200 Subject: [PATCH] mult dep efficiency --- .../Tasks/Strangeness/hStrangeCorrelation.cxx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx b/PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx index 42297eb61e3..dbf2957a7ed 100644 --- a/PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx +++ b/PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx @@ -1409,9 +1409,9 @@ struct HStrangeCorrelation { // MC generated plots if (doprocessMCGenerated) { - histos.add("Generated/hTrigger", "", kTH2F, {axesConfigurations.axisPtQA, axesConfigurations.axisEta}); + histos.add("Generated/hTrigger", "", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisEta, axesConfigurations.axisMult}); for (int i = 0; i < 9; i++) { - histos.add(fmt::format("Generated/h{}", kParticlenames[i]).c_str(), "", kTH2F, {axesConfigurations.axisPtQA, axesConfigurations.axisEta}); + histos.add(fmt::format("Generated/h{}", kParticlenames[i]).c_str(), "", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisEta, axesConfigurations.axisMult}); } histos.addClone("Generated/", "GeneratedWithPV/"); @@ -1690,7 +1690,7 @@ struct HStrangeCorrelation { efficiency = 1; } float weight = efficiencyFlags.applyEfficiencyCorrection ? purity / efficiency : 1.0f; - histos.fill(HIST("hAssocHadronsAllSelectedEtaVsPt"), assoc.pt(), assoc.eta(), collision.centFT0M()); + histos.fill(HIST("hAssocHadronsAllSelectedEtaVsPt"), assoc.pt(), assoc.eta(), collision.centFT0M(), weight); histos.fill(HIST("hAssocPtResolution"), assoc.pt(), assocTrack.mcOriginalPt()); if (doAssocPhysicalPrimary && !assocTrack.mcPhysicalPrimary()) continue; @@ -2172,10 +2172,10 @@ struct HStrangeCorrelation { constexpr int Index = i.value; if (i == 0 || i == 7) { if (std::abs(mcParticle.pdgCode()) == kPdgCodes[i]) - histos.fill(HIST("Generated/h") + HIST(kParticlenames[Index]), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/h") + HIST(kParticlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1); } else { if (mcParticle.pdgCode() == kPdgCodes[i]) - histos.fill(HIST("Generated/h") + HIST(kParticlenames[Index]), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/h") + HIST(kParticlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1); } }); } @@ -2265,7 +2265,7 @@ struct HStrangeCorrelation { double geta = mcParticle.eta(); double gpt = mcParticle.pt(); if (std::abs(mcParticle.pdgCode()) == PDG_t::kPiPlus || std::abs(mcParticle.pdgCode()) == PDG_t::kKPlus || std::abs(mcParticle.pdgCode()) == PDG_t::kProton || std::abs(mcParticle.pdgCode()) == PDG_t::kElectron || std::abs(mcParticle.pdgCode()) == PDG_t::kMuonMinus) - histos.fill(HIST("GeneratedWithPV/hTrigger"), gpt, geta); + histos.fill(HIST("GeneratedWithPV/hTrigger"), gpt, geta, bestCollisionFT0Mpercentile); if (mcParticle.pdgCode() == PDG_t::kLambda0 && !doAssocPhysicalPrimaryInGen && !mcParticle.isPhysicalPrimary()) { if (std::abs(geta) > etaSel) { continue; @@ -2311,14 +2311,14 @@ struct HStrangeCorrelation { constexpr int Index = i.value; if (i == 0 || i == 7) { if (std::abs(mcParticle.pdgCode()) == kPdgCodes[i]) { - histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]), gpt, geta); + histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]), gpt, geta, bestCollisionFT0Mpercentile); if (std::abs(mcParticle.y()) < ySel) histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]) + HIST("_MidYVsMult"), gpt, bestCollisionFT0Mpercentile); } } else { if (mcParticle.pdgCode() == kPdgCodes[i]) { - histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]), gpt, geta); + histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]), gpt, geta, bestCollisionFT0Mpercentile); if (std::abs(mcParticle.y()) < ySel) histos.fill(HIST("GeneratedWithPV/h") + HIST(kParticlenames[Index]) + HIST("_MidYVsMult"), gpt, bestCollisionFT0Mpercentile); } @@ -2432,7 +2432,9 @@ struct HStrangeCorrelation { if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) { triggerIndices.emplace_back(iteratorNum); histos.fill(HIST("ClosureTest/hTrigger"), gpt, geta, bestCollisionFT0Mpercentile); - if (doCorrelationHadron) { + } + if (doCorrelationHadron) { + if (!doAssocPhysicalPrimary || mcParticle.isPhysicalPrimary()) { assocHadronIndices.emplace_back(iteratorNum); histos.fill(HIST("ClosureTest/hHadron"), gpt, geta, gphi); }