CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1TMenuHelper Class Reference

#include <L1TMenuHelper.h>

Public Member Functions

std::string enumToStringL1GtConditionCategory (L1GtConditionCategory iConditionCategory)
 
std::string enumToStringL1GtConditionType (L1GtConditionType iConditionType)
 
std::string enumToStringL1GtObject (L1GtObject iObject)
 
unsigned int getEtaRangeByAlias (TString iCategory, TString iAlias)
 
std::map< std::string,
std::string > 
getLUSOTrigger (std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
 
int getPrescaleByAlias (TString iCategory, TString iAlias)
 
unsigned int getQualityAlias (TString iCategory, TString iAlias)
 
 L1TMenuHelper (const edm::EventSetup &iSetup)
 
std::map< std::string,
std::string > 
testAlgos (std::map< std::string, std::string >)
 
 ~L1TMenuHelper ()
 

Private Attributes

edm::ESHandle
< L1GtPrescaleFactors
l1GtPfAlgo
 
const L1GtTriggerMenum_l1GtMenu
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsAlgoTrig
 
std::vector< SingleObjectTriggerm_vTrigCenJet
 
std::vector< SingleObjectTriggerm_vTrigEG
 
std::vector< SingleObjectTriggerm_vTrigETM
 
std::vector< SingleObjectTriggerm_vTrigETT
 
std::vector< SingleObjectTriggerm_vTrigForJet
 
std::vector< SingleObjectTriggerm_vTrigHTM
 
std::vector< SingleObjectTriggerm_vTrigHTT
 
std::vector< SingleObjectTriggerm_vTrigIsoEG
 
std::vector< SingleObjectTriggerm_vTrigJet
 
std::vector< SingleObjectTriggerm_vTrigMu
 
std::vector< SingleObjectTriggerm_vTrigTauJet
 
edm::ESHandle< L1GtTriggerMenumenuRcd
 
L1GtUtils myUtils
 

Detailed Description

Definition at line 77 of file L1TMenuHelper.h.

Constructor & Destructor Documentation

L1TMenuHelper::L1TMenuHelper ( const edm::EventSetup iSetup)

Definition at line 43 of file L1TMenuHelper.cc.

References edm::EventSetup::get(), and L1GtPrescaleFactors::gtPrescaleFactors().

43  {
44 
45  iSetup.get<L1GtTriggerMenuRcd>() .get(menuRcd);
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 
54 
55 }
L1GtUtils myUtils
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const L1GtTriggerMenu * m_l1GtMenu
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:113
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
edm::ESHandle< L1GtTriggerMenu > menuRcd
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo
L1TMenuHelper::~L1TMenuHelper ( )

Definition at line 61 of file L1TMenuHelper.cc.

61 {}

Member Function Documentation

string L1TMenuHelper::enumToStringL1GtConditionCategory ( L1GtConditionCategory  iConditionCategory)

Definition at line 417 of file L1TMenuHelper.cc.

References CondBptx, CondCalo, CondCastor, CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, CondMuon, CondNull, and dbtoconf::out.

417  {
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 }
tuple out
Definition: dbtoconf.py:99
string L1TMenuHelper::enumToStringL1GtConditionType ( L1GtConditionType  iConditionType)

Definition at line 384 of file L1TMenuHelper.cc.

References dbtoconf::out, Type1s, Type2cor, Type2s, Type2wsc, Type3s, Type4s, TypeBptx, TypeCastor, TypeETM, TypeETT, TypeExternal, TypeHfBitCounts, TypeHfRingEtSums, TypeHTM, TypeHTT, TypeJetCounts, and TypeNull.

384  {
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 }
tuple out
Definition: dbtoconf.py:99
string L1TMenuHelper::enumToStringL1GtObject ( L1GtObject  iObject)

Definition at line 351 of file L1TMenuHelper.cc.

References BPTX, CenJet, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, IsoEG, JetCounts, Mu, NoIsoEG, dbtoconf::out, TauJet, and TechTrig.

351  {
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 }
Definition: L1GtObject.h:41
Definition: L1GtObject.h:38
Definition: L1GtObject.h:40
tuple out
Definition: dbtoconf.py:99
Definition: L1GtObject.h:32
Definition: L1GtObject.h:39
unsigned int L1TMenuHelper::getEtaRangeByAlias ( TString  iCategory,
TString  iAlias 
)

Definition at line 474 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

Referenced by L1TRate::beginRun().

474  {
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 }
int i
Definition: DBlmapReader.cc:9
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTT
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG
map< string, string > L1TMenuHelper::getLUSOTrigger ( std::map< std::string, bool >  iCategories,
int  IndexRefPrescaleFactors 
)

Definition at line 67 of file L1TMenuHelper.cc.

References a, L1GtAlgorithm::algoRpnVector(), SingleObjectTrigger::alias, b, begin, SingleObjectTrigger::bit, CenJet, L1GtCondition::condCategory(), SingleObjectCondition::conditionCategory, SingleObjectCondition::conditionType, L1GtCondition::condName(), L1GtCondition::condType(), end, error, MuonErrorMatrixValues_cff::etaRange, SingleObjectCondition::etaRange, SingleObjectTrigger::etaRange, ETM, ETT, ForJet, HTM, HTT, i, IsoEG, Mu, SingleObjectCondition::name, NoIsoEG, L1GtCondition::nrObjects(), SingleObjectCondition::object, SingleObjectTrigger::object, L1GtEnergySumTemplate::objectParameter(), L1GtCaloTemplate::objectParameter(), L1GtMuonTemplate::objectParameter(), L1GtCondition::objectType(), L1GtLogicParser::OP_AND, L1GtLogicParser::OP_OPERAND, dbtoconf::out, SingleObjectTrigger::prescale, SingleObjectCondition::quality, SingleObjectTrigger::quality, findQualityFiles::size, python.multivaluedict::sort(), TauJet, SingleObjectCondition::threshold, SingleObjectTrigger::threshold, Type1s, TypeETM, TypeETT, TypeHTM, and TypeHTT.

Referenced by L1TRate::beginRun(), and L1TSync::beginRun().

67  {
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 }
int i
Definition: DBlmapReader.cc:9
L1GtConditionCategory conditionCategory
Definition: L1TMenuHelper.h:40
std::vector< SingleObjectTrigger > m_vTrigJet
unsigned int quality
Definition: L1TMenuHelper.h:57
L1GtUtils myUtils
const int nrObjects() const
get number of trigger objects
Definition: L1GtObject.h:41
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigMu
unsigned int etaRange
Definition: L1TMenuHelper.h:44
Definition: L1GtObject.h:38
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
const L1GtTriggerMenu * m_l1GtMenu
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:55
L1GtConditionType conditionType
Definition: L1TMenuHelper.h:41
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:88
std::vector< SingleObjectTrigger > m_vTrigTauJet
unsigned int threshold
Definition: L1TMenuHelper.h:56
unsigned int threshold
Definition: L1TMenuHelper.h:45
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
unsigned int quality
Definition: L1TMenuHelper.h:43
Definition: L1GtObject.h:40
std::vector< SingleObjectTrigger > m_vTrigHTM
const std::vector< L1GtLogicParser::TokenRPN > & algoRpnVector() const
return the RPN vector
Definition: L1GtAlgorithm.h:87
std::vector< SingleObjectTrigger > m_vTrigHTT
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
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
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigIsoEG
Definition: L1GtObject.h:32
double b
Definition: hdecay.h:120
const std::vector< std::vector< L1GtCaloTemplate > > & vecCaloTemplate() const
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1522
Definition: L1GtObject.h:39
#define begin
Definition: vmac.h:31
double a
Definition: hdecay.h:121
const std::vector< std::vector< L1GtMuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
const std::vector< ObjectParameter > * objectParameter() const
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
const std::vector< std::vector< L1GtEnergySumTemplate > > & vecEnergySumTemplate() const
tuple size
Write out results.
int L1TMenuHelper::getPrescaleByAlias ( TString  iCategory,
TString  iAlias 
)

Definition at line 441 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

Referenced by L1TRate::beginRun().

441  {
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 }
int i
Definition: DBlmapReader.cc:9
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTT
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG
unsigned int L1TMenuHelper::getQualityAlias ( TString  iCategory,
TString  iAlias 
)

Definition at line 507 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

Referenced by L1TRate::beginRun().

507  {
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
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTT
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG
map< string, string > L1TMenuHelper::testAlgos ( std::map< std::string, std::string >  )

Definition at line 326 of file L1TMenuHelper.cc.

References i.

Referenced by L1TSync::beginRun().

326  {
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 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
const L1GtTriggerMenu * m_l1GtMenu
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)

Member Data Documentation

edm::ESHandle<L1GtPrescaleFactors> L1TMenuHelper::l1GtPfAlgo
private

Definition at line 102 of file L1TMenuHelper.h.

const L1GtTriggerMenu* L1TMenuHelper::m_l1GtMenu
private

Definition at line 106 of file L1TMenuHelper.h.

const std::vector<std::vector<int> >* L1TMenuHelper::m_prescaleFactorsAlgoTrig
private

Definition at line 107 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigCenJet
private

Definition at line 114 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigEG
private

Definition at line 111 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigETM
private

Definition at line 117 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigETT
private

Definition at line 118 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigForJet
private

Definition at line 115 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigHTM
private

Definition at line 120 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigHTT
private

Definition at line 119 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigIsoEG
private

Definition at line 112 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigJet
private

Definition at line 113 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigMu
private

Definition at line 110 of file L1TMenuHelper.h.

std::vector<SingleObjectTrigger> L1TMenuHelper::m_vTrigTauJet
private

Definition at line 116 of file L1TMenuHelper.h.

edm::ESHandle<L1GtTriggerMenu> L1TMenuHelper::menuRcd
private

Definition at line 101 of file L1TMenuHelper.h.

L1GtUtils L1TMenuHelper::myUtils
private

Definition at line 104 of file L1TMenuHelper.h.