From 542677d6ed7210fbdb0b8c0e47fc2f9e97956aff Mon Sep 17 00:00:00 2001 From: Florian Jonas Date: Thu, 19 Feb 2026 13:31:46 +0100 Subject: [PATCH 1/2] [EMCAL] fix zorro event selection in emc correction framework --- PWGJE/TableProducer/emcalCorrectionTask.cxx | 75 +++++++++------------ 1 file changed, 33 insertions(+), 42 deletions(-) diff --git a/PWGJE/TableProducer/emcalCorrectionTask.cxx b/PWGJE/TableProducer/emcalCorrectionTask.cxx index 3a6f22ef2ba..4efc1eb885b 100644 --- a/PWGJE/TableProducer/emcalCorrectionTask.cxx +++ b/PWGJE/TableProducer/emcalCorrectionTask.cxx @@ -410,11 +410,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(bc.globalBC())) { - continue; - } - } // get run number runNumber = bc.runNumber(); @@ -441,6 +436,14 @@ struct EmcalCorrectionTask { } // Counters for BCs with matched collisions countBC(collisionsInFoundBC.size(), true); + + // do not do the next part if we do not fulfill the software trigger selection + if (applySoftwareTriggerSelection) { + if (!zorro.isSelected(bc.globalBC())) { + continue; + } + } + std::vector cellsBC; std::vector cellIndicesBC; for (const auto& cell : cellsInBC) { @@ -525,12 +528,8 @@ struct EmcalCorrectionTask { } // end of bc loop // Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC) + // NOTE: we can not do zorro selection here since emcalcollisionmatch needs to alway be filled to be joinable with collision table for (const auto& collision : collisions) { - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(collision.foundBC_as().globalBC())) { - continue; - } - } auto globalbcid = collision.foundBC_as().globalIndex(); auto foundColls = numberCollsInBC.find(globalbcid); auto foundCells = numberCellsInBC.find(globalbcid); @@ -559,11 +558,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(bc.globalBC())) { - continue; - } - } // get run number runNumber = bc.runNumber(); @@ -590,6 +584,14 @@ struct EmcalCorrectionTask { } // Counters for BCs with matched collisions countBC(collisionsInFoundBC.size(), true); + + // do not do the next part if we do not fulfill the software trigger selection + if (applySoftwareTriggerSelection) { + if (!zorro.isSelected(bc.globalBC())) { + continue; + } + } + std::vector cellsBC; std::vector cellIndicesBC; for (const auto& cell : cellsInBC) { @@ -678,12 +680,8 @@ struct EmcalCorrectionTask { } // end of bc loop // Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC) + // NOTE: we can not do zorro selection here since emcalcollisionmatch needs to alway be filled to be joinable with collision table for (const auto& collision : collisions) { - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(collision.foundBC_as().globalBC())) { - continue; - } - } auto globalbcid = collision.foundBC_as().globalIndex(); auto foundColls = numberCollsInBC.find(globalbcid); auto foundCells = numberCellsInBC.find(globalbcid); @@ -714,12 +712,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(bc.globalBC())) { - continue; - } - } - // get run number runNumber = bc.runNumber(); @@ -737,6 +729,14 @@ struct EmcalCorrectionTask { } // Counters for BCs with matched collisions countBC(collisionsInFoundBC.size(), true); + + // do not do the next part if we do not fulfill the software trigger selection + if (applySoftwareTriggerSelection) { + if (!zorro.isSelected(bc.globalBC())) { + continue; + } + } + std::vector cellsBC; std::vector cellIndicesBC; std::vector cellLabels; @@ -860,11 +860,6 @@ struct EmcalCorrectionTask { // Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC) for (const auto& collision : collisions) { - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(collision.foundBC_as().globalBC())) { - continue; - } - } auto globalbcid = collision.foundBC_as().globalIndex(); auto foundColls = numberCollsInBC.find(globalbcid); auto foundCells = numberCellsInBC.find(globalbcid); @@ -895,12 +890,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(bc.globalBC())) { - continue; - } - } - // get run number runNumber = bc.runNumber(); @@ -918,6 +907,13 @@ struct EmcalCorrectionTask { } // Counters for BCs with matched collisions countBC(collisionsInFoundBC.size(), true); + + if (applySoftwareTriggerSelection) { + if (!zorro.isSelected(bc.globalBC())) { + continue; + } + } + std::vector cellsBC; std::vector cellIndicesBC; std::vector cellLabels; @@ -1045,11 +1041,6 @@ struct EmcalCorrectionTask { // Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC) for (const auto& collision : collisions) { - if (applySoftwareTriggerSelection) { - if (!zorro.isSelected(collision.foundBC_as().globalBC())) { - continue; - } - } auto globalbcid = collision.foundBC_as().globalIndex(); auto foundColls = numberCollsInBC.find(globalbcid); auto foundCells = numberCellsInBC.find(globalbcid); From 987cb2df3929dfe5077810cbb974753a6a937a3f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 19 Feb 2026 12:47:11 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGJE/TableProducer/emcalCorrectionTask.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGJE/TableProducer/emcalCorrectionTask.cxx b/PWGJE/TableProducer/emcalCorrectionTask.cxx index 4efc1eb885b..3b7c919b7e2 100644 --- a/PWGJE/TableProducer/emcalCorrectionTask.cxx +++ b/PWGJE/TableProducer/emcalCorrectionTask.cxx @@ -410,7 +410,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - // get run number runNumber = bc.runNumber(); @@ -558,7 +557,6 @@ struct EmcalCorrectionTask { initZorroCCDB(bc); - // get run number runNumber = bc.runNumber();