From 1d58e66dfc7eae74feb7c4c0d367ba3998b74dac Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Wed, 21 Oct 2026 13:49:54 -0600 Subject: [PATCH 1/5] Fixed bug:Using isBestCollIndex instead of bestCollisionIndex --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index 16edb8c98be..c9ffad92b91 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -1542,12 +1542,12 @@ struct PiKpRAA { hasbc = collision.has_foundBC(); hasft0 = collision.has_foundFT0(); hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); - hasBcFT0TVX = hasbc && hasft0 && hastvx; + hasBcFT0TVX = (hasbc && hasft0 && hastvx); if (hasBcFT0TVX) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc); - if (hasBcFT0TVX && bestCollisionIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); } } From 2b50f1407c891b0ec7157ed00c3d3e9e06a24531 Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Wed, 21 Oct 2026 14:09:11 -0600 Subject: [PATCH 2/5] Fixed bug:Using isBestCollIndex instead of bestCollisionIndex --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index c9ffad92b91..c960e143f65 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -1537,23 +1537,21 @@ struct PiKpRAA { bool hasbc{false}; bool hasft0{false}; bool hastvx{false}; - bool hasBcFT0TVX{false}; hasbc = collision.has_foundBC(); hasft0 = collision.has_foundFT0(); hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); - hasBcFT0TVX = (hasbc && hasft0 && hastvx); - if (hasBcFT0TVX) { + if (hasbc && hasft0 && hastvx) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc); - if (hasBcFT0TVX && isBestCollIndex) { + if (hasbc && hasft0 && hastvx && isBestCollIndex) { registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); } } // TVX-triggered + bestCollisionIndex - if (hasBcFT0TVX && isBestCollIndex) { + if (hasbc && hasft0 && hastvx && isBestCollIndex) { registry.fill(HIST("EventCounterMC"), 4.5); } @@ -1602,28 +1600,28 @@ 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 (hasBcFT0TVX) { + if (hasbc && hasft0 && hastvx) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { + if (hasbc && hasft0 && hastvx && isBestCollIndex) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } } else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) { - if (hasBcFT0TVX) { + if (hasbc && hasft0 && hastvx) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { + if (hasbc && hasft0 && hastvx && isBestCollIndex) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } } else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) { - if (hasBcFT0TVX) { + if (hasbc && hasft0 && hastvx) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { + if (hasbc && hasft0 && hastvx && isBestCollIndex) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } From ff7ea461ac272a78eeaa8e7bc878fffca078a805 Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Wed, 21 Oct 2026 14:24:35 -0600 Subject: [PATCH 3/5] Fixed bug:Using isBestCollIndex instead of bestCollisionIndex --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index c960e143f65..c9ffad92b91 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -1537,21 +1537,23 @@ struct PiKpRAA { bool hasbc{false}; bool hasft0{false}; bool hastvx{false}; + bool hasBcFT0TVX{false}; hasbc = collision.has_foundBC(); hasft0 = collision.has_foundFT0(); hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); + hasBcFT0TVX = (hasbc && hasft0 && hastvx); - if (hasbc && hasft0 && hastvx) { + if (hasBcFT0TVX) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc); - if (hasbc && hasft0 && hastvx && isBestCollIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); } } // TVX-triggered + bestCollisionIndex - if (hasbc && hasft0 && hastvx && isBestCollIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("EventCounterMC"), 4.5); } @@ -1600,28 +1602,28 @@ 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 (hasbc && hasft0 && hastvx) { + if (hasBcFT0TVX) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasbc && hasft0 && hastvx && isBestCollIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } } else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) { - if (hasbc && hasft0 && hastvx) { + if (hasBcFT0TVX) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasbc && hasft0 && hastvx && isBestCollIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } } else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) { - if (hasbc && hasft0 && hastvx) { + if (hasBcFT0TVX) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasbc && hasft0 && hastvx && isBestCollIndex) { + if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } From d55754a2fa93419d8503187575e8b2029db41d16 Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Wed, 21 Oct 2026 14:43:29 -0600 Subject: [PATCH 4/5] Fixed bug:Using isBestCollIndex instead of bestCollisionIndex --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index c9ffad92b91..2d93a29c67a 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -1547,14 +1547,13 @@ struct PiKpRAA { if (hasBcFT0TVX) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc); - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); - } } // TVX-triggered + bestCollisionIndex if (hasBcFT0TVX && isBestCollIndex) { registry.fill(HIST("EventCounterMC"), 4.5); + // NUMERATOR/DENOMINATOR OF THE EVENT LOSS + registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); } //--------------------------- @@ -1605,28 +1604,28 @@ struct PiKpRAA { if (hasBcFT0TVX) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); - } + } + if (hasBcFT0TVX && isBestCollIndex) { + registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) { if (hasBcFT0TVX) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); - } + } + if (hasBcFT0TVX && isBestCollIndex) { + registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) { if (hasBcFT0TVX) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); - } + } + if (hasBcFT0TVX && isBestCollIndex) { + registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); } } else { continue; From 68e8822230aad888a5c2f1bbd97505b34b81fa27 Mon Sep 17 00:00:00 2001 From: Omar Vazquez Rueda Date: Wed, 21 Oct 2026 15:01:59 -0600 Subject: [PATCH 5/5] Fix bug: Using isBestCollIndex instead of bestCollisionIndex --- PWGLF/Tasks/Nuspex/piKpRAA.cxx | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/piKpRAA.cxx b/PWGLF/Tasks/Nuspex/piKpRAA.cxx index 2d93a29c67a..c45074ecae0 100644 --- a/PWGLF/Tasks/Nuspex/piKpRAA.cxx +++ b/PWGLF/Tasks/Nuspex/piKpRAA.cxx @@ -1547,13 +1547,13 @@ struct PiKpRAA { if (hasBcFT0TVX) { // NUMERATOR/DENOMINATOR OF THE EVENT LOSS registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc); - } - // TVX-triggered + bestCollisionIndex - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("EventCounterMC"), 4.5); - // NUMERATOR/DENOMINATOR OF THE EVENT LOSS - registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); + // TVX-triggered + bestCollisionIndex + if (isBestCollIndex) { + registry.fill(HIST("EventCounterMC"), 4.5); + // NUMERATOR/DENOMINATOR OF THE EVENT LOSS + registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc); + } } //--------------------------- @@ -1604,28 +1604,28 @@ struct PiKpRAA { if (hasBcFT0TVX) { registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - } - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + } } } else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) { if (hasBcFT0TVX) { registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - } - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + } } } else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) { if (hasBcFT0TVX) { registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc); registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward); - } - if (hasBcFT0TVX && isBestCollIndex) { - registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); - registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + if (isBestCollIndex) { + registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc); + registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward); + } } } else { continue;