13 #include <boost/cstdint.hpp> 48 desc.
add<
edm::InputTag> (
"MuonInputTag",
edm::InputTag(
""))->setComment(
"InputTag for Global Muon Trigger (required parameter: default value is invalid)");
49 desc.
add<
edm::InputTag> (
"EGammaInputTag",
edm::InputTag(
""))->setComment(
"InputTag for Calo Trigger EGamma (required parameter: default value is invalid)");
50 desc.
add<
edm::InputTag> (
"TauInputTag",
edm::InputTag(
""))->setComment(
"InputTag for Calo Trigger Tau (required parameter: default value is invalid)");
51 desc.
add<
edm::InputTag> (
"JetInputTag",
edm::InputTag(
""))->setComment(
"InputTag for Calo Trigger Jet (required parameter: default value is invalid)");
52 desc.
add<
edm::InputTag> (
"EtSumInputTag",
edm::InputTag(
""))->setComment(
"InputTag for Calo Trigger EtSum (required parameter: default value is invalid)");
53 desc.
add<
edm::InputTag> (
"ExtInputTag",
edm::InputTag(
""))->setComment(
"InputTag for external conditions (not required, but recommend to specify explicitly in config)");
54 desc.
add<
bool> (
"AlgorithmTriggersUnprescaled",
false)->setComment(
"not required, but recommend to specify explicitly in config");
55 desc.
add<
bool> (
"AlgorithmTriggersUnmasked",
false)->setComment(
"not required, but recommend to specify explicitly in config");
58 desc.
add<
bool> (
"ProduceL1GtDaqRecord",
true);
59 desc.
add<
bool> (
"ProduceL1GtObjectMapRecord",
true);
60 desc.
add<
int> (
"EmulateBxInEvent",1);
61 desc.
add<
int> (
"L1DataBxInEvent",5);
62 desc.
add<
unsigned int> (
"AlternativeNrBxBoardDaq",0);
63 desc.
add<
int> (
"BstLengthBytes",-1);
64 desc.
add<
unsigned int> (
"PrescaleSet",1);
69 descriptions.
add(
"L1TGlobalProducer", desc);
77 m_muInputTag(parSet.getParameter<
edm::InputTag> (
"MuonInputTag")),
78 m_egInputTag(parSet.getParameter<
edm::InputTag> (
"EGammaInputTag")),
79 m_tauInputTag(parSet.getParameter<
edm::InputTag> (
"TauInputTag")),
80 m_jetInputTag(parSet.getParameter<
edm::InputTag> (
"JetInputTag")),
81 m_sumInputTag(parSet.getParameter<
edm::InputTag> (
"EtSumInputTag")),
82 m_extInputTag(parSet.getParameter<
edm::InputTag> (
"ExtInputTag")),
84 m_produceL1GtDaqRecord(parSet.getParameter<bool> (
"ProduceL1GtDaqRecord")),
85 m_produceL1GtObjectMapRecord(parSet.getParameter<bool> (
"ProduceL1GtObjectMapRecord")),
87 m_emulateBxInEvent(parSet.getParameter<
int> (
"EmulateBxInEvent")),
88 m_L1DataBxInEvent(parSet.getParameter<
int> (
"L1DataBxInEvent")),
90 m_alternativeNrBxBoardDaq(parSet.getParameter<unsigned
int> (
"AlternativeNrBxBoardDaq")),
91 m_psBstLengthBytes(parSet.getParameter<
int> (
"BstLengthBytes")),
93 m_prescaleSet(parSet.getParameter<unsigned
int> (
"PrescaleSet")),
95 m_algorithmTriggersUnprescaled(parSet.getParameter<bool> (
"AlgorithmTriggersUnprescaled")),
96 m_algorithmTriggersUnmasked(parSet.getParameter<bool> (
"AlgorithmTriggersUnmasked")),
98 m_verbosity(parSet.getUntrackedParameter<
int>(
"Verbosity")),
99 m_printL1Menu(parSet.getUntrackedParameter<bool>(
"PrintL1Menu")),
114 <<
"\nInput tag for muon collection from uGMT: " <<
m_muInputTag 115 <<
"\nInput tag for calorimeter jet collections from Cal: " <<
m_jetInputTag 126 <<
"\nAlternative for number of BX in GT DAQ record: 0x" << std::hex
141 <<
"\nWARNING: Number of bunch crossing to be emulated rounded to: " 153 <<
"\nWARNING: Number of bunch crossing for incoming L1 Data rounded to: " 162 <<
"\nWARNING: Number of bunch crossing for incoming L1 Data was changed to: " 173 produces<GlobalAlgBlkBxCollection>();
179 produces<GlobalObjectMapRecord>();
184 m_uGtBrd = std::make_unique<GlobalBoard>();
227 std::vector<std::vector<int> > temp_prescaleTable;
229 temp_prescaleTable.push_back(std::vector<int>());
252 unsigned long long l1GtParCacheID =
459 bool receiveMu =
true;
460 bool receiveEG =
true;
461 bool receiveTau =
true;
462 bool receiveJet =
true;
463 bool receiveEtSums =
true;
464 bool receiveExt =
true;
496 std::unique_ptr<GlobalAlgBlkBxCollection> uGtAlgRecord(
new GlobalAlgBlkBxCollection(0,minEmulBxInEvent,maxEmulBxInEvent));
499 std::unique_ptr<GlobalObjectMapRecord> gtObjectMapRecord(
509 boost::uint16_t bxCrossHw = 0;
510 if ((bxCross & 0xFFF) == bxCross) {
511 bxCrossHw =
static_cast<boost::uint16_t
> (bxCross);
518 <<
"\nBunch cross number [hex] = " << std::hex << bxCross
519 <<
"\n larger than 12 bits. Set to 0! \n" <<
std::dec 523 LogDebug(
"L1TGlobalProducer") <<
"HW BxCross " << bxCrossHw << std::endl;
529 auto max = (*m_prescaleFactorsAlgoTrig).size()-1;
530 if (pfAlgoSetIndex >
max) {
532 <<
"\nAttempting to access prescale algo set: " <<
m_prescaleSet 533 <<
"\nNumber of prescale algo sets available: 0.." <<
max 534 <<
"Setting former to latter." 536 pfAlgoSetIndex =
max;
539 const std::vector<int>& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex);
543 for(
unsigned int iAlgo=0; iAlgo < prescaleFactorsAlgoTrig.size(); iAlgo++ ){
544 unsigned int value = prescaleFactorsAlgoTrig[iAlgo];
545 value = ( value==0 ) ? 0 : 1;
553 LogDebug(
"L1TGlobalProducer") <<
"Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl;
557 m_uGtBrd->receiveCaloObjectData(iEvent,
575 for (
int iBxInEvent = minEmulBxInEvent; iBxInEvent <= maxEmulBxInEvent;
580 <<
"\nL1TGlobalProducer : running GTL for bx = " << iBxInEvent <<
"\n" 597 <<
"\nL1TGlobalProducer : running FDL for bx = " << iBxInEvent <<
"\n" 605 m_numberPhysTriggers,
606 prescaleFactorsAlgoTrig,
608 triggerMaskVetoAlgoTrig,
632 std::ostringstream myCoutStream;
634 for(
int bx=minEmulBxInEvent; bx<maxEmulBxInEvent; bx++) {
637 (uGtAlgRecord->at(bx,0)).
print(myCoutStream);
642 <<
"\n The following L1 GT DAQ readout record was produced:\n" 643 << myCoutStream.str() <<
"\n" 646 myCoutStream.str(
"");
647 myCoutStream.clear();
649 const std::vector<GlobalObjectMap> objMapVec =
650 gtObjectMapRecord->gtObjectMap();
652 for (std::vector<GlobalObjectMap>::const_iterator
653 it = objMapVec.begin(); it != objMapVec.end(); ++it) {
655 (*it).print(myCoutStream);
661 <<
"Test gtObjectMapRecord in L1TGlobalProducer \n\n" << myCoutStream.str() <<
"\n\n" 664 myCoutStream.str(
"");
665 myCoutStream.clear();
edm::InputTag m_jetInputTag
unsigned int m_numberDaqPartitions
unsigned long long m_l1GtParCacheID
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
unsigned int numberL1Jet() const
get / set the number of L1 jets received by GT
unsigned long long m_l1GtTmVetoAlgoCacheID
const std::vector< std::vector< int > > & prescaleTable() const
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int m_verbosity
verbosity level
unsigned int numberL1EG() const
get / set the number of L1 e/gamma objects received by GT
uint16_t m_activeBoardsGtDaq
active boards in L1 GT DAQ record
edm::InputTag m_egInputTag
input tag for calorimeter collections from GCT
edm::EDGetTokenT< BXVector< l1t::Tau > > m_tauInputToken
#define DEFINE_FWK_MODULE(type)
bool m_produceL1GtObjectMapRecord
logical flag to produce the L1 GT object map record
int m_totalBxInEvent
total number of Bx's in the event coming from EventSetup
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
unsigned int numberPhysTriggers() const
get / set the number of physics trigger algorithms
int bunchCrossing() const
unsigned int m_numberPhysTriggers
const L1TGlobalParameters * m_l1GtStablePar
cached stuff
edm::EDGetTokenT< BXVector< GlobalExtBlk > > m_extInputToken
BXVector< GlobalAlgBlk > GlobalAlgBlkBxCollection
unsigned long long m_l1GtTmAlgoCacheID
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
const std::vector< int > * m_triggerMaskVetoAlgoTrig
unsigned int m_alternativeNrBxBoardDaq
edm::InputTag m_sumInputTag
edm::InputTag m_muInputTag
input tag for muon collection from GMT
edm::InputTag m_extInputTag
input tag for external conditions
unsigned long long m_l1GtMenuCacheID
edm::InputTag m_tauInputTag
const std::vector< int > & orderOfChip() const
const std::vector< int > & triggerMaskVeto() const
std::unique_ptr< TriggerMenu > m_l1GtMenu
bool m_algorithmTriggersUnprescaled
std::vector< std::vector< int > > m_initialPrescaleFactorsAlgoTrig
std::vector< int > m_initialTriggerMaskVetoAlgoTrig
bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
bool m_algorithmTriggersUnmasked
edm::EDGetTokenT< BXVector< l1t::Muon > > m_muInputToken
unsigned int numberL1Tau() const
get / set the number of L1 tau received by GT
ParameterDescriptionBase * add(U const &iLabel, T const &value)
unsigned int m_prescaleSet
prescale set used
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< BXVector< l1t::EtSum > > m_sumInputToken
int m_L1DataBxInEvent
Bx expected in Data coming to GT.
L1TGlobalProducer(const edm::ParameterSet &)
unsigned long long m_l1GtBMCacheID
int m_ifCaloEtaNumberBits
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int m_bstLengthBytes
length of BST record (in bytes) from event setup
char data[epos_bytes_allocation]
int totalBxInEvent() const
get / set the number of bx in hardware
const l1t::PrescalesVetosHelper * m_l1GtPrescalesVetoes
prescale factors
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
unsigned long long m_l1GtPfAlgoCacheID
std::unique_ptr< l1t::GlobalBoard > m_uGtBrd
unsigned int numberL1Mu() const
get / set the number of L1 muons received by GT
T const * product() const
unsigned int pinsOnChip() const
get / set the number of pins on the GTL condition chips
edm::EDGetTokenT< BXVector< l1t::Jet > > m_jetInputToken
unsigned int numberChips() const
get / set the number of condition chips in GTL
edm::EDGetTokenT< BXVector< l1t::EGamma > > m_egInputToken
virtual void produce(edm::Event &, const edm::EventSetup &) override