CMS 3D CMS Logo

L1GlobalTrigger.cc
Go to the documentation of this file.
1 
15 // this class header
16 #include "L1GlobalTrigger.h"
17 
18 // system include files
19 #include <algorithm>
20 #include <iomanip>
21 #include <iostream>
22 #include <memory>
23 
24 // user include files
25 //#include
26 //"DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
30 
32 
36 
43 
48 
51 
54 
59 
63 
67 
70 
74 
78 
81 
84 #include <cstdint>
85 
86 // constructors
87 
89  : m_muGmtInputTag(parSet.getParameter<edm::InputTag>("GmtInputTag")),
90  m_caloGctInputTag(parSet.getParameter<edm::InputTag>("GctInputTag")),
91  m_castorInputTag(parSet.getParameter<edm::InputTag>("CastorInputTag")),
92  m_technicalTriggersInputTags(parSet.getParameter<std::vector<edm::InputTag>>("TechnicalTriggersInputTags")),
93  m_produceL1GtDaqRecord(parSet.getParameter<bool>("ProduceL1GtDaqRecord")),
94  m_produceL1GtEvmRecord(parSet.getParameter<bool>("ProduceL1GtEvmRecord")),
95  m_produceL1GtObjectMapRecord(parSet.getParameter<bool>("ProduceL1GtObjectMapRecord")),
96  m_writePsbL1GtDaqRecord(parSet.getParameter<bool>("WritePsbL1GtDaqRecord")),
97  m_readTechnicalTriggerRecords(parSet.getParameter<bool>("ReadTechnicalTriggerRecords")),
98  m_emulateBxInEvent(parSet.getParameter<int>("EmulateBxInEvent")),
99  m_recordLength(parSet.getParameter<std::vector<int>>("RecordLength")),
100  m_alternativeNrBxBoardDaq(parSet.getParameter<unsigned int>("AlternativeNrBxBoardDaq")),
101  m_alternativeNrBxBoardEvm(parSet.getParameter<unsigned int>("AlternativeNrBxBoardEvm")),
102  m_psBstLengthBytes(parSet.getParameter<int>("BstLengthBytes")),
103  m_algorithmTriggersUnprescaled(parSet.getParameter<bool>("AlgorithmTriggersUnprescaled")),
104  m_algorithmTriggersUnmasked(parSet.getParameter<bool>("AlgorithmTriggersUnmasked")),
105  m_technicalTriggersUnprescaled(parSet.getParameter<bool>("TechnicalTriggersUnprescaled")),
106  m_technicalTriggersUnmasked(parSet.getParameter<bool>("TechnicalTriggersUnmasked")),
107  m_technicalTriggersVetoUnmasked(parSet.getParameter<bool>("TechnicalTriggersVetoUnmasked")),
108  m_verbosity(parSet.getUntrackedParameter<int>("Verbosity", 0)),
109  m_isDebugEnabled(edm::isDebugEnabled())
110 
111 {
112  if (m_verbosity) {
113  LogDebug("L1GlobalTrigger") << std::endl;
114 
115  LogTrace("L1GlobalTrigger") << "\nInput tag for muon collection from GMT: " << m_muGmtInputTag
116  << "\nInput tag for calorimeter collections from GCT: " << m_caloGctInputTag
117  << "\nInput tag for CASTOR record: " << m_castorInputTag
118  << "\nInput tag for technical triggers: " << std::endl;
119 
120  // loop over all producers of technical trigger records
121  for (std::vector<edm::InputTag>::const_iterator it = m_technicalTriggersInputTags.begin();
122  it != m_technicalTriggersInputTags.end();
123  it++) {
124  LogTrace("L1GlobalTrigger") << "\n " << (*it) << std::endl;
125  }
126 
127  LogTrace("L1GlobalTrigger")
128  << "\nProduce the L1 GT DAQ readout record: " << m_produceL1GtDaqRecord
129  << "\nProduce the L1 GT EVM readout record: " << m_produceL1GtEvmRecord
130  << "\nProduce the L1 GT Object Map record: " << m_produceL1GtObjectMapRecord << " \n"
131  << "\nWrite Psb content to L1 GT DAQ Record: " << m_writePsbL1GtDaqRecord << " \n"
132  << "\nRead technical trigger records: " << m_readTechnicalTriggerRecords << " \n"
133  << "\nNumber of BxInEvent to be emulated: " << m_emulateBxInEvent
134  << "\nNumber of BXs corresponding to alternative 0: " << m_recordLength.at(0)
135  << "\nNumber of BXs corresponding to alternative 1: " << m_recordLength.at(1) << " \n"
136  << "\nAlternative for number of BX in GT DAQ record: 0x" << std::hex << m_alternativeNrBxBoardDaq
137  << "\nAlternative for number of BX in GT EVM record: 0x" << std::hex << m_alternativeNrBxBoardEvm << std::dec
138  << " \n"
139  << "\nLength of BST message [bytes]: " << m_psBstLengthBytes << "\n"
140  << "\nRun algorithm triggers unprescaled: " << m_algorithmTriggersUnprescaled
141  << "\nRun algorithm triggers unmasked (all enabled): " << m_algorithmTriggersUnmasked << "\n"
142  << "\nRun technical triggers unprescaled: " << m_technicalTriggersUnprescaled
143  << "\nRun technical triggers unmasked (all enabled): " << m_technicalTriggersUnmasked
144  << "\nRun technical triggers veto unmasked (no veto): " << m_technicalTriggersUnmasked << "\n"
145  << std::endl;
146  }
147 
148  if ((m_emulateBxInEvent > 0) && ((m_emulateBxInEvent % 2) == 0)) {
150 
151  if (m_verbosity) {
152  edm::LogWarning("L1GlobalTrigger") << "\nWARNING: Number of bunch crossing to be emulated rounded to: "
153  << m_emulateBxInEvent << "\n The number must be an odd number!\n"
154  << std::endl;
155  }
156  }
157 
158  int requiredRecordLength = std::max(m_recordLength.at(0), m_recordLength.at(1));
159  if ((m_emulateBxInEvent >= 0) && (m_emulateBxInEvent < requiredRecordLength)) {
160  m_emulateBxInEvent = requiredRecordLength;
161 
162  if (m_verbosity) {
163  edm::LogWarning("L1GlobalTrigger") << "\nWARNING: Number of bunch crossing required to be emulated ( "
164  << m_emulateBxInEvent << " BX) smaller as required in RecordLength:"
165  << "\n Number of BXs corresponding to alternative 0: "
166  << m_recordLength.at(0)
167  << "\n Number of BXs corresponding to alternative 1: "
168  << m_recordLength.at(1) << "\nEmulating " << requiredRecordLength << " BX!"
169  << "\n"
170  << std::endl;
171  }
172  }
173 
174  // register products
176  produces<L1GlobalTriggerReadoutRecord>();
177  }
178 
180  produces<L1GlobalTriggerEvmReadoutRecord>();
181  }
182 
184  produces<L1GlobalTriggerObjectMapRecord>();
185  }
186 
187  // create new PSBs
190 
191  // create new GTL
192  m_gtGTL = new L1GlobalTriggerGTL(m_muGmtInputTag, consumesCollector());
194 
195  // create new FDL
196  m_gtFDL = new L1GlobalTriggerFDL();
198 
199  // initialize cached IDs
200 
201  //
202  m_l1GtStableParCacheID = 0ULL;
203 
207 
208  m_nrL1Mu = 0;
209 
210  m_nrL1NoIsoEG = 0;
211  m_nrL1IsoEG = 0;
212 
213  m_nrL1CenJet = 0;
214  m_nrL1ForJet = 0;
215  m_nrL1TauJet = 0;
216 
217  m_nrL1JetCounts = 0;
218 
221 
222  //
223  m_l1GtParCacheID = 0ULL;
224 
225  m_totalBxInEvent = 0;
226 
229  m_bstLengthBytes = 0;
230 
231  //
232  m_l1GtBMCacheID = 0ULL;
233 
234  //
235  m_l1GtPfAlgoCacheID = 0ULL;
236  m_l1GtPfTechCacheID = 0ULL;
237 
238  m_l1GtTmAlgoCacheID = 0ULL;
239  m_l1GtTmTechCacheID = 0ULL;
240 
243 
244  consumes<L1MuGMTReadoutCollection>(m_muGmtInputTag);
245 }
246 
247 // destructor
249  delete m_gtPSB;
250  delete m_gtGTL;
251  delete m_gtFDL;
252 }
253 
254 // member functions
255 
256 // method called to produce the data
258  // process event iEvent
259 
260  // get / update the stable parameters from the EventSetup
261  // local cache & check on cacheIdentifier
262 
263  unsigned long long l1GtStableParCacheID = evSetup.get<L1GtStableParametersRcd>().cacheIdentifier();
264 
265  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
267  evSetup.get<L1GtStableParametersRcd>().get(l1GtStablePar);
268  m_l1GtStablePar = l1GtStablePar.product();
269 
270  // number of physics triggers
272 
273  // number of technical triggers
275 
276  // number of DAQ partitions
277  m_numberDaqPartitions = 8; // FIXME add it to stable parameters
278 
279  // number of objects of each type
280  m_nrL1Mu = static_cast<int>(m_l1GtStablePar->gtNumberL1Mu());
281 
282  m_nrL1NoIsoEG = static_cast<int>(m_l1GtStablePar->gtNumberL1NoIsoEG());
283  m_nrL1IsoEG = static_cast<int>(m_l1GtStablePar->gtNumberL1IsoEG());
284 
285  m_nrL1CenJet = static_cast<int>(m_l1GtStablePar->gtNumberL1CenJet());
286  m_nrL1ForJet = static_cast<int>(m_l1GtStablePar->gtNumberL1ForJet());
287  m_nrL1TauJet = static_cast<int>(m_l1GtStablePar->gtNumberL1TauJet());
288 
289  m_nrL1JetCounts = static_cast<int>(m_l1GtStablePar->gtNumberL1JetCounts());
290 
291  // ... the rest of the objects are global
292 
295 
296  // (re)initialize L1GlobalTriggerGTL
298 
299  // (re)initialize L1GlobalTriggerPSB
301 
302  //
303  m_l1GtStableParCacheID = l1GtStableParCacheID;
304  }
305 
306  // get / update the parameters from the EventSetup
307  // local cache & check on cacheIdentifier
308 
309  unsigned long long l1GtParCacheID = evSetup.get<L1GtParametersRcd>().cacheIdentifier();
310 
311  if (m_l1GtParCacheID != l1GtParCacheID) {
313  evSetup.get<L1GtParametersRcd>().get(l1GtPar);
314  m_l1GtPar = l1GtPar.product();
315 
316  // total number of Bx's in the event coming from EventSetup
318 
319  // active boards in L1 GT DAQ record and in L1 GT EVM record
322 
325 
326  m_l1GtParCacheID = l1GtParCacheID;
327  }
328 
329  // negative value: emulate TotalBxInEvent as given in EventSetup
330  if (m_emulateBxInEvent < 0) {
332  }
333 
334  int minBxInEvent = (m_emulateBxInEvent + 1) / 2 - m_emulateBxInEvent;
335  int maxBxInEvent = (m_emulateBxInEvent + 1) / 2 - 1;
336 
337  int recordLength0 = m_recordLength.at(0);
338  int recordLength1 = m_recordLength.at(1);
339 
340  if ((recordLength0 < 0) || (recordLength1 < 0)) {
341  // take them from event setup
342  // FIXME implement later - temporary solution
343 
344  recordLength0 = m_emulateBxInEvent;
345  recordLength1 = m_emulateBxInEvent;
346  }
347 
348  if (m_verbosity) {
349  LogDebug("L1GlobalTrigger") << "\nTotal number of BX to emulate in the GT readout record: " << m_emulateBxInEvent
350  << " = "
351  << "[" << minBxInEvent << ", " << maxBxInEvent << "] BX\n"
352  << "\nNumber of BX for alternative 0: " << recordLength0
353  << "\nNumber of BX for alternative 1: " << recordLength1
354  << "\nActive boards in L1 GT DAQ record (hex format) = " << std::hex
355  << std::setw(sizeof(m_activeBoardsGtDaq) * 2) << std::setfill('0')
356  << m_activeBoardsGtDaq << std::dec << std::setfill(' ')
357  << "\nActive boards in L1 GT EVM record (hex format) = " << std::hex
358  << std::setw(sizeof(m_activeBoardsGtEvm) * 2) << std::setfill('0')
359  << m_activeBoardsGtEvm << std::dec << std::setfill(' ') << "\n"
360  << std::endl;
361  }
362 
363  // get / update the board maps from the EventSetup
364  // local cache & check on cacheIdentifier
365 
366  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
367 
368  unsigned long long l1GtBMCacheID = evSetup.get<L1GtBoardMapsRcd>().cacheIdentifier();
369 
370  if (m_l1GtBMCacheID != l1GtBMCacheID) {
372  evSetup.get<L1GtBoardMapsRcd>().get(l1GtBM);
373  m_l1GtBM = l1GtBM.product();
374 
375  m_l1GtBMCacheID = l1GtBMCacheID;
376  }
377 
378  // TODO need changes in CondFormats to cache the maps
379  const std::vector<L1GtBoard> &boardMaps = m_l1GtBM->gtBoardMaps();
380 
381  // get / update the prescale factors from the EventSetup
382  // local cache & check on cacheIdentifier
383 
384  unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
385 
386  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
388  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
389  m_l1GtPfAlgo = l1GtPfAlgo.product();
390 
392 
393  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
394  }
395 
396  unsigned long long l1GtPfTechCacheID = evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();
397 
398  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
400  evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
401  m_l1GtPfTech = l1GtPfTech.product();
402 
404 
405  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
406  }
407 
408  // get / update the trigger mask from the EventSetup
409  // local cache & check on cacheIdentifier
410 
411  unsigned long long l1GtTmAlgoCacheID = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
412 
413  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
415  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
416  m_l1GtTmAlgo = l1GtTmAlgo.product();
417 
419 
420  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
421  }
422 
423  unsigned long long l1GtTmTechCacheID = evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();
424 
425  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
427  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
428  m_l1GtTmTech = l1GtTmTech.product();
429 
431 
432  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
433  }
434 
435  unsigned long long l1GtTmVetoAlgoCacheID = evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
436 
437  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
438  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
439  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
440  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
441 
443 
444  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
445  }
446 
447  unsigned long long l1GtTmVetoTechCacheID = evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().cacheIdentifier();
448 
449  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
450  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
451  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().get(l1GtTmVetoTech);
452  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
453 
455 
456  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
457  }
458 
459  // loop over blocks in the GT DAQ record receiving data, count them if they
460  // are active all board type are defined in CondFormats/L1TObjects/L1GtFwd
461  // enum L1GtBoardType { GTFE, FDL, PSB, GMT, TCS, TIM };
462  // &
463  // set the active flag for each object type received from GMT and GCT
464  // all objects in the GT system are defined in enum L1GtObject from
465  // DataFormats/L1Trigger/L1GlobalTriggerReadoutSetupFwd
466 
467  int daqNrGtfeBoards = 0;
468 
469  int daqNrFdlBoards = 0;
470  int daqNrPsbBoards = 0;
471  int daqNrGmtBoards = 0;
472  int daqNrTcsBoards = 0;
473  int daqNrTimBoards = 0;
474 
475  //
476  bool receiveMu = false;
477  bool receiveNoIsoEG = false;
478  bool receiveIsoEG = false;
479  bool receiveCenJet = false;
480  bool receiveForJet = false;
481  bool receiveTauJet = false;
482  bool receiveETM = false;
483  bool receiveETT = false;
484  bool receiveHTT = false;
485  bool receiveHTM = false;
486  bool receiveJetCounts = false;
487  bool receiveHfBitCounts = false;
488  bool receiveHfRingEtSums = false;
489 
490  bool receiveExternal = false;
491 
492  bool receiveTechTr = false;
493 
494  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
495  int iPosition = itBoard->gtPositionDaqRecord();
496  if (iPosition > 0) {
497  int iActiveBit = itBoard->gtBitDaqActiveBoards();
498  bool activeBoard = false;
499 
500  if (iActiveBit >= 0) {
501  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
502  }
503 
504  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit <
505  // 0)
506  // in the record and ActiveBoardsMap, and active
507  if ((iActiveBit < 0) || activeBoard) {
508  switch (itBoard->gtBoardType()) {
509  case GTFE: {
510  daqNrGtfeBoards++;
511  }
512 
513  break;
514  case FDL: {
515  daqNrFdlBoards++;
516  }
517 
518  break;
519  case PSB: {
520  daqNrPsbBoards++;
521 
522  // get the objects coming to this PSB
523  std::vector<L1GtPsbQuad> quadInPsb = itBoard->gtQuadInPsb();
524  for (std::vector<L1GtPsbQuad>::const_iterator itQuad = quadInPsb.begin(); itQuad != quadInPsb.end();
525  ++itQuad) {
526  switch (*itQuad) {
527  case TechTr: {
528  receiveTechTr = true;
529  }
530 
531  break;
532  case NoIsoEGQ: {
533  receiveNoIsoEG = true;
534  }
535 
536  break;
537  case IsoEGQ: {
538  receiveIsoEG = true;
539  }
540 
541  break;
542  case CenJetQ: {
543  receiveCenJet = true;
544  }
545 
546  break;
547  case ForJetQ: {
548  receiveForJet = true;
549  }
550 
551  break;
552  case TauJetQ: {
553  receiveTauJet = true;
554  }
555 
556  break;
557  case ESumsQ: {
558  receiveETM = true;
559  receiveETT = true;
560  receiveHTT = true;
561  receiveHTM = true;
562  }
563 
564  break;
565  case JetCountsQ: {
566  receiveJetCounts = true;
567  }
568 
569  break;
570  case CastorQ: {
571  // obsolete
572  }
573 
574  break;
575  case BptxQ: {
576  // obsolete
577  }
578 
579  break;
580  case GtExternalQ: {
581  receiveExternal = true;
582  }
583 
584  break;
585  case HfQ: {
586  receiveHfBitCounts = true;
587  receiveHfRingEtSums = true;
588  }
589 
590  break;
591  // FIXME add MIP/Iso bits
592  default: {
593  // do nothing
594  }
595 
596  break;
597  }
598  }
599 
600  }
601 
602  break;
603  case GMT: {
604  daqNrGmtBoards++;
605  receiveMu = true;
606  }
607 
608  break;
609  case TCS: {
610  daqNrTcsBoards++;
611  }
612 
613  break;
614  case TIM: {
615  daqNrTimBoards++;
616  }
617 
618  break;
619  default: {
620  // do nothing, all blocks are given in GtBoardType enum
621  }
622 
623  break;
624  }
625  }
626  }
627  }
628 
629  // produce the L1GlobalTriggerReadoutRecord now, after we found how many
630  // BxInEvent the record has and how many boards are active
631  std::unique_ptr<L1GlobalTriggerReadoutRecord> gtDaqReadoutRecord(
632  new L1GlobalTriggerReadoutRecord(m_emulateBxInEvent, daqNrFdlBoards, daqNrPsbBoards));
633 
634  // * produce the L1GlobalTriggerEvmReadoutRecord
635  std::unique_ptr<L1GlobalTriggerEvmReadoutRecord> gtEvmReadoutRecord(
637  // daqNrFdlBoards OK, just reserve memory at this point
638 
639  // * produce the L1GlobalTriggerObjectMapRecord
640  std::unique_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(new L1GlobalTriggerObjectMapRecord());
641 
642  // fill the boards not depending on the BxInEvent in the L1 GT DAQ record
643  // GMT, PSB and FDL depend on BxInEvent
644 
645  // fill in emulator the same bunch crossing (12 bits - hardwired number of
646  // bits...) and the same local bunch crossing for all boards
647  int bxCross = iEvent.bunchCrossing();
648  uint16_t bxCrossHw = 0;
649  if ((bxCross & 0xFFF) == bxCross) {
650  bxCrossHw = static_cast<uint16_t>(bxCross);
651  } else {
652  bxCrossHw = 0; // Bx number too large, set to 0!
653  if (m_verbosity) {
654  LogDebug("L1GlobalTrigger") << "\nBunch cross number [hex] = " << std::hex << bxCross
655  << "\n larger than 12 bits. Set to 0! \n"
656  << std::dec << std::endl;
657  }
658  }
659 
661  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
662  int iPosition = itBoard->gtPositionDaqRecord();
663  if (iPosition > 0) {
664  int iActiveBit = itBoard->gtBitDaqActiveBoards();
665  bool activeBoard = false;
666 
667  if (iActiveBit >= 0) {
668  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
669  }
670 
671  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit <
672  // 0)
673  // in the record and ActiveBoardsMap, and active
674  if ((iActiveBit < 0) || activeBoard) {
675  switch (itBoard->gtBoardType()) {
676  case GTFE: {
677  L1GtfeWord gtfeWordValue;
678 
679  gtfeWordValue.setBoardId(itBoard->gtBoardId());
680 
681  // cast int to uint16_t
682  // there are normally 3 or 5 BxInEvent
683  gtfeWordValue.setRecordLength(static_cast<uint16_t>(recordLength0));
684 
685  gtfeWordValue.setRecordLength1(static_cast<uint16_t>(recordLength1));
686 
687  // bunch crossing
688  gtfeWordValue.setBxNr(bxCrossHw);
689 
690  // set the list of active boards
691  gtfeWordValue.setActiveBoards(m_activeBoardsGtDaq);
692 
693  // set alternative for number of BX per board
694  gtfeWordValue.setAltNrBxBoard(static_cast<uint16_t>(m_alternativeNrBxBoardDaq));
695 
696  // set the TOTAL_TRIGNR as read from iEvent
697  // TODO check again - PTC stuff
698 
699  gtfeWordValue.setTotalTriggerNr(static_cast<uint32_t>(iEvent.id().event()));
700 
701  // ** fill L1GtfeWord in GT DAQ record
702 
703  gtDaqReadoutRecord->setGtfeWord(gtfeWordValue);
704  }
705 
706  break;
707  case TCS: {
708  // nothing
709  }
710 
711  break;
712  case TIM: {
713  // nothing
714  }
715 
716  break;
717  default: {
718  // do nothing, all blocks are given in GtBoardType enum
719  }
720 
721  break;
722  }
723  }
724  }
725  }
726  }
727 
728  // fill the boards not depending on the BxInEvent in the L1 GT EVM record
729 
730  int evmNrFdlBoards = 0;
731 
733  // get the length of the BST message from parameter set or from event setup
734 
735  int bstLengthBytes = 0;
736 
737  if (m_psBstLengthBytes < 0) {
738  // length from event setup
739  bstLengthBytes = static_cast<int>(m_bstLengthBytes);
740 
741  } else {
742  // length from parameter set
743  bstLengthBytes = m_psBstLengthBytes;
744  }
745 
746  if (m_verbosity) {
747  LogTrace("L1GlobalTrigger") << "\n Length of BST message (in bytes): " << bstLengthBytes << "\n" << std::endl;
748  }
749 
750  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
751  int iPosition = itBoard->gtPositionEvmRecord();
752  if (iPosition > 0) {
753  int iActiveBit = itBoard->gtBitEvmActiveBoards();
754  bool activeBoard = false;
755 
756  if (iActiveBit >= 0) {
757  activeBoard = m_activeBoardsGtEvm & (1 << iActiveBit);
758  }
759 
760  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit <
761  // 0)
762  // in the record and ActiveBoardsMap, and active
763  if ((iActiveBit < 0) || activeBoard) {
764  switch (itBoard->gtBoardType()) {
765  case GTFE: {
766  L1GtfeExtWord gtfeWordValue(bstLengthBytes);
767 
768  gtfeWordValue.setBoardId(itBoard->gtBoardId());
769 
770  // cast int to uint16_t
771  // there are normally 3 or 5 BxInEvent
772  gtfeWordValue.setRecordLength(static_cast<uint16_t>(recordLength0));
773 
774  gtfeWordValue.setRecordLength1(static_cast<uint16_t>(recordLength1));
775 
776  // bunch crossing
777  gtfeWordValue.setBxNr(bxCrossHw);
778 
779  // set the list of active boards
780  gtfeWordValue.setActiveBoards(m_activeBoardsGtEvm);
781 
782  // set alternative for number of BX per board
783  gtfeWordValue.setAltNrBxBoard(static_cast<uint16_t>(m_alternativeNrBxBoardEvm));
784 
785  // set the TOTAL_TRIGNR as read from iEvent
786  // TODO check again - PTC stuff
787 
788  gtfeWordValue.setTotalTriggerNr(static_cast<uint32_t>(iEvent.id().event()));
789 
790  // set the GPS time to the value read from Timestamp
791  edm::TimeValue_t evTime = iEvent.time().value();
792 
793  gtfeWordValue.setGpsTime(evTime);
794 
795  // LogDebug("L1GlobalTrigger")
796  //<< "\nEvent timestamp value [hex] = " << std::hex << evTime
797  //<< "\nBST retrieved value [hex] = " << gtfeWordValue.gpsTime()
798  //<< std::dec << std::endl;
799 
800  // source of BST message: DDDD simulated data
801  uint16_t bstSourceVal = 0xDDDD;
802  gtfeWordValue.setBstSource(bstSourceVal);
803 
804  // ** fill L1GtfeWord in GT EVM record
805 
806  gtEvmReadoutRecord->setGtfeWord(gtfeWordValue);
807  }
808 
809  break;
810  case FDL: {
811  evmNrFdlBoards++;
812  }
813 
814  break;
815  case TCS: {
816  L1TcsWord tcsWordValue;
817 
818  tcsWordValue.setBoardId(itBoard->gtBoardId());
819 
820  // bunch crossing
821  tcsWordValue.setBxNr(bxCrossHw);
822 
823  uint16_t trigType = 0x5; // 0101 simulated event
824  tcsWordValue.setTriggerType(trigType);
825 
826  // luminosity segment number
827  tcsWordValue.setLuminositySegmentNr(static_cast<uint16_t>(iEvent.luminosityBlock()));
828 
829  // set the Event_Nr as read from iEvent
830  tcsWordValue.setEventNr(static_cast<uint32_t>(iEvent.id().event()));
831 
832  // orbit number
833  tcsWordValue.setOrbitNr(static_cast<uint64_t>(iEvent.orbitNumber()));
834 
835  // ** fill L1TcsWord in the EVM record
836 
837  gtEvmReadoutRecord->setTcsWord(tcsWordValue);
838 
839  }
840 
841  break;
842  case TIM: {
843  // nothing
844  }
845 
846  break;
847  default: {
848  // do nothing, all blocks are given in GtBoardType enum
849  }
850 
851  break;
852  }
853  }
854  }
855  }
856  }
857 
858  // get the prescale factor set used in the actual luminosity segment
859  int pfAlgoSetIndex = 0; // FIXME
860  const std::vector<int> &prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex);
861 
862  int pfTechSetIndex = 0; // FIXME
863  const std::vector<int> &prescaleFactorsTechTrig = (*m_prescaleFactorsTechTrig).at(pfTechSetIndex);
864 
865  //
866 
867  // loop over BxInEvent
868  for (int iBxInEvent = minBxInEvent; iBxInEvent <= maxBxInEvent; ++iBxInEvent) {
869  // * receive GCT object data via PSBs
870  // LogDebug("L1GlobalTrigger")
871  //<< "\nL1GlobalTrigger : receiving PSB data for bx = " << iBxInEvent <<
872  //"\n"
873  //<< std::endl;
874 
877  iBxInEvent,
878  receiveNoIsoEG,
880  receiveIsoEG,
881  m_nrL1IsoEG,
882  receiveCenJet,
883  m_nrL1CenJet,
884  receiveForJet,
885  m_nrL1ForJet,
886  receiveTauJet,
887  m_nrL1TauJet,
888  receiveETM,
889  receiveETT,
890  receiveHTT,
891  receiveHTM,
892  receiveJetCounts,
893  receiveHfBitCounts,
894  receiveHfRingEtSums);
895 
899  iEvent, m_technicalTriggersInputTags, iBxInEvent, receiveTechTr, m_numberTechnicalTriggers);
900  }
901 
902  if (receiveExternal) {
903  // FIXME read the external conditions
904  }
905 
909  recordLength0,
910  recordLength1,
912  boardMaps,
913  iBxInEvent,
914  gtDaqReadoutRecord.get());
915  }
916 
917  // * receive GMT object data via GTL
918  // LogDebug("L1GlobalTrigger")
919  //<< "\nL1GlobalTrigger : receiving GMT data for bx = " << iBxInEvent <<
920  //"\n"
921  //<< std::endl;
922 
923  m_gtGTL->receiveGmtObjectData(iEvent, m_muGmtInputTag, iBxInEvent, receiveMu, m_nrL1Mu);
924 
925  // * run GTL
926  // LogDebug("L1GlobalTrigger")
927  //<< "\nL1GlobalTrigger : running GTL for bx = " << iBxInEvent << "\n"
928  //<< std::endl;
929 
930  m_gtGTL->run(iEvent,
931  evSetup,
932  m_gtPSB,
934  iBxInEvent,
935  gtObjectMapRecord.get(),
937  m_nrL1Mu,
939  m_nrL1IsoEG,
940  m_nrL1CenJet,
941  m_nrL1ForJet,
942  m_nrL1TauJet,
946 
947  // LogDebug("L1GlobalTrigger")
948  //<< "\n AlgorithmOR\n" << m_gtGTL->getAlgorithmOR() << "\n"
949  //<< std::endl;
950 
951  // * run FDL
952  // LogDebug("L1GlobalTrigger")
953  //<< "\nL1GlobalTrigger : running FDL for bx = " << iBxInEvent << "\n"
954  //<< std::endl;
955 
956  m_gtFDL->run(iEvent,
957  prescaleFactorsAlgoTrig,
958  prescaleFactorsTechTrig,
963  boardMaps,
965  iBxInEvent,
969  m_gtGTL,
970  m_gtPSB,
971  pfAlgoSetIndex,
972  pfTechSetIndex,
978 
979  if (m_produceL1GtDaqRecord && (daqNrFdlBoards > 0)) {
980  m_gtFDL->fillDaqFdlBlock(iBxInEvent,
982  recordLength0,
983  recordLength1,
985  boardMaps,
986  gtDaqReadoutRecord.get());
987  }
988 
989  if (m_produceL1GtEvmRecord && (evmNrFdlBoards > 0)) {
990  m_gtFDL->fillEvmFdlBlock(iBxInEvent,
992  recordLength0,
993  recordLength1,
995  boardMaps,
996  gtEvmReadoutRecord.get());
997  }
998 
999  // reset
1000  m_gtPSB->reset();
1001  m_gtGTL->reset();
1002  m_gtFDL->reset();
1003 
1004  // LogDebug("L1GlobalTrigger") << "\n Reset PSB, GTL, FDL\n" << std::endl;
1005  }
1006 
1007  if (receiveMu) {
1008  // LogDebug("L1GlobalTrigger")
1009  //<< "\n**** "
1010  //<< "\n Persistent reference for L1MuGMTReadoutCollection with input tag:
1011  //"
1012  //<< m_muGmtInputTag
1013  //<< "\n**** \n"
1014  //<< std::endl;
1015 
1016  // get L1MuGMTReadoutCollection reference and set it in GT record
1017 
1019  iEvent.getByLabel(m_muGmtInputTag, gmtRcHandle);
1020 
1021  if (!gmtRcHandle.isValid()) {
1022  if (m_verbosity) {
1023  edm::LogWarning("L1GlobalTrigger") << "\nWarning: L1MuGMTReadoutCollection with input tag " << m_muGmtInputTag
1024  << "\nrequested in configuration, but not found in the event.\n"
1025  << std::endl;
1026  }
1027  } else {
1028  gtDaqReadoutRecord->setMuCollectionRefProd(gmtRcHandle);
1029  }
1030  }
1031 
1032  if (m_verbosity && m_isDebugEnabled) {
1033  std::ostringstream myCoutStream;
1034  gtDaqReadoutRecord->print(myCoutStream);
1035  LogTrace("L1GlobalTrigger") << "\n The following L1 GT DAQ readout record was produced:\n"
1036  << myCoutStream.str() << "\n"
1037  << std::endl;
1038 
1039  myCoutStream.str("");
1040  myCoutStream.clear();
1041 
1042  gtEvmReadoutRecord->print(myCoutStream);
1043  LogTrace("L1GlobalTrigger") << "\n The following L1 GT EVM readout record was produced:\n"
1044  << myCoutStream.str() << "\n"
1045  << std::endl;
1046 
1047  myCoutStream.str("");
1048  myCoutStream.clear();
1049 
1050  const std::vector<L1GlobalTriggerObjectMap> objMapVec = gtObjectMapRecord->gtObjectMap();
1051 
1052  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator it = objMapVec.begin(); it != objMapVec.end(); ++it) {
1053  (*it).print(myCoutStream);
1054  }
1055 
1056  LogDebug("L1GlobalTrigger") << "Test gtObjectMapRecord in L1GlobalTrigger \n\n"
1057  << myCoutStream.str() << "\n\n"
1058  << std::endl;
1059 
1060  myCoutStream.str("");
1061  myCoutStream.clear();
1062  }
1063 
1064  // **
1065  // register products
1066  if (m_produceL1GtDaqRecord) {
1067  iEvent.put(std::move(gtDaqReadoutRecord));
1068  }
1069 
1070  if (m_produceL1GtEvmRecord) {
1071  iEvent.put(std::move(gtEvmReadoutRecord));
1072  }
1073 
1075  iEvent.put(std::move(gtObjectMapRecord));
1076  }
1077 }
1078 
1079 // static data members
1080 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RefProd.h
L1GlobalTrigger::m_gtFDL
L1GlobalTriggerFDL * m_gtFDL
Definition: L1GlobalTrigger.h:154
CenJetQ
Definition: L1GtDefinitions.h:43
L1GlobalTrigger::m_nrL1IsoEG
int m_nrL1IsoEG
Definition: L1GlobalTrigger.h:92
L1GtStableParameters::gtNumberL1Mu
unsigned int gtNumberL1Mu() const
get / set the number of L1 muons received by GT
Definition: L1GtStableParameters.h:58
L1GctHFRingEtSums.h
L1GlobalTrigger::m_numberPhysTriggers
unsigned int m_numberPhysTriggers
number of physics triggers
Definition: L1GlobalTrigger.h:78
electrons_cff.bool
bool
Definition: electrons_cff.py:372
L1GlobalTrigger::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: L1GlobalTrigger.cc:257
L1GtParameters::gtBstLengthBytes
const unsigned int gtBstLengthBytes() const
get / set length of BST message (in bytes) for L1 GT EVM record
Definition: L1GtParameters.h:68
L1GlobalTrigger::m_nrL1TauJet
int m_nrL1TauJet
Definition: L1GlobalTrigger.h:96
MessageLogger.h
L1GlobalTrigger::m_gtPSB
L1GlobalTriggerPSB * m_gtPSB
Definition: L1GlobalTrigger.h:152
L1GlobalTrigger::m_algorithmTriggersUnmasked
const bool m_algorithmTriggersUnmasked
Definition: L1GlobalTrigger.h:213
L1GtTriggerMaskAlgoTrigRcd.h
FDL
Definition: L1GtDefinitions.h:27
L1GtTriggerMask.h
PSB
Definition: L1GtDefinitions.h:27
ESHandle.h
L1GtParametersRcd.h
L1GctJetCounts.h
L1GtParameters.h
L1GtStableParameters::gtNumberTechnicalTriggers
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
Definition: L1GtStableParameters.h:53
L1GlobalTrigger::m_l1GtPfTechCacheID
unsigned long long m_l1GtPfTechCacheID
Definition: L1GlobalTrigger.h:128
L1GlobalTrigger::m_recordLength
const std::vector< int > m_recordLength
Definition: L1GlobalTrigger.h:193
L1TcsWord::setLuminositySegmentNr
void setLuminositySegmentNr(const cms_uint16_t luminositySegmentNrValue)
Definition: L1TcsWord.h:123
L1GtStableParameters::gtNumberL1TauJet
unsigned int gtNumberL1TauJet() const
get / set the number of L1 tau jets received by GT
Definition: L1GtStableParameters.h:83
L1GlobalTrigger
Definition: L1GlobalTrigger.h:54
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GtfeWord::setTotalTriggerNr
void setTotalTriggerNr(cms_uint32_t totalTriggerNrValue)
Definition: L1GtfeWord.h:151
L1GlobalTriggerPSB::fillPsbBlock
void fillPsbBlock(edm::Event &iEvent, const uint16_t &activeBoardsGtDaq, const int recordLength0, const int recordLength1, const unsigned int altNrBxBoardDaq, const std::vector< L1GtBoard > &boardMaps, const int iBxInEvent, L1GlobalTriggerReadoutRecord *gtDaqReadoutRecord)
fill the content of active PSB boards
Definition: L1GlobalTriggerPSB.cc:573
TauJetQ
Definition: L1GtDefinitions.h:45
L1MuGMTReadoutCollection.h
L1GlobalTrigger::m_triggerMaskVetoAlgoTrig
std::vector< unsigned int > m_triggerMaskVetoAlgoTrig
Definition: L1GlobalTrigger.h:149
L1GtfeExtWord.h
L1TcsWord
Definition: L1TcsWord.h:29
L1GtStableParameters::gtNumberL1ForJet
unsigned int gtNumberL1ForJet() const
get / set the number of L1 forward jets received by GT
Definition: L1GtStableParameters.h:78
L1GtfeWord::setRecordLength
void setRecordLength(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:84
L1GlobalTrigger::m_l1GtStableParCacheID
unsigned long long m_l1GtStableParCacheID
Definition: L1GlobalTrigger.h:75
L1GtPrescaleFactors::gtPrescaleFactors
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtPrescaleFactors.h:45
L1GlobalTrigger::m_ifMuEtaNumberBits
int m_ifMuEtaNumberBits
Definition: L1GlobalTrigger.h:102
L1GlobalTrigger::m_l1GtParCacheID
unsigned long long m_l1GtParCacheID
Definition: L1GlobalTrigger.h:107
L1GtParameters::gtTotalBxInEvent
const int gtTotalBxInEvent() const
get / set the total Bx's in the event
Definition: L1GtParameters.h:43
L1GlobalTriggerGTL::reset
void reset()
clear GTL
Definition: L1GlobalTriggerGTL.cc:658
GTFE
Definition: L1GtDefinitions.h:27
L1GtTriggerMaskTechTrigRcd.h
L1GtfeWord::setRecordLength1
void setRecordLength1(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:73
L1GtStableParametersRcd.h
L1GlobalTrigger::m_l1GtTmVetoAlgoCacheID
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GlobalTrigger.h:141
L1GtTriggerMaskVetoTechTrigRcd
Definition: L1GtTriggerMaskVetoTechTrigRcd.h:39
L1GlobalTrigger::L1GlobalTrigger
L1GlobalTrigger(const edm::ParameterSet &)
Definition: L1GlobalTrigger.cc:88
L1GlobalTrigger::m_l1GtTmVetoTechCacheID
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GlobalTrigger.h:144
L1GtfeWord
Definition: L1GtfeWord.h:30
ESumsQ
Definition: L1GtDefinitions.h:46
L1GlobalTrigger::m_activeBoardsGtDaq
uint16_t m_activeBoardsGtDaq
active boards in L1 GT DAQ record and in L1 GT EVM record
Definition: L1GlobalTrigger.h:113
L1GlobalTriggerGTL::init
void init(const int nrL1Mu, const int numberPhysTriggers)
initialize the class (mainly reserve)
Definition: L1GlobalTriggerGTL.cc:102
L1GlobalTrigger::m_activeBoardsGtEvm
uint16_t m_activeBoardsGtEvm
Definition: L1GlobalTrigger.h:114
ForJetQ
Definition: L1GtDefinitions.h:44
L1GlobalTrigger::m_triggerMaskVetoTechTrig
std::vector< unsigned int > m_triggerMaskVetoTechTrig
Definition: L1GlobalTrigger.h:150
edm::Handle
Definition: AssociativeIterator.h:50
L1GlobalTrigger::m_muGmtInputTag
const edm::InputTag m_muGmtInputTag
input tag for muon collection from GMT
Definition: L1GlobalTrigger.h:157
L1GtPrescaleFactorsTechTrigRcd
Definition: L1GtPrescaleFactorsTechTrigRcd.h:38
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
L1GlobalTriggerFDL::fillDaqFdlBlock
void fillDaqFdlBlock(const int iBxInEvent, const uint16_t &activeBoardsGtDaq, const int recordLength0, const int recordLength1, const unsigned int altNrBxBoardDaq, const std::vector< L1GtBoard > &boardMaps, L1GlobalTriggerReadoutRecord *gtDaqReadoutRecord)
fill the FDL block in the L1 GT DAQ record for iBxInEvent
Definition: L1GlobalTriggerFDL.cc:387
L1GlobalTrigger::m_nrL1JetCounts
int m_nrL1JetCounts
Definition: L1GlobalTrigger.h:98
L1GlobalTrigger::m_l1GtBMCacheID
unsigned long long m_l1GtBMCacheID
Definition: L1GlobalTrigger.h:121
L1GtfeExtWord::setGpsTime
void setGpsTime(const cms_uint64_t)
Definition: L1GtfeExtWord.cc:124
L1TcsWord::setOrbitNr
void setOrbitNr(const cms_uint64_t orbitNrValue)
Definition: L1TcsWord.h:187
L1GlobalTrigger::m_l1GtTmAlgo
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
Definition: L1GlobalTrigger.h:134
L1GlobalTriggerPSB::receiveTechnicalTriggers
void receiveTechnicalTriggers(edm::Event &iEvent, const std::vector< edm::InputTag > &technicalTriggersInputTags, const int iBxInEvent, const bool receiveTechTr, const int nrL1TechTr)
receive technical trigger
Definition: L1GlobalTriggerPSB.cc:489
NoIsoEGQ
Definition: L1GtDefinitions.h:42
L1TcsWord.h
L1GlobalTriggerGTL::run
void run(edm::Event &iEvent, const edm::EventSetup &evSetup, const L1GlobalTriggerPSB *ptrGtPSB, const bool produceL1GtObjectMapRecord, const int iBxInEvent, L1GlobalTriggerObjectMapRecord *gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1NoIsoEG, const int nrL1IsoEG, const int nrL1CenJet, const int nrL1ForJet, const int nrL1TauJet, const int nrL1JetCounts, const int ifMuEtaNumberBits, const int ifCaloEtaNumberBits)
run the GTL
Definition: L1GlobalTriggerGTL.cc:158
L1TcsWord::setTriggerType
void setTriggerType(const cms_uint16_t triggerTypeValue)
Definition: L1TcsWord.h:99
L1GctHFBitCounts.h
MakerMacros.h
L1GlobalTrigger::m_writePsbL1GtDaqRecord
const bool m_writePsbL1GtDaqRecord
logical flag to write the PSB content in the L1 GT DAQ record
Definition: L1GlobalTrigger.h:178
L1GlobalTrigger::m_l1GtTmTech
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GlobalTrigger.h:137
L1GlobalTriggerEvmReadoutRecord.h
L1GtStableParameters::gtNumberL1JetCounts
unsigned int gtNumberL1JetCounts() const
get / set the number of L1 jet counts received by GT
Definition: L1GtStableParameters.h:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
L1GlobalTriggerFDL::fillEvmFdlBlock
void fillEvmFdlBlock(const int iBxInEvent, const uint16_t &activeBoardsGtEvm, const int recordLength0, const int recordLength1, const unsigned int altNrBxBoardEvm, const std::vector< L1GtBoard > &boardMaps, L1GlobalTriggerEvmReadoutRecord *gtEvmReadoutRecord)
fill the FDL block in the L1 GT EVM record for iBxInEvent
Definition: L1GlobalTriggerFDL.cc:431
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1GctJetCand.h
L1GlobalTrigger::m_l1GtStablePar
const L1GtStableParameters * m_l1GtStablePar
cached stuff
Definition: L1GlobalTrigger.h:74
L1GlobalTrigger::m_numberTechnicalTriggers
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GlobalTrigger.h:81
L1GlobalTrigger::m_nrL1Mu
int m_nrL1Mu
Definition: L1GlobalTrigger.h:89
L1GtStableParameters::gtIfCaloEtaNumberBits
unsigned int gtIfCaloEtaNumberBits() const
get / set the number of bits for eta of calorimeter objects
Definition: L1GtStableParameters.h:116
L1GlobalTriggerPSB::receiveGctObjectData
void receiveGctObjectData(edm::Event &iEvent, const edm::InputTag &caloGctInputTag, const int iBxInEvent, const bool receiveNoIsoEG, const int nrL1NoIsoEG, const bool receiveIsoEG, const int nrL1IsoEG, const bool receiveCenJet, const int nrL1CenJet, const bool receiveForJet, const int nrL1ForJet, const bool receiveTauJet, const int nrL1TauJet, const bool receiveETM, const bool receiveETT, const bool receiveHTT, const bool receiveHTM, const bool receiveJetCounts, const bool receiveHfBitCounts, const bool receiveHfRingEtSums)
receive Global Calorimeter Trigger objects
Definition: L1GlobalTriggerPSB.cc:118
L1GlobalTriggerEvmReadoutRecord
Definition: L1GlobalTriggerEvmReadoutRecord.h:36
L1GlobalTrigger::m_nrL1NoIsoEG
int m_nrL1NoIsoEG
Definition: L1GlobalTrigger.h:91
L1GlobalTrigger::m_produceL1GtDaqRecord
const bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
Definition: L1GlobalTrigger.h:169
GtExternalQ
Definition: L1GtDefinitions.h:63
L1GtTriggerMaskTechTrigRcd
Definition: L1GtTriggerMaskTechTrigRcd.h:39
L1GlobalTrigger::m_l1GtPfTech
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GlobalTrigger.h:127
L1GtTriggerMaskAlgoTrigRcd
Definition: L1GtTriggerMaskAlgoTrigRcd.h:39
edm::ESHandle
Definition: DTSurvey.h:22
L1GlobalTrigger::m_castorInputTag
const edm::InputTag m_castorInputTag
input tag for CASTOR record
Definition: L1GlobalTrigger.h:163
L1GlobalTrigger::m_psBstLengthBytes
const int m_psBstLengthBytes
length of BST record (in bytes) from parameter set
Definition: L1GlobalTrigger.h:204
GMT
Definition: L1GtDefinitions.h:27
L1GtfeWord::setActiveBoards
void setActiveBoards(cms_uint16_t activeBoardsValue)
Definition: L1GtfeWord.h:121
L1GlobalTriggerFDL::reset
void reset()
clear FDL
Definition: L1GlobalTriggerFDL.cc:457
L1GlobalTrigger::m_triggerMaskTechTrig
std::vector< unsigned int > m_triggerMaskTechTrig
Definition: L1GlobalTrigger.h:147
L1GlobalTriggerGTL.h
IsoEGQ
Definition: L1GtDefinitions.h:41
L1GtTriggerMaskVetoTechTrigRcd.h
edm::LogWarning
Definition: MessageLogger.h:141
L1GtParametersRcd
Definition: L1GtParametersRcd.h:38
L1GlobalTrigger::m_prescaleFactorsAlgoTrig
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GlobalTrigger.h:130
L1GlobalTriggerFDL
Definition: L1GlobalTriggerFDL.h:40
L1GlobalTrigger::m_ifCaloEtaNumberBits
int m_ifCaloEtaNumberBits
Definition: L1GlobalTrigger.h:103
L1GlobalTriggerGTL::receiveGmtObjectData
void receiveGmtObjectData(edm::Event &, const edm::InputTag &, const int iBxInEvent, const bool receiveMu, const int nrL1Mu)
receive data from Global Muon Trigger
Definition: L1GlobalTriggerGTL.cc:116
L1GlobalTriggerGTL
Definition: L1GlobalTriggerGTL.h:45
L1GtBoard.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
MessageDrop.h
edm::ParameterSet
Definition: ParameterSet.h:36
L1GlobalTrigger::m_l1GtTmTechCacheID
unsigned long long m_l1GtTmTechCacheID
Definition: L1GlobalTrigger.h:138
Event.h
L1GlobalTrigger::m_nrL1ForJet
int m_nrL1ForJet
Definition: L1GlobalTrigger.h:95
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
L1GlobalTriggerObjectMapRecord
Definition: L1GlobalTriggerObjectMapRecord.h:29
L1GlobalTrigger::m_gtGTL
L1GlobalTriggerGTL * m_gtGTL
Definition: L1GlobalTrigger.h:153
L1GtTriggerMask::gtTriggerMask
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
Definition: L1GtTriggerMask.h:47
TechTr
Definition: L1GtDefinitions.h:40
L1GlobalTriggerFDL::setVerbosity
void setVerbosity(const int verbosity)
Definition: L1GlobalTriggerFDL.h:97
L1GlobalTriggerFDL.h
L1GlobalTrigger::m_algorithmTriggersUnprescaled
const bool m_algorithmTriggersUnprescaled
Definition: L1GlobalTrigger.h:209
L1GlobalTrigger::m_caloGctInputTag
const edm::InputTag m_caloGctInputTag
input tag for calorimeter collections from GCT
Definition: L1GlobalTrigger.h:160
L1GlobalTrigger::m_l1GtTmVetoTech
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GlobalTrigger.h:143
L1GlobalTrigger::m_l1GtTmVetoAlgo
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GlobalTrigger.h:140
L1GlobalTrigger::m_isDebugEnabled
const bool m_isDebugEnabled
Definition: L1GlobalTrigger.h:230
L1GlobalTriggerPSB.h
L1GlobalTrigger::m_l1GtPar
const L1GtParameters * m_l1GtPar
parameters
Definition: L1GlobalTrigger.h:106
createfilelist.int
int
Definition: createfilelist.py:10
L1GlobalTrigger::m_triggerMaskAlgoTrig
std::vector< unsigned int > m_triggerMaskAlgoTrig
Definition: L1GlobalTrigger.h:146
iEvent
int iEvent
Definition: GenABIO.cc:224
L1GlobalTrigger::m_l1GtPfAlgoCacheID
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GlobalTrigger.h:125
L1GctEtSums.h
L1GtFwd.h
L1TcsWord::setEventNr
void setEventNr(const cms_uint32_t eventNrValue)
Definition: L1TcsWord.h:175
L1GlobalTrigger::m_alternativeNrBxBoardEvm
const unsigned int m_alternativeNrBxBoardEvm
Definition: L1GlobalTrigger.h:201
L1GtPrescaleFactorsAlgoTrigRcd.h
L1GlobalTrigger::m_nrL1CenJet
int m_nrL1CenJet
Definition: L1GlobalTrigger.h:94
L1GtParameters::gtDaqActiveBoards
const uint16_t gtDaqActiveBoards() const
get / set the active boards for L1 GT DAQ record
Definition: L1GtParameters.h:48
L1GlobalTriggerPSB::setVerbosity
void setVerbosity(const int verbosity)
Definition: L1GlobalTriggerPSB.h:183
L1GtStableParameters::gtNumberPhysTriggers
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
Definition: L1GtStableParameters.h:43
edm::EventSetup
Definition: EventSetup.h:57
L1GlobalTrigger::m_verbosity
const int m_verbosity
verbosity level
Definition: L1GlobalTrigger.h:229
get
#define get
L1GlobalTrigger::m_bstLengthBytes
unsigned int m_bstLengthBytes
length of BST record (in bytes) from event setup
Definition: L1GlobalTrigger.h:117
L1GtStableParameters::gtIfMuEtaNumberBits
unsigned int gtIfMuEtaNumberBits() const
get / set the number of bits for eta of muon objects
Definition: L1GtStableParameters.h:121
L1GtStableParametersRcd
Definition: L1GtStableParametersRcd.h:39
L1GtBoardMaps.h
L1GlobalTriggerGTL::setVerbosity
void setVerbosity(const int verbosity)
Definition: L1GlobalTriggerGTL.h:99
L1GtStableParameters::gtNumberL1IsoEG
unsigned int gtNumberL1IsoEG() const
get / set the number of L1 isolated e/gamma objects received by GT
Definition: L1GtStableParameters.h:68
L1GlobalTriggerPSB::reset
void reset()
clear PSB
Definition: L1GlobalTriggerPSB.cc:1214
L1GtfeWord.h
L1GtTriggerMaskVetoAlgoTrigRcd
Definition: L1GtTriggerMaskVetoAlgoTrigRcd.h:39
L1GtfeExtWord
Definition: L1GtfeExtWord.h:31
InputTag.h
L1GlobalTrigger::m_technicalTriggersInputTags
const std::vector< edm::InputTag > m_technicalTriggersInputTags
input tag for technical triggers
Definition: L1GlobalTrigger.h:166
L1GlobalTrigger::m_alternativeNrBxBoardDaq
const unsigned int m_alternativeNrBxBoardDaq
Definition: L1GlobalTrigger.h:197
TCS
Definition: L1GtDefinitions.h:27
L1GlobalTrigger::m_technicalTriggersUnprescaled
const bool m_technicalTriggersUnprescaled
Definition: L1GlobalTrigger.h:218
CastorQ
Definition: L1GtDefinitions.h:60
L1GtfeWord::setAltNrBxBoard
void setAltNrBxBoard(cms_uint16_t altNrBxBoardValue)
Definition: L1GtfeWord.h:136
L1GlobalTrigger::~L1GlobalTrigger
~L1GlobalTrigger() override
Definition: L1GlobalTrigger.cc:248
L1MuGMTCand.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
L1GtStableParameters::gtNumberL1CenJet
unsigned int gtNumberL1CenJet() const
get / set the number of L1 central jets received by GT
Definition: L1GtStableParameters.h:73
L1GlobalTrigger.h
L1GctEmCand.h
L1GlobalTriggerPSB::init
void init(const int nrL1NoIsoEG, const int nrL1IsoEG, const int nrL1CenJet, const int nrL1ForJet, const int nrL1TauJet, const int numberTechnicalTriggers)
initialize the class (mainly reserve)
Definition: L1GlobalTriggerPSB.cc:100
L1GtfeExtWord::setBstSource
void setBstSource(const cms_uint16_t bstSourceVal)
Definition: L1GtfeExtWord.h:98
L1GlobalTrigger::m_produceL1GtObjectMapRecord
const bool m_produceL1GtObjectMapRecord
logical flag to produce the L1 GT object map record
Definition: L1GlobalTrigger.h:175
L1GtfeWord::setBxNr
void setBxNr(cms_uint16_t bxNrValue)
Definition: L1GtfeWord.h:95
L1GlobalTriggerPSB
Definition: L1GlobalTriggerPSB.h:58
EventSetup.h
L1GlobalTrigger::m_produceL1GtEvmRecord
const bool m_produceL1GtEvmRecord
logical flag to produce the L1 GT EVM readout record
Definition: L1GlobalTrigger.h:172
L1GlobalTrigger::m_numberDaqPartitions
unsigned int m_numberDaqPartitions
number of DAQ partitions
Definition: L1GlobalTrigger.h:84
L1GtBoardMaps::gtBoardMaps
const std::vector< L1GtBoard > & gtBoardMaps() const
get / set / print the L1 GT board map
Definition: L1GtBoardMaps.h:43
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:71
L1GtfeWord::setBoardId
void setBoardId(cms_uint16_t boardIdValue)
set BoardId from a BoardId value
Definition: L1GtfeWord.h:61
L1GlobalTrigger::m_prescaleFactorsTechTrig
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GlobalTrigger.h:131
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
L1GlobalTriggerObjectMapRecord.h
L1GlobalTrigger::m_technicalTriggersVetoUnmasked
const bool m_technicalTriggersVetoUnmasked
Definition: L1GlobalTrigger.h:226
L1GlobalTrigger::m_emulateBxInEvent
int m_emulateBxInEvent
Definition: L1GlobalTrigger.h:188
L1GtBoardMapsRcd
Definition: L1GtBoardMapsRcd.h:39
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38
L1GlobalTrigger::m_readTechnicalTriggerRecords
const bool m_readTechnicalTriggerRecords
logical flag to read the technical trigger records
Definition: L1GlobalTrigger.h:181
L1TcsWord::setBoardId
void setBoardId(const cms_uint16_t boardIdValue)
set BoardId from a BoardId value
Definition: L1TcsWord.h:63
L1TcsWord::setBxNr
void setBxNr(const cms_uint16_t bxNrValue)
Definition: L1TcsWord.h:75
TIM
Definition: L1GtDefinitions.h:27
L1GtParameters::gtEvmActiveBoards
const uint16_t gtEvmActiveBoards() const
get / set the active boards for L1 GT EVM record
Definition: L1GtParameters.h:53
L1GtTriggerMaskVetoAlgoTrigRcd.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
BptxQ
Definition: L1GtDefinitions.h:62
edm::Event
Definition: Event.h:73
L1GlobalTrigger::m_technicalTriggersUnmasked
const bool m_technicalTriggersUnmasked
Definition: L1GlobalTrigger.h:222
L1MuGMTExtendedCand.h
L1GlobalTriggerObjectMap.h
L1GlobalTrigger::m_totalBxInEvent
int m_totalBxInEvent
total number of Bx's in the event coming from EventSetup
Definition: L1GlobalTrigger.h:110
L1GlobalTrigger::m_l1GtPfAlgo
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GlobalTrigger.h:124
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
L1GtStableParameters.h
L1GlobalTriggerReadoutRecord.h
HfQ
Definition: L1GtDefinitions.h:61
L1GlobalTriggerFDL::run
void run(edm::Event &iEvent, const std::vector< int > &prescaleFactorsAlgoTrig, const std::vector< int > &prescaleFactorsTechTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< unsigned int > &triggerMaskTechTrig, const std::vector< unsigned int > &triggerMaskVetoAlgoTrig, const std::vector< unsigned int > &triggerMaskVetoTechTrig, const std::vector< L1GtBoard > &boardMaps, const int totalBxInEvent, const int iBxInEvent, const unsigned int numberPhysTriggers, const unsigned int numberTechnicalTriggers, const unsigned int numberDaqPartitions, const L1GlobalTriggerGTL *ptrGTL, const L1GlobalTriggerPSB *ptrPSB, const int pfAlgoSetIndex, const int pfTechSetIndex, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked, const bool technicalTriggersUnprescaled, const bool technicalTriggersUnmasked, const bool technicalTriggersVetoUnmasked)
run the FDL
Definition: L1GlobalTriggerFDL.cc:65
L1GtBoardMapsRcd.h
L1GtStableParameters::gtNumberL1NoIsoEG
unsigned int gtNumberL1NoIsoEG() const
get / set the number of L1 e/gamma objects received by GT
Definition: L1GtStableParameters.h:63
JetCountsQ
Definition: L1GtDefinitions.h:47
L1GtPrescaleFactors.h
L1GlobalTrigger::m_l1GtBM
const L1GtBoardMaps * m_l1GtBM
board maps - cache only the record
Definition: L1GlobalTrigger.h:120
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
L1GlobalTrigger::m_l1GtTmAlgoCacheID
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GlobalTrigger.h:135
L1GtPrescaleFactorsTechTrigRcd.h