CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
L1GtUtils Class Reference

#include <L1GtUtils.h>

Classes

class  LogicalExpressionL1Results
 

Public Types

enum  TriggerCategory { AlgorithmTrigger = 0, TechnicalTrigger = 1 }
 
enum  UseEventSetupIn { UseEventSetupIn::Run, UseEventSetupIn::Event, UseEventSetupIn::RunAndEvent, UseEventSetupIn::Nothing }
 

Public Member Functions

const bool availableL1Configuration (int &errorCode, int &l1ConfCode) const
 
const bool decision (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const bool decisionAfterMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision after trigger mask for a given algorithm or technical trigger More...
 
const bool decisionBeforeMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision before trigger mask for a given algorithm or technical trigger More...
 
void getL1GtRunCache (const edm::Event &, const edm::EventSetup &, const bool, const bool)
 for use in analyze(const edm::Event&, const edm::EventSetup&) More...
 
void getL1GtRunCache (const edm::Run &, const edm::EventSetup &, const bool, const bool)
 get all the run-constant quantities for L1 trigger and cache them More...
 
const bool l1AlgoTechTrigBitNumber (const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, T &module, edm::InputTag const &l1GtRecordInputTag, edm::InputTag const &l1GtReadoutRecordInputTag, edm::InputTag const &l1GtTriggerMenuLiteInputTag, UseEventSetupIn use=UseEventSetupIn::Run)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, T &module, UseEventSetupIn use=UseEventSetupIn::Run)
 
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, UseEventSetupIn use=UseEventSetupIn::Run)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite, T &module, edm::InputTag const &l1GtRecordInputTag, edm::InputTag const &l1GtReadoutRecordInputTag, edm::InputTag const &l1GtTriggerMenuLiteInputTag, UseEventSetupIn use=UseEventSetupIn::Run)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite, T &module, UseEventSetupIn use=UseEventSetupIn::Run)
 
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite, UseEventSetupIn use=UseEventSetupIn::Run)
 
const int l1Results (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
 
const std::string & l1TriggerMenu () const
 return the L1 trigger menu name More...
 
const std::string & l1TriggerMenuImplementation () const
 return the L1 trigger menu implementation More...
 
const bool l1TriggerNameFromBit (const int &bitNumber, const TriggerCategory &trigCategory, std::string &aliasL1Trigger, std::string &nameL1Trigger) const
 
const int prescaleFactor (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return prescale factor for a given algorithm or technical trigger More...
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode)
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
 
const L1GtTriggerMenuLiteptrL1GtTriggerMenuLite (int &errorCode)
 return a pointer to the L1GtTriggerMenuLite product More...
 
const L1GtTriggerMenuptrL1TriggerMenuEventSetup (int &errorCode)
 return a pointer to the L1 trigger menu from event setup More...
 
void retrieveL1EventSetup (const edm::EventSetup &, bool isRun=true)
 retrieve all the relevant L1 trigger event setup records and cache them to improve the speed More...
 
void retrieveL1GtTriggerMenuLite (const edm::Run &)
 retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed More...
 
const std::string triggerCategory (const TriggerCategory &) const
 public methods More...
 
const int triggerMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return trigger mask for a given algorithm or technical trigger More...
 
const int triggerMask (const std::string &nameAlgoTechTrig, int &errorCode) const
 
const std::vector< unsigned int > & triggerMaskSet (const TriggerCategory &trigCategory, int &errorCode)
 
virtual ~L1GtUtils ()
 destructor More...
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &desc)
 

Private Member Functions

 L1GtUtils (edm::ConsumesCollector &, UseEventSetupIn)
 
const bool trigResult (const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
 

Private Attributes

const AlgorithmMapm_algorithmAliasMap
 
const L1GtTriggerMenuLite::L1TriggerMapm_algorithmAliasMapLite
 
const AlgorithmMapm_algorithmMap
 
const L1GtTriggerMenuLite::L1TriggerMapm_algorithmMapLite
 
bool m_beginRunCache
 flag for call of getL1GtRunCache in beginRun More...
 
bool m_l1EventSetupValid
 
const L1GtTriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1GtTriggerMenuLitem_l1GtMenuLite
 L1GtTriggerMenuLite cached stuff. More...
 
bool m_l1GtMenuLiteValid
 
const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
unsigned long long m_l1GtPfAlgoCacheID
 
const L1GtPrescaleFactorsm_l1GtPfTech
 
unsigned long long m_l1GtPfTechCacheID
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcdm_L1GtPrescaleFactorsAlgoTrigEventToken
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcdm_L1GtPrescaleFactorsAlgoTrigRunToken
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcdm_L1GtPrescaleFactorsTechTrigEventToken
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcdm_L1GtPrescaleFactorsTechTrigRunToken
 
const L1GtStableParametersm_l1GtStablePar
 event setup cached stuff More...
 
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcdm_L1GtStableParametersEventToken
 
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcdm_L1GtStableParametersRunToken
 
unsigned long long m_l1GtStableParCacheID
 
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks More...
 
unsigned long long m_l1GtTmAlgoCacheID
 
const L1GtTriggerMaskm_l1GtTmTech
 
unsigned long long m_l1GtTmTechCacheID
 
const L1GtTriggerMaskm_l1GtTmVetoAlgo
 
unsigned long long m_l1GtTmVetoAlgoCacheID
 
const L1GtTriggerMaskm_l1GtTmVetoTech
 
unsigned long long m_l1GtTmVetoTechCacheID
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcdm_L1GtTriggerMaskAlgoTrigEventToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcdm_L1GtTriggerMaskAlgoTrigRunToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcdm_L1GtTriggerMaskTechTrigEventToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcdm_L1GtTriggerMaskTechTrigRunToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcdm_L1GtTriggerMaskVetoAlgoTrigEventToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcdm_L1GtTriggerMaskVetoAlgoTrigRunToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcdm_L1GtTriggerMaskVetoTechTrigEventToken
 
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcdm_L1GtTriggerMaskVetoTechTrigRunToken
 
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcdm_L1GtTriggerMenuEventToken
 
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcdm_L1GtTriggerMenuRunToken
 
std::unique_ptr< L1GtUtilsHelperm_l1GtUtilsHelper
 
unsigned int m_numberAlgorithmTriggers
 number of algorithm triggers More...
 
unsigned int m_numberTechnicalTriggers
 number of technical triggers More...
 
unsigned int m_physicsDaqPartition
 index of physics DAQ partition More...
 
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
 
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
 
std::vector< int > m_prescaleFactorSet
 
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
 
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
 
bool m_retrieveL1EventSetup
 flags to check which method was used to retrieve L1 trigger configuration More...
 
bool m_retrieveL1GtTriggerMenuLite
 
edm::RunID m_runIDCache
 run cache ID More...
 
const AlgorithmMapm_technicalTriggerMap
 
const L1GtTriggerMenuLite::L1TriggerMapm_technicalTriggerMapLite
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
 
std::vector< unsigned int > m_triggerMaskSet
 
const std::vector< unsigned int > * m_triggerMaskTechTrig
 
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
 
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
 

Static Private Attributes

static const std::string EmptyString = ""
 
static const int L1GtNotValidError = 99999
 

Detailed Description

Description: various methods for L1 GT, to be called in an EDM analyzer, producer or filter.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Description: return L1 trigger results for a logical expression.

Implementation: Return L1 trigger results for a logical expression of algorithm or technical triggers. Mixture of algorithm and technical triggers in the logical expression is allowed only if trigger names or aliases are used. Mixing bit numbers and names or aliases is not supported. If the expression has bit numbers, they are assumed to be technical triggers.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 66 of file L1GtUtils.h.

Member Enumeration Documentation

◆ TriggerCategory

Enumerator
AlgorithmTrigger 
TechnicalTrigger 

Definition at line 140 of file L1GtUtils.h.

◆ UseEventSetupIn

Enumerator
Run 
Event 
RunAndEvent 
Nothing 

Definition at line 76 of file L1GtUtils.h.

76 { Run, Event, RunAndEvent, Nothing };

Constructor & Destructor Documentation

◆ L1GtUtils() [1/7]

L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

Definition at line 92 of file L1GtUtils.cc.

96  : L1GtUtils(pset, iC, useL1GtTriggerMenuLite, useEventSetupIn) {}

◆ L1GtUtils() [2/7]

L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

Definition at line 98 of file L1GtUtils.cc.

102  : L1GtUtils(iC, useEventSetupIn) {
104 }

References m_l1GtUtilsHelper, muonDTDigis_cfi::pset, and useL1GtTriggerMenuLite().

◆ L1GtUtils() [3/7]

template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite,
T module,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

Definition at line 497 of file L1GtUtils.h.

502  : L1GtUtils(pset, iC, useL1GtTriggerMenuLite, module, useEventSetupIn) {}

◆ L1GtUtils() [4/7]

template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite,
T module,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

Definition at line 505 of file L1GtUtils.h.

510  : L1GtUtils(iC, useEventSetupIn) {
512 }

References m_l1GtUtilsHelper, muonDTDigis_cfi::pset, and useL1GtTriggerMenuLite().

◆ L1GtUtils() [5/7]

template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite,
T module,
edm::InputTag const &  l1GtRecordInputTag,
edm::InputTag const &  l1GtReadoutRecordInputTag,
edm::InputTag const &  l1GtTriggerMenuLiteInputTag,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

Definition at line 515 of file L1GtUtils.h.

523  : L1GtUtils(pset,
524  iC,
526  module,
530  useEventSetupIn) {}

◆ L1GtUtils() [6/7]

template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite,
T module,
edm::InputTag const &  l1GtRecordInputTag,
edm::InputTag const &  l1GtReadoutRecordInputTag,
edm::InputTag const &  l1GtTriggerMenuLiteInputTag,
UseEventSetupIn  use = UseEventSetupIn::Run 
)

◆ ~L1GtUtils()

L1GtUtils::~L1GtUtils ( )
virtual

destructor

Definition at line 107 of file L1GtUtils.cc.

107  {
108  // empty
109 }

◆ L1GtUtils() [7/7]

L1GtUtils::L1GtUtils ( edm::ConsumesCollector iC,
UseEventSetupIn  useEventSetupIn 
)
private

Definition at line 29 of file L1GtUtils.cc.

30  :
31 
34 
36 
37  m_l1GtPfAlgoCacheID(0ULL),
38  m_l1GtPfTechCacheID(0ULL),
39 
40  m_l1GtTmAlgoCacheID(0ULL),
41  m_l1GtTmTechCacheID(0ULL),
42 
45 
46  m_l1GtMenuCacheID(0ULL),
47 
48  m_l1EventSetupValid(false),
49 
50  m_l1GtMenuLiteValid(false),
51 
52  m_beginRunCache(false),
53 
54  m_runIDCache(0),
55 
57 
59 
61 
62 {
63  if (useEventSetupIn == UseEventSetupIn::Run || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
79  }
80  if (useEventSetupIn == UseEventSetupIn::Event || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
89  }
90 }

References edm::BeginRun, edm::ConsumesCollector::esConsumes(), Event, m_L1GtPrescaleFactorsAlgoTrigEventToken, m_L1GtPrescaleFactorsAlgoTrigRunToken, m_L1GtPrescaleFactorsTechTrigEventToken, m_L1GtPrescaleFactorsTechTrigRunToken, m_L1GtStableParametersEventToken, m_L1GtStableParametersRunToken, m_L1GtTriggerMaskAlgoTrigEventToken, m_L1GtTriggerMaskAlgoTrigRunToken, m_L1GtTriggerMaskTechTrigEventToken, m_L1GtTriggerMaskTechTrigRunToken, m_L1GtTriggerMaskVetoAlgoTrigEventToken, m_L1GtTriggerMaskVetoAlgoTrigRunToken, m_L1GtTriggerMaskVetoTechTrigEventToken, m_L1GtTriggerMaskVetoTechTrigRunToken, m_L1GtTriggerMenuEventToken, m_L1GtTriggerMenuRunToken, Run, and RunAndEvent.

Member Function Documentation

◆ availableL1Configuration()

const bool L1GtUtils::availableL1Configuration ( int &  errorCode,
int &  l1ConfCode 
) const

check if L1 trigger configuration is available return false and an error code if configuration is not available

Definition at line 1684 of file L1GtUtils.cc.

1684  {
1686  if (!m_retrieveL1EventSetup) {
1687  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only.\n" << std::endl;
1688  l1ConfCode = 0;
1689  } else {
1690  LogDebug("L1GtUtils") << "\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite."
1691  << "\nIf L1GtTriggerMenuLite not valid, try to retrieve from event setup.\n"
1692  << std::endl;
1693  l1ConfCode = 100000;
1694  }
1695 
1696  if (m_l1GtMenuLiteValid) {
1697  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product.\n"
1698  << std::endl;
1699  l1ConfCode = l1ConfCode + 10000;
1700  errorCode = 0;
1701 
1702  return true;
1703 
1704  } else if (m_retrieveL1EventSetup) {
1705  if (m_l1EventSetupValid) {
1706  LogDebug("L1GtUtils") << "\nFall through: retrieve L1 trigger configuration from event setup."
1707  << "\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
1708  << std::endl;
1709  l1ConfCode = l1ConfCode + 20000;
1710  errorCode = 0;
1711 
1712  return true;
1713 
1714  } else {
1715  LogDebug("L1GtUtils") << "\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n" << std::endl;
1716  l1ConfCode = l1ConfCode + L1GtNotValidError;
1717  errorCode = l1ConfCode;
1718 
1719  return false;
1720  }
1721 
1722  } else {
1723  LogDebug("L1GtUtils") << "\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
1724  << "\nbut L1GtTriggerMenuLite is not valid.\n"
1725  << std::endl;
1726  l1ConfCode = l1ConfCode + L1GtNotValidError;
1727  errorCode = l1ConfCode;
1728 
1729  return false;
1730  }
1731  } else if (m_retrieveL1EventSetup) {
1732  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup."
1733  << "\nL1GtTriggerMenuLite product was not requested.\n"
1734  << std::endl;
1735  l1ConfCode = 200000;
1736 
1737  if (m_l1EventSetupValid) {
1738  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup only."
1739  << "\nValid L1 trigger event setup.\n"
1740  << std::endl;
1741  l1ConfCode = l1ConfCode + 10000;
1742  errorCode = 0;
1743 
1744  return true;
1745 
1746  } else {
1747  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup only."
1748  << "\nNo valid L1 trigger event setup.\n"
1749  << std::endl;
1750  l1ConfCode = l1ConfCode + L1GtNotValidError;
1751  errorCode = l1ConfCode;
1752 
1753  return false;
1754  }
1755 
1756  } else {
1757  LogDebug("L1GtUtils") << "\nError: no L1 trigger configuration requested to be retrieved."
1758  << "\nMust call before getL1GtRunCache in beginRun and analyze.\n"
1759  << std::endl;
1760  l1ConfCode = 300000;
1761  errorCode = l1ConfCode;
1762 
1763  return false;
1764  }
1765 }

References L1GtNotValidError, LogDebug, m_l1EventSetupValid, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by IsoTrackCalib::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), l1Results(), prescaleFactorSetIndex(), ptrL1GtTriggerMenuLite(), ptrL1TriggerMenuEventSetup(), triggerMask(), and triggerMaskSet().

◆ decision()

const bool L1GtUtils::decision ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision after trigger mask for a given algorithm or technical trigger function identical with decisionAfterMask

Definition at line 1071 of file L1GtUtils.cc.

1071  {
1072  // initial values
1073  bool decisionBeforeMask = false;
1074  bool decisionAfterMask = false;
1075  int prescaleFactor = -1;
1076  int triggerMask = -1;
1077 
1079 
1080  return decisionAfterMask;
1081 }

References decisionAfterMask(), decisionBeforeMask(), iEvent, l1Results(), prescaleFactor(), and triggerMask().

Referenced by IsoTrackCalib::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), and PrescaleWeightProvider::prescaleWeight().

◆ decisionAfterMask()

const bool L1GtUtils::decisionAfterMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision after trigger mask for a given algorithm or technical trigger

Definition at line 1057 of file L1GtUtils.cc.

1059  {
1060  // initial values
1061  bool decisionBeforeMask = false;
1062  bool decisionAfterMask = false;
1063  int prescaleFactor = -1;
1064  int triggerMask = -1;
1065 
1067 
1068  return decisionAfterMask;
1069 }

References decisionBeforeMask(), iEvent, l1Results(), prescaleFactor(), and triggerMask().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

◆ decisionBeforeMask()

const bool L1GtUtils::decisionBeforeMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision before trigger mask for a given algorithm or technical trigger

for the functions decisionBeforeMask, decisionAfterMask, decision prescaleFactor, trigger mask:

input: event, event setup algorithm trigger name or alias, or technical trigger name output (by reference): error code return: the corresponding quantity

Definition at line 1043 of file L1GtUtils.cc.

1045  {
1046  // initial values
1047  bool decisionBeforeMask = false;
1048  bool decisionAfterMask = false;
1049  int prescaleFactor = -1;
1050  int triggerMask = -1;
1051 
1053 
1054  return decisionBeforeMask;
1055 }

References decisionAfterMask(), iEvent, l1Results(), prescaleFactor(), and triggerMask().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), l1Results(), prescaleFactor(), and triggerMask().

◆ fillDescription()

static void L1GtUtils::fillDescription ( edm::ParameterSetDescription desc)
inlinestatic

Definition at line 137 of file L1GtUtils.h.

References L1GtUtilsHelper::fillDescription().

◆ getL1GtRunCache() [1/2]

void L1GtUtils::getL1GtRunCache ( const edm::Event iEvent,
const edm::EventSetup evSetup,
const bool  useL1EventSetup,
const bool  useL1GtTriggerMenuLite 
)

for use in analyze(const edm::Event&, const edm::EventSetup&)

Definition at line 344 of file L1GtUtils.cc.

347  {
348  // if there was no retrieval and caching in beginRun, do it here
349  if (!m_beginRunCache) {
350  // if requested, retrieve and cache L1 event setup
351  // keep the caching based on cacheIdentifier() for each record
352  if (useL1EventSetup) {
353  bool isRun = false;
354  retrieveL1EventSetup(evSetup, isRun);
355  }
356  }
357 
358  // cached per run
359 
360  const edm::Run& iRun = iEvent.getRun();
361  edm::RunID runID = iRun.runAuxiliary().id();
362 
363  if (runID != m_runIDCache) {
364  if (!m_beginRunCache) {
365  // if requested, retrieve and cache the L1GtTriggerMenuLite
366  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
367  // and put in the Run section
370  }
371  }
372  m_runIDCache = runID;
373  }
374 }

References edm::RunAuxiliary::id(), iEvent, m_beginRunCache, m_runIDCache, retrieveL1EventSetup(), retrieveL1GtTriggerMenuLite(), edm::Run::runAuxiliary(), useL1EventSetup(), and useL1GtTriggerMenuLite().

◆ getL1GtRunCache() [2/2]

void L1GtUtils::getL1GtRunCache ( const edm::Run iRun,
const edm::EventSetup evSetup,
const bool  useL1EventSetup,
const bool  useL1GtTriggerMenuLite 
)

get all the run-constant quantities for L1 trigger and cache them

for use in beginRun(const edm::Run&, const edm::EventSetup&);

Definition at line 319 of file L1GtUtils.cc.

322  {
323  // first call will turn this to true: the quantities which can be cached in
324  // beginRun will not be cached then in analyze
325  m_beginRunCache = true;
326 
327  // if requested, retrieve and cache L1 event setup
328  // keep the caching based on cacheIdentifier() for each record
329  if (useL1EventSetup) {
330  bool isRun = true;
331  retrieveL1EventSetup(evSetup, isRun);
332  }
333 
334  // cached per run
335 
336  // if requested, retrieve and cache the L1GtTriggerMenuLite
337  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
338  // and put in the Run section
341  }
342 }

References m_beginRunCache, retrieveL1EventSetup(), retrieveL1GtTriggerMenuLite(), useL1EventSetup(), and useL1GtTriggerMenuLite().

Referenced by IsoTrackCalib::analyze(), L1GtAnalyzer::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsEventSetup(), L1GtAnalyzer::analyzeL1GtUtilsMenuLite(), L1GtAnalyzer::analyzeTrigger(), and L1GtAnalyzer::beginRun().

◆ l1AlgoTechTrigBitNumber()

const bool L1GtUtils::l1AlgoTechTrigBitNumber ( const std::string &  nameAlgoTechTrig,
TriggerCategory trigCategory,
int &  bitNumber 
) const

return the trigger "category" trigCategory algorithm trigger alias or algorithm trigger name AlgorithmTrigger = 0, technical trigger TechnicalTrigger = 1 and its bit number

in case the algorithm trigger / technical trigger is not in the menu, the returned function is false, the trigger category is irrelevant (default value is AlgorithmTrigger), and the value of the bit number is -1

Definition at line 376 of file L1GtUtils.cc.

378  {
379  trigCategory = AlgorithmTrigger;
380  bitNumber = -1;
381 
383  if (m_l1GtMenuLiteValid) {
384  // test if the name is an algorithm alias
386  itTrig != m_algorithmAliasMapLite->end();
387  itTrig++) {
388  if (itTrig->second == nameAlgoTechTrig) {
389  trigCategory = AlgorithmTrigger;
390  bitNumber = itTrig->first;
391 
392  return true;
393  }
394  }
395 
396  // test if the name is an algorithm name
397  for (L1GtTriggerMenuLite::CItL1Trig itTrig = m_algorithmMapLite->begin(); itTrig != m_algorithmMapLite->end();
398  itTrig++) {
399  if (itTrig->second == nameAlgoTechTrig) {
400  trigCategory = AlgorithmTrigger;
401  bitNumber = itTrig->first;
402 
403  return true;
404  }
405  }
406 
407  // test if the name is a technical trigger
409  itTrig != m_technicalTriggerMapLite->end();
410  itTrig++) {
411  if (itTrig->second == nameAlgoTechTrig) {
412  trigCategory = TechnicalTrigger;
413  bitNumber = itTrig->first;
414 
415  return true;
416  }
417  }
418 
419  } else if (m_retrieveL1EventSetup) {
420  // test if the name is an algorithm alias
421  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
422  if (itAlgo != m_algorithmAliasMap->end()) {
423  trigCategory = AlgorithmTrigger;
424  bitNumber = (itAlgo->second).algoBitNumber();
425 
426  return true;
427  }
428 
429  // test if the name is an algorithm name
430  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
431  if (itAlgo != m_algorithmMap->end()) {
432  trigCategory = AlgorithmTrigger;
433  bitNumber = (itAlgo->second).algoBitNumber();
434 
435  return true;
436  }
437 
438  // test if the name is a technical trigger
439  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
440  if (itAlgo != m_technicalTriggerMap->end()) {
441  trigCategory = TechnicalTrigger;
442  bitNumber = (itAlgo->second).algoBitNumber();
443 
444  return true;
445  }
446 
447  } else {
448  // only L1GtTriggerMenuLite requested, but it is not valid
449  return false;
450  }
451  } else if (m_retrieveL1EventSetup) {
452  // test if the name is an algorithm alias
453  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
454  if (itAlgo != m_algorithmAliasMap->end()) {
455  trigCategory = AlgorithmTrigger;
456  bitNumber = (itAlgo->second).algoBitNumber();
457 
458  return true;
459  }
460 
461  // test if the name is an algorithm name
462  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
463  if (itAlgo != m_algorithmMap->end()) {
464  trigCategory = AlgorithmTrigger;
465  bitNumber = (itAlgo->second).algoBitNumber();
466 
467  return true;
468  }
469 
470  // test if the name is a technical trigger
471  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
472  if (itAlgo != m_technicalTriggerMap->end()) {
473  trigCategory = TechnicalTrigger;
474  bitNumber = (itAlgo->second).algoBitNumber();
475 
476  return true;
477  }
478 
479  } else {
480  // L1 trigger configuration not retrieved
481  return false;
482  }
483 
484  // all possibilities already tested, so it should not arrive here
485  return false;
486 }

References AlgorithmTrigger, L1TBPTX_cfi::bitNumber, m_algorithmAliasMap, m_algorithmAliasMapLite, m_algorithmMap, m_algorithmMapLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, m_retrieveL1GtTriggerMenuLite, m_technicalTriggerMap, m_technicalTriggerMapLite, and TechnicalTrigger.

Referenced by l1Results(), pat::PATTriggerProducer::produce(), and triggerMask().

◆ l1Results()

const int L1GtUtils::l1Results ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
bool &  decisionBeforeMask,
bool &  decisionAfterMask,
int &  prescaleFactor,
int &  triggerMask 
) const

return results for a given algorithm or technical trigger, input: event algorithm trigger name or alias, or technical trigger name output (by reference): decision before mask, decision after mask, prescale factor trigger mask return: integer error code

Definition at line 671 of file L1GtUtils.cc.

676  {
677  // initial values for returned results
678  decisionBeforeMask = false;
679  decisionAfterMask = false;
680  prescaleFactor = -1;
681  triggerMask = -1;
682 
683  // initialize error code and L1 configuration code
684  int iError = 0;
685  int l1ConfCode = 0;
686 
687  // check if L1 configuration is available
688 
689  if (!availableL1Configuration(iError, l1ConfCode)) {
690  return iError;
691  }
692 
693  // at this point, a valid L1 configuration is available, so the if/else if/else
694  // can be simplified
695 
696  // if the given name is not an algorithm trigger alias, an algorithm trigger name
697  // or a technical trigger in the current menu, return with error code 1
698 
699  TriggerCategory trigCategory = AlgorithmTrigger;
700  int bitNumber = -1;
701 
702  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
703  iError = l1ConfCode + 1;
704 
706  if (m_l1GtMenuLiteValid) {
707  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
708  << "\not found in the trigger menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
709  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
710 
711  } else {
712  // fall through: L1 trigger configuration from event setup
713  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
714  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
715  << "\nretrieved from Event Setup" << std::endl;
716  }
717 
718  } else {
719  // L1 trigger configuration from event setup only
720  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
721  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
722  << "\nretrieved from Event Setup" << std::endl;
723  }
724 
725  return iError;
726  }
727 
728  // check here if a positive bit number was retrieved
729  // exit in case of negative bit number, before retrieving L1 GT products, saving time
730 
731  if (bitNumber < 0) {
732  iError = l1ConfCode + 2;
733 
735  if (m_l1GtMenuLiteValid) {
736  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
737  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
738  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
739 
740  } else {
741  // fall through: L1 trigger configuration from event setup
742  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
743  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
744  << "\nretrieved from Event Setup" << std::endl;
745  }
746 
747  } else {
748  // L1 trigger configuration from event setup only
749  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
750  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
751  << "\nretrieved from Event Setup" << std::endl;
752  }
753 
754  return iError;
755  }
756 
757  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
758  // intermediate error code for the records
759  // the module returns an error code only if both the lite and the readout record are missing
760 
761  int iErrorRecord = 0;
762 
763  bool validRecord = false;
764  bool gtReadoutRecordValid = false;
765 
767  if (!m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized()) {
768  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
769  }
770  if (gtRecord.isValid()) {
771  validRecord = true;
772 
773  } else {
774  iErrorRecord = 10;
775  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
776  << "\nnot found in the event." << std::endl;
777  }
778 
780  if (!m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized()) {
781  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
782  }
783  if (gtReadoutRecord.isValid()) {
784  gtReadoutRecordValid = true;
785  validRecord = true;
786 
787  } else {
788  iErrorRecord = iErrorRecord + 100;
789  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
790  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event." << std::endl;
791  }
792 
793  // get the prescale factor index from
794  // L1GlobalTriggerReadoutRecord if valid
795  // if not, from L1GlobalTriggerRecord if valid
796  // else return an error
797 
798  int pfIndexTechTrig = -1;
799  int pfIndexAlgoTrig = -1;
800 
801  if (validRecord) {
802  if (gtReadoutRecordValid) {
803  pfIndexTechTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
804  pfIndexAlgoTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
805 
806  } else {
807  pfIndexTechTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexTech());
808  pfIndexAlgoTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexAlgo());
809  }
810 
811  } else {
812  LogDebug("L1GtUtils") << "\nError: "
813  << "\nNo valid L1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
814  << "\nfound in the event."
815  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
816  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event." << std::endl;
817 
818  iError = l1ConfCode + iErrorRecord;
819  return iError;
820  }
821 
822  // depending on trigger category (algorithm trigger or technical trigger)
823  // get the correct quantities
824 
825  // number of sets of prescale factors
826  // index of prescale factor set retrieved from data
827  // pointer to the actual prescale factor set
828  // pointer to the set of trigger masks
829 
830  size_t pfSetsSize = 0;
831  int pfIndex = -1;
832  const std::vector<int>* prescaleFactorsSubset = nullptr;
833  const std::vector<unsigned int>* triggerMasksSet = nullptr;
834 
835  switch (trigCategory) {
836  case AlgorithmTrigger: {
838  if (m_l1GtMenuLiteValid) {
839  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
840  triggerMasksSet = m_triggerMaskAlgoTrigLite;
841 
842  } else {
843  // fall through: L1 trigger configuration from event setup
844  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
845  triggerMasksSet = m_triggerMaskAlgoTrig;
846  }
847 
848  } else {
849  // L1 trigger configuration from event setup only
850  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
851  triggerMasksSet = m_triggerMaskAlgoTrig;
852  }
853 
854  pfIndex = pfIndexAlgoTrig;
855 
856  } break;
857  case TechnicalTrigger: {
859  if (m_l1GtMenuLiteValid) {
860  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
861  triggerMasksSet = m_triggerMaskTechTrigLite;
862 
863  } else {
864  // fall through: L1 trigger configuration from event setup
865  pfSetsSize = m_prescaleFactorsTechTrig->size();
866  triggerMasksSet = m_triggerMaskTechTrig;
867  }
868 
869  } else {
870  // L1 trigger configuration from event setup only
871  pfSetsSize = m_prescaleFactorsTechTrig->size();
872  triggerMasksSet = m_triggerMaskTechTrig;
873  }
874 
875  pfIndex = pfIndexTechTrig;
876 
877  } break;
878  default: {
879  // should not be the case
880  iError = l1ConfCode + iErrorRecord + 3;
881  return iError;
882 
883  } break;
884  }
885 
886  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
887 
888  if (pfIndex < 0) {
889  iError = l1ConfCode + iErrorRecord + 1000;
890  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
891  << "less than zero."
892  << "\n Value of index retrieved from data = " << pfIndex << std::endl;
893 
894  return iError;
895 
896  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
897  iError = l1ConfCode + iErrorRecord + 2000;
898  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
899  << "greater than the size of the vector of prescale factor sets."
900  << "\n Value of index retrieved from data = " << pfIndex
901  << "\n Vector size = " << pfSetsSize << std::endl;
902 
903  return iError;
904 
905  } else {
906  switch (trigCategory) {
907  case AlgorithmTrigger: {
909  if (m_l1GtMenuLiteValid) {
910  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
911 
912  } else {
913  // fall through: L1 trigger configuration from event setup
914  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
915  }
916 
917  } else {
918  // L1 trigger configuration from event setup only
919  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
920  }
921 
922  } break;
923  case TechnicalTrigger: {
925  if (m_l1GtMenuLiteValid) {
926  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
927 
928  } else {
929  // fall through: L1 trigger configuration from event setup
930  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrig).at(pfIndex));
931  }
932 
933  } else {
934  // L1 trigger configuration from event setup only
935  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrig).at(pfIndex));
936  }
937 
938  } break;
939  default: {
940  // do nothing - it was tested before, with return
941 
942  } break;
943  }
944  }
945 
946  // algorithm result before applying the trigger masks
947  // the bit number is positive (tested previously)
948 
949  switch (trigCategory) {
950  case AlgorithmTrigger: {
951  if (gtReadoutRecordValid) {
952  const DecisionWord& decWord = gtReadoutRecord->decisionWord();
953  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
954  if (iError) {
955  return (iError + l1ConfCode + iErrorRecord);
956  }
957 
958  } else {
959  const DecisionWord& decWord = gtRecord->decisionWordBeforeMask();
960  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
961  if (iError) {
962  return (iError + l1ConfCode + iErrorRecord);
963  }
964  }
965 
966  } break;
967  case TechnicalTrigger: {
968  if (gtReadoutRecordValid) {
969  const DecisionWord& decWord = gtReadoutRecord->technicalTriggerWord();
970  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
971  if (iError) {
972  return (iError + l1ConfCode + iErrorRecord);
973  }
974 
975  } else {
976  const DecisionWord& decWord = gtRecord->technicalTriggerWordBeforeMask();
977  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
978  if (iError) {
979  return (iError + l1ConfCode + iErrorRecord);
980  }
981  }
982 
983  } break;
984  default: {
985  // do nothing - it was tested before, with return
986 
987  } break;
988  }
989 
990  // prescale factor
991  // the bit number is positive (tested previously)
992 
993  if (bitNumber < (static_cast<int>(prescaleFactorsSubset->size()))) {
994  prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
995  } else {
996  iError = l1ConfCode + iErrorRecord + 4000;
997  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
998  << "\n " << nameAlgoTechTrig << "\ngreater than size of actual L1 GT prescale factor set: "
999  << prescaleFactorsSubset->size() << "\nError: Inconsistent L1 trigger configuration!"
1000  << std::endl;
1001 
1002  return iError;
1003  }
1004 
1005  // trigger mask and trigger result after applying the trigger masks
1006 
1007  if (bitNumber < (static_cast<int>((*triggerMasksSet).size()))) {
1009  if (m_l1GtMenuLiteValid) {
1010  triggerMask = (*triggerMasksSet)[bitNumber];
1011 
1012  } else {
1013  // fall through: L1 trigger configuration from event setup
1014  // masks in event setup are for all partitions
1015  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1016  }
1017 
1018  } else {
1019  // L1 trigger configuration from event setup only
1020  // masks in event setup are for all partitions
1021  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1022  }
1023 
1024  } else {
1025  iError = l1ConfCode + iErrorRecord + 5000;
1026  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
1027  << "\n " << nameAlgoTechTrig
1028  << "\ngreater than size of L1 GT trigger mask set: " << (*triggerMasksSet).size()
1029  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
1030 
1031  return iError;
1032  }
1033 
1035 
1036  if (triggerMask) {
1037  decisionAfterMask = false;
1038  }
1039 
1040  return iError;
1041 }

References AlgorithmTrigger, availableL1Configuration(), L1TBPTX_cfi::bitNumber, decisionAfterMask(), decisionBeforeMask(), L1GlobalTriggerReadoutRecord::decisionWord(), L1GlobalTriggerRecord::decisionWordBeforeMask(), L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo(), L1GlobalTriggerRecord::gtPrescaleFactorIndexTech(), L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), iEvent, edm::HandleBase::isValid(), l1AlgoTechTrigBitNumber(), LogDebug, m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_l1GtUtilsHelper, m_physicsDaqPartition, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, prescaleFactor(), TechnicalTrigger, L1GlobalTriggerReadoutRecord::technicalTriggerWord(), L1GlobalTriggerRecord::technicalTriggerWordBeforeMask(), triggerCategory(), triggerMask(), and trigResult().

Referenced by decision(), decisionAfterMask(), decisionBeforeMask(), L1GtUtils::LogicalExpressionL1Results::errorCodes(), prescaleFactor(), pat::PATTriggerProducer::produce(), and triggerMask().

◆ l1TriggerMenu()

const std::string & L1GtUtils::l1TriggerMenu ( ) const

return the L1 trigger menu name

Definition at line 1582 of file L1GtUtils.cc.

1582  {
1584  if (m_l1GtMenuLiteValid) {
1586 
1587  } else if (m_retrieveL1EventSetup) {
1588  return m_l1GtMenu->gtTriggerMenuName();
1589 
1590  } else {
1591  // only L1GtTriggerMenuLite requested, but it is not valid
1592  return EmptyString;
1593  }
1594  } else if (m_retrieveL1EventSetup) {
1595  return m_l1GtMenu->gtTriggerMenuName();
1596 
1597  } else {
1598  // L1 trigger configuration not retrieved
1599  return EmptyString;
1600  }
1601 }

References EmptyString, L1GtTriggerMenuLite::gtTriggerMenuName(), L1GtTriggerMenu::gtTriggerMenuName(), m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by L1MenuTreeProducer::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), and L1Analysis::L1AnalysisL1Menu::SetPrescaleFactorIndex().

◆ l1TriggerMenuImplementation()

const std::string & L1GtUtils::l1TriggerMenuImplementation ( ) const

return the L1 trigger menu implementation

Definition at line 1603 of file L1GtUtils.cc.

1603  {
1605  if (m_l1GtMenuLiteValid) {
1607 
1608  } else if (m_retrieveL1EventSetup) {
1610 
1611  } else {
1612  // only L1GtTriggerMenuLite requested, but it is not valid
1613  return EmptyString;
1614  }
1615  } else if (m_retrieveL1EventSetup) {
1617 
1618  } else {
1619  // L1 trigger configuration not retrieved
1620  return EmptyString;
1621  }
1622 }

References EmptyString, L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by L1MenuTreeProducer::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), and L1GtAnalyzer::analyzeTrigger().

◆ l1TriggerNameFromBit()

const bool L1GtUtils::l1TriggerNameFromBit ( const int &  bitNumber,
const TriggerCategory trigCategory,
std::string &  aliasL1Trigger,
std::string &  nameL1Trigger 
) const

return the trigger name and alias for a given trigger category and a given bit number

in case no algorithm trigger / technical trigger is defined for that bit in the menu, the returned function is false, and the name and the alias is empty

Definition at line 488 of file L1GtUtils.cc.

491  {
492  aliasL1Trigger.clear();
493  nameL1Trigger.clear();
494 
496  if (m_l1GtMenuLiteValid) {
497  // for an algorithm trigger
498  if (trigCategory == AlgorithmTrigger) {
499  bool trigAliasFound = false;
500  bool trigNameFound = false;
501 
503  itTrig != m_algorithmAliasMapLite->end();
504  itTrig++) {
505  if (static_cast<int>(itTrig->first) == bitNumber) {
506  aliasL1Trigger = itTrig->second;
507  trigAliasFound = true;
508  break;
509  }
510  }
511 
512  for (L1GtTriggerMenuLite::CItL1Trig itTrig = m_algorithmMapLite->begin(); itTrig != m_algorithmMapLite->end();
513  itTrig++) {
514  if (static_cast<int>(itTrig->first) == bitNumber) {
515  nameL1Trigger = itTrig->second;
516  trigNameFound = true;
517  break;
518  }
519  }
520 
521  if (!(trigAliasFound && trigNameFound)) {
522  return false;
523  }
524 
525  return true;
526 
527  } else if (trigCategory == TechnicalTrigger) {
528  // for a technical trigger
529 
530  bool trigNameFound = false;
531 
533  itTrig != m_technicalTriggerMapLite->end();
534  itTrig++) {
535  if (static_cast<int>(itTrig->first) == bitNumber) {
536  nameL1Trigger = itTrig->second;
537 
538  // technically, no alias is defined for technical triggers
539  // users use mainly aliases, so just return the name here
540  aliasL1Trigger = itTrig->second;
541 
542  trigNameFound = true;
543  break;
544  }
545  }
546 
547  if (!(trigNameFound)) {
548  return false;
549  }
550 
551  return true;
552 
553  } else {
554  // non-existing trigger category...
555  return false;
556  }
557 
558  } else if (m_retrieveL1EventSetup) {
559  // for an algorithm trigger
560  if (trigCategory == AlgorithmTrigger) {
561  bool trigAliasFound = false;
562 
563  for (CItAlgo itTrig = m_algorithmAliasMap->begin(); itTrig != m_algorithmAliasMap->end(); itTrig++) {
564  if ((itTrig->second).algoBitNumber() == bitNumber) {
565  aliasL1Trigger = itTrig->first;
566  // get the name here, avoiding a loop on m_algorithmMap
567  nameL1Trigger = (itTrig->second).algoName();
568 
569  trigAliasFound = true;
570  break;
571  }
572  }
573 
574  if (!(trigAliasFound)) {
575  return false;
576  }
577 
578  return true;
579 
580  } else if (trigCategory == TechnicalTrigger) {
581  // for a technical trigger
582 
583  bool trigNameFound = false;
584 
585  for (CItAlgo itTrig = m_technicalTriggerMap->begin(); itTrig != m_technicalTriggerMap->end(); itTrig++) {
586  if ((itTrig->second).algoBitNumber() == bitNumber) {
587  nameL1Trigger = (itTrig->second).algoName();
588  // technically, no alias is defined for technical triggers
589  // users use mainly aliases, so just return the name here
590  aliasL1Trigger = nameL1Trigger;
591 
592  trigNameFound = true;
593  break;
594  }
595  }
596 
597  if (!(trigNameFound)) {
598  return false;
599  }
600 
601  return true;
602 
603  } else {
604  // non-existing trigger category...
605  return false;
606  }
607 
608  } else {
609  // only L1GtTriggerMenuLite requested, but it is not valid
610  return false;
611  }
612  } else if (m_retrieveL1EventSetup) {
613  // for an algorithm trigger
614  if (trigCategory == AlgorithmTrigger) {
615  bool trigAliasFound = false;
616 
617  for (CItAlgo itTrig = m_algorithmAliasMap->begin(); itTrig != m_algorithmAliasMap->end(); itTrig++) {
618  if ((itTrig->second).algoBitNumber() == bitNumber) {
619  aliasL1Trigger = itTrig->first;
620  // get the name here, avoiding a loop on m_algorithmMap
621  nameL1Trigger = (itTrig->second).algoName();
622 
623  trigAliasFound = true;
624  break;
625  }
626  }
627 
628  if (!(trigAliasFound)) {
629  return false;
630  }
631 
632  return true;
633 
634  } else if (trigCategory == TechnicalTrigger) {
635  // for a technical trigger
636 
637  bool trigNameFound = false;
638 
639  for (CItAlgo itTrig = m_technicalTriggerMap->begin(); itTrig != m_technicalTriggerMap->end(); itTrig++) {
640  if ((itTrig->second).algoBitNumber() == bitNumber) {
641  nameL1Trigger = (itTrig->second).algoName();
642  // technically, no alias is defined for technical triggers
643  // users use mainly aliases, so just return the name here
644  aliasL1Trigger = itTrig->first;
645 
646  trigNameFound = true;
647  break;
648  }
649  }
650 
651  if (!(trigNameFound)) {
652  return false;
653  }
654 
655  return true;
656 
657  } else {
658  // non-existing trigger category...
659  return false;
660  }
661 
662  } else {
663  // L1 trigger configuration not retrieved
664  return false;
665  }
666 
667  // all possibilities already tested, so it should not arrive here
668  return false;
669 }

References HIPAlignmentAlgorithm_cfi::algoName, AlgorithmTrigger, L1TBPTX_cfi::bitNumber, m_algorithmAliasMap, m_algorithmAliasMapLite, m_algorithmMapLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, m_retrieveL1GtTriggerMenuLite, m_technicalTriggerMap, m_technicalTriggerMapLite, and TechnicalTrigger.

◆ prescaleFactor()

const int L1GtUtils::prescaleFactor ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return prescale factor for a given algorithm or technical trigger

Definition at line 1083 of file L1GtUtils.cc.

1085  {
1086  // initial values
1087  bool decisionBeforeMask = false;
1088  bool decisionAfterMask = false;
1089  int prescaleFactor = -1;
1090  int triggerMask = -1;
1091 
1093 
1094  return prescaleFactor;
1095 }

References decisionAfterMask(), decisionBeforeMask(), iEvent, l1Results(), and triggerMask().

Referenced by HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), decisionBeforeMask(), l1Results(), PrescaleWeightProvider::prescaleWeight(), and triggerMask().

◆ prescaleFactorSet()

const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
const TriggerCategory trigCategory,
int &  errorCode 
)

return the actual set of prescale factors used for the event (must be the same for all events in the luminosity block, if no errors)

Definition at line 1446 of file L1GtUtils.cc.

1448  {
1449  // clear the vector before filling it
1450  m_prescaleFactorSet.clear();
1451 
1452  // initialize error code
1453  int iError = 0;
1454 
1455  const int pfIndex = prescaleFactorSetIndex(iEvent, trigCategory, iError);
1456 
1457  if (iError == 0) {
1458  switch (trigCategory) {
1459  case AlgorithmTrigger: {
1461  if (m_l1GtMenuLiteValid) {
1462  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
1463 
1464  } else {
1465  // fall through: L1 trigger configuration from event setup
1466  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(pfIndex);
1467  }
1468 
1469  } else {
1470  // L1 trigger configuration from event setup only
1471  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(pfIndex);
1472  }
1473 
1474  } break;
1475  case TechnicalTrigger: {
1477  if (m_l1GtMenuLiteValid) {
1478  m_prescaleFactorSet = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
1479 
1480  } else {
1481  // fall through: L1 trigger configuration from event setup
1482  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(pfIndex);
1483  }
1484 
1485  } else {
1486  // L1 trigger configuration from event setup only
1487  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(pfIndex);
1488  }
1489 
1490  } break;
1491  default: {
1492  // do nothing - it was tested before, with return
1493 
1494  } break;
1495  }
1496  }
1497 
1498  errorCode = iError;
1499  return m_prescaleFactorSet;
1500 }

References AlgorithmTrigger, iEvent, m_l1GtMenuLiteValid, m_prescaleFactorSet, m_retrieveL1GtTriggerMenuLite, prescaleFactorSetIndex(), and TechnicalTrigger.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

◆ prescaleFactorSetIndex()

const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
const TriggerCategory trigCategory,
int &  errorCode 
) const

return the index of the actual set of prescale factors used for the event (must be the same for all events in the luminosity block, if no errors)

Definition at line 1274 of file L1GtUtils.cc.

1276  {
1277  // initialize the index to a negative value
1278  int pfIndex = -1;
1279 
1280  // initialize error code and L1 configuration code
1281  int iError = 0;
1282  int l1ConfCode = 0;
1283 
1284  // check if L1 configuration is available
1285 
1286  if (!availableL1Configuration(iError, l1ConfCode)) {
1287  errorCode = iError;
1288  return pfIndex;
1289  }
1290 
1291  // at this point, a valid L1 configuration is available, so the if/else if/else
1292  // can be simplified
1293 
1294  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
1295  // intermediate error code for the records
1296  // the module returns an error code only if both the lite and the readout record are missing
1297 
1298  int iErrorRecord = 0;
1299 
1300  bool validRecord = false;
1301  bool gtReadoutRecordValid = false;
1302 
1304  if (!m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized()) {
1305  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
1306  }
1307  if (gtRecord.isValid()) {
1308  validRecord = true;
1309 
1310  } else {
1311  iErrorRecord = 10;
1312  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
1313  << "\nnot found in the event." << std::endl;
1314  }
1315 
1317  if (!m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized()) {
1318  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
1319  }
1320  if (gtReadoutRecord.isValid()) {
1321  gtReadoutRecordValid = true;
1322  validRecord = true;
1323 
1324  } else {
1325  iErrorRecord = iErrorRecord + 100;
1326  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
1327  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event." << std::endl;
1328  }
1329 
1330  // get the prescale factor index from
1331  // L1GlobalTriggerReadoutRecord if valid
1332  // if not, from L1GlobalTriggerRecord if valid
1333  // else return an error
1334 
1335  int pfIndexTechTrig = -1;
1336  int pfIndexAlgoTrig = -1;
1337 
1338  if (validRecord) {
1339  if (gtReadoutRecordValid) {
1340  pfIndexTechTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1341  pfIndexAlgoTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1342 
1343  } else {
1344  pfIndexTechTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexTech());
1345  pfIndexAlgoTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexAlgo());
1346  }
1347 
1348  } else {
1349  LogDebug("L1GtUtils") << "\nError: "
1350  << "\nNo valid L1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
1351  << "\nfound in the event."
1352  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
1353  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event." << std::endl;
1354 
1355  iError = l1ConfCode + iErrorRecord;
1356 
1357  errorCode = iError;
1358  return pfIndex;
1359  }
1360 
1361  // depending on trigger category (algorithm trigger or technical trigger)
1362  // get the correct quantities
1363 
1364  // number of sets of prescale factors
1365  // index of prescale factor set retrieved from data
1366  // pointer to the actual prescale factor set
1367  // pointer to the set of trigger masks
1368 
1369  size_t pfSetsSize = 0;
1370 
1371  switch (trigCategory) {
1372  case AlgorithmTrigger: {
1374  if (m_l1GtMenuLiteValid) {
1375  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
1376 
1377  } else {
1378  // fall through: L1 trigger configuration from event setup
1379  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1380  }
1381 
1382  } else {
1383  // L1 trigger configuration from event setup only
1384  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1385  }
1386 
1387  pfIndex = pfIndexAlgoTrig;
1388 
1389  } break;
1390  case TechnicalTrigger: {
1392  if (m_l1GtMenuLiteValid) {
1393  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
1394 
1395  } else {
1396  // fall through: L1 trigger configuration from event setup
1397  pfSetsSize = m_prescaleFactorsTechTrig->size();
1398  }
1399 
1400  } else {
1401  // L1 trigger configuration from event setup only
1402  pfSetsSize = m_prescaleFactorsTechTrig->size();
1403  }
1404 
1405  pfIndex = pfIndexTechTrig;
1406 
1407  } break;
1408  default: {
1409  // should not be the case
1410  iError = l1ConfCode + iErrorRecord + 3;
1411  return iError;
1412 
1413  } break;
1414  }
1415 
1416  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
1417 
1418  if (pfIndex < 0) {
1419  iError = l1ConfCode + iErrorRecord + 1000;
1420  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
1421  << "less than zero."
1422  << "\n Value of index retrieved from data = " << pfIndex << std::endl;
1423 
1424  errorCode = iError;
1425  return pfIndex;
1426 
1427  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1428  iError = l1ConfCode + iErrorRecord + 2000;
1429  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
1430  << "greater than the size of the vector of prescale factor sets."
1431  << "\n Value of index retrieved from data = " << pfIndex
1432  << "\n Vector size = " << pfSetsSize << std::endl;
1433 
1434  errorCode = iError;
1435  return pfIndex;
1436 
1437  } else {
1438  errorCode = iError;
1439  return pfIndex;
1440  }
1441 
1442  errorCode = iError;
1443  return pfIndex;
1444 }

References AlgorithmTrigger, availableL1Configuration(), L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo(), L1GlobalTriggerRecord::gtPrescaleFactorIndexTech(), iEvent, edm::HandleBase::isValid(), LogDebug, m_l1GtMenuLiteValid, m_l1GtUtilsHelper, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, and TechnicalTrigger.

Referenced by HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), prescaleFactorSet(), and L1Analysis::L1AnalysisL1Menu::SetPrescaleFactorIndex().

◆ ptrL1GtTriggerMenuLite()

const L1GtTriggerMenuLite * L1GtUtils::ptrL1GtTriggerMenuLite ( int &  errorCode)

return a pointer to the L1GtTriggerMenuLite product

Definition at line 1650 of file L1GtUtils.cc.

1650  {
1651  // initialize error code and return value
1652  int iError = 0;
1653  int l1ConfCode = 0;
1654 
1655  // check if L1 configuration is available
1656 
1657  if (!availableL1Configuration(iError, l1ConfCode)) {
1658  errorCode = iError;
1659  return nullptr;
1660  }
1661 
1663  if (m_l1GtMenuLiteValid) {
1664  errorCode = iError;
1665  return m_l1GtMenuLite;
1666 
1667  } else {
1668  iError = l1ConfCode;
1669 
1670  errorCode = iError;
1671  return nullptr;
1672  }
1673  } else {
1674  iError = l1ConfCode;
1675 
1676  errorCode = iError;
1677  return nullptr;
1678  }
1679 
1680  errorCode = iError;
1681  return m_l1GtMenuLite;
1682 }

References availableL1Configuration(), m_l1GtMenuLite, m_l1GtMenuLiteValid, and m_retrieveL1GtTriggerMenuLite.

◆ ptrL1TriggerMenuEventSetup()

const L1GtTriggerMenu * L1GtUtils::ptrL1TriggerMenuEventSetup ( int &  errorCode)

return a pointer to the L1 trigger menu from event setup

Definition at line 1624 of file L1GtUtils.cc.

1624  {
1625  // initialize error code and return value
1626  int iError = 0;
1627  int l1ConfCode = 0;
1628 
1629  // check if L1 configuration is available
1630 
1631  if (!availableL1Configuration(iError, l1ConfCode)) {
1632  errorCode = iError;
1633  return nullptr;
1634  }
1635 
1636  if (m_retrieveL1EventSetup) {
1637  errorCode = iError;
1638  return m_l1GtMenu;
1639  } else {
1640  iError = l1ConfCode;
1641 
1642  errorCode = iError;
1643  return nullptr;
1644  }
1645 
1646  errorCode = iError;
1647  return m_l1GtMenu;
1648 }

References availableL1Configuration(), m_l1GtMenu, and m_retrieveL1EventSetup.

Referenced by IsoTrackCalib::beginRun().

◆ retrieveL1EventSetup()

void L1GtUtils::retrieveL1EventSetup ( const edm::EventSetup evSetup,
bool  isRun = true 
)

retrieve all the relevant L1 trigger event setup records and cache them to improve the speed

Definition at line 127 of file L1GtUtils.cc.

127  {
128  //
129  m_retrieveL1EventSetup = true;
130 
131  m_l1EventSetupValid = true;
132  // FIXME test for each record if valid; if not set m_l1EventSetupValid = false;
133 
134  // get / update the stable parameters from the EventSetup
135  // local cache & check on cacheIdentifier
136 
137  auto l1GtStableParametersRcd = evSetup.get<L1GtStableParametersRcd>();
138  unsigned long long l1GtStableParCacheID = l1GtStableParametersRcd.cacheIdentifier();
139 
140  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
141  if (isRun) {
142  m_l1GtStablePar = &l1GtStableParametersRcd.get(m_L1GtStableParametersRunToken);
143  } else {
144  m_l1GtStablePar = &l1GtStableParametersRcd.get(m_L1GtStableParametersEventToken);
145  }
146 
147  // number of algorithm triggers
149 
150  // number of technical triggers
152 
154 
155  m_triggerMaskSet.reserve(maxNumberTrigger);
156  m_prescaleFactorSet.reserve(maxNumberTrigger);
157 
158  //
159  m_l1GtStableParCacheID = l1GtStableParCacheID;
160  }
161 
162  // get / update the prescale factors from the EventSetup
163  // local cache & check on cacheIdentifier
164 
165  auto l1GtPrescaleFactorsAlgoTrigRcd = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>();
166  unsigned long long l1GtPfAlgoCacheID = l1GtPrescaleFactorsAlgoTrigRcd.cacheIdentifier();
167 
168  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
169  if (isRun) {
170  m_l1GtPfAlgo = &l1GtPrescaleFactorsAlgoTrigRcd.get(m_L1GtPrescaleFactorsAlgoTrigRunToken);
171  } else {
172  m_l1GtPfAlgo = &l1GtPrescaleFactorsAlgoTrigRcd.get(m_L1GtPrescaleFactorsAlgoTrigEventToken);
173  }
174 
176 
177  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
178  }
179 
180  auto l1GtPrescaleFactorsTechTrigRcd = evSetup.get<L1GtPrescaleFactorsTechTrigRcd>();
181  unsigned long long l1GtPfTechCacheID = l1GtPrescaleFactorsTechTrigRcd.cacheIdentifier();
182 
183  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
184  if (isRun) {
185  m_l1GtPfTech = &l1GtPrescaleFactorsTechTrigRcd.get(m_L1GtPrescaleFactorsTechTrigRunToken);
186  } else {
187  m_l1GtPfTech = &l1GtPrescaleFactorsTechTrigRcd.get(m_L1GtPrescaleFactorsTechTrigEventToken);
188  }
189 
191 
192  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
193  }
194 
195  // get / update the trigger mask from the EventSetup
196  // local cache & check on cacheIdentifier
197 
198  auto l1GtTriggerMaskAlgoTrigRcd = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>();
199  unsigned long long l1GtTmAlgoCacheID = l1GtTriggerMaskAlgoTrigRcd.cacheIdentifier();
200 
201  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
202  if (isRun) {
203  m_l1GtTmAlgo = &l1GtTriggerMaskAlgoTrigRcd.get(m_L1GtTriggerMaskAlgoTrigRunToken);
204  } else {
205  m_l1GtTmAlgo = &l1GtTriggerMaskAlgoTrigRcd.get(m_L1GtTriggerMaskAlgoTrigEventToken);
206  }
207 
209 
210  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
211  }
212 
213  auto l1GtTriggerMaskTechTrigRcd = evSetup.get<L1GtTriggerMaskTechTrigRcd>();
214  unsigned long long l1GtTmTechCacheID = l1GtTriggerMaskTechTrigRcd.cacheIdentifier();
215 
216  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
217  if (isRun) {
218  m_l1GtTmTech = &l1GtTriggerMaskTechTrigRcd.get(m_L1GtTriggerMaskTechTrigRunToken);
219  } else {
220  m_l1GtTmTech = &l1GtTriggerMaskTechTrigRcd.get(m_L1GtTriggerMaskTechTrigEventToken);
221  }
222 
224 
225  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
226  }
227 
228  auto l1GtTriggerMaskVetoAlgoTrigRcd = evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>();
229  unsigned long long l1GtTmVetoAlgoCacheID = l1GtTriggerMaskVetoAlgoTrigRcd.cacheIdentifier();
230 
231  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
232  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
233  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
234  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
235  if (isRun) {
236  m_l1GtTmVetoAlgo = &l1GtTriggerMaskVetoAlgoTrigRcd.get(m_L1GtTriggerMaskVetoAlgoTrigRunToken);
237  } else {
238  m_l1GtTmVetoAlgo = &l1GtTriggerMaskVetoAlgoTrigRcd.get(m_L1GtTriggerMaskVetoAlgoTrigEventToken);
239  }
240 
242 
243  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
244  }
245 
246  auto l1GtTriggerMaskVetoTechTrigRcd = evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>();
247  unsigned long long l1GtTmVetoTechCacheID = l1GtTriggerMaskVetoTechTrigRcd.cacheIdentifier();
248 
249  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
250  if (isRun) {
251  m_l1GtTmVetoTech = &l1GtTriggerMaskVetoTechTrigRcd.get(m_L1GtTriggerMaskVetoTechTrigRunToken);
252  } else {
253  m_l1GtTmVetoTech = &l1GtTriggerMaskVetoTechTrigRcd.get(m_L1GtTriggerMaskVetoTechTrigEventToken);
254  }
255 
257 
258  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
259  }
260 
261  // get / update the trigger menu from the EventSetup
262  // local cache & check on cacheIdentifier
263 
264  auto l1GtTriggerMenuRcd = evSetup.get<L1GtTriggerMenuRcd>();
265  unsigned long long l1GtMenuCacheID = l1GtTriggerMenuRcd.cacheIdentifier();
266 
267  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
269  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
270  m_l1GtMenu = l1GtMenu.product();
271  if (isRun) {
272  m_l1GtMenu = &l1GtTriggerMenuRcd.get(m_L1GtTriggerMenuRunToken);
273  } else {
274  m_l1GtMenu = &l1GtTriggerMenuRcd.get(m_L1GtTriggerMenuEventToken);
275  }
276 
279 
281 
282  m_l1GtMenuCacheID = l1GtMenuCacheID;
283  }
284 }

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), edm::EventSetup::get(), get, L1GtTriggerMenu::gtAlgorithmAliasMap(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtStableParameters::gtNumberPhysTriggers(), L1GtStableParameters::gtNumberTechnicalTriggers(), L1GtPrescaleFactors::gtPrescaleFactors(), L1GtTriggerMenu::gtTechnicalTriggerMap(), L1GtTriggerMask::gtTriggerMask(), m_algorithmAliasMap, m_algorithmMap, m_l1EventSetupValid, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtPfAlgo, m_l1GtPfAlgoCacheID, m_l1GtPfTech, m_l1GtPfTechCacheID, m_L1GtPrescaleFactorsAlgoTrigEventToken, m_L1GtPrescaleFactorsAlgoTrigRunToken, m_L1GtPrescaleFactorsTechTrigEventToken, m_L1GtPrescaleFactorsTechTrigRunToken, m_l1GtStablePar, m_L1GtStableParametersEventToken, m_L1GtStableParametersRunToken, m_l1GtStableParCacheID, m_l1GtTmAlgo, m_l1GtTmAlgoCacheID, m_l1GtTmTech, m_l1GtTmTechCacheID, m_l1GtTmVetoAlgo, m_l1GtTmVetoAlgoCacheID, m_l1GtTmVetoTech, m_l1GtTmVetoTechCacheID, m_L1GtTriggerMaskAlgoTrigEventToken, m_L1GtTriggerMaskAlgoTrigRunToken, m_L1GtTriggerMaskTechTrigEventToken, m_L1GtTriggerMaskTechTrigRunToken, m_L1GtTriggerMaskVetoAlgoTrigEventToken, m_L1GtTriggerMaskVetoAlgoTrigRunToken, m_L1GtTriggerMaskVetoTechTrigEventToken, m_L1GtTriggerMaskVetoTechTrigRunToken, m_L1GtTriggerMenuEventToken, m_L1GtTriggerMenuRunToken, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_prescaleFactorsAlgoTrig, m_prescaleFactorSet, m_prescaleFactorsTechTrig, m_retrieveL1EventSetup, m_technicalTriggerMap, m_triggerMaskAlgoTrig, m_triggerMaskSet, m_triggerMaskTechTrig, m_triggerMaskVetoAlgoTrig, m_triggerMaskVetoTechTrig, SiStripPI::max, and edm::ESHandle< T >::product().

Referenced by L1MenuTreeProducer::analyze(), L1TRate_Offline::bookHistograms(), L1TRate::bookHistograms(), L1TSync::bookHistograms(), L1TSync_Offline::bookHistograms(), and getL1GtRunCache().

◆ retrieveL1GtTriggerMenuLite()

void L1GtUtils::retrieveL1GtTriggerMenuLite ( const edm::Run iRun)

retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed

for use in beginRun(const edm::Run&, const edm::EventSetup&);

Definition at line 286 of file L1GtUtils.cc.

286  {
288 
289  // get L1GtTriggerMenuLite
291  if (!m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken().isUninitialized()) {
292  iRun.getByToken(m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken(), l1GtMenuLite);
293  }
294 
295  if (!l1GtMenuLite.isValid()) {
296  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n " << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag()
297  << "\nrequested, but not found in the run." << std::endl;
298 
299  m_l1GtMenuLiteValid = false;
300  } else {
301  m_l1GtMenuLite = l1GtMenuLite.product();
302  m_l1GtMenuLiteValid = true;
303 
304  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n " << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag()
305  << "\nretrieved for run " << iRun.runAuxiliary().run() << std::endl;
306 
310 
313 
316  }
317 }

References edm::Run::getByToken(), L1GtTriggerMenuLite::gtAlgorithmAliasMap(), L1GtTriggerMenuLite::gtAlgorithmMap(), L1GtTriggerMenuLite::gtPrescaleFactorsAlgoTrig(), L1GtTriggerMenuLite::gtPrescaleFactorsTechTrig(), L1GtTriggerMenuLite::gtTechnicalTriggerMap(), L1GtTriggerMenuLite::gtTriggerMaskAlgoTrig(), L1GtTriggerMenuLite::gtTriggerMaskTechTrig(), edm::HandleBase::isValid(), LogDebug, m_algorithmAliasMapLite, m_algorithmMapLite, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_l1GtUtilsHelper, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, m_technicalTriggerMapLite, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrigLite, edm::Handle< T >::product(), edm::RunAuxiliary::run(), and edm::Run::runAuxiliary().

Referenced by getL1GtRunCache().

◆ triggerCategory()

const std::string L1GtUtils::triggerCategory ( const TriggerCategory trigCategory) const

public methods

Definition at line 111 of file L1GtUtils.cc.

111  {
112  switch (trigCategory) {
113  case AlgorithmTrigger: {
114  return "Algorithm Trigger";
115  } break;
116  case TechnicalTrigger: {
117  return "Technical Trigger";
118  }
119 
120  break;
121  default: {
122  return EmptyString;
123  } break;
124  }
125 }

References AlgorithmTrigger, EmptyString, and TechnicalTrigger.

Referenced by l1Results(), triggerMask(), and trigResult().

◆ triggerMask() [1/2]

const int L1GtUtils::triggerMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return trigger mask for a given algorithm or technical trigger

Definition at line 1097 of file L1GtUtils.cc.

1097  {
1098  // initial values
1099  bool decisionBeforeMask = false;
1100  bool decisionAfterMask = false;
1101  int prescaleFactor = -1;
1102  int triggerMask = -1;
1103 
1105 
1106  return triggerMask;
1107 }

References decisionAfterMask(), decisionBeforeMask(), iEvent, l1Results(), and prescaleFactor().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), decisionBeforeMask(), L1TMenuHelper::getLUSOTrigger(), l1Results(), and prescaleFactor().

◆ triggerMask() [2/2]

const int L1GtUtils::triggerMask ( const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

faster than previous two methods - one needs in fact for the masks the event setup only

Definition at line 1109 of file L1GtUtils.cc.

1109  {
1110  // initial values for returned results
1111  int triggerMaskValue = -1;
1112 
1113  // initialize error code and L1 configuration code
1114  int iError = 0;
1115  int l1ConfCode = 0;
1116 
1117  // check if L1 configuration is available
1118 
1119  if (!availableL1Configuration(iError, l1ConfCode)) {
1120  errorCode = iError;
1121  return triggerMaskValue;
1122  }
1123 
1124  // at this point, a valid L1 configuration is available, so the if/else if/else
1125  // can be simplified
1126 
1127  // if the given name is not an algorithm trigger alias, an algorithm trigger name
1128  // or a technical trigger in the current menu, return with error code 1
1129 
1130  TriggerCategory trigCategory = AlgorithmTrigger;
1131  int bitNumber = -1;
1132 
1133  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
1134  iError = l1ConfCode + 1;
1135 
1137  if (m_l1GtMenuLiteValid) {
1138  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1139  << "\not found in the trigger menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
1140  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1141 
1142  } else {
1143  // fall through: L1 trigger configuration from event setup
1144  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1145  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1146  << "\nretrieved from Event Setup" << std::endl;
1147  }
1148 
1149  } else {
1150  // L1 trigger configuration from event setup only
1151  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1152  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1153  << "\nretrieved from Event Setup" << std::endl;
1154  }
1155 
1156  errorCode = iError;
1157  return triggerMaskValue;
1158  }
1159 
1160  // check here if a positive bit number was retrieved
1161  // exit in case of negative bit number, before retrieving L1 GT products, saving time
1162 
1163  if (bitNumber < 0) {
1164  iError = l1ConfCode + 2;
1165 
1167  if (m_l1GtMenuLiteValid) {
1168  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1169  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
1170  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1171 
1172  } else {
1173  // fall through: L1 trigger configuration from event setup
1174  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1175  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1176  << "\nretrieved from Event Setup" << std::endl;
1177  }
1178 
1179  } else {
1180  // L1 trigger configuration from event setup only
1181  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1182  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1183  << "\nretrieved from Event Setup" << std::endl;
1184  }
1185 
1186  errorCode = iError;
1187  return triggerMaskValue;
1188  }
1189 
1190  // depending on trigger category (algorithm trigger or technical trigger)
1191  // get the correct quantities
1192 
1193  // pointer to the set of trigger masks
1194 
1195  const std::vector<unsigned int>* triggerMasksSet = nullptr;
1196 
1197  switch (trigCategory) {
1198  case AlgorithmTrigger: {
1200  if (m_l1GtMenuLiteValid) {
1201  triggerMasksSet = m_triggerMaskAlgoTrigLite;
1202 
1203  } else {
1204  // fall through: L1 trigger configuration from event setup
1205  triggerMasksSet = m_triggerMaskAlgoTrig;
1206  }
1207 
1208  } else {
1209  // L1 trigger configuration from event setup only
1210  triggerMasksSet = m_triggerMaskAlgoTrig;
1211  }
1212 
1213  } break;
1214  case TechnicalTrigger: {
1216  if (m_l1GtMenuLiteValid) {
1217  triggerMasksSet = m_triggerMaskTechTrigLite;
1218 
1219  } else {
1220  // fall through: L1 trigger configuration from event setup
1221  triggerMasksSet = m_triggerMaskTechTrig;
1222  }
1223 
1224  } else {
1225  // L1 trigger configuration from event setup only
1226  triggerMasksSet = m_triggerMaskTechTrig;
1227  }
1228 
1229  } break;
1230  default: {
1231  // should not be the case
1232  iError = l1ConfCode + 3;
1233 
1234  errorCode = iError;
1235  return triggerMaskValue;
1236 
1237  } break;
1238  }
1239 
1240  // trigger mask
1241 
1242  if (bitNumber < (static_cast<int>((*triggerMasksSet).size()))) {
1244  if (m_l1GtMenuLiteValid) {
1245  triggerMaskValue = (*triggerMasksSet)[bitNumber];
1246 
1247  } else {
1248  // fall through: L1 trigger configuration from event setup
1249  // masks in event setup are for all partitions
1250  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1251  }
1252 
1253  } else {
1254  // L1 trigger configuration from event setup only
1255  // masks in event setup are for all partitions
1256  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1257  }
1258 
1259  } else {
1260  iError = l1ConfCode + 5000;
1261  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
1262  << "\n " << nameAlgoTechTrig
1263  << "\ngreater than size of L1 GT trigger mask set: " << (*triggerMasksSet).size()
1264  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
1265 
1266  errorCode = iError;
1267  return triggerMaskValue;
1268  }
1269 
1270  errorCode = iError;
1271  return triggerMaskValue;
1272 }

References AlgorithmTrigger, availableL1Configuration(), L1TBPTX_cfi::bitNumber, L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), l1AlgoTechTrigBitNumber(), LogDebug, m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_physicsDaqPartition, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, TechnicalTrigger, and triggerCategory().

◆ triggerMaskSet()

const std::vector< unsigned int > & L1GtUtils::triggerMaskSet ( const TriggerCategory trigCategory,
int &  errorCode 
)

return the set of trigger masks for the physics partition (partition zero) used for the event (remain the same in the whole run, if no errors)

Definition at line 1502 of file L1GtUtils.cc.

1502  {
1503  // clear the vector before filling it
1504  m_triggerMaskSet.clear();
1505 
1506  // initialize error code and L1 configuration code
1507  int iError = 0;
1508  int l1ConfCode = 0;
1509 
1510  // check if L1 configuration is available
1511 
1512  if (!availableL1Configuration(iError, l1ConfCode)) {
1513  errorCode = iError;
1514  return m_triggerMaskSet;
1515  }
1516 
1517  // at this point, a valid L1 configuration is available, so the if/else if/else
1518  // can be simplified
1519 
1520  // depending on trigger category (algorithm trigger or technical trigger)
1521  // get the correct quantities
1522 
1523  // pointer to the set of trigger masks
1524 
1525  switch (trigCategory) {
1526  case AlgorithmTrigger: {
1528  // L1GtTriggerMenuLite has masks for physics partition only
1529  // avoid copy to m_triggerMaskSet, return directly m_triggerMaskAlgoTrigLite
1530  if (m_l1GtMenuLiteValid) {
1531  errorCode = iError;
1532  return (*m_triggerMaskAlgoTrigLite);
1533 
1534  } else {
1535  // fall through: L1 trigger configuration from event setup
1536  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1538  }
1539  }
1540 
1541  } else {
1542  // L1 trigger configuration from event setup only
1543  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1545  }
1546  }
1547  } break;
1548  case TechnicalTrigger: {
1550  if (m_l1GtMenuLiteValid) {
1551  errorCode = iError;
1552  return (*m_triggerMaskTechTrigLite);
1553 
1554  } else {
1555  // fall through: L1 trigger configuration from event setup
1556  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1558  }
1559  }
1560 
1561  } else {
1562  // L1 trigger configuration from event setup only
1563  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1565  }
1566  }
1567  } break;
1568  default: {
1569  // should not be the case
1570  iError = l1ConfCode + 3;
1571 
1572  errorCode = iError;
1573  return m_triggerMaskSet;
1574 
1575  } break;
1576  }
1577 
1578  errorCode = iError;
1579  return m_triggerMaskSet;
1580 }

References AlgorithmTrigger, availableL1Configuration(), mps_fire::i, m_l1GtMenuLiteValid, m_physicsDaqPartition, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskSet, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, and TechnicalTrigger.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

◆ trigResult()

const bool L1GtUtils::trigResult ( const DecisionWord decWord,
const int  bitNumber,
const std::string &  nameAlgoTechTrig,
const TriggerCategory trigCategory,
int &  errorCode 
) const
private

return the trigger result given bit number and decision word errorCode != 0 if bit number greater than size of decision word print in debug mode a message in case of error

Definition at line 1769 of file L1GtUtils.cc.

1773  {
1774  bool trigRes = false;
1775  errorCode = 0;
1776 
1777  if (bitNumber < (static_cast<int>(decWord.size()))) {
1778  trigRes = decWord[bitNumber];
1779  } else {
1780  errorCode = 3000;
1781  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
1782  << "\n " << nameAlgoTechTrig
1783  << "\ngreater than size of L1 GT decision word: " << decWord.size()
1784  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
1785  }
1786 
1787  return trigRes;
1788 }

References L1TBPTX_cfi::bitNumber, LogDebug, and triggerCategory().

Referenced by l1Results().

Member Data Documentation

◆ EmptyString

const std::string L1GtUtils::EmptyString = ""
staticprivate

Definition at line 373 of file L1GtUtils.h.

Referenced by l1TriggerMenu(), l1TriggerMenuImplementation(), and triggerCategory().

◆ L1GtNotValidError

const int L1GtUtils::L1GtNotValidError = 99999
staticprivate

Definition at line 374 of file L1GtUtils.h.

Referenced by availableL1Configuration().

◆ m_algorithmAliasMap

const AlgorithmMap* L1GtUtils::m_algorithmAliasMap
private

◆ m_algorithmAliasMapLite

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmAliasMapLite
private

◆ m_algorithmMap

const AlgorithmMap* L1GtUtils::m_algorithmMap
private

Definition at line 433 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1EventSetup().

◆ m_algorithmMapLite

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmMapLite
private

◆ m_beginRunCache

bool L1GtUtils::m_beginRunCache
private

flag for call of getL1GtRunCache in beginRun

Definition at line 457 of file L1GtUtils.h.

Referenced by getL1GtRunCache().

◆ m_l1EventSetupValid

bool L1GtUtils::m_l1EventSetupValid
private

Definition at line 437 of file L1GtUtils.h.

Referenced by availableL1Configuration(), and retrieveL1EventSetup().

◆ m_l1GtMenu

const L1GtTriggerMenu* L1GtUtils::m_l1GtMenu
private

◆ m_l1GtMenuCacheID

unsigned long long L1GtUtils::m_l1GtMenuCacheID
private

Definition at line 431 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtMenuLite

const L1GtTriggerMenuLite* L1GtUtils::m_l1GtMenuLite
private

◆ m_l1GtMenuLiteValid

bool L1GtUtils::m_l1GtMenuLiteValid
private

◆ m_l1GtPfAlgo

const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfAlgo
private

prescale factors

Definition at line 401 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtPfAlgoCacheID

unsigned long long L1GtUtils::m_l1GtPfAlgoCacheID
private

Definition at line 402 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtPfTech

const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfTech
private

Definition at line 404 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtPfTechCacheID

unsigned long long L1GtUtils::m_l1GtPfTechCacheID
private

Definition at line 405 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_L1GtPrescaleFactorsAlgoTrigEventToken

edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> L1GtUtils::m_L1GtPrescaleFactorsAlgoTrigEventToken
private

Definition at line 487 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtPrescaleFactorsAlgoTrigRunToken

edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> L1GtUtils::m_L1GtPrescaleFactorsAlgoTrigRunToken
private

Definition at line 477 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtPrescaleFactorsTechTrigEventToken

edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> L1GtUtils::m_L1GtPrescaleFactorsTechTrigEventToken
private

Definition at line 488 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtPrescaleFactorsTechTrigRunToken

edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> L1GtUtils::m_L1GtPrescaleFactorsTechTrigRunToken
private

Definition at line 478 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_l1GtStablePar

const L1GtStableParameters* L1GtUtils::m_l1GtStablePar
private

event setup cached stuff

stable parameters

Definition at line 391 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_L1GtStableParametersEventToken

edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> L1GtUtils::m_L1GtStableParametersEventToken
private

Definition at line 486 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtStableParametersRunToken

edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> L1GtUtils::m_L1GtStableParametersRunToken
private

Definition at line 476 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_l1GtStableParCacheID

unsigned long long L1GtUtils::m_l1GtStableParCacheID
private

Definition at line 392 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmAlgo

const L1GtTriggerMask* L1GtUtils::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 411 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmAlgoCacheID

unsigned long long L1GtUtils::m_l1GtTmAlgoCacheID
private

Definition at line 412 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmTech

const L1GtTriggerMask* L1GtUtils::m_l1GtTmTech
private

Definition at line 414 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmTechCacheID

unsigned long long L1GtUtils::m_l1GtTmTechCacheID
private

Definition at line 415 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmVetoAlgo

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoAlgo
private

Definition at line 417 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmVetoAlgoCacheID

unsigned long long L1GtUtils::m_l1GtTmVetoAlgoCacheID
private

Definition at line 418 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmVetoTech

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoTech
private

Definition at line 420 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_l1GtTmVetoTechCacheID

unsigned long long L1GtUtils::m_l1GtTmVetoTechCacheID
private

Definition at line 421 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_L1GtTriggerMaskAlgoTrigEventToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> L1GtUtils::m_L1GtTriggerMaskAlgoTrigEventToken
private

Definition at line 489 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskAlgoTrigRunToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> L1GtUtils::m_L1GtTriggerMaskAlgoTrigRunToken
private

Definition at line 479 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskTechTrigEventToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> L1GtUtils::m_L1GtTriggerMaskTechTrigEventToken
private

Definition at line 490 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskTechTrigRunToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> L1GtUtils::m_L1GtTriggerMaskTechTrigRunToken
private

Definition at line 480 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskVetoAlgoTrigEventToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> L1GtUtils::m_L1GtTriggerMaskVetoAlgoTrigEventToken
private

Definition at line 491 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskVetoAlgoTrigRunToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> L1GtUtils::m_L1GtTriggerMaskVetoAlgoTrigRunToken
private

Definition at line 481 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskVetoTechTrigEventToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> L1GtUtils::m_L1GtTriggerMaskVetoTechTrigEventToken
private

Definition at line 492 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMaskVetoTechTrigRunToken

edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> L1GtUtils::m_L1GtTriggerMaskVetoTechTrigRunToken
private

Definition at line 482 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMenuEventToken

edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> L1GtUtils::m_L1GtTriggerMenuEventToken
private

Definition at line 493 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_L1GtTriggerMenuRunToken

edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> L1GtUtils::m_L1GtTriggerMenuRunToken
private

Definition at line 483 of file L1GtUtils.h.

Referenced by L1GtUtils(), and retrieveL1EventSetup().

◆ m_l1GtUtilsHelper

std::unique_ptr<L1GtUtilsHelper> L1GtUtils::m_l1GtUtilsHelper
private

◆ m_numberAlgorithmTriggers

unsigned int L1GtUtils::m_numberAlgorithmTriggers
private

number of algorithm triggers

Definition at line 395 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_numberTechnicalTriggers

unsigned int L1GtUtils::m_numberTechnicalTriggers
private

number of technical triggers

Definition at line 398 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_physicsDaqPartition

unsigned int L1GtUtils::m_physicsDaqPartition
private

index of physics DAQ partition

Definition at line 464 of file L1GtUtils.h.

Referenced by l1Results(), triggerMask(), and triggerMaskSet().

◆ m_prescaleFactorsAlgoTrig

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

Definition at line 407 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1EventSetup().

◆ m_prescaleFactorsAlgoTrigLite

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsAlgoTrigLite
private

Definition at line 451 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1GtTriggerMenuLite().

◆ m_prescaleFactorSet

std::vector<int> L1GtUtils::m_prescaleFactorSet
private

Definition at line 467 of file L1GtUtils.h.

Referenced by prescaleFactorSet(), and retrieveL1EventSetup().

◆ m_prescaleFactorsTechTrig

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsTechTrig
private

Definition at line 408 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1EventSetup().

◆ m_prescaleFactorsTechTrigLite

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsTechTrigLite
private

Definition at line 452 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1GtTriggerMenuLite().

◆ m_retrieveL1EventSetup

bool L1GtUtils::m_retrieveL1EventSetup
private

flags to check which method was used to retrieve L1 trigger configuration

Definition at line 470 of file L1GtUtils.h.

Referenced by availableL1Configuration(), l1AlgoTechTrigBitNumber(), l1TriggerMenu(), l1TriggerMenuImplementation(), l1TriggerNameFromBit(), ptrL1TriggerMenuEventSetup(), and retrieveL1EventSetup().

◆ m_retrieveL1GtTriggerMenuLite

bool L1GtUtils::m_retrieveL1GtTriggerMenuLite
private

◆ m_runIDCache

edm::RunID L1GtUtils::m_runIDCache
private

run cache ID

Definition at line 460 of file L1GtUtils.h.

Referenced by getL1GtRunCache().

◆ m_technicalTriggerMap

const AlgorithmMap* L1GtUtils::m_technicalTriggerMap
private

◆ m_technicalTriggerMapLite

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_technicalTriggerMapLite
private

◆ m_triggerMaskAlgoTrig

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskAlgoTrig
private

Definition at line 423 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1EventSetup(), triggerMask(), and triggerMaskSet().

◆ m_triggerMaskAlgoTrigLite

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskAlgoTrigLite
private

Definition at line 448 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1GtTriggerMenuLite(), triggerMask(), and triggerMaskSet().

◆ m_triggerMaskSet

std::vector<unsigned int> L1GtUtils::m_triggerMaskSet
private

Definition at line 466 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup(), and triggerMaskSet().

◆ m_triggerMaskTechTrig

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskTechTrig
private

Definition at line 424 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1EventSetup(), triggerMask(), and triggerMaskSet().

◆ m_triggerMaskTechTrigLite

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskTechTrigLite
private

Definition at line 449 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1GtTriggerMenuLite(), triggerMask(), and triggerMaskSet().

◆ m_triggerMaskVetoAlgoTrig

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskVetoAlgoTrig
private

Definition at line 426 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

◆ m_triggerMaskVetoTechTrig

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskVetoTechTrig
private

Definition at line 427 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1GtTriggerMenuLite::gtPrescaleFactorsAlgoTrig
const std::vector< std::vector< int > > & gtPrescaleFactorsAlgoTrig() const
get the prescale factors by reference / set the prescale factors
Definition: L1GtTriggerMenuLite.h:128
l1MenuTree_cfi.l1GtTriggerMenuLiteInputTag
l1GtTriggerMenuLiteInputTag
Definition: l1MenuTree_cfi.py:6
L1GtUtils::m_l1GtPfAlgoCacheID
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:402
L1GtTriggerMenuLite::gtTriggerMaskAlgoTrig
const std::vector< unsigned int > & gtTriggerMaskAlgoTrig() const
get the trigger mask for physics algorithms
Definition: L1GtTriggerMenuLite.h:116
L1GtTriggerMenu::gtTriggerMenuName
const std::string & gtTriggerMenuName() const
Definition: L1GtTriggerMenu.h:91
useL1EventSetup
static const bool useL1EventSetup(true)
mps_fire.i
i
Definition: mps_fire.py:355
L1GtPrescaleFactors
Definition: L1GtPrescaleFactors.h:32
L1GtUtils::m_triggerMaskSet
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:466
L1GtUtils::UseEventSetupIn::RunAndEvent
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::RunID
Definition: RunID.h:28
L1GtUtils::UseEventSetupIn::Event
L1GtUtils::m_L1GtTriggerMaskVetoAlgoTrigRunToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd > m_L1GtTriggerMaskVetoAlgoTrigRunToken
Definition: L1GtUtils.h:481
L1GtStableParameters::gtNumberTechnicalTriggers
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
Definition: L1GtStableParameters.h:53
L1GtUtils::m_L1GtStableParametersRunToken
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_L1GtStableParametersRunToken
Definition: L1GtUtils.h:476
L1GtUtils::m_beginRunCache
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:457
edm::Run
Definition: Run.h:45
L1GtUtils::m_l1GtTmAlgoCacheID
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:412
L1GtUtils::m_l1GtMenuLiteValid
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:454
L1GtUtils::m_physicsDaqPartition
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:464
L1GtPrescaleFactors::gtPrescaleFactors
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtPrescaleFactors.h:45
L1GtUtils::decisionBeforeMask
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1043
L1GtUtils::m_triggerMaskVetoTechTrig
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
Definition: L1GtUtils.h:427
L1GtUtilsHelper
Definition: L1GtUtilsHelper.h:37
L1GtTriggerMenu::gtTriggerMenuImplementation
const std::string & gtTriggerMenuImplementation() const
Definition: L1GtTriggerMenu.h:96
HIPAlignmentAlgorithm_cfi.algoName
algoName
Definition: HIPAlignmentAlgorithm_cfi.py:5
L1GtUtils::m_L1GtTriggerMaskAlgoTrigRunToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > m_L1GtTriggerMaskAlgoTrigRunToken
Definition: L1GtUtils.h:479
L1GtTriggerMaskVetoTechTrigRcd
Definition: L1GtTriggerMaskVetoTechTrigRcd.h:39
L1GtUtils::m_runIDCache
edm::RunID m_runIDCache
run cache ID
Definition: L1GtUtils.h:460
L1GtUtils::EmptyString
static const std::string EmptyString
Definition: L1GtUtils.h:373
L1GtUtils::m_L1GtTriggerMaskVetoAlgoTrigEventToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd > m_L1GtTriggerMaskVetoAlgoTrigEventToken
Definition: L1GtUtils.h:491
L1GtUtils::m_algorithmMap
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:433
L1GtUtils::m_l1GtPfTechCacheID
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:405
L1GtUtils::m_prescaleFactorsAlgoTrig
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:407
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:86
edm::Handle
Definition: AssociativeIterator.h:50
L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo
const unsigned int gtPrescaleFactorIndexAlgo() const
Definition: L1GlobalTriggerRecord.h:87
L1GtPrescaleFactorsTechTrigRcd
Definition: L1GtPrescaleFactorsTechTrigRcd.h:38
L1GtTriggerMenuLite::CItL1Trig
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers
Definition: L1GtTriggerMenuLite.h:45
L1GtUtils::L1GtNotValidError
static const int L1GtNotValidError
Definition: L1GtUtils.h:374
L1GtUtils::m_l1GtUtilsHelper
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:473
L1GtUtils::TechnicalTrigger
Definition: L1GtUtils.h:140
L1GtUtils::m_L1GtTriggerMaskAlgoTrigEventToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > m_L1GtTriggerMaskAlgoTrigEventToken
Definition: L1GtUtils.h:489
L1GtUtils::m_retrieveL1EventSetup
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:470
L1GtUtils::m_triggerMaskTechTrig
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:424
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
L1GtUtils::m_L1GtPrescaleFactorsAlgoTrigRunToken
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_L1GtPrescaleFactorsAlgoTrigRunToken
Definition: L1GtUtils.h:477
edm::Run::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:315
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1GtUtils::m_L1GtTriggerMenuEventToken
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_L1GtTriggerMenuEventToken
Definition: L1GtUtils.h:493
L1GtUtils::TriggerCategory
TriggerCategory
Definition: L1GtUtils.h:140
L1GtUtils::m_algorithmAliasMap
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:434
L1GtTriggerMenuLite::gtTechnicalTriggerMap
const L1TriggerMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
Definition: L1GtTriggerMenuLite.h:111
L1GtTriggerMaskTechTrigRcd
Definition: L1GtTriggerMaskTechTrigRcd.h:39
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
L1GtUtils::trigResult
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1769
L1GtTriggerMaskAlgoTrigRcd
Definition: L1GtTriggerMaskAlgoTrigRcd.h:39
edm::ESHandle
Definition: DTSurvey.h:22
Event
L1GtTriggerMask
Definition: L1GtTriggerMask.h:33
L1GtStableParameters
Definition: L1GtStableParameters.h:33
L1GtUtils::triggerCategory
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:111
L1GtUtils::availableL1Configuration
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1684
useL1GtTriggerMenuLite
static const bool useL1GtTriggerMenuLite(true)
L1GtUtils::m_triggerMaskTechTrigLite
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:449
L1GtUtils::m_L1GtTriggerMaskTechTrigEventToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > m_L1GtTriggerMaskTechTrigEventToken
Definition: L1GtUtils.h:490
L1GtUtils::m_numberTechnicalTriggers
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:398
L1GtTriggerMenuLite::gtTriggerMenuImplementation
const std::string & gtTriggerMenuImplementation() const
Definition: L1GtTriggerMenuLite.h:91
L1GtTriggerMenuLite::gtTriggerMaskTechTrig
const std::vector< unsigned int > & gtTriggerMaskTechTrig() const
get the trigger mask for technical triggers
Definition: L1GtTriggerMenuLite.h:122
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
L1GtUtils::UseEventSetupIn::Run
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
L1GtTriggerMenuLite::gtAlgorithmMap
const L1TriggerMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenuLite.h:101
L1GtTriggerMask::gtTriggerMask
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
Definition: L1GtTriggerMask.h:47
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:186
L1GtUtils::m_l1GtStablePar
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
Definition: L1GtUtils.h:391
L1GtUtilsHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &desc)
Definition: L1GtUtilsHelper.cc:27
PDRates.Run
Run
Definition: PDRates.py:133
L1GtUtils::l1Results
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:671
L1GtUtils::m_L1GtPrescaleFactorsAlgoTrigEventToken
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_L1GtPrescaleFactorsAlgoTrigEventToken
Definition: L1GtUtils.h:487
iEvent
int iEvent
Definition: GenABIO.cc:224
L1GtUtils::decisionAfterMask
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1057
L1GtUtils::retrieveL1EventSetup
void retrieveL1EventSetup(const edm::EventSetup &, bool isRun=true)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed
Definition: L1GtUtils.cc:127
L1GtUtils::m_l1GtMenu
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:430
L1GtUtils::m_l1GtMenuLite
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:442
L1GtTriggerMenu::gtAlgorithmAliasMap
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
Definition: L1GtTriggerMenu.h:192
L1GtUtils::retrieveL1GtTriggerMenuLite
void retrieveL1GtTriggerMenuLite(const edm::Run &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
Definition: L1GtUtils.cc:286
L1GtStableParameters::gtNumberPhysTriggers
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
Definition: L1GtStableParameters.h:43
l1MenuTree_cfi.l1GtRecordInputTag
l1GtRecordInputTag
Definition: l1MenuTree_cfi.py:4
L1GtUtils::l1AlgoTechTrigBitNumber
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:376
l1MenuTree_cfi.l1GtReadoutRecordInputTag
l1GtReadoutRecordInputTag
Definition: l1MenuTree_cfi.py:5
L1GtUtils::m_algorithmAliasMapLite
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:445
L1GtUtils::m_l1GtPfTech
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GtUtils.h:404
module
Definition: vlib.h:198
get
#define get
L1GtUtils::m_prescaleFactorsTechTrigLite
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:452
L1GtStableParametersRcd
Definition: L1GtStableParametersRcd.h:39
L1GtUtils::m_L1GtStableParametersEventToken
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_L1GtStableParametersEventToken
Definition: L1GtUtils.h:486
L1GtTriggerMaskVetoAlgoTrigRcd
Definition: L1GtTriggerMaskVetoAlgoTrigRcd.h:39
L1GtTriggerMenuLite::gtPrescaleFactorsTechTrig
const std::vector< std::vector< int > > & gtPrescaleFactorsTechTrig() const
Definition: L1GtTriggerMenuLite.h:132
l1t::UseEventSetupIn::RunAndEvent
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
L1GtUtils::m_algorithmMapLite
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:444
L1GtUtils::AlgorithmTrigger
Definition: L1GtUtils.h:140
L1GtUtils::m_technicalTriggerMapLite
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:446
L1GlobalTriggerRecord::decisionWordBeforeMask
const DecisionWord decisionWordBeforeMask() const
Definition: L1GlobalTriggerRecord.h:64
L1GtUtils::m_technicalTriggerMap
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:435
edm::Run::runAuxiliary
RunAuxiliary const & runAuxiliary() const override
Definition: Run.h:61
L1GtUtils::m_triggerMaskAlgoTrig
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:423
L1GlobalTriggerRecord::gtPrescaleFactorIndexTech
const unsigned int gtPrescaleFactorIndexTech() const
get/set index of the set of prescale factors
Definition: L1GlobalTriggerRecord.h:81
L1GtUtils::L1GtUtils
L1GtUtils(edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, UseEventSetupIn use=UseEventSetupIn::Run)
Definition: L1GtUtils.cc:92
L1GtUtils::m_L1GtTriggerMenuRunToken
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_L1GtTriggerMenuRunToken
Definition: L1GtUtils.h:483
L1GtUtils::triggerMask
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1097
L1GtUtils::prescaleFactorSetIndex
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1274
L1GtUtils::m_retrieveL1GtTriggerMenuLite
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:471
L1GtUtils::m_numberAlgorithmTriggers
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:395
edm::Transition::BeginRun
L1GtUtils::m_triggerMaskAlgoTrigLite
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:448
L1GtUtils::m_L1GtTriggerMaskTechTrigRunToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > m_L1GtTriggerMaskTechTrigRunToken
Definition: L1GtUtils.h:480
edm::RunAuxiliary::run
RunNumber_t run() const
Definition: RunAuxiliary.h:31
L1GtTriggerMenuLite::gtTriggerMenuName
const std::string & gtTriggerMenuName() const
Definition: L1GtTriggerMenuLite.h:86
L1GtUtils::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:431
L1GtUtils::m_l1GtTmTech
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GtUtils.h:414
L1GtUtils::m_l1EventSetupValid
bool m_l1EventSetupValid
Definition: L1GtUtils.h:437
edm::RunAuxiliary::id
RunID const & id() const
Definition: RunAuxiliary.h:27
L1GtUtils::m_prescaleFactorsAlgoTrigLite
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:451
L1TBPTX_cfi.bitNumber
bitNumber
Definition: L1TBPTX_cfi.py:26
L1GtUtils::m_prescaleFactorSet
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:467
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:185
L1GlobalTriggerReadoutRecord::technicalTriggerWord
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:212
L1GtUtils::m_prescaleFactorsTechTrig
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:408
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38
L1GtUtils::m_l1GtTmTechCacheID
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:415
L1GtUtils::m_L1GtTriggerMaskVetoTechTrigEventToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd > m_L1GtTriggerMaskVetoTechTrigEventToken
Definition: L1GtUtils.h:492
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1GtUtils::m_l1GtTmVetoAlgoCacheID
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:418
L1GtUtils::m_l1GtTmVetoTechCacheID
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:421
L1GtUtils::m_triggerMaskVetoAlgoTrig
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
Definition: L1GtUtils.h:426
L1GlobalTriggerRecord::technicalTriggerWordBeforeMask
const TechnicalTriggerWord technicalTriggerWordBeforeMask() const
Definition: L1GlobalTriggerRecord.h:66
L1GtUtils::m_l1GtTmVetoTech
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GtUtils.h:420
L1GtTriggerMenu::gtTechnicalTriggerMap
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
Definition: L1GtTriggerMenu.h:197
L1GtUtils::m_L1GtPrescaleFactorsTechTrigRunToken
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > m_L1GtPrescaleFactorsTechTrigRunToken
Definition: L1GtUtils.h:478
L1GtUtils::prescaleFactor
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1083
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:372
L1GtUtils::m_l1GtPfAlgo
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GtUtils.h:401
L1GtUtils::m_l1GtStableParCacheID
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:392
L1GtTriggerMenu::gtAlgorithmMap
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenu.h:187
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
L1GtUtils::m_L1GtPrescaleFactorsTechTrigEventToken
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > m_L1GtPrescaleFactorsTechTrigEventToken
Definition: L1GtUtils.h:488
L1GtUtils::m_L1GtTriggerMaskVetoTechTrigRunToken
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd > m_L1GtTriggerMaskVetoTechTrigRunToken
Definition: L1GtUtils.h:482
L1GtTriggerMenuLite::gtAlgorithmAliasMap
const L1TriggerMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
Definition: L1GtTriggerMenuLite.h:106
L1GtUtils::m_l1GtTmVetoAlgo
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GtUtils.h:417
L1GtUtils::m_l1GtTmAlgo
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
Definition: L1GtUtils.h:411