CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TMenuHelper.cc
Go to the documentation of this file.
1 
2 /*
3  * \file L1TMenuHelper.cc
4  *
5  * $Date: 2011/11/15 10:41:00 $
6  * $Revision: 1.6 $
7  * \author J. Pela, P. Musella
8  *
9 */
10 
11 #include "TString.h"
12 
16 
17 //#include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
18 #include "HLTrigger/HLTanalyzers/test/RateEff/L1GtLogicParser.h"
19 
20 // L1Gt - Trigger Menu
24 
25 // L1Gt - Prescales
28 
29 // L1Gt - Masks
32 
33 
34 
36 
37 using namespace edm;
38 using namespace std;
39 
40 //-------------------------------------------------------------------------------------
41 //
42 //-------------------------------------------------------------------------------------
44 
45  iSetup.get<L1GtTriggerMenuRcd>() .get(menuRcd);
46  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
47 
48  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
49 
50  m_l1GtMenu = menuRcd .product(); // Getting the menu
51  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors()); // Retriving the list of prescale sets
52 
53  myUtils.retrieveL1EventSetup(iSetup);
54 
55 }
56 
57 
58 //-------------------------------------------------------------------------------------
59 //
60 //-------------------------------------------------------------------------------------
62 
63 //-------------------------------------------------------------------------------------
64 // Method: fetLUSOTrigger
65 // * Get Lowest Unprescaled Single Object Triggers and Energy Sums
66 //-------------------------------------------------------------------------------------
67 map<string,string> L1TMenuHelper::getLUSOTrigger(map<string,bool> iCategories, int IndexRefPrescaleFactors){
68 
69  map<string,string> out;
70 
71  // Getting information from the menu
72  const AlgorithmMap *theAlgoMap = &m_l1GtMenu->gtAlgorithmAliasMap();
73  const vector< vector<L1GtMuonTemplate> > *vMuonConditions = &m_l1GtMenu->vecMuonTemplate();
74  const vector< vector<L1GtCaloTemplate> > *vCaloConditions = &m_l1GtMenu->vecCaloTemplate();
75  const vector< vector<L1GtEnergySumTemplate> > *vEnergySumConditions = &m_l1GtMenu->vecEnergySumTemplate();
76 
77  // Getting reference prescales
78  const vector<int>& refPrescaleFactors = (*m_prescaleFactorsAlgoTrig).at(IndexRefPrescaleFactors);
79 
80  AlgorithmMap MyAlgos;
81 
82  map<string,SingleObjectCondition> myConditions;
83 
84  for(unsigned int a=0 ; a<vMuonConditions->size() ; a++){
85  for(unsigned int b=0 ; b<(*vMuonConditions)[a].size() ; b++){
86 
87  const L1GtMuonTemplate* MuonCondition = &(*vMuonConditions)[a][b];
88 
89  // Selecting conditions that require single objects
90  if(MuonCondition->condType() == Type1s && MuonCondition->nrObjects() == 1){
91 
92  SingleObjectCondition tCondition;
93 
94  tCondition.name = MuonCondition->condName();
95  tCondition.conditionCategory = MuonCondition->condCategory();
96  tCondition.conditionType = MuonCondition->condType();
97  tCondition.object = MuonCondition->objectType()[0];
98  tCondition.threshold = (*MuonCondition->objectParameter())[0].ptHighThreshold;
99  tCondition.quality = (*MuonCondition->objectParameter())[0].qualityRange;
100  tCondition.etaRange = (*MuonCondition->objectParameter())[0].etaRange;
101 
102  myConditions[MuonCondition->condName()] = tCondition;
103 
104  }
105  }
106  }
107 
108  for(unsigned int a=0 ; a<vCaloConditions->size() ; a++){
109  for(unsigned int b=0 ; b<(*vCaloConditions)[a].size() ; b++){
110 
111  const L1GtCaloTemplate* CaloCondition = &(*vCaloConditions)[a][b];
112 
113  if(CaloCondition->condType() == Type1s && CaloCondition->nrObjects() == 1){
114 
115  SingleObjectCondition tCondition;
116 
117  tCondition.name = CaloCondition->condName();
118  tCondition.conditionCategory = CaloCondition->condCategory();
119  tCondition.conditionType = CaloCondition->condType();
120  tCondition.object = CaloCondition->objectType()[0];
121  tCondition.threshold = (*CaloCondition->objectParameter())[0].etThreshold;
122  tCondition.quality = 0;
123  tCondition.etaRange = (*CaloCondition->objectParameter())[0].etaRange;
124 
125  myConditions[CaloCondition->condName()] = tCondition;
126 
127  }
128  }
129  }
130 
131  for(unsigned int a=0 ; a<vEnergySumConditions->size() ; a++){
132  for(unsigned int b=0 ; b<(*vEnergySumConditions)[a].size() ; b++){
133 
134  const L1GtEnergySumTemplate* EnergySumCondition = &(*vEnergySumConditions)[a][b];
135 
136  if((EnergySumCondition->condType() == TypeETT ||
137  EnergySumCondition->condType() == TypeETM ||
138  EnergySumCondition->condType() == TypeHTT ||
139  EnergySumCondition->condType() == TypeHTM
140  ) && EnergySumCondition->nrObjects() == 1){
141 
142  SingleObjectCondition tCondition;
143 
144  tCondition.name = EnergySumCondition->condName();
145  tCondition.conditionCategory = EnergySumCondition->condCategory();
146  tCondition.conditionType = EnergySumCondition->condType();
147  tCondition.object = EnergySumCondition->objectType()[0];
148  tCondition.threshold = (*EnergySumCondition->objectParameter())[0].etThreshold;
149  tCondition.quality = 0;
150  tCondition.etaRange = 0;
151 
152  myConditions[EnergySumCondition->condName()] = tCondition;
153 
154  }
155  }
156  }
157 
158  for (CItAlgo iAlgo = theAlgoMap->begin(); iAlgo!=theAlgoMap->end(); ++iAlgo){
159 
160  int error;
161 
162  bool algoIsValid = true;
163  unsigned int maxThreshold = 0;
164  int tAlgoMask = myUtils.triggerMask(iAlgo->first,error);
165  L1GtObject tObject = Mu; // Initial dummy value
166  unsigned int tQuality = 0; // Only aplicable to Muons
167  unsigned int tEtaRange = 0;
168 
169  // Objects associated
170  bool isMu = false;
171  bool isNoIsoEG = false;
172  bool isIsoEG = false;
173  bool isCenJet = false;
174  bool isForJet = false;
175  bool isTauJet = false;
176  bool isETM = false;
177  bool isETT = false;
178  bool isHTT = false;
179  bool isHTM = false;
180 
181  // Check if the trigger is masked
182  if(tAlgoMask != 0){
183  algoIsValid = false;
184  }
185  else{
186 
187  const L1GtAlgorithm *pAlgo = &(iAlgo->second);
188 
189  for(unsigned int i=0; i<pAlgo->algoRpnVector().size() ; i++){
190 
191  // Algorithm cannot be single algo if it requires 2 simultaneous conditions
192  // FIXME: Should be improved to be sure one of the conditions is not technical (ex: BPTX)
193  if(pAlgo->algoRpnVector()[i].operation == L1GtLogicParser::OP_AND){
194  algoIsValid = false;
195  break;
196  }
197  else if(pAlgo->algoRpnVector()[i].operation == L1GtLogicParser::OP_OPERAND){
198 
199  string AlgoCondition = pAlgo->algoRpnVector()[i].operand;
200  map<string,SingleObjectCondition>::const_iterator ciCond = myConditions.find(AlgoCondition);
201 
202  // If there is no matching condition (i.e. its not a single object or energy sum condition)
203  // ignore this this L1 algo
204  if(ciCond == myConditions.end()){
205  algoIsValid = false;
206  break;
207  }
208  // If trigger was not invalidated by this condition we register its objects and threshold
209  else{
210 
211  // Updating value for the object with the maximum threshold for this triger
212  if(maxThreshold < (*ciCond).second.threshold){
213  maxThreshold = (*ciCond).second.threshold;
214  tObject = (*ciCond).second.object;
215  tQuality = (*ciCond).second.quality;
216  tEtaRange = (*ciCond).second.etaRange;
217  }
218 
219  if ((*ciCond).second.object == Mu) {isMu = true;}
220  else if((*ciCond).second.object == NoIsoEG){isNoIsoEG = true;}
221  else if((*ciCond).second.object == IsoEG) {isIsoEG = true;}
222  else if((*ciCond).second.object == CenJet) {isCenJet = true;}
223  else if((*ciCond).second.object == ForJet) {isForJet = true;}
224  else if((*ciCond).second.object == TauJet) {isTauJet = true;}
225  else if((*ciCond).second.object == ETM) {isETM = true;}
226  else if((*ciCond).second.object == ETT) {isETT = true;}
227  else if((*ciCond).second.object == HTT) {isHTT = true;}
228  else if((*ciCond).second.object == HTM) {isHTM = true;}
229 
230  }
231  }
232  }
233  }
234 
235  if(algoIsValid){
236 
237  SingleObjectTrigger tTrigger;
238  tTrigger.alias = iAlgo->first;
239  tTrigger.bit = (iAlgo->second).algoBitNumber();
240  tTrigger.prescale = refPrescaleFactors[tTrigger.bit];
241  tTrigger.threshold = maxThreshold;
242  tTrigger.object = tObject;
243  tTrigger.quality = tQuality; // Only aplicable to Muons
244  tTrigger.etaRange = tEtaRange; // Only aplicable to EG and Muons
245 
246  // Counting the number of different trigger conditions
247  int nCond = 0;
248  if(isMu) {nCond++;}
249  if(isNoIsoEG){nCond++;}
250  if(isIsoEG) {nCond++;}
251  if(isCenJet) {nCond++;}
252  if(isForJet) {nCond++;}
253  if(isTauJet) {nCond++;}
254  if(isETM) {nCond++;}
255  if(isETT) {nCond++;}
256  if(isHTT) {nCond++;}
257  if(isHTM) {nCond++;}
258 
259  // If the trigger matched one of the pre-defined categories it is added to
260  // the corresponding trigger vector
261  if (nCond==1 && isMu ==true){
262  //TODO: tTrigger.etaRange
263  m_vTrigMu .push_back(tTrigger);
264  }
265  else if(nCond==2 && isNoIsoEG==true && isIsoEG ==true) {m_vTrigEG .push_back(tTrigger);}
266  else if(nCond==1 && isIsoEG ==true) {m_vTrigIsoEG .push_back(tTrigger);}
267  else if(nCond==3 && isCenJet ==true && isForJet==true && isTauJet==true){m_vTrigJet .push_back(tTrigger);}
268  else if(nCond==1 && isCenJet ==true) {m_vTrigCenJet.push_back(tTrigger);}
269  else if(nCond==1 && isForJet ==true) {m_vTrigForJet.push_back(tTrigger);}
270  else if(nCond==1 && isTauJet ==true) {m_vTrigTauJet.push_back(tTrigger);}
271  else if(nCond==1 && isETT ==true) {m_vTrigETT .push_back(tTrigger);}
272  else if(nCond==1 && isETM ==true) {m_vTrigETM .push_back(tTrigger);}
273  else if(nCond==1 && isHTT ==true) {m_vTrigHTT .push_back(tTrigger);}
274  else if(nCond==1 && isHTM ==true) {m_vTrigHTM .push_back(tTrigger);}
275  }
276 
277  }
278 
279  //--------------------------------------------------------------------------------------
280  // Now that we have built vectors of SingleObjectTrigger by category we can select for
281  // each category the lowest unprescaled single object trigger.
282  // NOTE: Since it is not guaranteed that all categories will have at least one unprescaled
283  // trigger this method will return in that case the lowest prescale trigger available
284  //--------------------------------------------------------------------------------------
285 
286  string selTrigMu = "Undefined";
287  string selTrigEG = "Undefined";
288  string selTrigIsoEG = "Undefined";
289  string selTrigJet = "Undefined";
290  string selTrigCenJet = "Undefined";
291  string selTrigForJet = "Undefined";
292  string selTrigTauJet = "Undefined";
293  string selTrigETT = "Undefined";
294  string selTrigETM = "Undefined";
295  string selTrigHTT = "Undefined";
296  string selTrigHTM = "Undefined";
297 
298  if(m_vTrigMu .size() > 0){sort(m_vTrigMu .begin(),m_vTrigMu .end()); selTrigMu = m_vTrigMu [0].alias;}
299  if(m_vTrigEG .size() > 0){sort(m_vTrigEG .begin(),m_vTrigEG .end()); selTrigEG = m_vTrigEG [0].alias;}
300  if(m_vTrigIsoEG .size() > 0){sort(m_vTrigIsoEG .begin(),m_vTrigIsoEG .end()); selTrigIsoEG = m_vTrigIsoEG [0].alias;}
301  if(m_vTrigJet .size() > 0){sort(m_vTrigJet .begin(),m_vTrigJet .end()); selTrigJet = m_vTrigJet [0].alias;}
302  if(m_vTrigCenJet.size() > 0){sort(m_vTrigCenJet.begin(),m_vTrigCenJet.end()); selTrigCenJet = m_vTrigCenJet[0].alias;}
303  if(m_vTrigForJet.size() > 0){sort(m_vTrigForJet.begin(),m_vTrigForJet.end()); selTrigForJet = m_vTrigForJet[0].alias;}
304  if(m_vTrigTauJet.size() > 0){sort(m_vTrigTauJet.begin(),m_vTrigTauJet.end()); selTrigTauJet = m_vTrigTauJet[0].alias;}
305  if(m_vTrigETT .size() > 0){sort(m_vTrigETT .begin(),m_vTrigETT .end()); selTrigETT = m_vTrigETT [0].alias;}
306  if(m_vTrigETM .size() > 0){sort(m_vTrigETM .begin(),m_vTrigETM .end()); selTrigETM = m_vTrigETM [0].alias;}
307  if(m_vTrigHTT .size() > 0){sort(m_vTrigHTT .begin(),m_vTrigHTT .end()); selTrigHTT = m_vTrigHTT [0].alias;}
308  if(m_vTrigHTM .size() > 0){sort(m_vTrigHTM .begin(),m_vTrigHTM .end()); selTrigHTM = m_vTrigHTM [0].alias;}
309 
310  if(iCategories["Mu"]) {out["Mu"] = selTrigMu;}
311  if(iCategories["EG"]) {out["EG"] = selTrigEG;}
312  if(iCategories["IsoEG"]) {out["IsoEG"] = selTrigIsoEG;}
313  if(iCategories["Jet"]) {out["Jet"] = selTrigJet;}
314  if(iCategories["CenJet"]){out["CenJet"] = selTrigCenJet;}
315  if(iCategories["ForJet"]){out["ForJet"] = selTrigForJet;}
316  if(iCategories["TauJet"]){out["TauJet"] = selTrigTauJet;}
317  if(iCategories["ETT"]) {out["ETT"] = selTrigETT;}
318  if(iCategories["ETM"]) {out["ETM"] = selTrigETM;}
319  if(iCategories["HTT"]) {out["HTT"] = selTrigHTT;}
320  if(iCategories["HTM"]) {out["HTM"] = selTrigHTM;}
321 
322  return out;
323 
324 }
325 
326 map<string,string> L1TMenuHelper::testAlgos(map<string,string> iAlgos){
327 
328  // Getting information from the menu
329  const AlgorithmMap *theAlgoMap = &m_l1GtMenu->gtAlgorithmAliasMap();
330 
331  for(map<string,string>::const_iterator i = iAlgos.begin() ; iAlgos.end() != i ; i++){
332 
333  string tCategory = (*i).first;
334  string tTrigger = (*i).second;
335 
336  if(tTrigger == "" ){iAlgos[tCategory] = "Undefined";}
337  else{
338  if(theAlgoMap->find(tTrigger) == theAlgoMap->end()){iAlgos[tCategory] = "Undefined (Wrong Name)";}
339  }
340 
341  }
342 
343  return iAlgos;
344 
345 }
346 
347 //-------------------------------------------------------------------------------------
348 // Method: enumToStringL1GtObject
349 // * Converts L1GtObject (enum) to string
350 //-------------------------------------------------------------------------------------
352 
353  string out;
354 
355  switch(iObject){
356  case Mu: out = "Mu"; break;
357  case NoIsoEG: out = "NoIsoEG"; break;
358  case IsoEG: out = "IsoEG"; break;
359  case CenJet: out = "CenJet"; break;
360  case ForJet: out = "ForJet"; break;
361  case TauJet: out = "TauJet"; break;
362  case ETM: out = "ETM"; break;
363  case ETT: out = "ETT"; break;
364  case HTT: out = "HTT"; break;
365  case HTM: out = "HTM"; break;
366  case JetCounts: out = "JetCounts"; break;
367  case HfBitCounts: out = "HfBitCounts"; break;
368  case HfRingEtSums: out = "HfRingEtSums"; break;
369  case TechTrig: out = "TechTrig"; break;
370  case Castor: out = "Castor"; break;
371  case BPTX: out = "BPTX"; break;
372  case GtExternal: out = "GtExternal"; break;
373  default: out = "Unknown"; break;
374  };
375 
376  return out;
377 
378 }
379 
380 //-------------------------------------------------------------------------------------
381 // Method: enumToStringL1GtConditionType
382 // * Converts L1GtConditionType (enum) to string
383 //-------------------------------------------------------------------------------------
385 
386  string out;
387 
388  switch(iConditionType){
389  case TypeNull: out = "TypeNull"; break;
390  case Type1s: out = "Type1s"; break;
391  case Type2s: out = "Type2s"; break;
392  case Type2wsc: out = "Type2wsc"; break;
393  case Type2cor: out = "Type2cor"; break;
394  case Type3s: out = "Type3s"; break;
395  case Type4s: out = "Type4s"; break;
396  case TypeETM: out = "TypeETM"; break;
397  case TypeETT: out = "TypeETT"; break;
398  case TypeHTT: out = "TypeHTT"; break;
399  case TypeHTM: out = "TypeHTM"; break;
400  case TypeJetCounts: out = "TypeJetCounts"; break;
401  case TypeCastor: out = "TypeCastor"; break;
402  case TypeHfBitCounts: out = "TypeHfBitCounts"; break;
403  case TypeHfRingEtSums: out = "TypeHfRingEtSums"; break;
404  case TypeBptx: out = "TypeBptx"; break;
405  case TypeExternal: out = "TypeExternal"; break;
406  default: out = "Unknown"; break;
407  };
408 
409  return out;
410 
411 }
412 
413 //__________________________________________________________________
414 // Method: enumToStringL1GtConditionCategory
415 // * Converts L1GtConditionCategory (enum) to string
416 //__________________________________________________________________
418 
419  string out;
420 
421  switch(iConditionCategory){
422  case CondNull: out = "CondNull"; break;
423  case CondMuon: out = "CondMuon"; break;
424  case CondCalo: out = "CondCalo"; break;
425  case CondEnergySum: out = "CondEnergySum"; break;
426  case CondJetCounts: out = "CondJetCounts"; break;
427  case CondCorrelation: out = "CondCorrelation"; break;
428  case CondCastor: out = "CondCastor"; break;
429  case CondHfBitCounts: out = "CondHfBitCounts"; break;
430  case CondHfRingEtSums: out = "CondHfRingEtSums"; break;
431  case CondBptx: out = "CondBptx"; break;
432  case CondExternal: out = "CondExternal"; break;
433  default: out = "Unknown"; break;
434  };
435 
436  return out;
437 
438 }
439 
440 //__________________________________________________________________
441 int L1TMenuHelper::getPrescaleByAlias(TString iCategory,TString iAlias){
442 
443  int out = -1;
444 
445  if(iCategory == "Mu"){
446  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].prescale;}}
447  }else if(iCategory == "EG"){
448  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].prescale;}}
449  }else if(iCategory == "IsoEG"){
450  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].prescale;}}
451  }else if(iCategory == "Jet"){
452  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].prescale;}}
453  }else if(iCategory == "CenJet"){
454  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].prescale;}}
455  }else if(iCategory == "ForJet"){
456  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].prescale;}}
457  }else if(iCategory == "TauJet"){
458  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].prescale;}}
459  }else if(iCategory == "ETT"){
460  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].prescale;}}
461  }else if(iCategory == "ETM"){
462  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].prescale;}}
463  }else if(iCategory == "HTT"){
464  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].prescale;}}
465  }else if(iCategory == "HTM"){
466  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].prescale;}}
467  }
468 
469  return out;
470 
471 }
472 
473 //__________________________________________________________________
474 unsigned int L1TMenuHelper::getEtaRangeByAlias(TString iCategory,TString iAlias){
475 
476  unsigned int out = -1;
477 
478  if(iCategory == "Mu"){
479  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].etaRange;}}
480  }else if(iCategory == "EG"){
481  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].etaRange;}}
482  }else if(iCategory == "IsoEG"){
483  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].etaRange;}}
484  }else if(iCategory == "Jet"){
485  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].etaRange;}}
486  }else if(iCategory == "CenJet"){
487  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].etaRange;}}
488  }else if(iCategory == "ForJet"){
489  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].etaRange;}}
490  }else if(iCategory == "TauJet"){
491  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].etaRange;}}
492  }else if(iCategory == "ETT"){
493  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].etaRange;}}
494  }else if(iCategory == "ETM"){
495  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].etaRange;}}
496  }else if(iCategory == "HTT"){
497  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].etaRange;}}
498  }else if(iCategory == "HTM"){
499  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].etaRange;}}
500  }
501 
502  return out;
503 
504 }
505 
506 //__________________________________________________________________
507 unsigned int L1TMenuHelper::getQualityAlias(TString iCategory,TString iAlias){
508 
509  unsigned int out = -1;
510 
511  if(iCategory == "Mu"){
512  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].quality;}}
513  }else if(iCategory == "EG"){
514  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].quality;}}
515  }else if(iCategory == "IsoEG"){
516  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].quality;}}
517  }else if(iCategory == "Jet"){
518  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].quality;}}
519  }else if(iCategory == "CenJet"){
520  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].quality;}}
521  }else if(iCategory == "ForJet"){
522  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].quality;}}
523  }else if(iCategory == "TauJet"){
524  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].quality;}}
525  }else if(iCategory == "ETT"){
526  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].quality;}}
527  }else if(iCategory == "ETM"){
528  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].quality;}}
529  }else if(iCategory == "HTT"){
530  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].quality;}}
531  }else if(iCategory == "HTM"){
532  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].quality;}}
533  }
534 
535  return out;
536 
537 }
int i
Definition: DBlmapReader.cc:9
L1GtConditionCategory conditionCategory
Definition: L1TMenuHelper.h:40
unsigned int quality
Definition: L1TMenuHelper.h:57
std::string enumToStringL1GtObject(L1GtObject iObject)
const int nrObjects() const
get number of trigger objects
Definition: L1GtObject.h:41
unsigned int etaRange
Definition: L1TMenuHelper.h:44
Definition: L1GtObject.h:38
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:55
L1GtConditionType conditionType
Definition: L1TMenuHelper.h:41
std::map< std::string, std::string > getLUSOTrigger(std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:88
L1GtConditionType
unsigned int threshold
Definition: L1TMenuHelper.h:56
unsigned int threshold
Definition: L1TMenuHelper.h:45
int getPrescaleByAlias(TString iCategory, TString iAlias)
unsigned int getQualityAlias(TString iCategory, TString iAlias)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
unsigned int quality
Definition: L1TMenuHelper.h:43
Definition: L1GtObject.h:40
const std::vector< L1GtLogicParser::TokenRPN > & algoRpnVector() const
return the RPN vector
Definition: L1GtAlgorithm.h:87
L1TMenuHelper(const edm::EventSetup &iSetup)
const std::vector< ObjectParameter > * objectParameter() const
const L1GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: L1GtCondition.h:77
const std::vector< ObjectParameter > * objectParameter() const
L1GtConditionCategory
condition categories
unsigned int bit
Definition: L1TMenuHelper.h:54
#define end
Definition: vmac.h:38
const L1GtConditionCategory & condCategory() const
get / set the category of the condition
Definition: L1GtCondition.h:66
unsigned int etaRange
Definition: L1TMenuHelper.h:58
unsigned int getEtaRangeByAlias(TString iCategory, TString iAlias)
tuple out
Definition: dbtoconf.py:99
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtObject.h:32
const T & get() const
Definition: EventSetup.h:55
double b
Definition: hdecay.h:120
Definition: L1GtObject.h:39
#define begin
Definition: vmac.h:31
double a
Definition: hdecay.h:121
std::string enumToStringL1GtConditionType(L1GtConditionType iConditionType)
std::map< std::string, std::string > testAlgos(std::map< std::string, std::string >)
const std::vector< ObjectParameter > * objectParameter() const
std::string enumToStringL1GtConditionCategory(L1GtConditionCategory iConditionCategory)
tuple size
Write out results.