From 92523cf1864bcdcdd12e8d308a76738fcfa6daa1 Mon Sep 17 00:00:00 2001 From: Marco Giacalone Date: Wed, 19 Nov 2025 16:10:00 +0100 Subject: [PATCH] Generalize IR setting --- Steer/src/CollisionContextTool.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Steer/src/CollisionContextTool.cxx b/Steer/src/CollisionContextTool.cxx index 6a2fca20afe76..5287e1ef32799 100644 --- a/Steer/src/CollisionContextTool.cxx +++ b/Steer/src/CollisionContextTool.cxx @@ -556,8 +556,10 @@ int main(int argc, char* argv[]) float sgnIRate = -1.; for (auto& p : ispecs) { prefixes.push_back(p.name); - if (p.name == "sgn") { - // Setting interaction rate in the digitizer context as provided by the O2DPG workflow + // Set the interaction rate from the first pattern with a valid value. + // This handles both simple signal-only productions (where "sgn" has the rate) + // and embedding productions (where "bkg" has the rate and "sgn" syncs to it) + if (sgnIRate < 0 && p.interactionRate > 0) { LOG(debug) << "Setting signal interaction rate to " << p.interactionRate << " Hz in the digitization context."; sgnIRate = p.interactionRate; digicontext.setDigitizerInteractionRate(p.interactionRate);