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 93 of file L1GtUtils.cc.

97  : 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 99 of file L1GtUtils.cc.

103  : L1GtUtils(iC, useEventSetupIn) {
104  m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset, iC, useL1GtTriggerMenuLite);
105 }

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) {
511  m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset, iC, useL1GtTriggerMenuLite, module);
512 }

References m_l1GtUtilsHelper, callgraph::module, 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 108 of file L1GtUtils.cc.

108  {
109  // empty
110 }

◆ L1GtUtils() [7/7]

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

Definition at line 30 of file L1GtUtils.cc.

31  :
32 
35 
37 
38  m_l1GtPfAlgoCacheID(0ULL),
39  m_l1GtPfTechCacheID(0ULL),
40 
41  m_l1GtTmAlgoCacheID(0ULL),
42  m_l1GtTmTechCacheID(0ULL),
43 
46 
47  m_l1GtMenuCacheID(0ULL),
48 
49  m_l1EventSetupValid(false),
50 
51  m_l1GtMenuLiteValid(false),
52 
53  m_beginRunCache(false),
54 
55  m_runIDCache(0),
56 
58 
60 
62 
63 {
64  if (useEventSetupIn == UseEventSetupIn::Run || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
80  }
81  if (useEventSetupIn == UseEventSetupIn::Event || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
90  }
91 }

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 1679 of file L1GtUtils.cc.

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

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 1066 of file L1GtUtils.cc.

1066  {
1067  // initial values
1068  bool decisionBeforeMask = false;
1069  bool decisionAfterMask = false;
1070  int prescaleFactor = -1;
1071  int triggerMask = -1;
1072 
1074 
1075  return decisionAfterMask;
1076 }

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 1052 of file L1GtUtils.cc.

1054  {
1055  // initial values
1056  bool decisionBeforeMask = false;
1057  bool decisionAfterMask = false;
1058  int prescaleFactor = -1;
1059  int triggerMask = -1;
1060 
1062 
1063  return decisionAfterMask;
1064 }

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 1038 of file L1GtUtils.cc.

1040  {
1041  // initial values
1042  bool decisionBeforeMask = false;
1043  bool decisionAfterMask = false;
1044  int prescaleFactor = -1;
1045  int triggerMask = -1;
1046 
1048 
1049  return decisionBeforeMask;
1050 }

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

◆ 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 339 of file L1GtUtils.cc.

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

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 314 of file L1GtUtils.cc.

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

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 371 of file L1GtUtils.cc.

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

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 666 of file L1GtUtils.cc.

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

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 1577 of file L1GtUtils.cc.

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

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 1598 of file L1GtUtils.cc.

1598  {
1600  if (m_l1GtMenuLiteValid) {
1602 
1603  } else if (m_retrieveL1EventSetup) {
1605 
1606  } else {
1607  // only L1GtTriggerMenuLite requested, but it is not valid
1608  return EmptyString;
1609  }
1610  } else if (m_retrieveL1EventSetup) {
1612 
1613  } else {
1614  // L1 trigger configuration not retrieved
1615  return EmptyString;
1616  }
1617 }

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 483 of file L1GtUtils.cc.

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

References MillePedeAlignmentAlgorithm_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 1078 of file L1GtUtils.cc.

1080  {
1081  // initial values
1082  bool decisionBeforeMask = false;
1083  bool decisionAfterMask = false;
1084  int prescaleFactor = -1;
1085  int triggerMask = -1;
1086 
1088 
1089  return prescaleFactor;
1090 }

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 1441 of file L1GtUtils.cc.

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

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 1269 of file L1GtUtils.cc.

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

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 1645 of file L1GtUtils.cc.

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

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 1619 of file L1GtUtils.cc.

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

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 128 of file L1GtUtils.cc.

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

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), edm::EventSetup::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, and SiStripPI::max.

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 281 of file L1GtUtils.cc.

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

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 112 of file L1GtUtils.cc.

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

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 1092 of file L1GtUtils.cc.

1092  {
1093  // initial values
1094  bool decisionBeforeMask = false;
1095  bool decisionAfterMask = false;
1096  int prescaleFactor = -1;
1097  int triggerMask = -1;
1098 
1100 
1101  return triggerMask;
1102 }

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 1104 of file L1GtUtils.cc.

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

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 1497 of file L1GtUtils.cc.

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

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 1764 of file L1GtUtils.cc.

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

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

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:428
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:1038
L1GtUtils::m_triggerMaskVetoTechTrig
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
Definition: L1GtUtils.h:427
L1GtTriggerMenu::gtTriggerMenuImplementation
const std::string & gtTriggerMenuImplementation() const
Definition: L1GtTriggerMenu.h:96
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:97
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:87
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:318
MillePedeAlignmentAlgorithm_cfi.algoName
algoName
Definition: MillePedeAlignmentAlgorithm_cfi.py:10
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:1764
L1GtTriggerMaskAlgoTrigRcd
Definition: L1GtTriggerMaskAlgoTrigRcd.h:39
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:112
L1GtUtils::availableL1Configuration
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1679
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:233
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:132
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:666
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:1052
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:128
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:281
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:371
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
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
callgraph.module
module
Definition: callgraph.py:61
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:62
L1GtUtils::m_triggerMaskAlgoTrig
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:423
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
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:93
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:1092
L1GtUtils::prescaleFactorSetIndex
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1269
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:187
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:1078
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