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 enumToStringL1GtConditionCategory (L1GtConditionCategory iConditionCategory)
 
std::string enumToStringL1GtConditionType (L1GtConditionType iConditionType)
 
std::string enumToStringL1GtConditionType (L1GtConditionType iConditionType)
 
std::string enumToStringL1GtObject (L1GtObject iObject)
 
std::string enumToStringL1GtObject (L1GtObject iObject)
 
unsigned int getEtaRangeByAlias (TString iCategory, TString iAlias)
 
unsigned int getEtaRangeByAlias (TString iCategory, TString iAlias)
 
std::map< std::string,
std::string > 
getLUSOTrigger (std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
 
std::map< std::string,
std::string > 
getLUSOTrigger (std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
 
int getPrescaleByAlias (TString iCategory, TString iAlias)
 
int getPrescaleByAlias (TString iCategory, TString iAlias)
 
unsigned int getQualityAlias (TString iCategory, TString iAlias)
 
unsigned int getQualityAlias (TString iCategory, TString iAlias)
 
 L1TMenuHelper (const edm::EventSetup &iSetup)
 
 L1TMenuHelper (const edm::EventSetup &iSetup)
 
std::map< std::string,
std::string > 
testAlgos (std::map< std::string, std::string >)
 
std::map< std::string,
std::string > 
testAlgos (std::map< std::string, std::string >)
 
 ~L1TMenuHelper ()
 
 ~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 }
edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo
L1GtUtils myUtils
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 L1GtTriggerMenu * m_l1GtMenu
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::ESHandle< L1GtTriggerMenu > menuRcd
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
L1TMenuHelper::~L1TMenuHelper ( )

Definition at line 61 of file L1TMenuHelper.cc.

61 {}
L1TMenuHelper::L1TMenuHelper ( const edm::EventSetup iSetup)
L1TMenuHelper::~L1TMenuHelper ( )

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
std::string L1TMenuHelper::enumToStringL1GtConditionCategory ( L1GtConditionCategory  iConditionCategory)
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
std::string L1TMenuHelper::enumToStringL1GtConditionType ( L1GtConditionType  iConditionType)
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
std::string L1TMenuHelper::enumToStringL1GtObject ( L1GtObject  iObject)
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(), and L1TRate_Offline::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_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigEG
std::vector< SingleObjectTrigger > m_vTrigHTT
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigForJet
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigCenJet
unsigned int L1TMenuHelper::getEtaRangeByAlias ( TString  iCategory,
TString  iAlias 
)
std::map<std::string,std::string> L1TMenuHelper::getLUSOTrigger ( std::map< std::string, bool >  iCategories,
int  IndexRefPrescaleFactors 
)
std::map<std::string,std::string> L1TMenuHelper::getLUSOTrigger ( std::map< std::string, bool >  iCategories,
int  IndexRefPrescaleFactors 
)
int L1TMenuHelper::getPrescaleByAlias ( TString  iCategory,
TString  iAlias 
)

Definition at line 441 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

Referenced by L1TRate::beginRun(), and L1TRate_Offline::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_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigEG
std::vector< SingleObjectTrigger > m_vTrigHTT
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigForJet
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigCenJet
int L1TMenuHelper::getPrescaleByAlias ( TString  iCategory,
TString  iAlias 
)
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(), and L1TRate_Offline::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_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigEG
std::vector< SingleObjectTrigger > m_vTrigHTT
std::vector< SingleObjectTrigger > m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigForJet
tuple out
Definition: dbtoconf.py:99
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigCenJet
unsigned int L1TMenuHelper::getQualityAlias ( TString  iCategory,
TString  iAlias 
)
std::map<std::string,std::string> L1TMenuHelper::testAlgos ( std::map< std::string, std::string >  )
std::map<std::string,std::string> L1TMenuHelper::testAlgos ( std::map< std::string, std::string >  )

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.