CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1TMenuHelper Class Reference

#include <L1TMenuHelper.h>

List of all members.

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().

                                                       {

  iSetup.get<L1GtTriggerMenuRcd>()            .get(menuRcd);
  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);

  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();

  m_l1GtMenu                = menuRcd   .product();                 // Getting the menu
  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors()); // Retriving the list of prescale sets

  myUtils.retrieveL1EventSetup(iSetup);

}
L1TMenuHelper::~L1TMenuHelper ( )

Definition at line 61 of file L1TMenuHelper.cc.

{}                      
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.

                                                                                               {

  string out;

  switch(iConditionCategory){
    case CondNull:         out = "CondNull";         break;
    case CondMuon:         out = "CondMuon";         break;
    case CondCalo:         out = "CondCalo";         break;
    case CondEnergySum:    out = "CondEnergySum";    break;
    case CondJetCounts:    out = "CondJetCounts";    break;
    case CondCorrelation:  out = "CondCorrelation";  break;
    case CondCastor:       out = "CondCastor";       break;
    case CondHfBitCounts:  out = "CondHfBitCounts";  break;
    case CondHfRingEtSums: out = "CondHfRingEtSums"; break;
    case CondBptx:         out = "CondBptx";         break;
    case CondExternal:     out = "CondExternal";     break;
    default:               out = "Unknown";          break;
  };

  return out;

}
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.

                                                                                   {

  string out;

  switch(iConditionType){
    case TypeNull:         out = "TypeNull";         break;
    case Type1s:           out = "Type1s";           break;
    case Type2s:           out = "Type2s";           break;
    case Type2wsc:         out = "Type2wsc";         break;
    case Type2cor:         out = "Type2cor";         break;
    case Type3s:           out = "Type3s";           break;
    case Type4s:           out = "Type4s";           break;
    case TypeETM:          out = "TypeETM";          break;
    case TypeETT:          out = "TypeETT";          break;
    case TypeHTT:          out = "TypeHTT";          break;
    case TypeHTM:          out = "TypeHTM";          break;
    case TypeJetCounts:    out = "TypeJetCounts";    break;
    case TypeCastor:       out = "TypeCastor";       break;
    case TypeHfBitCounts:  out = "TypeHfBitCounts";  break;
    case TypeHfRingEtSums: out = "TypeHfRingEtSums"; break;
    case TypeBptx:         out = "TypeBptx";         break;
    case TypeExternal:     out = "TypeExternal";     break;
    default:               out = "Unknown";          break;
  };

  return out;

} 
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.

                                                              {

  string out;

  switch(iObject){
    case Mu:           out = "Mu";           break;
    case NoIsoEG:      out = "NoIsoEG";      break;
    case IsoEG:        out = "IsoEG";        break;
    case CenJet:       out = "CenJet";       break;
    case ForJet:       out = "ForJet";       break;
    case TauJet:       out = "TauJet";       break;
    case ETM:          out = "ETM";          break;
    case ETT:          out = "ETT";          break;
    case HTT:          out = "HTT";          break;
    case HTM:          out = "HTM";          break;
    case JetCounts:    out = "JetCounts";    break;
    case HfBitCounts:  out = "HfBitCounts";  break;
    case HfRingEtSums: out = "HfRingEtSums"; break;
    case TechTrig:     out = "TechTrig";     break;
    case Castor:       out = "Castor";       break;
    case BPTX:         out = "BPTX";         break;
    case GtExternal:   out = "GtExternal";   break;
    default:           out = "Unknown";      break;
  };

  return out;

}
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().

                                                                              {

    unsigned int out = -1;

    if(iCategory == "Mu"){ 
      for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias)        {return m_vTrigMu[i].etaRange;}} 
    }else if(iCategory == "EG"){ 
      for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias)        {return m_vTrigEG[i].etaRange;}} 
    }else if(iCategory == "IsoEG"){ 
      for(unsigned int i=0 ; i<m_vTrigIsoEG.size()  ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].etaRange;}} 
    }else if(iCategory == "Jet"){
      for(unsigned int i=0 ; i<m_vTrigJet.size()    ; i++){if(m_vTrigJet[i].alias==iAlias)   {return m_vTrigJet[i].etaRange;}} 
    }else if(iCategory == "CenJet"){ 
      for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].etaRange;}} 
    }else if(iCategory == "ForJet"){ 
      for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].etaRange;}} 
    }else if(iCategory == "TauJet"){ 
      for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].etaRange;}} 
    }else if(iCategory == "ETT"){ 
      for(unsigned int i=0 ; i<m_vTrigETT.size()    ; i++){if(m_vTrigETT[i].alias==iAlias)   {return m_vTrigETT[i].etaRange;}} 
    }else if(iCategory == "ETM"){ 
      for(unsigned int i=0 ; i<m_vTrigETM.size()    ; i++){if(m_vTrigETM[i].alias==iAlias)   {return m_vTrigETM[i].etaRange;}} 
    }else if(iCategory == "HTT"){ 
      for(unsigned int i=0 ; i<m_vTrigHTT.size()    ; i++){if(m_vTrigHTT[i].alias==iAlias)   {return m_vTrigHTT[i].etaRange;}}  
    }else if(iCategory == "HTM"){ 
      for(unsigned int i=0 ; i<m_vTrigHTM.size()    ; i++){if(m_vTrigHTM[i].alias==iAlias)   {return m_vTrigHTM[i].etaRange;}} 
    }

  return out;

}
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().

                                                                     {

    int out = -1;

    if(iCategory == "Mu"){ 
      for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias)        {return m_vTrigMu[i].prescale;}} 
    }else if(iCategory == "EG"){ 
      for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias)        {return m_vTrigEG[i].prescale;}} 
    }else if(iCategory == "IsoEG"){ 
      for(unsigned int i=0 ; i<m_vTrigIsoEG.size()  ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].prescale;}} 
    }else if(iCategory == "Jet"){
      for(unsigned int i=0 ; i<m_vTrigJet.size()    ; i++){if(m_vTrigJet[i].alias==iAlias)   {return m_vTrigJet[i].prescale;}} 
    }else if(iCategory == "CenJet"){ 
      for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].prescale;}}
    }else if(iCategory == "ForJet"){ 
      for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].prescale;}}
    }else if(iCategory == "TauJet"){ 
      for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].prescale;}}
    }else if(iCategory == "ETT"){ 
      for(unsigned int i=0 ; i<m_vTrigETT.size()    ; i++){if(m_vTrigETT[i].alias==iAlias)   {return m_vTrigETT[i].prescale;}}
    }else if(iCategory == "ETM"){ 
      for(unsigned int i=0 ; i<m_vTrigETM.size()    ; i++){if(m_vTrigETM[i].alias==iAlias)   {return m_vTrigETM[i].prescale;}}
    }else if(iCategory == "HTT"){ 
      for(unsigned int i=0 ; i<m_vTrigHTT.size()    ; i++){if(m_vTrigHTT[i].alias==iAlias)   {return m_vTrigHTT[i].prescale;}}
    }else if(iCategory == "HTM"){ 
      for(unsigned int i=0 ; i<m_vTrigHTM.size()    ; i++){if(m_vTrigHTM[i].alias==iAlias)   {return m_vTrigHTM[i].prescale;}}
    }

  return out;

}
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().

                                                                           {

    unsigned int out = -1;

    if(iCategory == "Mu"){ 
      for(unsigned int i=0 ; i<m_vTrigMu.size() ; i++){if(m_vTrigMu[i].alias==iAlias)        {return m_vTrigMu[i].quality;}} 
    }else if(iCategory == "EG"){ 
      for(unsigned int i=0 ; i<m_vTrigEG.size() ; i++){if(m_vTrigEG[i].alias==iAlias)        {return m_vTrigEG[i].quality;}} 
    }else if(iCategory == "IsoEG"){ 
      for(unsigned int i=0 ; i<m_vTrigIsoEG.size()  ; i++){if(m_vTrigIsoEG[i].alias==iAlias) {return m_vTrigIsoEG[i].quality;}} 
    }else if(iCategory == "Jet"){
      for(unsigned int i=0 ; i<m_vTrigJet.size()    ; i++){if(m_vTrigJet[i].alias==iAlias)   {return m_vTrigJet[i].quality;}} 
    }else if(iCategory == "CenJet"){ 
      for(unsigned int i=0 ; i<m_vTrigCenJet.size() ; i++){if(m_vTrigCenJet[i].alias==iAlias){return m_vTrigCenJet[i].quality;}} 
    }else if(iCategory == "ForJet"){ 
      for(unsigned int i=0 ; i<m_vTrigForJet.size() ; i++){if(m_vTrigForJet[i].alias==iAlias){return m_vTrigForJet[i].quality;}} 
    }else if(iCategory == "TauJet"){ 
      for(unsigned int i=0 ; i<m_vTrigTauJet.size() ; i++){if(m_vTrigTauJet[i].alias==iAlias){return m_vTrigTauJet[i].quality;}} 
    }else if(iCategory == "ETT"){ 
      for(unsigned int i=0 ; i<m_vTrigETT.size()    ; i++){if(m_vTrigETT[i].alias==iAlias)   {return m_vTrigETT[i].quality;}} 
    }else if(iCategory == "ETM"){ 
      for(unsigned int i=0 ; i<m_vTrigETM.size()    ; i++){if(m_vTrigETM[i].alias==iAlias)   {return m_vTrigETM[i].quality;}} 
    }else if(iCategory == "HTT"){ 
      for(unsigned int i=0 ; i<m_vTrigHTT.size()    ; i++){if(m_vTrigHTT[i].alias==iAlias)   {return m_vTrigHTT[i].quality;}}  
    }else if(iCategory == "HTM"){ 
      for(unsigned int i=0 ; i<m_vTrigHTM.size()    ; i++){if(m_vTrigHTM[i].alias==iAlias)   {return m_vTrigHTM[i].quality;}} 
    }

  return out;

}
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

Definition at line 102 of file L1TMenuHelper.h.

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.

Definition at line 114 of file L1TMenuHelper.h.

Definition at line 111 of file L1TMenuHelper.h.

Definition at line 117 of file L1TMenuHelper.h.

Definition at line 118 of file L1TMenuHelper.h.

Definition at line 115 of file L1TMenuHelper.h.

Definition at line 120 of file L1TMenuHelper.h.

Definition at line 119 of file L1TMenuHelper.h.

Definition at line 112 of file L1TMenuHelper.h.

Definition at line 113 of file L1TMenuHelper.h.

Definition at line 110 of file L1TMenuHelper.h.

Definition at line 116 of file L1TMenuHelper.h.

Definition at line 101 of file L1TMenuHelper.h.

Definition at line 104 of file L1TMenuHelper.h.