From 2ba8924be65537f9c0f0fe8068017c5828feb765 Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Fri, 4 Dec 2026 13:00:18 -0600 Subject: [PATCH] Signal for events with FT0 info --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 44 +++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index 8ccec57d4ff..906a9762c01 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -369,8 +369,8 @@ struct PiKpRAA { const AxisSpec axisPt{binsPt, "#it{p}_{T} (GeV/#it{c})"}; const AxisSpec axisPtV0s{binsPtV0s, "#it{p}_{T} (GeV/#it{c})"}; const AxisSpec axisCent{binsCent, "Centrality Perc."}; - const auto latexEta = std::vector(vecLatexEta); - const auto endingEta = std::vector(vecEndingEta); + const auto latexEta = (std::vector)vecLatexEta; + const auto endingEta = (std::vector)vecEndingEta; registry.add("EventCounter", ";;Events", kTH1F, {axisEvent}); registry.add("HasBCVsFT0VsTVXVsEvSel", "Alls=1 | BC=2 | FT0=3 | TVX=4 | EvSel=5;;", kTH1F, {{5, 0.5, 5.5}}); @@ -593,11 +593,19 @@ struct PiKpRAA { registry.add("PtKaVsNchMCFwd_HasFT0AndTVX", "Gen Evts W/at leas One Rec. Coll + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); registry.add("PtPrVsNchMCFwd_HasFT0AndTVX", "Gen Evts W/at leas One Rec. Coll + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtPiVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtKaVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtPrVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + // DENOMITOR OF THE SIGNAL LOSS. USES ALL THE RECONSTRUCTED COLLISIONS EVENT IF RECONSTRUCTED MULTIPLE TIMES (A LA PI0) registry.add("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); registry.add("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); registry.add("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtPiVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtKaVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + registry.add("PtPrVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch}); + // ======================================= // NUMERATOR OF THE SIGNAL LOSS. BASED ONLY ON THE COLLISION WITH THE LARGEST NUMBER OF CONTRIBUTORS TO PV @@ -693,8 +701,8 @@ struct PiKpRAA { LOG(info) << "\tdcaSelectionsLoaded=" << cfgDCA.dcaSelectionsLoaded; } - auto vecLowEtaSel = std::vector(vecLowEta); - auto vecUpEtaSel = std::vector(vecUpEta); + auto vecLowEtaSel = (std::vector)vecLowEta; + auto vecUpEtaSel = (std::vector)vecUpEta; LOGF(info, "vecLowEta: %s", printArray(vecLowEtaSel).c_str()); LOGF(info, "vecUpEta: %s", printArray(vecUpEtaSel).c_str()); LOGF(info, "vecEndingEta: %s", printArray(endingEta).c_str()); @@ -707,8 +715,8 @@ struct PiKpRAA { // Table's size: " << collisions.tableSize() << "\n"; // LOG(info) << "Run number: " << foundBC.runNumber() << "\n"; - const auto& kLowEta = std::vector(vecLowEta); - const auto& kHighEta = std::vector(vecUpEta); + const auto& kLowEta = (std::vector)vecLowEta; + const auto& kHighEta = (std::vector)vecUpEta; const auto& foundBC = collision.foundBC_as(); const uint64_t timeStamp{foundBC.timestamp()}; @@ -1299,8 +1307,8 @@ struct PiKpRAA { void processSignalLoss(aod::McCollisions::iterator const& mccollision, soa::SmallGroups const& collisions, BCsRun3 const& /*bcs*/, aod::FT0s const& /*ft0s*/, aod::McParticles const& mcParticles, TracksMC const& tracksMC) { - const auto& kLowEta = std::vector(vecLowEta); - const auto& kHighEta = std::vector(vecUpEta); + const auto& kLowEta = (std::vector)vecLowEta; + const auto& kHighEta = (std::vector)vecUpEta; registry.fill(HIST("EventCounterMC"), 0.5); //--------------------------- @@ -1540,11 +1548,13 @@ struct PiKpRAA { bool hasft0{false}; bool hastvx{false}; bool hasBcFT0TVX{false}; + bool hasBcFT0{false}; hasbc = collision.has_foundBC(); hasft0 = collision.has_foundFT0(); hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); hasBcFT0TVX = (hasbc && hasft0 && hastvx); + hasBcFT0 = (hasbc && hasft0); if (hasBcFT0TVX) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS @@ -1605,6 +1615,12 @@ struct PiKpRAA { // TO COMPUTE SIGNAL LOSS RELATIVE TO THE MC SIGNAL OF EVENTS WITH FT0 INFO + TVX-TRIGGERED if (particle.pdgCode() == PDG_t::kPiPlus || particle.pdgCode() == PDG_t::kPiMinus) { + if (hasBcFT0) { + registry.fill(HIST("PtPiVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtPiVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward); + } + } if (hasBcFT0TVX) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); @@ -1614,6 +1630,12 @@ struct PiKpRAA { } } } else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) { + if (hasBcFT0) { + registry.fill(HIST("PtKaVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtKaVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward); + } + } if (hasBcFT0TVX) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); @@ -1623,6 +1645,12 @@ struct PiKpRAA { } } } else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) { + if (hasBcFT0) { + registry.fill(HIST("PtPrVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtPrVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward); + } + } if (hasBcFT0TVX) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);