From 3d92b73a5c67869495137c842cfeaba7296dc437 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 26 May 2026 18:41:42 +0200 Subject: [PATCH] CTP: avoid useless work to count non-zero bits --- Common/CCDB/ctpRateFetcher.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Common/CCDB/ctpRateFetcher.cxx b/Common/CCDB/ctpRateFetcher.cxx index 6cf7213f2e7..eb5fcc38f3e 100644 --- a/Common/CCDB/ctpRateFetcher.cxx +++ b/Common/CCDB/ctpRateFetcher.cxx @@ -95,9 +95,7 @@ double ctpRateFetcher::pileUpCorrection(double triggerRate) if (mLHCIFdata == nullptr) { LOG(fatal) << "No filling" << std::endl; } - auto bfilling = mLHCIFdata->getBunchFilling(); - std::vector bcs = bfilling.getFilledBCs(); - double nbc = bcs.size(); + double nbc = mLHCIFdata->getBunchFilling().getPattern().count(); double nTriggersPerFilledBC = triggerRate / nbc / constants::lhc::LHCRevFreq; double mu = -std::log(1 - nTriggersPerFilledBC); return mu * nbc * constants::lhc::LHCRevFreq;