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;
63 for (
unsigned int iPhiNon = 0; iPhiNon <
numPhiNonants_; iPhiNon++) {
66 for (
unsigned int iSecInNon = 0; iSecInNon <
numPhiSecPerNon_; iSecInNon++) {
69 for (
unsigned int iEtaReg = 0; iEtaReg <
numEtaRegions_; iEtaReg++) {
70 HTrphi* htRphi = mHtRphis(iPhiSec, iEtaReg).get();
72 list<L1track2D> keptTracks;
77 unsigned int nStubs = trkTmp.
numStubs();
80 unsigned int link = this->
linkID(iSecInNon, iEtaReg, mBinRange);
84 numStubsPerLink[link] += nStubs;
90 keptTracks.push_back(trkTmp);
106 throw cms::Exception(
"BadConfig") <<
"MuxHToutputs: Unknown MuxOutputsHT configuration option!";
113 unsigned int MuxHToutputs::linkID(
unsigned int iSecInNon,
unsigned int iEtaReg,
unsigned int mBinRange)
const {
123 throw cms::Exception(
"BadConfig") <<
"MuxHToutputs: Unknown MuxOutputsHT configuration option!";
127 throw cms::Exception(
"LogicError") <<
"MuxHToutputs: Calculated link ID exceeded expected number of links! " 137 <<
"MuxHToutputs: Number of sectors per phi nonant is not a multiple of muxFactor().";
140 for (
unsigned int iSecInNon = 0; iSecInNon <
numPhiSecPerNon_; iSecInNon++) {
141 for (
unsigned int iEtaReg = 0; iEtaReg <
numEtaRegions_; iEtaReg++) {
144 unsigned int link = this->
linkID(iSecInNon, iEtaReg, mBinRange);
145 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
=== 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_