Skip to content

Commit d5c009f

Browse files
authored
[Common] CTP: avoid useless work to count non-zero bits (#16400)
1 parent 851162d commit d5c009f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Common/CCDB/ctpRateFetcher.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ double ctpRateFetcher::pileUpCorrection(double triggerRate)
9595
if (mLHCIFdata == nullptr) {
9696
LOG(fatal) << "No filling" << std::endl;
9797
}
98-
auto bfilling = mLHCIFdata->getBunchFilling();
99-
std::vector<int> bcs = bfilling.getFilledBCs();
100-
double nbc = bcs.size();
98+
double nbc = mLHCIFdata->getBunchFilling().getPattern().count();
10199
double nTriggersPerFilledBC = triggerRate / nbc / constants::lhc::LHCRevFreq;
102100
double mu = -std::log(1 - nTriggersPerFilledBC);
103101
return mu * nbc * constants::lhc::LHCRevFreq;

0 commit comments

Comments
 (0)