16 if (
pnodes_[nodeIdx].uparams_.size() != 4) {
20 for (
size_t i = 0;
i < 28; ++
i) {
40 if (
pnodes_[nodeIdx].uparams_.size() == 4) {
43 return std::bitset<28>();
48 if (
pnodes_[nodeIdx].uparams_.size() == 4) {
49 return std::bitset<12>(
pnodes_[nodeIdx].uparams_[tfIdx]);
51 return std::bitset<12>();
56 const size_t &startIdx,
57 const int &tfIdx)
const {
59 if (
pnodes_[nodeIdx].uparams_.size() == 4) {
60 for (
size_t i = 0;
i < 6; ++
i) {
73 pnodes_[nodeIdx].uparams_.resize(4);
74 for (
size_t i = 0;
i < 28; ++
i) {
89 pnodes_[nodeIdx].uparams_.resize(4);
90 for (
size_t i = 0;
i < 28; ++
i) {
97 const std::bitset<12> &inputFlags) {
98 pnodes_[nodeIdx].uparams_.resize(4);
99 for (
size_t i = 0;
i < 12; ++
i) {
105 const size_t &startIdx,
107 const std::bitset<6> &inputFlags) {
108 pnodes_[nodeIdx].uparams_.resize(4);
109 for (
size_t i = 0;
i < 6; ++
i) {
117 if (procId.empty()) {
119 if (procRoleMap.size() != 1) {
120 if (procRoleMap.empty()) {
121 edm::LogError(
"uGMT config from online") <<
"No processor id found for uGMT HW configuration.";
123 edm::LogError(
"uGMT config from online") <<
"More than one processor id found for uGMT HW configuration.";
126 procId = procRoleMap.cbegin()->first;
131 std::map<std::string, l1t::Parameter> settings = trgSys.
getParameters(procId.c_str());
142 if (settings.count(
"algoRev") > 0) {
143 fwVersion = settings[
"algoRev"].getValue<
unsigned int>();
147 std::stringstream
ss;
149 bool disableCaloInputs = settings[
"caloInputsDisable"].getValue<
bool>();
150 std::string bmtfInputsToDisableStr = settings[
"bmtfInputsToDisable"].getValueAsStr();
151 std::string omtfInputsToDisableStr = settings[
"omtfInputsToDisable"].getValueAsStr();
152 std::string emtfInputsToDisableStr = settings[
"emtfInputsToDisable"].getValueAsStr();
157 for (
unsigned i = 0;
i < 12; ++
i) {
159 ss <<
"BMTF" <<
i + 1;
160 if (bmtfInputsToDisableStr.find(
ss.str()) != std::string::npos) {
170 if (omtfInputsToDisableStr.find(
ss.str()) != std::string::npos) {
180 if (emtfInputsToDisableStr.find(
ss.str()) != std::string::npos) {
186 if (disableCaloInputs) {
192 std::bitset<12> bmtfDisables;
198 std::bitset<6> omtfpDisables;
199 std::bitset<6> omtfnDisables;
210 std::bitset<6> emtfpDisables;
211 std::bitset<6> emtfnDisables;
227 ss << std::setfill(
'0');
229 for (
unsigned i = 0;
i < 28; ++
i) {
231 ss <<
"inputPorts.CaloL2_" << std::setw(2) <<
i + 1;
233 if (!trgSys.
isMasked(procId.c_str(),
ss.str().c_str())) {
238 ss <<
"inputPorts.BMTF_" << std::setw(2) <<
i + 1;
239 if (trgSys.
isMasked(procId.c_str(),
ss.str().c_str())) {
243 ss <<
"inputPorts.OMTF";
245 ss <<
"+_" << std::setw(2) <<
i + 1;
247 ss <<
"-_" << std::setw(2) <<
i - 5;
249 if (trgSys.
isMasked(procId.c_str(),
ss.str().c_str())) {
253 ss <<
"inputPorts.EMTF";
255 ss <<
"+_" << std::setw(2) <<
i + 1;
257 ss <<
"-_" << std::setw(2) <<
i - 5;
259 if (trgSys.
isMasked(procId.c_str(),
ss.str().c_str())) {
264 ss << std::setfill(
' ');
273 std::bitset<12> bmtfMasked;
279 std::bitset<6> omtfpMasked;
280 std::bitset<6> omtfnMasked;
291 std::bitset<6> emtfpMasked;
292 std::bitset<6> emtfnMasked;
389 out <<
"L1 MicroGMT Parameters" << std::endl;
391 out <<
"Firmware version: " << this->
fwVersion() << std::endl;
394 out <<
" EMTF-|OMTF-| BMTF |OMTF+|EMTF+| CALO | res 0" << std::endl;
397 out <<
" EMTF-|OMTF-| BMTF |OMTF+|EMTF+| CALO | res 0" << std::endl;
399 out <<
"LUT paths (LUTs are generated analytically if path is empty)" << std::endl;
433 <<
", pT and quality factors (Used when LUT path empty): pT factor: " << this->
sortRankLUTPtFactor()
double bOPosMatchQualLUTfEtaCoarse() const
std::bitset< 12 > omtfInputsToDisable() const
std::string fwdPosSingleMatchQualLUTPath() const
void setFOPosMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
std::string idxSelMemPhiLUTPath() const
void setInputFlags(const int &nodeIdx, const std::bitset< 72 > &flags)
void setMaskedCaloInputs(const std::bitset< 28 > &masked)
void setIdxSelMemEtaLUT(const l1t::LUT &lut)
unsigned sortRankLUTPtFactor() const
void setOPhiExtrapolationLUT(const l1t::LUT &lut)
void setBEtaExtrapolationLUT(const l1t::LUT &lut)
void setFwdPosSingleMatchQualLUT(const l1t::LUT &lut)
void setBmtfInputsToDisable(const std::bitset< 12 > &disables)
std::bitset< 72 > maskedInputs() const
std::bitset< 12 > maskedOmtfInputs() const
void print(std::ostream &) const
std::string idxSelMemEtaLUTPath() const
std::bitset< 72 > inputsToDisable() const
void setFEtaExtrapolationLUT(const l1t::LUT &lut)
void setTfInputFlags(const int &nodeIdx, const int &tfIdx, const std::bitset< 12 > &flags)
void setFPhiExtrapolationLUT(const l1t::LUT &lut)
std::bitset< 72 > inputFlags(const int &nodeIdx) const
std::vector< Node > pnodes_
std::string oEtaExtrapolationLUTPath() const
std::string fOPosMatchQualLUTPath() const
double bONegMatchQualLUTfEta() const
void setOmtfpInputsToDisable(const std::bitset< 6 > &disables)
void setOEtaExtrapolationLUT(const l1t::LUT &lut)
std::string bONegMatchQualLUTPath() const
double fONegMatchQualLUTMaxDR() const
double bONegMatchQualLUTfEtaCoarse() const
Log< level::Error, false > LogError
double ovlPosSingleMatchQualLUTMaxDR() const
std::string fEtaExtrapolationLUTPath() const
std::bitset< 12 > emtfInputsToDisable() const
L1TMuonGlobalParamsHelper()
std::string relIsoCheckMemLUTPath() const
void setEOmtfInputFlags(const int &nodeIdx, const size_t &startIdx, const int &tfIdx, const std::bitset< 6 > &flags)
void setIdxSelMemPhiLUT(const l1t::LUT &lut)
const std::map< std::string, std::string > & getProcToRoleAssignment(void) const noexcept
void setBPhiExtrapolationLUT(const l1t::LUT &lut)
std::string bPhiExtrapolationLUTPath() const
bool isMasked(const char *proccessor, const char *id) const
void setFOPosMatchQualLUT(const l1t::LUT &lut)
void setBONegMatchQualLUT(const l1t::LUT &lut)
void setFwdPosSingleMatchQualLUTMaxDR(double maxDR, double fEta, double fPhi)
double bOPosMatchQualLUTfEta() const
double bONegMatchQualLUTfPhi() const
void setMaskedOmtfpInputs(const std::bitset< 6 > &masked)
const std::map< std::string, Parameter > & getParameters(const char *processor) const
void setCaloInputFlags(const int &nodeIdx, const std::bitset< 28 > &flags)
void setFONegMatchQualLUT(const l1t::LUT &lut)
std::bitset< 12 > maskedEmtfInputs() const
std::bitset< 28 > caloInputFlags(const int &nodeIdx) const
std::string ovlPosSingleMatchQualLUTPath() const
void loadFromOnline(l1t::TriggerSystem &trgSys, const std::string &processorId="")
std::string oPhiExtrapolationLUTPath() const
void setRelIsoCheckMemLUT(const l1t::LUT &lut)
std::string bOPosMatchQualLUTPath() const
double bONegMatchQualLUTMaxDR() const
void setEmtfnInputsToDisable(const std::bitset< 6 > &disables)
void setOvlPosSingleMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
unsigned sortRankLUTQualFactor() const
void setAbsIsoCheckMemLUT(const l1t::LUT &lut)
void setOvlPosSingleMatchQualLUT(const l1t::LUT &lut)
void setFwVersion(unsigned fwVersion)
std::bitset< 12 > tfInputFlags(const int &nodeIdx, const int &tfIdx) const
std::string fwdNegSingleMatchQualLUTPath() const
void setBOPosMatchQualLUT(const l1t::LUT &lut)
double fwdPosSingleMatchQualLUTMaxDR() const
l1t::LUT convertToLUT(const std::vector< uint64_t > &v, int padding=-1) noexcept
void setMaskedOmtfnInputs(const std::bitset< 6 > &masked)
void setCaloInputsToDisable(const std::bitset< 28 > &disables)
double fOPosMatchQualLUTMaxDR() const
std::string fPhiExtrapolationLUTPath() const
std::string absIsoCheckMemLUTPath() const
void setBOPosMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
std::string fONegMatchQualLUTPath() const
void setMaskedBmtfInputs(const std::bitset< 12 > &masked)
void setFONegMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
double fwdNegSingleMatchQualLUTMaxDR() const
std::string sortRankLUTPath() const
void setFwdNegSingleMatchQualLUT(const l1t::LUT &lut)
std::bitset< 12 > bmtfInputsToDisable() const
void setSortRankLUT(const l1t::LUT &lut)
void setBONegMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
std::bitset< 12 > maskedBmtfInputs() const
std::string bEtaExtrapolationLUTPath() const
void setOvlNegSingleMatchQualLUTMaxDR(double maxDR, double fEta, double fEtaCoarse, double fPhi)
const L1TMuonGlobalParams_PUBLIC & cast_to_L1TMuonGlobalParams_PUBLIC(const L1TMuonGlobalParams &x)
std::bitset< 6 > eomtfInputFlags(const int &nodeIdx, const size_t &startIdx, const int &tfIdx) const
void setMaskedEmtfpInputs(const std::bitset< 6 > &masked)
std::string ovlNegSingleMatchQualLUTPath() const
void setMaskedEmtfnInputs(const std::bitset< 6 > &masked)
void setEmtfpInputsToDisable(const std::bitset< 6 > &disables)
void setOmtfnInputsToDisable(const std::bitset< 6 > &disables)
double ovlNegSingleMatchQualLUTMaxDR() const
double bOPosMatchQualLUTMaxDR() const
void setFwdNegSingleMatchQualLUTMaxDR(double maxDR, double fEta, double fPhi)
unsigned fwVersion() const
void setOvlNegSingleMatchQualLUT(const l1t::LUT &lut)