File indexing completed on 2024-04-06 12:07:52
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "TString.h"
0010
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013
0014 #include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
0015
0016
0017 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
0018 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0019 #include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
0020
0021
0022 #include "CondFormats/L1TObjects/interface/L1GtPrescaleFactors.h"
0023 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
0024
0025
0026 #include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h"
0027 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h"
0028
0029 #include "DQM/L1TMonitor/interface/L1TMenuHelper.h"
0030
0031 using namespace edm;
0032 using namespace std;
0033
0034
0035
0036
0037 L1TMenuHelper::L1TMenuHelper(const edm::EventSetup& iSetup, const Tokens& tokens) {
0038 m_l1GtMenu = &iSetup.getData(tokens.menu);
0039 m_prescaleFactorsAlgoTrig =
0040 &(iSetup.getData(tokens.l1GtPfAlgo).gtPrescaleFactors());
0041 }
0042
0043
0044
0045
0046 L1TMenuHelper::~L1TMenuHelper() {}
0047
0048
0049
0050
0051
0052 map<string, string> L1TMenuHelper::getLUSOTrigger(const map<string, bool>& iCategories,
0053 int IndexRefPrescaleFactors,
0054 L1GtUtils const& myUtils) {
0055 map<string, string> out;
0056
0057
0058 const AlgorithmMap* theAlgoMap = &m_l1GtMenu->gtAlgorithmAliasMap();
0059 const vector<vector<L1GtMuonTemplate> >* vMuonConditions = &m_l1GtMenu->vecMuonTemplate();
0060 const vector<vector<L1GtCaloTemplate> >* vCaloConditions = &m_l1GtMenu->vecCaloTemplate();
0061 const vector<vector<L1GtEnergySumTemplate> >* vEnergySumConditions = &m_l1GtMenu->vecEnergySumTemplate();
0062
0063
0064 const vector<int>& refPrescaleFactors = (*m_prescaleFactorsAlgoTrig).at(IndexRefPrescaleFactors);
0065
0066 AlgorithmMap MyAlgos;
0067
0068 map<string, SingleObjectCondition> myConditions;
0069
0070 for (unsigned int a = 0; a < vMuonConditions->size(); a++) {
0071 for (unsigned int b = 0; b < (*vMuonConditions)[a].size(); b++) {
0072 const L1GtMuonTemplate* MuonCondition = &(*vMuonConditions)[a][b];
0073
0074
0075 if (MuonCondition->condType() == Type1s && MuonCondition->nrObjects() == 1) {
0076 SingleObjectCondition tCondition;
0077
0078 tCondition.name = MuonCondition->condName();
0079 tCondition.conditionCategory = MuonCondition->condCategory();
0080 tCondition.conditionType = MuonCondition->condType();
0081 tCondition.object = MuonCondition->objectType()[0];
0082 tCondition.threshold = (*MuonCondition->objectParameter())[0].ptHighThreshold;
0083 tCondition.quality = (*MuonCondition->objectParameter())[0].qualityRange;
0084 tCondition.etaRange = (*MuonCondition->objectParameter())[0].etaRange;
0085
0086 myConditions[MuonCondition->condName()] = tCondition;
0087 }
0088 }
0089 }
0090
0091 for (unsigned int a = 0; a < vCaloConditions->size(); a++) {
0092 for (unsigned int b = 0; b < (*vCaloConditions)[a].size(); b++) {
0093 const L1GtCaloTemplate* CaloCondition = &(*vCaloConditions)[a][b];
0094
0095 if (CaloCondition->condType() == Type1s && CaloCondition->nrObjects() == 1) {
0096 SingleObjectCondition tCondition;
0097
0098 tCondition.name = CaloCondition->condName();
0099 tCondition.conditionCategory = CaloCondition->condCategory();
0100 tCondition.conditionType = CaloCondition->condType();
0101 tCondition.object = CaloCondition->objectType()[0];
0102 tCondition.threshold = (*CaloCondition->objectParameter())[0].etThreshold;
0103 tCondition.quality = 0;
0104 tCondition.etaRange = (*CaloCondition->objectParameter())[0].etaRange;
0105
0106 myConditions[CaloCondition->condName()] = tCondition;
0107 }
0108 }
0109 }
0110
0111 for (unsigned int a = 0; a < vEnergySumConditions->size(); a++) {
0112 for (unsigned int b = 0; b < (*vEnergySumConditions)[a].size(); b++) {
0113 const L1GtEnergySumTemplate* EnergySumCondition = &(*vEnergySumConditions)[a][b];
0114
0115 if ((EnergySumCondition->condType() == TypeETT || EnergySumCondition->condType() == TypeETM ||
0116 EnergySumCondition->condType() == TypeHTT || EnergySumCondition->condType() == TypeHTM) &&
0117 EnergySumCondition->nrObjects() == 1) {
0118 SingleObjectCondition tCondition;
0119
0120 tCondition.name = EnergySumCondition->condName();
0121 tCondition.conditionCategory = EnergySumCondition->condCategory();
0122 tCondition.conditionType = EnergySumCondition->condType();
0123 tCondition.object = EnergySumCondition->objectType()[0];
0124 tCondition.threshold = (*EnergySumCondition->objectParameter())[0].etThreshold;
0125 tCondition.quality = 0;
0126 tCondition.etaRange = 0;
0127
0128 myConditions[EnergySumCondition->condName()] = tCondition;
0129 }
0130 }
0131 }
0132
0133 for (CItAlgo iAlgo = theAlgoMap->begin(); iAlgo != theAlgoMap->end(); ++iAlgo) {
0134 int error;
0135
0136 bool algoIsValid = true;
0137 unsigned int maxThreshold = 0;
0138 int tAlgoMask = myUtils.triggerMask(iAlgo->first, error);
0139 L1GtObject tObject = Mu;
0140 unsigned int tQuality = 0;
0141 unsigned int tEtaRange = 0;
0142
0143
0144 bool isMu = false;
0145 bool isNoIsoEG = false;
0146 bool isIsoEG = false;
0147 bool isCenJet = false;
0148 bool isForJet = false;
0149 bool isTauJet = false;
0150 bool isETM = false;
0151 bool isETT = false;
0152 bool isHTT = false;
0153 bool isHTM = false;
0154
0155
0156 if (tAlgoMask != 0) {
0157 algoIsValid = false;
0158 } else {
0159 const L1GtAlgorithm* pAlgo = &(iAlgo->second);
0160
0161 for (unsigned int i = 0; i < pAlgo->algoRpnVector().size(); i++) {
0162
0163
0164 if (pAlgo->algoRpnVector()[i].operation == L1GtLogicParser::OP_AND) {
0165 algoIsValid = false;
0166 break;
0167 } else if (pAlgo->algoRpnVector()[i].operation == L1GtLogicParser::OP_OPERAND) {
0168 string AlgoCondition = pAlgo->algoRpnVector()[i].operand;
0169 map<string, SingleObjectCondition>::const_iterator ciCond = myConditions.find(AlgoCondition);
0170
0171
0172
0173 if (ciCond == myConditions.end()) {
0174 algoIsValid = false;
0175 break;
0176 }
0177
0178 else {
0179
0180 if (maxThreshold < (*ciCond).second.threshold) {
0181 maxThreshold = (*ciCond).second.threshold;
0182 tObject = (*ciCond).second.object;
0183 tQuality = (*ciCond).second.quality;
0184 tEtaRange = (*ciCond).second.etaRange;
0185 }
0186
0187 if ((*ciCond).second.object == Mu) {
0188 isMu = true;
0189 } else if ((*ciCond).second.object == NoIsoEG) {
0190 isNoIsoEG = true;
0191 } else if ((*ciCond).second.object == IsoEG) {
0192 isIsoEG = true;
0193 } else if ((*ciCond).second.object == CenJet) {
0194 isCenJet = true;
0195 } else if ((*ciCond).second.object == ForJet) {
0196 isForJet = true;
0197 } else if ((*ciCond).second.object == TauJet) {
0198 isTauJet = true;
0199 } else if ((*ciCond).second.object == ETM) {
0200 isETM = true;
0201 } else if ((*ciCond).second.object == ETT) {
0202 isETT = true;
0203 } else if ((*ciCond).second.object == HTT) {
0204 isHTT = true;
0205 } else if ((*ciCond).second.object == HTM) {
0206 isHTM = true;
0207 }
0208 }
0209 }
0210 }
0211 }
0212
0213 if (algoIsValid) {
0214 SingleObjectTrigger tTrigger;
0215 tTrigger.alias = iAlgo->first;
0216 tTrigger.bit = (iAlgo->second).algoBitNumber();
0217 tTrigger.prescale = refPrescaleFactors[tTrigger.bit];
0218 tTrigger.threshold = maxThreshold;
0219 tTrigger.object = tObject;
0220 tTrigger.quality = tQuality;
0221 tTrigger.etaRange = tEtaRange;
0222
0223
0224 int nCond = 0;
0225 if (isMu) {
0226 nCond++;
0227 }
0228 if (isNoIsoEG) {
0229 nCond++;
0230 }
0231 if (isIsoEG) {
0232 nCond++;
0233 }
0234 if (isCenJet) {
0235 nCond++;
0236 }
0237 if (isForJet) {
0238 nCond++;
0239 }
0240 if (isTauJet) {
0241 nCond++;
0242 }
0243 if (isETM) {
0244 nCond++;
0245 }
0246 if (isETT) {
0247 nCond++;
0248 }
0249 if (isHTT) {
0250 nCond++;
0251 }
0252 if (isHTM) {
0253 nCond++;
0254 }
0255
0256
0257
0258 if (nCond == 1 && isMu == true) {
0259
0260 m_vTrigMu.push_back(tTrigger);
0261 } else if (nCond == 2 && isNoIsoEG == true && isIsoEG == true) {
0262 m_vTrigEG.push_back(tTrigger);
0263 } else if (nCond == 1 && isIsoEG == true) {
0264 m_vTrigIsoEG.push_back(tTrigger);
0265 } else if (nCond == 3 && isCenJet == true && isForJet == true && isTauJet == true) {
0266 m_vTrigJet.push_back(tTrigger);
0267 } else if (nCond == 1 && isCenJet == true) {
0268 m_vTrigCenJet.push_back(tTrigger);
0269 } else if (nCond == 1 && isForJet == true) {
0270 m_vTrigForJet.push_back(tTrigger);
0271 } else if (nCond == 1 && isTauJet == true) {
0272 m_vTrigTauJet.push_back(tTrigger);
0273 } else if (nCond == 1 && isETT == true) {
0274 m_vTrigETT.push_back(tTrigger);
0275 } else if (nCond == 1 && isETM == true) {
0276 m_vTrigETM.push_back(tTrigger);
0277 } else if (nCond == 1 && isHTT == true) {
0278 m_vTrigHTT.push_back(tTrigger);
0279 } else if (nCond == 1 && isHTM == true) {
0280 m_vTrigHTM.push_back(tTrigger);
0281 }
0282 }
0283 }
0284
0285
0286
0287
0288
0289
0290
0291
0292 string selTrigMu = "Undefined";
0293 string selTrigEG = "Undefined";
0294 string selTrigIsoEG = "Undefined";
0295 string selTrigJet = "Undefined";
0296 string selTrigCenJet = "Undefined";
0297 string selTrigForJet = "Undefined";
0298 string selTrigTauJet = "Undefined";
0299 string selTrigETT = "Undefined";
0300 string selTrigETM = "Undefined";
0301 string selTrigHTT = "Undefined";
0302 string selTrigHTM = "Undefined";
0303
0304 if (!m_vTrigMu.empty()) {
0305 sort(m_vTrigMu.begin(), m_vTrigMu.end());
0306 selTrigMu = m_vTrigMu[0].alias;
0307 }
0308 if (!m_vTrigEG.empty()) {
0309 sort(m_vTrigEG.begin(), m_vTrigEG.end());
0310 selTrigEG = m_vTrigEG[0].alias;
0311 }
0312 if (!m_vTrigIsoEG.empty()) {
0313 sort(m_vTrigIsoEG.begin(), m_vTrigIsoEG.end());
0314 selTrigIsoEG = m_vTrigIsoEG[0].alias;
0315 }
0316 if (!m_vTrigJet.empty()) {
0317 sort(m_vTrigJet.begin(), m_vTrigJet.end());
0318 selTrigJet = m_vTrigJet[0].alias;
0319 }
0320 if (!m_vTrigCenJet.empty()) {
0321 sort(m_vTrigCenJet.begin(), m_vTrigCenJet.end());
0322 selTrigCenJet = m_vTrigCenJet[0].alias;
0323 }
0324 if (!m_vTrigForJet.empty()) {
0325 sort(m_vTrigForJet.begin(), m_vTrigForJet.end());
0326 selTrigForJet = m_vTrigForJet[0].alias;
0327 }
0328 if (!m_vTrigTauJet.empty()) {
0329 sort(m_vTrigTauJet.begin(), m_vTrigTauJet.end());
0330 selTrigTauJet = m_vTrigTauJet[0].alias;
0331 }
0332 if (!m_vTrigETT.empty()) {
0333 sort(m_vTrigETT.begin(), m_vTrigETT.end());
0334 selTrigETT = m_vTrigETT[0].alias;
0335 }
0336 if (!m_vTrigETM.empty()) {
0337 sort(m_vTrigETM.begin(), m_vTrigETM.end());
0338 selTrigETM = m_vTrigETM[0].alias;
0339 }
0340 if (!m_vTrigHTT.empty()) {
0341 sort(m_vTrigHTT.begin(), m_vTrigHTT.end());
0342 selTrigHTT = m_vTrigHTT[0].alias;
0343 }
0344 if (!m_vTrigHTM.empty()) {
0345 sort(m_vTrigHTM.begin(), m_vTrigHTM.end());
0346 selTrigHTM = m_vTrigHTM[0].alias;
0347 }
0348
0349 auto check = [](const map<string, bool>& cats, const char* key) -> bool {
0350 auto it = cats.find(key);
0351 if (it != cats.end())
0352 return it->second;
0353
0354 return false;
0355 };
0356
0357 if (check(iCategories, "Mu")) {
0358 out["Mu"] = selTrigMu;
0359 }
0360 if (check(iCategories, "EG")) {
0361 out["EG"] = selTrigEG;
0362 }
0363 if (check(iCategories, "IsoEG")) {
0364 out["IsoEG"] = selTrigIsoEG;
0365 }
0366 if (check(iCategories, "Jet")) {
0367 out["Jet"] = selTrigJet;
0368 }
0369 if (check(iCategories, "CenJet")) {
0370 out["CenJet"] = selTrigCenJet;
0371 }
0372 if (check(iCategories, "ForJet")) {
0373 out["ForJet"] = selTrigForJet;
0374 }
0375 if (check(iCategories, "TauJet")) {
0376 out["TauJet"] = selTrigTauJet;
0377 }
0378 if (check(iCategories, "ETT")) {
0379 out["ETT"] = selTrigETT;
0380 }
0381 if (check(iCategories, "ETM")) {
0382 out["ETM"] = selTrigETM;
0383 }
0384 if (check(iCategories, "HTT")) {
0385 out["HTT"] = selTrigHTT;
0386 }
0387 if (check(iCategories, "HTM")) {
0388 out["HTM"] = selTrigHTM;
0389 }
0390
0391 return out;
0392 }
0393
0394 map<string, string> L1TMenuHelper::testAlgos(const map<string, string>& _iAlgos) {
0395 map<string, string> iAlgos = _iAlgos;
0396
0397 const AlgorithmMap* theAlgoMap = &m_l1GtMenu->gtAlgorithmAliasMap();
0398
0399 for (map<string, string>::const_iterator i = iAlgos.begin(); iAlgos.end() != i; i++) {
0400 string tCategory = (*i).first;
0401 string tTrigger = (*i).second;
0402
0403 if (tTrigger.empty()) {
0404 iAlgos[tCategory] = "Undefined";
0405 } else {
0406 if (theAlgoMap->find(tTrigger) == theAlgoMap->end()) {
0407 iAlgos[tCategory] = "Undefined (Wrong Name)";
0408 }
0409 }
0410 }
0411
0412 return iAlgos;
0413 }
0414
0415
0416
0417
0418
0419 string L1TMenuHelper::enumToStringL1GtObject(L1GtObject iObject) {
0420 string out;
0421
0422 switch (iObject) {
0423 case Mu:
0424 out = "Mu";
0425 break;
0426 case NoIsoEG:
0427 out = "NoIsoEG";
0428 break;
0429 case IsoEG:
0430 out = "IsoEG";
0431 break;
0432 case CenJet:
0433 out = "CenJet";
0434 break;
0435 case ForJet:
0436 out = "ForJet";
0437 break;
0438 case TauJet:
0439 out = "TauJet";
0440 break;
0441 case ETM:
0442 out = "ETM";
0443 break;
0444 case ETT:
0445 out = "ETT";
0446 break;
0447 case HTT:
0448 out = "HTT";
0449 break;
0450 case HTM:
0451 out = "HTM";
0452 break;
0453 case JetCounts:
0454 out = "JetCounts";
0455 break;
0456 case HfBitCounts:
0457 out = "HfBitCounts";
0458 break;
0459 case HfRingEtSums:
0460 out = "HfRingEtSums";
0461 break;
0462 case TechTrig:
0463 out = "TechTrig";
0464 break;
0465 case Castor:
0466 out = "Castor";
0467 break;
0468 case BPTX:
0469 out = "BPTX";
0470 break;
0471 case GtExternal:
0472 out = "GtExternal";
0473 break;
0474 default:
0475 out = "Unknown";
0476 break;
0477 };
0478
0479 return out;
0480 }
0481
0482
0483
0484
0485
0486 string L1TMenuHelper::enumToStringL1GtConditionType(L1GtConditionType iConditionType) {
0487 string out;
0488
0489 switch (iConditionType) {
0490 case TypeNull:
0491 out = "TypeNull";
0492 break;
0493 case Type1s:
0494 out = "Type1s";
0495 break;
0496 case Type2s:
0497 out = "Type2s";
0498 break;
0499 case Type2wsc:
0500 out = "Type2wsc";
0501 break;
0502 case Type2cor:
0503 out = "Type2cor";
0504 break;
0505 case Type3s:
0506 out = "Type3s";
0507 break;
0508 case Type4s:
0509 out = "Type4s";
0510 break;
0511 case TypeETM:
0512 out = "TypeETM";
0513 break;
0514 case TypeETT:
0515 out = "TypeETT";
0516 break;
0517 case TypeHTT:
0518 out = "TypeHTT";
0519 break;
0520 case TypeHTM:
0521 out = "TypeHTM";
0522 break;
0523 case TypeJetCounts:
0524 out = "TypeJetCounts";
0525 break;
0526 case TypeCastor:
0527 out = "TypeCastor";
0528 break;
0529 case TypeHfBitCounts:
0530 out = "TypeHfBitCounts";
0531 break;
0532 case TypeHfRingEtSums:
0533 out = "TypeHfRingEtSums";
0534 break;
0535 case TypeBptx:
0536 out = "TypeBptx";
0537 break;
0538 case TypeExternal:
0539 out = "TypeExternal";
0540 break;
0541 default:
0542 out = "Unknown";
0543 break;
0544 };
0545
0546 return out;
0547 }
0548
0549
0550
0551
0552
0553 string L1TMenuHelper::enumToStringL1GtConditionCategory(L1GtConditionCategory iConditionCategory) {
0554 string out;
0555
0556 switch (iConditionCategory) {
0557 case CondNull:
0558 out = "CondNull";
0559 break;
0560 case CondMuon:
0561 out = "CondMuon";
0562 break;
0563 case CondCalo:
0564 out = "CondCalo";
0565 break;
0566 case CondEnergySum:
0567 out = "CondEnergySum";
0568 break;
0569 case CondJetCounts:
0570 out = "CondJetCounts";
0571 break;
0572 case CondCorrelation:
0573 out = "CondCorrelation";
0574 break;
0575 case CondCastor:
0576 out = "CondCastor";
0577 break;
0578 case CondHfBitCounts:
0579 out = "CondHfBitCounts";
0580 break;
0581 case CondHfRingEtSums:
0582 out = "CondHfRingEtSums";
0583 break;
0584 case CondBptx:
0585 out = "CondBptx";
0586 break;
0587 case CondExternal:
0588 out = "CondExternal";
0589 break;
0590 default:
0591 out = "Unknown";
0592 break;
0593 };
0594
0595 return out;
0596 }
0597
0598
0599 int L1TMenuHelper::getPrescaleByAlias(const TString& iCategory, const TString& iAlias) {
0600 int out = -1;
0601
0602 if (iCategory == "Mu") {
0603 for (unsigned int i = 0; i < m_vTrigMu.size(); i++) {
0604 if (m_vTrigMu[i].alias == iAlias) {
0605 return m_vTrigMu[i].prescale;
0606 }
0607 }
0608 } else if (iCategory == "EG") {
0609 for (unsigned int i = 0; i < m_vTrigEG.size(); i++) {
0610 if (m_vTrigEG[i].alias == iAlias) {
0611 return m_vTrigEG[i].prescale;
0612 }
0613 }
0614 } else if (iCategory == "IsoEG") {
0615 for (unsigned int i = 0; i < m_vTrigIsoEG.size(); i++) {
0616 if (m_vTrigIsoEG[i].alias == iAlias) {
0617 return m_vTrigIsoEG[i].prescale;
0618 }
0619 }
0620 } else if (iCategory == "Jet") {
0621 for (unsigned int i = 0; i < m_vTrigJet.size(); i++) {
0622 if (m_vTrigJet[i].alias == iAlias) {
0623 return m_vTrigJet[i].prescale;
0624 }
0625 }
0626 } else if (iCategory == "CenJet") {
0627 for (unsigned int i = 0; i < m_vTrigCenJet.size(); i++) {
0628 if (m_vTrigCenJet[i].alias == iAlias) {
0629 return m_vTrigCenJet[i].prescale;
0630 }
0631 }
0632 } else if (iCategory == "ForJet") {
0633 for (unsigned int i = 0; i < m_vTrigForJet.size(); i++) {
0634 if (m_vTrigForJet[i].alias == iAlias) {
0635 return m_vTrigForJet[i].prescale;
0636 }
0637 }
0638 } else if (iCategory == "TauJet") {
0639 for (unsigned int i = 0; i < m_vTrigTauJet.size(); i++) {
0640 if (m_vTrigTauJet[i].alias == iAlias) {
0641 return m_vTrigTauJet[i].prescale;
0642 }
0643 }
0644 } else if (iCategory == "ETT") {
0645 for (unsigned int i = 0; i < m_vTrigETT.size(); i++) {
0646 if (m_vTrigETT[i].alias == iAlias) {
0647 return m_vTrigETT[i].prescale;
0648 }
0649 }
0650 } else if (iCategory == "ETM") {
0651 for (unsigned int i = 0; i < m_vTrigETM.size(); i++) {
0652 if (m_vTrigETM[i].alias == iAlias) {
0653 return m_vTrigETM[i].prescale;
0654 }
0655 }
0656 } else if (iCategory == "HTT") {
0657 for (unsigned int i = 0; i < m_vTrigHTT.size(); i++) {
0658 if (m_vTrigHTT[i].alias == iAlias) {
0659 return m_vTrigHTT[i].prescale;
0660 }
0661 }
0662 } else if (iCategory == "HTM") {
0663 for (unsigned int i = 0; i < m_vTrigHTM.size(); i++) {
0664 if (m_vTrigHTM[i].alias == iAlias) {
0665 return m_vTrigHTM[i].prescale;
0666 }
0667 }
0668 }
0669
0670 return out;
0671 }
0672
0673
0674 unsigned int L1TMenuHelper::getEtaRangeByAlias(const TString& iCategory, const TString& iAlias) {
0675 unsigned int out = -1;
0676
0677 if (iCategory == "Mu") {
0678 for (unsigned int i = 0; i < m_vTrigMu.size(); i++) {
0679 if (m_vTrigMu[i].alias == iAlias) {
0680 return m_vTrigMu[i].etaRange;
0681 }
0682 }
0683 } else if (iCategory == "EG") {
0684 for (unsigned int i = 0; i < m_vTrigEG.size(); i++) {
0685 if (m_vTrigEG[i].alias == iAlias) {
0686 return m_vTrigEG[i].etaRange;
0687 }
0688 }
0689 } else if (iCategory == "IsoEG") {
0690 for (unsigned int i = 0; i < m_vTrigIsoEG.size(); i++) {
0691 if (m_vTrigIsoEG[i].alias == iAlias) {
0692 return m_vTrigIsoEG[i].etaRange;
0693 }
0694 }
0695 } else if (iCategory == "Jet") {
0696 for (unsigned int i = 0; i < m_vTrigJet.size(); i++) {
0697 if (m_vTrigJet[i].alias == iAlias) {
0698 return m_vTrigJet[i].etaRange;
0699 }
0700 }
0701 } else if (iCategory == "CenJet") {
0702 for (unsigned int i = 0; i < m_vTrigCenJet.size(); i++) {
0703 if (m_vTrigCenJet[i].alias == iAlias) {
0704 return m_vTrigCenJet[i].etaRange;
0705 }
0706 }
0707 } else if (iCategory == "ForJet") {
0708 for (unsigned int i = 0; i < m_vTrigForJet.size(); i++) {
0709 if (m_vTrigForJet[i].alias == iAlias) {
0710 return m_vTrigForJet[i].etaRange;
0711 }
0712 }
0713 } else if (iCategory == "TauJet") {
0714 for (unsigned int i = 0; i < m_vTrigTauJet.size(); i++) {
0715 if (m_vTrigTauJet[i].alias == iAlias) {
0716 return m_vTrigTauJet[i].etaRange;
0717 }
0718 }
0719 } else if (iCategory == "ETT") {
0720 for (unsigned int i = 0; i < m_vTrigETT.size(); i++) {
0721 if (m_vTrigETT[i].alias == iAlias) {
0722 return m_vTrigETT[i].etaRange;
0723 }
0724 }
0725 } else if (iCategory == "ETM") {
0726 for (unsigned int i = 0; i < m_vTrigETM.size(); i++) {
0727 if (m_vTrigETM[i].alias == iAlias) {
0728 return m_vTrigETM[i].etaRange;
0729 }
0730 }
0731 } else if (iCategory == "HTT") {
0732 for (unsigned int i = 0; i < m_vTrigHTT.size(); i++) {
0733 if (m_vTrigHTT[i].alias == iAlias) {
0734 return m_vTrigHTT[i].etaRange;
0735 }
0736 }
0737 } else if (iCategory == "HTM") {
0738 for (unsigned int i = 0; i < m_vTrigHTM.size(); i++) {
0739 if (m_vTrigHTM[i].alias == iAlias) {
0740 return m_vTrigHTM[i].etaRange;
0741 }
0742 }
0743 }
0744
0745 return out;
0746 }
0747
0748
0749 unsigned int L1TMenuHelper::getQualityAlias(const TString& iCategory, const TString& iAlias) {
0750 unsigned int out = -1;
0751
0752 if (iCategory == "Mu") {
0753 for (unsigned int i = 0; i < m_vTrigMu.size(); i++) {
0754 if (m_vTrigMu[i].alias == iAlias) {
0755 return m_vTrigMu[i].quality;
0756 }
0757 }
0758 } else if (iCategory == "EG") {
0759 for (unsigned int i = 0; i < m_vTrigEG.size(); i++) {
0760 if (m_vTrigEG[i].alias == iAlias) {
0761 return m_vTrigEG[i].quality;
0762 }
0763 }
0764 } else if (iCategory == "IsoEG") {
0765 for (unsigned int i = 0; i < m_vTrigIsoEG.size(); i++) {
0766 if (m_vTrigIsoEG[i].alias == iAlias) {
0767 return m_vTrigIsoEG[i].quality;
0768 }
0769 }
0770 } else if (iCategory == "Jet") {
0771 for (unsigned int i = 0; i < m_vTrigJet.size(); i++) {
0772 if (m_vTrigJet[i].alias == iAlias) {
0773 return m_vTrigJet[i].quality;
0774 }
0775 }
0776 } else if (iCategory == "CenJet") {
0777 for (unsigned int i = 0; i < m_vTrigCenJet.size(); i++) {
0778 if (m_vTrigCenJet[i].alias == iAlias) {
0779 return m_vTrigCenJet[i].quality;
0780 }
0781 }
0782 } else if (iCategory == "ForJet") {
0783 for (unsigned int i = 0; i < m_vTrigForJet.size(); i++) {
0784 if (m_vTrigForJet[i].alias == iAlias) {
0785 return m_vTrigForJet[i].quality;
0786 }
0787 }
0788 } else if (iCategory == "TauJet") {
0789 for (unsigned int i = 0; i < m_vTrigTauJet.size(); i++) {
0790 if (m_vTrigTauJet[i].alias == iAlias) {
0791 return m_vTrigTauJet[i].quality;
0792 }
0793 }
0794 } else if (iCategory == "ETT") {
0795 for (unsigned int i = 0; i < m_vTrigETT.size(); i++) {
0796 if (m_vTrigETT[i].alias == iAlias) {
0797 return m_vTrigETT[i].quality;
0798 }
0799 }
0800 } else if (iCategory == "ETM") {
0801 for (unsigned int i = 0; i < m_vTrigETM.size(); i++) {
0802 if (m_vTrigETM[i].alias == iAlias) {
0803 return m_vTrigETM[i].quality;
0804 }
0805 }
0806 } else if (iCategory == "HTT") {
0807 for (unsigned int i = 0; i < m_vTrigHTT.size(); i++) {
0808 if (m_vTrigHTT[i].alias == iAlias) {
0809 return m_vTrigHTT[i].quality;
0810 }
0811 }
0812 } else if (iCategory == "HTM") {
0813 for (unsigned int i = 0; i < m_vTrigHTM.size(); i++) {
0814 if (m_vTrigHTM[i].alias == iAlias) {
0815 return m_vTrigHTM[i].quality;
0816 }
0817 }
0818 }
0819
0820 return out;
0821 }