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