CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
L1MuGlobalMuonTrigger Class Reference

#include <L1MuGlobalMuonTrigger.h>

Inheritance diagram for L1MuGlobalMuonTrigger:
edm::one::EDProducer< edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginJob () override
 
const L1MuGMTCancelOutUnitCancelOutUnit (int id) const
 return pointer to Cancel Out Unit More...
 
L1MuGMTReadoutRecordcurrentReadoutRecord () const
 return a reference to the current record in the ring buffer More...
 
const L1MuGMTPSBData () const
 return pointer to PSB More...
 
L1MuGMTDebugBlockDebugBlockForFill () const
 for debug: return the debug block (in order to fill it) More...
 
std::unique_ptr
< L1MuGMTReadoutCollection
getReadoutCollection ()
 
 L1MuGlobalMuonTrigger (const edm::ParameterSet &)
 
const L1MuGMTMatcherMatcher (int id) const
 return pointer to Matcher More...
 
const L1MuGMTMergerMerger (int id) const
 return pointer to Merger More...
 
const L1MuGMTMipIsoAUMipIsoAU (int id) const
 return pointer to MIP & ISO bit assignment unit More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 
void reset ()
 
const L1MuGMTSorterSorter () const
 return pointer to Sorter More...
 
 ~L1MuGlobalMuonTrigger () override
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::SharedResources >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector
< edm::ProductResolverIndex >
const & 
putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::ESGetToken
< L1CaloGeometry,
L1CaloGeometryRecord
m_caloGeomToken
 
L1MuGMTCancelOutUnitm_CancelOutUnit [4]
 
std::vector< L1MuGMTExtendedCandm_ExtendedCands
 
edm::ESGetToken
< L1MuGMTChannelMask,
L1MuGMTChannelMaskRcd
m_gmtChanMaskToken
 
edm::ESGetToken
< L1MuGMTParameters,
L1MuGMTParametersRcd
m_gmtParamsToken
 
edm::ESGetToken< L1MuGMTScales,
L1MuGMTScalesRcd
m_gmtScalesToken
 
unsigned long long m_L1CaloGeometryCacheID
 
unsigned long long m_L1MuGMTChannelMaskCacheID
 
unsigned long long m_L1MuGMTParametersCacheID
 
unsigned long long m_L1MuGMTScalesCacheID
 
unsigned long long m_L1MuTriggerPtScaleCacheID
 
unsigned long long m_L1MuTriggerScalesCacheID
 
L1MuGMTMatcherm_Matcher [2]
 
L1MuGMTMergerm_Merger [2]
 
L1MuGMTMipIsoAUm_MipIsoAU [2]
 
L1MuGMTPSBm_PSB
 
std::vector
< L1MuGMTReadoutRecord * > 
m_ReadoutRingbuffer
 
bool m_sendMipIso
 
L1MuGMTSorterm_Sorter
 
edm::ESGetToken
< L1MuTriggerPtScale,
L1MuTriggerPtScaleRcd
m_trigPtScaleToken
 
edm::ESGetToken
< L1MuTriggerScales,
L1MuTriggerScalesRcd
m_trigScalesToken
 
bool m_writeLUTsAndRegs
 

Static Private Attributes

static L1MuGMTConfigm_config = nullptr
 
static L1MuGMTDebugBlockm_db = nullptr
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 64 of file L1MuGlobalMuonTrigger.h.

Constructor & Destructor Documentation

L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger ( const edm::ParameterSet ps)
explicit

EventSetup Tokens

Definition at line 56 of file L1MuGlobalMuonTrigger.cc.

References edm::EDConsumerBase::consumesCollector(), L1MuGMTConfig::Debug(), L1MuGMTConfig::getBxMax(), L1MuGMTConfig::getBxMin(), edm::ParameterSet::getUntrackedParameter(), m_caloGeomToken, m_CancelOutUnit, m_config, m_db, m_ExtendedCands, m_gmtChanMaskToken, m_gmtParamsToken, m_gmtScalesToken, m_L1CaloGeometryCacheID, m_L1MuGMTChannelMaskCacheID, m_L1MuGMTParametersCacheID, m_L1MuGMTScalesCacheID, m_L1MuTriggerPtScaleCacheID, m_L1MuTriggerScalesCacheID, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_sendMipIso, m_Sorter, m_trigPtScaleToken, m_trigScalesToken, and m_writeLUTsAndRegs.

56  {
57  produces<std::vector<L1MuGMTCand> >();
58  produces<L1MuGMTReadoutCollection>();
59  m_sendMipIso = ps.getUntrackedParameter<bool>("SendMipIso", false);
60  if (m_sendMipIso) {
61  produces<std::vector<unsigned> >();
62  }
63 
70 
71  m_ExtendedCands.reserve(20);
72 
73  // set configuration parameters
74  if (!m_config)
75  m_config = new L1MuGMTConfig(ps);
76  m_writeLUTsAndRegs = ps.getUntrackedParameter<bool>("WriteLUTsAndRegs", false);
77 
78  // build GMT
79  if (L1MuGMTConfig::Debug(1))
80  edm::LogVerbatim("GMT_info");
81  if (L1MuGMTConfig::Debug(1))
82  edm::LogVerbatim("GMT_info") << "**** L1GlobalMuonTrigger building ****";
83  if (L1MuGMTConfig::Debug(1))
84  edm::LogVerbatim("GMT_info");
85 
86  // create new PSB
87  if (L1MuGMTConfig::Debug(2))
88  edm::LogVerbatim("GMT_info") << "creating GMT PSB";
89  m_PSB = new L1MuGMTPSB(*this, consumesCollector());
90 
91  // create new matcher
92  if (L1MuGMTConfig::Debug(2))
93  edm::LogVerbatim("GMT_info") << "creating GMT Matcher (0,1)";
94  m_Matcher[0] = new L1MuGMTMatcher(*this, 0); // barrel
95  m_Matcher[1] = new L1MuGMTMatcher(*this, 1); // endcap
96 
97  // create new cancel-out units
98  if (L1MuGMTConfig::Debug(2))
99  edm::LogVerbatim("GMT_info") << "creating GMT Cancel Out Unit (0,1,2,3)";
100  m_CancelOutUnit[0] = new L1MuGMTCancelOutUnit(*this, 0); // barrel
101  m_CancelOutUnit[1] = new L1MuGMTCancelOutUnit(*this, 1); // endcap
102  m_CancelOutUnit[2] = new L1MuGMTCancelOutUnit(*this, 2); // CSC/bRPC
103  m_CancelOutUnit[3] = new L1MuGMTCancelOutUnit(*this, 3); // DT/fRPC
104 
105  // create new MIP & ISO bit assignment units
106  if (L1MuGMTConfig::Debug(2))
107  edm::LogVerbatim("GMT_info") << "creating GMT MIP & ISO bit Assigment Unit (0,1)";
108  m_MipIsoAU[0] = new L1MuGMTMipIsoAU(*this, 0); // barrel
109  m_MipIsoAU[1] = new L1MuGMTMipIsoAU(*this, 1); // endcap
110 
111  // create new Merger
112  if (L1MuGMTConfig::Debug(2))
113  edm::LogVerbatim("GMT_info") << "creating GMT Merger (0,1)";
114  m_Merger[0] = new L1MuGMTMerger(*this, 0); // barrel
115  m_Merger[1] = new L1MuGMTMerger(*this, 1); // endcap
116 
117  // create new sorter
118  if (L1MuGMTConfig::Debug(2))
119  edm::LogVerbatim("GMT_info") << "creating GMT Sorter";
120  m_Sorter = new L1MuGMTSorter(*this); // barrel
121 
122  if (!m_db)
124  usesResource("L1MuGlobalMuonTrigger");
126  m_gmtScalesToken = esConsumes<L1MuGMTScales, L1MuGMTScalesRcd>();
127  m_trigScalesToken = esConsumes<L1MuTriggerScales, L1MuTriggerScalesRcd>();
128  m_trigPtScaleToken = esConsumes<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd>();
129  m_gmtParamsToken = esConsumes<L1MuGMTParameters, L1MuGMTParametersRcd>();
130  m_gmtChanMaskToken = esConsumes<L1MuGMTChannelMask, L1MuGMTChannelMaskRcd>();
131  m_caloGeomToken = esConsumes<L1CaloGeometry, L1CaloGeometryRecord>();
132 }
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcd > m_trigPtScaleToken
unsigned long long m_L1MuTriggerScalesCacheID
unsigned long long m_L1MuGMTChannelMaskCacheID
edm::ESGetToken< L1MuGMTParameters, L1MuGMTParametersRcd > m_gmtParamsToken
std::vector< L1MuGMTExtendedCand > m_ExtendedCands
edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > m_trigScalesToken
unsigned long long m_L1CaloGeometryCacheID
unsigned long long m_L1MuTriggerPtScaleCacheID
static bool Debug()
L1MuGMTMipIsoAU * m_MipIsoAU[2]
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::ESGetToken< L1MuGMTScales, L1MuGMTScalesRcd > m_gmtScalesToken
edm::ESGetToken< L1CaloGeometry, L1CaloGeometryRecord > m_caloGeomToken
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
unsigned long long m_L1MuGMTScalesCacheID
static int getBxMin()
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
edm::ESGetToken< L1MuGMTChannelMask, L1MuGMTChannelMaskRcd > m_gmtChanMaskToken
static L1MuGMTConfig * m_config
unsigned long long m_L1MuGMTParametersCacheID
static int getBxMax()
static L1MuGMTDebugBlock * m_db
L1MuGlobalMuonTrigger::~L1MuGlobalMuonTrigger ( )
override

Definition at line 137 of file L1MuGlobalMuonTrigger.cc.

References m_CancelOutUnit, m_config, m_db, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_ReadoutRingbuffer, and m_Sorter.

137  {
138  if (m_db)
139  delete m_db;
140  m_db = nullptr;
141 
142  delete m_Sorter;
143  delete m_Merger[1]; // endcap Merger
144  delete m_Merger[0]; // barrel Merger
145  delete m_MipIsoAU[1]; // barrel MIP & ISO bit assignment unit
146  delete m_MipIsoAU[0]; // barrel MIP & ISO bit assignment unit
147  delete m_CancelOutUnit[3]; // DT/fRPC cancel-out unit (in endcap chip)
148  delete m_CancelOutUnit[2]; // CSC/bRPC cancel-out unit (in barrel chip)
149  delete m_CancelOutUnit[1]; // endcap DT/CSC cancel out unit
150  delete m_CancelOutUnit[0]; // barrel DT/CSC cancel out unit
151  delete m_Matcher[1]; // endcap matcher
152  delete m_Matcher[0]; // barrel matcher
153  delete m_PSB;
154 
155  if (m_config)
156  delete m_config;
157  m_config = nullptr;
158 
159  // copied from produce() by Jim B, 7 Aug 2007
160  std::vector<L1MuGMTReadoutRecord*>::iterator irr = m_ReadoutRingbuffer.begin();
161  for (; irr != m_ReadoutRingbuffer.end(); irr++)
162  delete (*irr);
163  m_ReadoutRingbuffer.clear();
164  // end Jim B edit
165 }
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
L1MuGMTMipIsoAU * m_MipIsoAU[2]
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
static L1MuGMTConfig * m_config
static L1MuGMTDebugBlock * m_db

Member Function Documentation

void L1MuGlobalMuonTrigger::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 171 of file L1MuGlobalMuonTrigger.cc.

171 {}
const L1MuGMTCancelOutUnit* L1MuGlobalMuonTrigger::CancelOutUnit ( int  id) const
inline

return pointer to Cancel Out Unit

Definition at line 81 of file L1MuGlobalMuonTrigger.h.

References gpuClustering::id, and m_CancelOutUnit.

Referenced by L1MuGMTMerger::merge().

81 { return m_CancelOutUnit[id]; }
uint16_t *__restrict__ id
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
L1MuGMTReadoutRecord* L1MuGlobalMuonTrigger::currentReadoutRecord ( ) const
inline

return a reference to the current record in the ring buffer

Definition at line 98 of file L1MuGlobalMuonTrigger.h.

References m_ReadoutRingbuffer.

Referenced by L1MuGMTPSB::getCalo(), L1MuGMTPSB::receiveData(), and L1MuGMTSorter::run().

98 { return m_ReadoutRingbuffer.back(); };
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
const L1MuGMTPSB* L1MuGlobalMuonTrigger::Data ( ) const
inline

return pointer to PSB

Definition at line 75 of file L1MuGlobalMuonTrigger.h.

References m_PSB.

Referenced by L1MuGMTMipIsoAU::assignISO(), L1MuGMTMipIsoAU::assignMIP(), L1MuGMTMatcher::load(), L1MuGMTMerger::load(), and L1MuGMTMipIsoAU::load().

75 { return m_PSB; }
L1MuGMTDebugBlock* L1MuGlobalMuonTrigger::DebugBlockForFill ( ) const
inline
std::unique_ptr< L1MuGMTReadoutCollection > L1MuGlobalMuonTrigger::getReadoutCollection ( )

get the GMT readout data for the triggered bx readout data contains input and output muons as well as MIP and Quiet bits for 3 or 5 bx around the triggered bx

Definition at line 432 of file L1MuGlobalMuonTrigger.cc.

References makePileupJSON::bx, L1MuGMTConfig::getBxMaxRo(), L1MuGMTConfig::getBxMinRo(), and m_ReadoutRingbuffer.

Referenced by produce().

432  {
433  int bx_min_ro = L1MuGMTConfig::getBxMinRo();
434  int bx_max_ro = L1MuGMTConfig::getBxMaxRo();
435  int bx_size = bx_max_ro - bx_min_ro + 1;
436 
437  std::unique_ptr<L1MuGMTReadoutCollection> rrc(new L1MuGMTReadoutCollection(bx_size));
438 
439  for (int bx = bx_min_ro; bx <= bx_max_ro; bx++) {
440  std::vector<L1MuGMTReadoutRecord*>::const_iterator iter = m_ReadoutRingbuffer.begin();
441 
442  for (; iter != m_ReadoutRingbuffer.end(); iter++) {
443  if ((*iter)->getBxInEvent() == bx) {
444  rrc->addRecord(**iter);
445  break;
446  }
447  }
448  }
449 
450  return rrc;
451 }
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
static int getBxMaxRo()
static int getBxMinRo()
const L1MuGMTMatcher* L1MuGlobalMuonTrigger::Matcher ( int  id) const
inline

return pointer to Matcher

Definition at line 78 of file L1MuGlobalMuonTrigger.h.

References gpuClustering::id, and m_Matcher.

Referenced by L1MuGMTCancelOutUnit::decide(), and L1MuGMTMerger::merge().

78 { return m_Matcher[id]; }
uint16_t *__restrict__ id
L1MuGMTMatcher * m_Matcher[2]
const L1MuGMTMerger* L1MuGlobalMuonTrigger::Merger ( int  id) const
inline

return pointer to Merger

Definition at line 87 of file L1MuGlobalMuonTrigger.h.

References gpuClustering::id, and m_Merger.

Referenced by L1MuGMTSorter::run().

87 { return m_Merger[id]; }
uint16_t *__restrict__ id
L1MuGMTMerger * m_Merger[2]
const L1MuGMTMipIsoAU* L1MuGlobalMuonTrigger::MipIsoAU ( int  id) const
inline

return pointer to MIP & ISO bit assignment unit

Definition at line 84 of file L1MuGlobalMuonTrigger.h.

References gpuClustering::id, and m_MipIsoAU.

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

84 { return m_MipIsoAU[id]; }
uint16_t *__restrict__ id
L1MuGMTMipIsoAU * m_MipIsoAU[2]
void L1MuGlobalMuonTrigger::produce ( edm::Event e,
const edm::EventSetup es 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 173 of file L1MuGlobalMuonTrigger.cc.

References makePileupJSON::bx, L1MuGMTSorter::Cands(), L1MuGMTConfig::clearLUTsRegs(), L1MuGMTConfig::createLUTsRegs(), L1MuGMTConfig::Debug(), TauDecayModes::dec, DeadROC_duringRun::dir, L1MuGMTConfig::dumpLUTs(), L1MuGMTConfig::dumpRegs(), L1MuGMTPSB::empty(), edm::EventSetup::get(), L1MuGMTConfig::getBxMax(), L1MuGMTConfig::getBxMin(), L1MuGMTConfig::getGMTChanMask(), edm::EventSetup::getHandle(), getReadoutCollection(), L1MuGMTChannelMask::getSubsystemMask(), mps_fire::i, L1MuGMTDebugBlock::IsMIPISO(), m_caloGeomToken, m_CancelOutUnit, m_config, m_db, m_ExtendedCands, m_gmtChanMaskToken, m_gmtParamsToken, m_gmtScalesToken, m_L1CaloGeometryCacheID, m_L1MuGMTChannelMaskCacheID, m_L1MuGMTParametersCacheID, m_L1MuGMTScalesCacheID, m_L1MuTriggerPtScaleCacheID, m_L1MuTriggerScalesCacheID, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_ReadoutRingbuffer, m_sendMipIso, m_Sorter, m_trigPtScaleToken, m_trigScalesToken, m_writeLUTsAndRegs, eostools::mkdir(), eostools::move(), L1MuGMTSorter::numberOfCands(), L1MuGMTSorter::print(), L1MuGMTMatcher::print(), L1MuGMTPSB::print(), L1MuGMTMipIsoAU::print(), L1MuGMTMerger::print(), L1MuGMTCancelOutUnit::print(), edm::ESHandle< class >::product(), edm::Event::put(), L1MuGMTPSB::receiveData(), L1MuGMTDebugBlock::reset(), reset(), L1MuGMTSorter::run(), L1MuGMTMatcher::run(), L1MuGMTMipIsoAU::run(), L1MuGMTMerger::run(), L1MuGMTCancelOutUnit::run(), L1MuGMTDebugBlock::SetBX(), L1MuGMTConfig::setCaloGeom(), L1MuGMTConfig::setDefaults(), L1MuGMTConfig::setGMTChanMask(), L1MuGMTConfig::setGMTParams(), L1MuGMTConfig::setGMTScales(), L1MuGMTConfig::setTriggerPtScale(), L1MuGMTConfig::setTriggerScales(), and AlCaHLTBitMon_QueryRunRegistry::string.

173  {
174  // configure from the event setup
175 
176  unsigned long long L1MuGMTScalesCacheID = es.get<L1MuGMTScalesRcd>().cacheIdentifier();
177  if (L1MuGMTScalesCacheID != m_L1MuGMTScalesCacheID) {
179  m_config->setGMTScales(gmtscales_h.product());
180  }
181 
182  unsigned long long L1MuTriggerScalesCacheID = es.get<L1MuTriggerScalesRcd>().cacheIdentifier();
183  if (L1MuTriggerScalesCacheID != m_L1MuTriggerScalesCacheID) {
185  m_config->setTriggerScales(trigscales_h.product());
186  }
187 
188  unsigned long long L1MuTriggerPtScaleCacheID = es.get<L1MuTriggerPtScaleRcd>().cacheIdentifier();
189  if (L1MuTriggerPtScaleCacheID != m_L1MuTriggerPtScaleCacheID) {
191  m_config->setTriggerPtScale(trigptscale_h.product());
192  }
193 
194  unsigned long long L1MuGMTParametersCacheID = es.get<L1MuGMTParametersRcd>().cacheIdentifier();
195  if (L1MuGMTParametersCacheID != m_L1MuGMTParametersCacheID) {
197  m_config->setGMTParams(gmtparams_h.product());
199  }
200 
201  unsigned long long L1MuGMTChannelMaskCacheID = es.get<L1MuGMTChannelMaskRcd>().cacheIdentifier();
202  if (L1MuGMTChannelMaskCacheID != m_L1MuGMTChannelMaskCacheID) {
204  m_config->setGMTChanMask(gmtchanmask_h.product());
205  if (L1MuGMTConfig::Debug(1)) {
206  std::string onoff;
207  const L1MuGMTChannelMask* theChannelMask = L1MuGMTConfig::getGMTChanMask();
208  unsigned mask = theChannelMask->getSubsystemMask();
209 
210  edm::LogVerbatim("GMT_info");
211  edm::LogVerbatim("GMT_info") << " GMT input Channel Mask:" << std::hex << mask << std::dec;
212  onoff = mask & 1 ? "OFF" : "ON";
213  edm::LogVerbatim("GMT_info") << " DT input " << onoff;
214  onoff = mask & 2 ? "OFF" : "ON";
215  edm::LogVerbatim("GMT_info") << " RPCb input " << onoff;
216  onoff = mask & 4 ? "OFF" : "ON";
217  edm::LogVerbatim("GMT_info") << " CSC input " << onoff;
218  onoff = mask & 8 ? "OFF" : "ON";
219  edm::LogVerbatim("GMT_info") << " RPCf input " << onoff;
220  edm::LogVerbatim("GMT_info");
221  }
222  }
223 
224  unsigned long long L1CaloGeometryCacheID = es.get<L1CaloGeometryRecord>().cacheIdentifier();
225  if (L1CaloGeometryCacheID != m_L1CaloGeometryCacheID) {
227  m_config->setCaloGeom(caloGeom_h.product());
228  }
229 
231 
232  // write LUTs and Regs if required
233 
234  if (m_writeLUTsAndRegs) {
235  std::string dir = "gmtconfig";
236 
237  mkdir(dir.c_str(), S_ISUID | S_ISGID | S_ISVTX | S_IRUSR | S_IWUSR | S_IXUSR);
238 
239  m_config->dumpLUTs(dir);
240  m_config->dumpRegs(dir);
241  }
242 
243  // process the event
244  if (L1MuGMTConfig::Debug(2))
245  edm::LogVerbatim("GMT_info");
246  if (L1MuGMTConfig::Debug(2))
247  edm::LogVerbatim("GMT_info") << "**** L1GlobalMuonTrigger processing ****";
248  if (L1MuGMTConfig::Debug(2))
249  edm::LogVerbatim("GMT_info");
250 
251  int bx_min = L1MuGMTConfig::getBxMin();
252  int bx_max = L1MuGMTConfig::getBxMax();
253 
254  m_ExtendedCands.clear();
255 
256  // clear readout ring buffer
257  std::vector<L1MuGMTReadoutRecord*>::iterator irr = m_ReadoutRingbuffer.begin();
258  for (; irr != m_ReadoutRingbuffer.end(); irr++)
259  delete (*irr);
260  m_ReadoutRingbuffer.clear();
261 
262  if (m_db)
263  m_db->reset(); // reset debug block
264 
265  for (int bx = bx_min; bx <= bx_max; bx++) {
266  m_db->SetBX(bx);
267 
268  // create new element in readout ring buffer
270 
271  if (L1MuGMTConfig::Debug(2))
272  edm::LogVerbatim("GMT_info") << "L1GlobalMuonTrigger processing bunch-crossing : " << bx;
273 
274  // get data into the data buffer
275  if (L1MuGMTConfig::Debug(2))
276  edm::LogVerbatim("GMT_info") << "running GMT PSB";
277  if (m_PSB) {
278  m_PSB->receiveData(e, bx);
279  if (L1MuGMTConfig::Debug(4))
280  m_PSB->print();
281  }
282 
283  if (m_PSB && !m_PSB->empty()) {
284  // run matcher
285  if (L1MuGMTConfig::Debug(2))
286  edm::LogVerbatim("GMT_info") << "running GMT barrel Matcher";
287  if (m_Matcher[0])
288  m_Matcher[0]->run();
289  if (L1MuGMTConfig::Debug(3) && m_Matcher[0])
290  m_Matcher[0]->print();
291  if (L1MuGMTConfig::Debug(2))
292  edm::LogVerbatim("GMT_info") << "running GMT endcap Matcher";
293  if (m_Matcher[1])
294  m_Matcher[1]->run();
295  if (L1MuGMTConfig::Debug(3) && m_Matcher[1])
296  m_Matcher[1]->print();
297 
298  // run cancel-out units
299  if (L1MuGMTConfig::Debug(2))
300  edm::LogVerbatim("GMT_info") << "running GMT barrel Cancel Out Unit";
301  if (m_CancelOutUnit[0])
302  m_CancelOutUnit[0]->run();
304  m_CancelOutUnit[0]->print();
305 
306  if (L1MuGMTConfig::Debug(2))
307  edm::LogVerbatim("GMT_info") << "running GMT endcap Cancel Out Unit";
308  if (m_CancelOutUnit[1])
309  m_CancelOutUnit[1]->run();
311  m_CancelOutUnit[1]->print();
312 
313  if (L1MuGMTConfig::Debug(2))
314  edm::LogVerbatim("GMT_info") << "running GMT CSC/fRPC Cancel Out Unit";
315  if (m_CancelOutUnit[2])
316  m_CancelOutUnit[2]->run();
318  m_CancelOutUnit[2]->print();
319 
320  if (L1MuGMTConfig::Debug(2))
321  edm::LogVerbatim("GMT_info") << "running GMT DT/bRPC Cancel Out Unit";
322  if (m_CancelOutUnit[3])
323  m_CancelOutUnit[3]->run();
325  m_CancelOutUnit[3]->print();
326 
327  // run MIP & ISO bit assignment units
328  if (L1MuGMTConfig::Debug(2))
329  edm::LogVerbatim("GMT_info") << "running GMT barrel MIP & ISO bit Assignment Unit";
330  if (m_MipIsoAU[0])
331  m_MipIsoAU[0]->run();
332  if (L1MuGMTConfig::Debug(3) && m_MipIsoAU[0])
333  m_MipIsoAU[0]->print();
334  if (L1MuGMTConfig::Debug(2))
335  edm::LogVerbatim("GMT_info") << "running GMT endcap MIP & ISO bit Assignment Unit";
336  if (m_MipIsoAU[1])
337  m_MipIsoAU[1]->run();
338  if (L1MuGMTConfig::Debug(3) && m_MipIsoAU[1])
339  m_MipIsoAU[1]->print();
340 
341  // run Merger
342  if (L1MuGMTConfig::Debug(2))
343  edm::LogVerbatim("GMT_info") << "running GMT barrel Merger";
344  if (m_Merger[0])
345  m_Merger[0]->run();
346  if (L1MuGMTConfig::Debug(3) && m_Merger[0])
347  m_Merger[0]->print();
348  if (L1MuGMTConfig::Debug(2))
349  edm::LogVerbatim("GMT_info") << "running GMT endcap Merger";
350  if (m_Merger[1])
351  m_Merger[1]->run();
352  if (L1MuGMTConfig::Debug(3) && m_Merger[1])
353  m_Merger[1]->print();
354 
355  // run sorter
356  if (L1MuGMTConfig::Debug(2))
357  edm::LogVerbatim("GMT_info") << "running GMT Sorter";
358  if (m_Sorter)
359  m_Sorter->run();
360  if (L1MuGMTConfig::Debug(1) && m_Sorter)
361  m_Sorter->print();
362 
363  // store found track candidates in a container
364  if (m_Sorter->numberOfCands() > 0) {
365  const std::vector<const L1MuGMTExtendedCand*>& gmt_cont = m_Sorter->Cands();
366  std::vector<const L1MuGMTExtendedCand*>::const_iterator iexc;
367  for (iexc = gmt_cont.begin(); iexc != gmt_cont.end(); iexc++) {
368  if (*iexc)
369  m_ExtendedCands.push_back(**iexc);
370  }
371  }
372 
373  // reset GMT
374  reset();
375  }
376  }
377 
378  // produce the output
379  std::unique_ptr<std::vector<L1MuGMTCand> > GMTCands(new std::vector<L1MuGMTCand>);
380  std::vector<L1MuGMTExtendedCand>::const_iterator iexc;
381  for (iexc = m_ExtendedCands.begin(); iexc != m_ExtendedCands.end(); iexc++) {
382  GMTCands->push_back(*iexc);
383  }
384  e.put(std::move(GMTCands));
385 
386  std::unique_ptr<L1MuGMTReadoutCollection> GMTRRC(getReadoutCollection());
387  e.put(std::move(GMTRRC));
388 
389  if (m_sendMipIso) {
390  std::unique_ptr<std::vector<unsigned> > mipiso(new std::vector<unsigned>);
391  for (int i = 0; i < 32; i++) {
392  mipiso->push_back(m_db->IsMIPISO(0, i));
393  }
394  e.put(std::move(mipiso));
395  }
396 
397  // delete registers and LUTs
399 }
Log< level::Info, true > LogVerbatim
void setGMTChanMask(const L1MuGMTChannelMask *gmtchanmask)
edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcd > m_trigPtScaleToken
unsigned long long m_L1MuTriggerScalesCacheID
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
unsigned long long m_L1MuGMTChannelMaskCacheID
void print() const
print PSB
Definition: L1MuGMTPSB.cc:212
edm::ESGetToken< L1MuGMTParameters, L1MuGMTParametersRcd > m_gmtParamsToken
void SetBX(int bx)
Set the current bunch crossing.
void setTriggerPtScale(const L1MuTriggerPtScale *trigptscale)
void dumpRegs(std::string dir)
std::vector< L1MuGMTExtendedCand > m_ExtendedCands
void print() const
print results after MIP &amp; ISO bit assignment
edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > m_trigScalesToken
void print()
print cancel-out bits
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:287
unsigned getSubsystemMask() const
void run()
run Matcher
void print()
print matching results
const std::vector< const L1MuGMTExtendedCand * > & Cands() const
return std::vector with all muon candidates
Definition: L1MuGMTSorter.h:60
unsigned long long m_L1CaloGeometryCacheID
virtual void run()
run Sorter
void run()
run GMT MIP &amp; ISO bit assignment unit
void setGMTScales(const L1MuGMTScales *gmtscales)
unsigned long long m_L1MuTriggerPtScaleCacheID
static bool Debug()
L1MuGMTMipIsoAU * m_MipIsoAU[2]
def move
Definition: eostools.py:511
edm::ESGetToken< L1MuGMTScales, L1MuGMTScalesRcd > m_gmtScalesToken
edm::ESGetToken< L1CaloGeometry, L1CaloGeometryRecord > m_caloGeomToken
static const L1MuGMTChannelMask * getGMTChanMask()
std::unique_ptr< L1MuGMTReadoutCollection > getReadoutCollection()
unsigned IsMIPISO(int bx, int idx)
Get stored MIP/ISO select bits.
L1MuGMTMatcher * m_Matcher[2]
void dumpLUTs(std::string dir)
L1MuGMTMerger * m_Merger[2]
void setCaloGeom(const L1CaloGeometry *caloGeom)
void print() const
print results after selection
unsigned long long m_L1MuGMTScalesCacheID
static int getBxMin()
void print()
print results after sorting
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
T const * product() const
Definition: ESHandle.h:86
void run()
run GMT Merger
void setGMTParams(const L1MuGMTParameters *gmtparams)
void clearLUTsRegs()
def mkdir
Definition: eostools.py:251
void receiveData(edm::Event &e, int bx)
receive muon candidates
Definition: L1MuGMTPSB.cc:86
edm::ESGetToken< L1MuGMTChannelMask, L1MuGMTChannelMaskRcd > m_gmtChanMaskToken
T get() const
Definition: EventSetup.h:88
void reset()
Reset the debug block.
static L1MuGMTConfig * m_config
unsigned long long m_L1MuGMTParametersCacheID
void createLUTsRegs()
static int getBxMax()
static L1MuGMTDebugBlock * m_db
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
void setTriggerScales(const L1MuTriggerScales *trigscales)
void run()
run cancel-out unit
int numberOfCands() const
return number of found muon candidates after sorter
Definition: L1MuGMTSorter.h:57
void L1MuGlobalMuonTrigger::reset ( void  )

Definition at line 404 of file L1MuGlobalMuonTrigger.cc.

References m_CancelOutUnit, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_Sorter, L1MuGMTSorter::reset(), L1MuGMTMatcher::reset(), L1MuGMTPSB::reset(), L1MuGMTMipIsoAU::reset(), L1MuGMTMerger::reset(), and L1MuGMTCancelOutUnit::reset().

Referenced by produce().

404  {
405  if (m_PSB)
406  m_PSB->reset();
407  if (m_Matcher[0])
408  m_Matcher[0]->reset();
409  if (m_Matcher[1])
410  m_Matcher[1]->reset();
411  if (m_CancelOutUnit[0])
412  m_CancelOutUnit[0]->reset();
413  if (m_CancelOutUnit[1])
414  m_CancelOutUnit[1]->reset();
415  if (m_CancelOutUnit[2])
416  m_CancelOutUnit[2]->reset();
417  if (m_CancelOutUnit[3])
418  m_CancelOutUnit[3]->reset();
419  if (m_MipIsoAU[0])
420  m_MipIsoAU[0]->reset();
421  if (m_MipIsoAU[1])
422  m_MipIsoAU[1]->reset();
423  if (m_Merger[0])
424  m_Merger[0]->reset();
425  if (m_Merger[1])
426  m_Merger[1]->reset();
427  if (m_Sorter)
428  m_Sorter->reset();
429 }
void reset()
clear cancel-out unit
virtual void reset()
reset Sorter
void reset()
clear MIP &amp; ISO bit assignment unit
void reset()
clear PSB
Definition: L1MuGMTPSB.cc:191
L1MuGMTMipIsoAU * m_MipIsoAU[2]
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
void reset()
clear Merger
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
void reset()
clear Matcher
const L1MuGMTSorter* L1MuGlobalMuonTrigger::Sorter ( ) const
inline

return pointer to Sorter

Definition at line 90 of file L1MuGlobalMuonTrigger.h.

References m_Sorter.

90 { return m_Sorter; }

Member Data Documentation

edm::ESGetToken<L1CaloGeometry, L1CaloGeometryRecord> L1MuGlobalMuonTrigger::m_caloGeomToken
private

Definition at line 133 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

L1MuGMTCancelOutUnit* L1MuGlobalMuonTrigger::m_CancelOutUnit[4]
private
L1MuGMTConfig * L1MuGlobalMuonTrigger::m_config = nullptr
staticprivate

Definition at line 117 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), produce(), and ~L1MuGlobalMuonTrigger().

L1MuGMTDebugBlock * L1MuGlobalMuonTrigger::m_db = nullptr
staticprivate

Definition at line 119 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), produce(), and ~L1MuGlobalMuonTrigger().

std::vector<L1MuGMTExtendedCand> L1MuGlobalMuonTrigger::m_ExtendedCands
private

Definition at line 111 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

edm::ESGetToken<L1MuGMTChannelMask, L1MuGMTChannelMaskRcd> L1MuGlobalMuonTrigger::m_gmtChanMaskToken
private

Definition at line 132 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

edm::ESGetToken<L1MuGMTParameters, L1MuGMTParametersRcd> L1MuGlobalMuonTrigger::m_gmtParamsToken
private

Definition at line 131 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

edm::ESGetToken<L1MuGMTScales, L1MuGMTScalesRcd> L1MuGlobalMuonTrigger::m_gmtScalesToken
private

Definition at line 128 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1CaloGeometryCacheID
private

Definition at line 126 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTChannelMaskCacheID
private

Definition at line 125 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTParametersCacheID
private

Definition at line 124 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTScalesCacheID
private

Definition at line 121 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuTriggerPtScaleCacheID
private

Definition at line 123 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuTriggerScalesCacheID
private

Definition at line 122 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

L1MuGMTMatcher* L1MuGlobalMuonTrigger::m_Matcher[2]
private
L1MuGMTMerger* L1MuGlobalMuonTrigger::m_Merger[2]
private
L1MuGMTMipIsoAU* L1MuGlobalMuonTrigger::m_MipIsoAU[2]
private
L1MuGMTPSB* L1MuGlobalMuonTrigger::m_PSB
private
std::vector<L1MuGMTReadoutRecord*> L1MuGlobalMuonTrigger::m_ReadoutRingbuffer
private
bool L1MuGlobalMuonTrigger::m_sendMipIso
private

Definition at line 115 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

L1MuGMTSorter* L1MuGlobalMuonTrigger::m_Sorter
private
edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> L1MuGlobalMuonTrigger::m_trigPtScaleToken
private

Definition at line 130 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> L1MuGlobalMuonTrigger::m_trigScalesToken
private

Definition at line 129 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

bool L1MuGlobalMuonTrigger::m_writeLUTsAndRegs
private

Definition at line 114 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().