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 (const TString &iCategory, const TString &iAlias)
 
unsigned int getEtaRangeByAlias (const TString &iCategory, const TString &iAlias)
 
std::map< std::string,
std::string > 
getLUSOTrigger (const 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 (const TString &iCategory, const TString &iAlias)
 
int getPrescaleByAlias (const TString &iCategory, const TString &iAlias)
 
unsigned int getQualityAlias (const TString &iCategory, const TString &iAlias)
 
unsigned int getQualityAlias (const TString &iCategory, const 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 (const 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 75 of file L1TMenuHelper.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file L1TMenuHelper.cc.

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

41  {
42 
43  iSetup.get<L1GtTriggerMenuRcd>() .get(menuRcd);
45 
46  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
47 
48  m_l1GtMenu = menuRcd .product(); // Getting the menu
49  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors()); // Retriving the list of prescale sets
50 
52 
53 }
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:111
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
Definition: L1TMenuHelper.h:99
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
L1TMenuHelper::~L1TMenuHelper ( )

Definition at line 59 of file L1TMenuHelper.cc.

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

Member Function Documentation

string L1TMenuHelper::enumToStringL1GtConditionCategory ( L1GtConditionCategory  iConditionCategory)

Definition at line 414 of file L1TMenuHelper.cc.

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

414  {
415 
416  string out;
417 
418  switch(iConditionCategory){
419  case CondNull: out = "CondNull"; break;
420  case CondMuon: out = "CondMuon"; break;
421  case CondCalo: out = "CondCalo"; break;
422  case CondEnergySum: out = "CondEnergySum"; break;
423  case CondJetCounts: out = "CondJetCounts"; break;
424  case CondCorrelation: out = "CondCorrelation"; break;
425  case CondCastor: out = "CondCastor"; break;
426  case CondHfBitCounts: out = "CondHfBitCounts"; break;
427  case CondHfRingEtSums: out = "CondHfRingEtSums"; break;
428  case CondBptx: out = "CondBptx"; break;
429  case CondExternal: out = "CondExternal"; break;
430  default: out = "Unknown"; break;
431  };
432 
433  return out;
434 
435 }
tuple out
Definition: dbtoconf.py:99
std::string L1TMenuHelper::enumToStringL1GtConditionCategory ( L1GtConditionCategory  iConditionCategory)
string L1TMenuHelper::enumToStringL1GtConditionType ( L1GtConditionType  iConditionType)

Definition at line 381 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.

381  {
382 
383  string out;
384 
385  switch(iConditionType){
386  case TypeNull: out = "TypeNull"; break;
387  case Type1s: out = "Type1s"; break;
388  case Type2s: out = "Type2s"; break;
389  case Type2wsc: out = "Type2wsc"; break;
390  case Type2cor: out = "Type2cor"; break;
391  case Type3s: out = "Type3s"; break;
392  case Type4s: out = "Type4s"; break;
393  case TypeETM: out = "TypeETM"; break;
394  case TypeETT: out = "TypeETT"; break;
395  case TypeHTT: out = "TypeHTT"; break;
396  case TypeHTM: out = "TypeHTM"; break;
397  case TypeJetCounts: out = "TypeJetCounts"; break;
398  case TypeCastor: out = "TypeCastor"; break;
399  case TypeHfBitCounts: out = "TypeHfBitCounts"; break;
400  case TypeHfRingEtSums: out = "TypeHfRingEtSums"; break;
401  case TypeBptx: out = "TypeBptx"; break;
402  case TypeExternal: out = "TypeExternal"; break;
403  default: out = "Unknown"; break;
404  };
405 
406  return out;
407 
408 }
tuple out
Definition: dbtoconf.py:99
std::string L1TMenuHelper::enumToStringL1GtConditionType ( L1GtConditionType  iConditionType)
string L1TMenuHelper::enumToStringL1GtObject ( L1GtObject  iObject)

Definition at line 348 of file L1TMenuHelper.cc.

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

348  {
349 
350  string out;
351 
352  switch(iObject){
353  case Mu: out = "Mu"; break;
354  case NoIsoEG: out = "NoIsoEG"; break;
355  case IsoEG: out = "IsoEG"; break;
356  case CenJet: out = "CenJet"; break;
357  case ForJet: out = "ForJet"; break;
358  case TauJet: out = "TauJet"; break;
359  case ETM: out = "ETM"; break;
360  case ETT: out = "ETT"; break;
361  case HTT: out = "HTT"; break;
362  case HTM: out = "HTM"; break;
363  case JetCounts: out = "JetCounts"; break;
364  case HfBitCounts: out = "HfBitCounts"; break;
365  case HfRingEtSums: out = "HfRingEtSums"; break;
366  case TechTrig: out = "TechTrig"; break;
367  case Castor: out = "Castor"; break;
368  case BPTX: out = "BPTX"; break;
369  case GtExternal: out = "GtExternal"; break;
370  default: out = "Unknown"; break;
371  };
372 
373  return out;
374 
375 }
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
Definition: L1GtObject.h:38
tuple out
Definition: dbtoconf.py:99
Definition: L1GtObject.h:30
Definition: L1GtObject.h:37
std::string L1TMenuHelper::enumToStringL1GtObject ( L1GtObject  iObject)
unsigned int L1TMenuHelper::getEtaRangeByAlias ( const TString &  iCategory,
const TString &  iAlias 
)

Definition at line 471 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

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

471  {
472 
473  unsigned int out = -1;
474 
475  if(iCategory == "Mu"){
476  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].etaRange;}}
477  }else if(iCategory == "EG"){
478  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].etaRange;}}
479  }else if(iCategory == "IsoEG"){
480  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].etaRange;}}
481  }else if(iCategory == "Jet"){
482  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].etaRange;}}
483  }else if(iCategory == "CenJet"){
484  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].etaRange;}}
485  }else if(iCategory == "ForJet"){
486  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].etaRange;}}
487  }else if(iCategory == "TauJet"){
488  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].etaRange;}}
489  }else if(iCategory == "ETT"){
490  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].etaRange;}}
491  }else if(iCategory == "ETM"){
492  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].etaRange;}}
493  }else if(iCategory == "HTT"){
494  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].etaRange;}}
495  }else if(iCategory == "HTM"){
496  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].etaRange;}}
497  }
498 
499  return out;
500 
501 }
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 ( const TString &  iCategory,
const 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 ( const std::map< std::string, bool > &  iCategories,
int  IndexRefPrescaleFactors 
)
int L1TMenuHelper::getPrescaleByAlias ( const TString &  iCategory,
const TString &  iAlias 
)

Definition at line 438 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

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

438  {
439 
440  int out = -1;
441 
442  if(iCategory == "Mu"){
443  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].prescale;}}
444  }else if(iCategory == "EG"){
445  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].prescale;}}
446  }else if(iCategory == "IsoEG"){
447  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].prescale;}}
448  }else if(iCategory == "Jet"){
449  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].prescale;}}
450  }else if(iCategory == "CenJet"){
451  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].prescale;}}
452  }else if(iCategory == "ForJet"){
453  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].prescale;}}
454  }else if(iCategory == "TauJet"){
455  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].prescale;}}
456  }else if(iCategory == "ETT"){
457  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].prescale;}}
458  }else if(iCategory == "ETM"){
459  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].prescale;}}
460  }else if(iCategory == "HTT"){
461  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].prescale;}}
462  }else if(iCategory == "HTM"){
463  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].prescale;}}
464  }
465 
466  return out;
467 
468 }
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 ( const TString &  iCategory,
const TString &  iAlias 
)
unsigned int L1TMenuHelper::getQualityAlias ( const TString &  iCategory,
const TString &  iAlias 
)

Definition at line 504 of file L1TMenuHelper.cc.

References i, and dbtoconf::out.

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

504  {
505 
506  unsigned int out = -1;
507 
508  if(iCategory == "Mu"){
509  for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias) {return m_vTrigMu[i].quality;}}
510  }else if(iCategory == "EG"){
511  for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias) {return m_vTrigEG[i].quality;}}
512  }else if(iCategory == "IsoEG"){
513  for(unsigned int i=0 ; i<m_vTrigIsoEG.size() ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].quality;}}
514  }else if(iCategory == "Jet"){
515  for(unsigned int i=0 ; i<m_vTrigJet.size() ; i++){if(m_vTrigJet[i].alias==iAlias) {return m_vTrigJet[i].quality;}}
516  }else if(iCategory == "CenJet"){
517  for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].quality;}}
518  }else if(iCategory == "ForJet"){
519  for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].quality;}}
520  }else if(iCategory == "TauJet"){
521  for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].quality;}}
522  }else if(iCategory == "ETT"){
523  for(unsigned int i=0 ; i<m_vTrigETT.size() ; i++){if(m_vTrigETT[i].alias==iAlias) {return m_vTrigETT[i].quality;}}
524  }else if(iCategory == "ETM"){
525  for(unsigned int i=0 ; i<m_vTrigETM.size() ; i++){if(m_vTrigETM[i].alias==iAlias) {return m_vTrigETM[i].quality;}}
526  }else if(iCategory == "HTT"){
527  for(unsigned int i=0 ; i<m_vTrigHTT.size() ; i++){if(m_vTrigHTT[i].alias==iAlias) {return m_vTrigHTT[i].quality;}}
528  }else if(iCategory == "HTM"){
529  for(unsigned int i=0 ; i<m_vTrigHTM.size() ; i++){if(m_vTrigHTM[i].alias==iAlias) {return m_vTrigHTM[i].quality;}}
530  }
531 
532  return out;
533 
534 }
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 ( const TString &  iCategory,
const TString &  iAlias 
)
std::map<std::string,std::string> L1TMenuHelper::testAlgos ( std::map< std::string, std::string >  )
std::map<std::string,std::string> L1TMenuHelper::testAlgos ( const std::map< std::string, std::string > &  )

Member Data Documentation

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

Definition at line 100 of file L1TMenuHelper.h.

const L1GtTriggerMenu * L1TMenuHelper::m_l1GtMenu
private

Definition at line 104 of file L1TMenuHelper.h.

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

Definition at line 105 of file L1TMenuHelper.h.

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

Definition at line 112 of file L1TMenuHelper.h.

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

Definition at line 109 of file L1TMenuHelper.h.

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

Definition at line 115 of file L1TMenuHelper.h.

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

Definition at line 116 of file L1TMenuHelper.h.

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

Definition at line 113 of file L1TMenuHelper.h.

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

Definition at line 118 of file L1TMenuHelper.h.

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

Definition at line 117 of file L1TMenuHelper.h.

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

Definition at line 110 of file L1TMenuHelper.h.

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

Definition at line 111 of file L1TMenuHelper.h.

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

Definition at line 108 of file L1TMenuHelper.h.

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

Definition at line 114 of file L1TMenuHelper.h.

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

Definition at line 99 of file L1TMenuHelper.h.

L1GtUtils L1TMenuHelper::myUtils
private

Definition at line 102 of file L1TMenuHelper.h.