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;
unsigned int numEtaRegions_
unsigned int numStubs() const override
void setOptoLinkID(unsigned int linkID)
void exec(Array2D< std::unique_ptr< HTrphi >> &mHtRphis) const
unsigned int busySectorNumStubs_
std::vector< unsigned int > busySectorMbinRanges_
unsigned int numLinksPerNonant() const
unsigned int numPhiNonants_
bool busySectorUseMbinRanges_
unsigned int numPhiSecPerNon_
unsigned int muxFactor() const
auto const & tracks
cannot be loose
=== This is the base class for the linearised chi-squared track fit algorithms.
virtual void replaceTrackCands2D(const std::list< L1track2D > &newTracks)
virtual const std::list< L1track2D > & trackCands2D() const
unsigned int getMbinRange(const L1track2D &trk) const
unsigned int linkID(unsigned int iSecInNon, unsigned int iEtaReg, unsigned int mBinRange) const
unsigned int numPhiSectors_
const Settings * settings_
MuxAlgoName muxOutputsHT_