19 MuxHToutputs::MuxHToutputs(
const Settings* settings)
20 : settings_(settings),
21 muxOutputsHT_(static_cast<
MuxAlgoName>(settings_->muxOutputsHT())),
22 numPhiNonants_(settings_->numPhiNonants()),
23 numPhiSectors_(settings_->numPhiSectors()),
24 numPhiSecPerNon_(numPhiSectors_ / numPhiNonants_),
25 numEtaRegions_(settings_->numEtaRegions()),
26 busySectorKill_(settings_->busySectorKill()),
27 busySectorNumStubs_(settings_->busySectorNumStubs()),
28 busySectorMbinRanges_(
29 settings_->busySectorMbinRanges()),
30 busySectorUseMbinRanges_(not busySectorMbinRanges_.
empty())
35 <<
"MuxHToutputs: Number of phi sectors is not a multiple of number of nonants!";
38 throw cms::Exception(
"BadConfig") <<
"MuxHToutputs: The implemented MUX algorithm requires you to be using the "
39 "busySectorMbinRanges cfg option!";
44 std::stringstream
text;
46 <<
" pairs of opto-links per nonant.";
47 static std::once_flag printOnce;
64 for (
unsigned int iPhiNon = 0; iPhiNon <
numPhiNonants_; iPhiNon++) {
67 for (
unsigned int iSecInNon = 0; iSecInNon <
numPhiSecPerNon_; iSecInNon++) {
70 for (
unsigned int iEtaReg = 0; iEtaReg <
numEtaRegions_; iEtaReg++) {
71 HTrphi* htRphi = mHtRphis(iPhiSec, iEtaReg).get();
73 list<L1track2D> keptTracks;
78 unsigned int nStubs = trkTmp.
numStubs();
81 unsigned int link = this->
linkID(iSecInNon, iEtaReg, mBinRange);
85 numStubsPerLink[
link] += nStubs;
91 keptTracks.push_back(trkTmp);
107 throw cms::Exception(
"BadConfig") <<
"MuxHToutputs: Unknown MuxOutputsHT configuration option!";
114 unsigned int MuxHToutputs::linkID(
unsigned int iSecInNon,
unsigned int iEtaReg,
unsigned int mBinRange)
const {
124 throw cms::Exception(
"BadConfig") <<
"MuxHToutputs: Unknown MuxOutputsHT configuration option!";
128 throw cms::Exception(
"LogicError") <<
"MuxHToutputs: Calculated link ID exceeded expected number of links! "
138 <<
"MuxHToutputs: Number of sectors per phi nonant is not a multiple of muxFactor().";
141 for (
unsigned int iSecInNon = 0; iSecInNon <
numPhiSecPerNon_; iSecInNon++) {
142 for (
unsigned int iEtaReg = 0; iEtaReg <
numEtaRegions_; iEtaReg++) {
145 unsigned int link = this->
linkID(iSecInNon, iEtaReg, mBinRange);
146 nObsElementsPerLink[
link] += 1;