CMS 3D CMS Logo

L1GtTrigReport.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <memory>
20 
21 #include <iostream>
22 #include <iomanip>
23 
24 #include <map>
25 #include <set>
26 #include <cmath>
27 #include <string>
28 
29 #include "boost/lexical_cast.hpp"
30 
31 // user include files
33 
36 
38 
41 
44 
47 
50 
54 
58 
61 
64 
66 
67 // constructor(s)
69  :
70 
71  // initialize cached IDs
72 
73  //
74  m_l1GtStableParCacheID(0ULL),
75 
76  m_numberPhysTriggers(0),
77  m_numberTechnicalTriggers(0),
78  m_numberDaqPartitions(0),
79  m_numberDaqPartitionsMax(0),
80 
81  //
82  m_l1GtPfAlgoCacheID(0ULL),
83  m_l1GtPfTechCacheID(0ULL),
84 
85  m_l1GtTmAlgoCacheID(0ULL),
86  m_l1GtTmTechCacheID(0ULL),
87 
88  m_l1GtTmVetoAlgoCacheID(0ULL),
89  m_l1GtTmVetoTechCacheID(0ULL),
90 
91  //
92  m_l1GtMenuCacheID(0ULL),
93 
94  // boolean flag to select the input record
95  // if true, it will use L1GlobalTriggerRecord
96  m_useL1GlobalTriggerRecord(pSet.getParameter<bool>("UseL1GlobalTriggerRecord")),
97 
99  m_l1GtRecordInputTag(pSet.getParameter<edm::InputTag>("L1GtRecordInputTag")),
100  m_l1GtRecordInputToken1(m_useL1GlobalTriggerRecord ? consumes<L1GlobalTriggerRecord>(m_l1GtRecordInputTag)
101  : edm::EDGetTokenT<L1GlobalTriggerRecord>()),
102  m_l1GtRecordInputToken2(not m_useL1GlobalTriggerRecord
103  ? consumes<L1GlobalTriggerReadoutRecord>(m_l1GtRecordInputTag)
104  : edm::EDGetTokenT<L1GlobalTriggerReadoutRecord>()),
105 
106  m_stableParToken(esConsumes()),
107  m_pfAlgoToken(esConsumes()),
108  m_pfTechToken(esConsumes()),
109  m_tmAlgoToken(esConsumes()),
110  m_tmTechToken(esConsumes()),
111  m_tmVetoAlgoToken(esConsumes()),
112  m_tmVetoTechToken(esConsumes()),
113  m_menuToken(esConsumes()),
114 
115  // print verbosity
116  m_printVerbosity(pSet.getUntrackedParameter<int>("PrintVerbosity", 2)),
117 
118  // print output
119  m_printOutput(pSet.getUntrackedParameter<int>("PrintOutput", 3)),
120 
121  // initialize global counters
122 
123  // number of events processed
124  m_totalEvents(0),
125 
126  //
127  m_entryList(),
128  m_entryListTechTrig(),
129 
130  // set the index of physics DAQ partition TODO input parameter?
131  m_physicsDaqPartition(0)
132 
133 {
134  LogDebug("L1GtTrigReport") << "\n Use L1GlobalTriggerRecord: " << m_useL1GlobalTriggerRecord
135  << "\n (if false: L1GtTrigReport uses L1GlobalTriggerReadoutRecord.)"
136  << "\n Input tag for L1 GT record: " << m_l1GtRecordInputTag.label() << " \n"
137  << "\n Print verbosity level: " << m_printVerbosity << " \n"
138  << "\n Print output: " << m_printOutput << " \n"
139  << std::endl;
140 }
141 
142 // destructor
144  for (ItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
145  if (*itEntry != nullptr) {
146  delete *itEntry;
147  *itEntry = nullptr;
148  }
149  }
150 
151  m_entryList.clear();
152 
153  for (ItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
154  if (*itEntry != nullptr) {
155  delete *itEntry;
156  *itEntry = nullptr;
157  }
158  }
159 
160  m_entryListTechTrig.clear();
161 }
162 
163 // member functions
164 
165 // method called once each job just before starting event loop
167  // empty
168 }
169 
170 // analyze each event
172  // increase the number of processed events
173  m_totalEvents++;
174 
175  // get / update the stable parameters from the EventSetup
176  // local cache & check on cacheIdentifier
177 
178  unsigned long long l1GtStableParCacheID = evSetup.get<L1GtStableParametersRcd>().cacheIdentifier();
179 
180  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
182 
183  // number of physics triggers
185 
186  // number of technical triggers
188 
189  // number of DAQ partitions
190  m_numberDaqPartitions = 8; // FIXME add it to stable parameters
191 
193  int numberDaqPartitionsOld = m_numberDaqPartitionsMax;
195 
198 
199  for (unsigned int iDaq = numberDaqPartitionsOld; iDaq < m_numberDaqPartitionsMax; ++iDaq) {
200  m_globalNrErrors.push_back(0);
201  m_globalNrAccepts.push_back(0);
202  }
203  }
204 
205  //
206  m_l1GtStableParCacheID = l1GtStableParCacheID;
207  }
208 
209  // get / update the prescale factors from the EventSetup
210  // local cache & check on cacheIdentifier
211 
212  unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
213 
214  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
215  m_l1GtPfAlgo = &evSetup.getData(m_pfAlgoToken);
216 
218 
219  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
220  }
221 
222  unsigned long long l1GtPfTechCacheID = evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();
223 
224  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
225  m_l1GtPfTech = &evSetup.getData(m_pfTechToken);
226 
228 
229  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
230  }
231 
232  // get / update the trigger mask from the EventSetup
233  // local cache & check on cacheIdentifier
234 
235  unsigned long long l1GtTmAlgoCacheID = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
236 
237  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
238  m_l1GtTmAlgo = &evSetup.getData(m_tmAlgoToken);
239 
241 
242  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
243  }
244 
245  unsigned long long l1GtTmTechCacheID = evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();
246 
247  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
248  m_l1GtTmTech = &evSetup.getData(m_tmTechToken);
249 
251 
252  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
253  }
254 
255  unsigned long long l1GtTmVetoAlgoCacheID = evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
256 
257  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
259 
261 
262  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
263  }
264 
265  unsigned long long l1GtTmVetoTechCacheID = evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().cacheIdentifier();
266 
267  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
269 
271 
272  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
273  }
274 
275  // get / update the trigger menu from the EventSetup
276  // local cache & check on cacheIdentifier
277 
278  unsigned long long l1GtMenuCacheID = evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
279 
280  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
281  m_l1GtMenu = &evSetup.getData(m_menuToken);
282 
283  m_l1GtMenuCacheID = l1GtMenuCacheID;
284 
285  LogDebug("L1GtTrigReport") << "\n Changing L1 menu to : \n"
286  << m_l1GtMenu->gtTriggerMenuName() << "\n\n"
287  << std::endl;
288  }
289 
290  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
291  const AlgorithmMap& technicalTriggerMap = m_l1GtMenu->gtTechnicalTriggerMap();
292 
293  const std::string& menuName = m_l1GtMenu->gtTriggerMenuName();
294 
295  // ... end EventSetup
296 
297  // get L1GlobalTriggerReadoutRecord or L1GlobalTriggerRecord
298  // in L1GlobalTriggerRecord, only the physics partition is available
301 
303  iEvent.getByToken(m_l1GtRecordInputToken1, gtRecord);
304  } else {
305  iEvent.getByToken(m_l1GtRecordInputToken2, gtReadoutRecord);
306  }
307 
308  bool validRecord = false;
309 
310  unsigned int pfIndexAlgo = 0; // get them later from the record
311  unsigned int pfIndexTech = 0;
312 
313  DecisionWord gtDecisionWordBeforeMask;
314  DecisionWord gtDecisionWordAfterMask;
315 
316  TechnicalTriggerWord technicalTriggerWordBeforeMask;
317  TechnicalTriggerWord technicalTriggerWordAfterMask;
318 
320  if (gtRecord.isValid()) {
321  // get Global Trigger decision and the decision word
322  bool gtDecision = gtRecord->decision();
323 
324  gtDecisionWordBeforeMask = gtRecord->decisionWordBeforeMask();
325  gtDecisionWordAfterMask = gtRecord->decisionWord();
326 
327  technicalTriggerWordBeforeMask = gtRecord->technicalTriggerWordBeforeMask();
328  technicalTriggerWordAfterMask = gtRecord->technicalTriggerWord();
329 
330  if (gtDecision) {
332  }
333 
334  pfIndexAlgo = gtRecord->gtPrescaleFactorIndexAlgo();
335  pfIndexTech = gtRecord->gtPrescaleFactorIndexTech();
336 
337  validRecord = true;
338 
339  } else {
341 
342  edm::LogWarning("L1GtTrigReport") << "\n L1GlobalTriggerRecord with input tag " << m_l1GtRecordInputTag.label()
343  << " not found."
344  << "\n Event classified as Error\n\n"
345  << std::endl;
346  }
347 
348  } else {
349  if (gtReadoutRecord.isValid()) {
350  // check if the readout record has size greater than zero, then proceeds
351  const std::vector<L1GtFdlWord>& fdlVec = gtReadoutRecord->gtFdlVector();
352  size_t fdlVecSize = fdlVec.size();
353 
354  if (fdlVecSize > 0) {
355  LogDebug("L1GtTrigReport") << "\n L1GlobalTriggerReadoutRecord with input tag " << m_l1GtRecordInputTag.label()
356  << " has gtFdlVector of size " << fdlVecSize << std::endl;
357 
358  // get Global Trigger finalOR and the decision word
359  uint16_t gtFinalOR = gtReadoutRecord->finalOR();
360 
361  gtDecisionWordBeforeMask = gtReadoutRecord->decisionWord();
362  technicalTriggerWordBeforeMask = gtReadoutRecord->technicalTriggerWord();
363 
364  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
365  bool gtDecision = static_cast<bool>(gtFinalOR & (1 << iDaqPartition));
366  if (gtDecision) {
367  m_globalNrAccepts[iDaqPartition]++;
368  }
369  }
370 
371  pfIndexAlgo = static_cast<unsigned int>((gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo());
372  pfIndexTech = static_cast<unsigned int>((gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech());
373 
374  validRecord = true;
375 
376  } else {
377  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
378  m_globalNrErrors[iDaqPartition]++;
379  }
380 
381  edm::LogWarning("L1GtTrigReport")
382  << "\n L1GlobalTriggerReadoutRecord with input tag " << m_l1GtRecordInputTag.label()
383  << " has gtFdlVector of size " << fdlVecSize << "\n Invalid L1GlobalTriggerReadoutRecord!"
384  << "\n Event classified as Error\n\n"
385  << std::endl;
386 
387  validRecord = false;
388  }
389 
390  } else {
391  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
392  m_globalNrErrors[iDaqPartition]++;
393  }
394 
395  edm::LogWarning("L1GtTrigReport") << "\n L1GlobalTriggerReadoutRecord with input tag "
396  << m_l1GtRecordInputTag.label() << " not found."
397  << "\n Event classified as Error\n\n"
398  << std::endl;
399  }
400  }
401 
402  // get the prescale factor set used in the actual luminosity segment
403  const std::vector<int>& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfIndexAlgo);
404 
405  const std::vector<int>& prescaleFactorsTechTrig = (*m_prescaleFactorsTechTrig).at(pfIndexTech);
406 
407  if (validRecord) {
408  // loop over algorithms and increase the corresponding counters
409  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
410  std::string algName = itAlgo->first;
411  int algBitNumber = (itAlgo->second).algoBitNumber();
412 
413  // the result before applying the trigger masks is available
414  // in both L1GlobalTriggerReadoutRecord or L1GlobalTriggerRecord
415  bool algResultBeforeMask = gtDecisionWordBeforeMask[algBitNumber];
416 
417  int prescaleFactor = prescaleFactorsAlgoTrig.at(algBitNumber);
418 
419  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
420  unsigned int triggerMask = (m_triggerMaskAlgoTrig.at(algBitNumber)) & (1 << iDaqPartition);
421 
422  bool algResultAfterMask = false;
423 
425  if (iDaqPartition == m_physicsDaqPartition) {
426  // result available already for physics DAQ partition
427  // in lite record
428  algResultAfterMask = gtDecisionWordAfterMask[algBitNumber];
429  } else {
430  // apply the masks for other partitions
431  algResultAfterMask = algResultBeforeMask;
432 
433  if (triggerMask) {
434  algResultAfterMask = false;
435  }
436  }
437  } else {
438  // apply the masks for L1GlobalTriggerReadoutRecord
439  algResultAfterMask = algResultBeforeMask;
440 
441  if (triggerMask) {
442  algResultAfterMask = false;
443  }
444  }
445 
446  L1GtTrigReportEntry* entryRep =
447  new L1GtTrigReportEntry(menuName, algName, prescaleFactor, triggerMask, iDaqPartition);
448 
449  int iCount = 0;
450 
451  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
452  if ((*entryRep) == *(*itEntry)) {
453  iCount++;
454  // increase the corresponding counter in the list entry
455  (*itEntry)->addValidEntry(algResultAfterMask, algResultBeforeMask);
456  }
457  }
458 
459  if (iCount == 0) {
460  // if entry not in the list, increase the corresponding counter
461  // and push the entry in the list
462  entryRep->addValidEntry(algResultAfterMask, algResultBeforeMask);
463  m_entryList.push_back(entryRep);
464  } else {
465  delete entryRep;
466  }
467  }
468  }
469 
470  // loop over technical triggers and increase the corresponding counters
471  for (CItAlgo itAlgo = technicalTriggerMap.begin(); itAlgo != technicalTriggerMap.end(); itAlgo++) {
472  //for (unsigned int iTechTrig = 0; iTechTrig < m_numberTechnicalTriggers; ++iTechTrig) {
473 
474  std::string ttName = itAlgo->first;
475  int ttBitNumber = (itAlgo->second).algoBitNumber();
476  // std::string ttName = boost::lexical_cast<std::string>(iTechTrig);
477  // int ttBitNumber = iTechTrig;
478 
479  // the result before applying the trigger masks is available
480  // in both L1GlobalTriggerReadoutRecord or L1GlobalTriggerRecord
481  bool ttResultBeforeMask = technicalTriggerWordBeforeMask[ttBitNumber];
482 
483  int prescaleFactor = prescaleFactorsTechTrig.at(ttBitNumber);
484 
485  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
486  unsigned int triggerMask = (m_triggerMaskTechTrig.at(ttBitNumber)) & (1 << iDaqPartition);
487 
488  bool ttResultAfterMask = false;
489 
491  if (iDaqPartition == m_physicsDaqPartition) {
492  // result available already for physics DAQ partition
493  // in lite record
494  ttResultAfterMask = technicalTriggerWordAfterMask[ttBitNumber];
495  } else {
496  // apply the masks for other partitions
497  ttResultAfterMask = ttResultBeforeMask;
498 
499  if (triggerMask) {
500  ttResultAfterMask = false;
501  }
502  }
503  } else {
504  // apply the masks for L1GlobalTriggerReadoutRecord
505  ttResultAfterMask = ttResultBeforeMask;
506 
507  if (triggerMask) {
508  ttResultAfterMask = false;
509  }
510  }
511 
512  L1GtTrigReportEntry* entryRep =
513  new L1GtTrigReportEntry(menuName, ttName, prescaleFactor, triggerMask, iDaqPartition);
514 
515  int iCount = 0;
516 
517  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
518  if ((*entryRep) == *(*itEntry)) {
519  iCount++;
520  // increase the corresponding counter in the list entry
521  (*itEntry)->addValidEntry(ttResultAfterMask, ttResultBeforeMask);
522  }
523  }
524 
525  if (iCount == 0) {
526  // if entry not in the list, increase the corresponding counter
527  // and push the entry in the list
528  entryRep->addValidEntry(ttResultAfterMask, ttResultBeforeMask);
529  m_entryListTechTrig.push_back(entryRep);
530  } else {
531  delete entryRep;
532  }
533  }
534  }
535 
536  } else {
537  // loop over algorithms and increase the error counters
538  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
539  std::string algName = itAlgo->first;
540  int algBitNumber = (itAlgo->second).algoBitNumber();
541 
542  int prescaleFactor = prescaleFactorsAlgoTrig.at(algBitNumber);
543 
544  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
545  unsigned int triggerMask = (m_triggerMaskAlgoTrig.at(algBitNumber)) & (1 << iDaqPartition);
546 
547  L1GtTrigReportEntry* entryRep =
548  new L1GtTrigReportEntry(menuName, algName, prescaleFactor, triggerMask, iDaqPartition);
549 
550  int iCount = 0;
551 
552  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
553  if ((*entryRep) == *(*itEntry)) {
554  iCount++;
555  // increase the corresponding counter in the list entry
556  (*itEntry)->addErrorEntry();
557  }
558  }
559 
560  if (iCount == 0) {
561  // if entry not in the list, increase the corresponding counter
562  // and push the entry in the list
563  entryRep->addErrorEntry();
564  m_entryList.push_back(entryRep);
565  } else {
566  delete entryRep;
567  }
568  }
569  }
570 
571  // loop over technical triggers and increase the error counters
572  // FIXME move to names when technical triggers available in menu
573  //for (CItAlgo itAlgo = technicalTriggerMap.begin(); itAlgo != technicalTriggerMap.end(); itAlgo++) {
574  for (unsigned int iTechTrig = 0; iTechTrig < m_numberTechnicalTriggers; ++iTechTrig) {
575  //std::string ttName = itAlgo->first;
576  //int ttBitNumber = ( itAlgo->second ).algoBitNumber();
577  std::string ttName = std::to_string(iTechTrig);
578  int ttBitNumber = iTechTrig;
579 
580  int prescaleFactor = prescaleFactorsTechTrig.at(ttBitNumber);
581 
582  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
583  unsigned int triggerMask = (m_triggerMaskTechTrig.at(ttBitNumber)) & (1 << iDaqPartition);
584 
585  L1GtTrigReportEntry* entryRep =
586  new L1GtTrigReportEntry(menuName, ttName, prescaleFactor, triggerMask, iDaqPartition);
587 
588  int iCount = 0;
589 
590  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
591  if ((*entryRep) == *(*itEntry)) {
592  iCount++;
593  // increase the corresponding counter in the list entry
594  (*itEntry)->addErrorEntry();
595  }
596  }
597 
598  if (iCount == 0) {
599  // if entry not in the list, increase the corresponding counter
600  // and push the entry in the list
601  entryRep->addErrorEntry();
602  m_entryListTechTrig.push_back(entryRep);
603  } else {
604  delete entryRep;
605  }
606  }
607  }
608  }
609 }
610 
611 // method called once each job just after ending the event loop
613  // define an output stream to print into
614  // it can then be directed to whatever log level is desired
615  std::ostringstream myCout;
616 
617  myCout << std::dec << std::endl;
618  myCout << "L1T-Report "
619  << "---------- Event Summary ----------\n";
620  myCout << "L1T-Report "
621  << "Total number of events processed: " << m_totalEvents << "\n";
622  myCout << "L1T-Report\n";
623 
624  myCout << "\n"
625  << " DAQ partition "
626  << " Total "
627  << " Passed[finalOR] "
628  << " Rejected "
629  << " Errors "
630  << "\n"
631  << std::endl;
632 
633  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
634  int rejectedEvents = m_totalEvents - m_globalNrErrors[iDaqPartition] - m_globalNrAccepts[iDaqPartition];
635 
636  if (m_useL1GlobalTriggerRecord && (iDaqPartition != m_physicsDaqPartition)) {
637  continue;
638  } else {
639  myCout << std::right << std::setw(16) << iDaqPartition << " " << std::right << std::setw(16) << m_totalEvents
640  << " " << std::right << std::setw(16) << m_globalNrAccepts[iDaqPartition] << " " << std::right
641  << std::setw(16) << rejectedEvents << " " << std::right << std::setw(16) << m_globalNrErrors[iDaqPartition]
642  << std::endl;
643  }
644  }
645 
646  // get the list of menus for the sample analyzed
647  //
648  std::set<std::string> menuList;
649  typedef std::set<std::string>::const_iterator CItL1Menu;
650 
651  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
652  menuList.insert((*itEntry)->gtTriggerMenuName());
653  }
654 
655  myCout << "\nThe following L1 menus were used for this sample: " << std::endl;
656  for (CItL1Menu itMenu = menuList.begin(); itMenu != menuList.end(); itMenu++) {
657  myCout << " " << (*itMenu) << std::endl;
658  }
659  myCout << "\n" << std::endl;
660 
661  switch (m_printVerbosity) {
662  case 0: {
663  myCout << "\nL1T-Report "
664  << "---------- L1 Trigger Global Summary - DAQ Partition " << m_physicsDaqPartition << "----------\n\n";
665 
666  myCout << "\n\n Number of events written after applying L1 prescale factors"
667  << " and trigger masks\n"
668  << " if not explicitly mentioned.\n\n";
669 
670  for (CItL1Menu itMenu = menuList.begin(); itMenu != menuList.end(); itMenu++) {
671  myCout << "\nReport for L1 menu: " << (*itMenu) << "\n" << std::endl;
672 
673  myCout << std::right << std::setw(45) << "Algorithm Key"
674  << " " << std::right << std::setw(10) << "Passed"
675  << " " << std::right << std::setw(10) << "Rejected"
676  << " " << std::right << std::setw(10) << "Error"
677  << "\n";
678 
679  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
680  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
681  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
682  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(10)
683  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(10)
684  << (*itEntry)->gtNrEventsError() << "\n";
685  }
686  }
687 
688  myCout << "\n\n"
689  << std::right << std::setw(45) << "Technical Trigger Key"
690  << " " << std::right << std::setw(10) << "Passed"
691  << " " << std::right << std::setw(10) << "Rejected"
692  << " " << std::right << std::setw(10) << "Error"
693  << "\n";
694 
695  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
696  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
697  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
698  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(10)
699  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(10)
700  << (*itEntry)->gtNrEventsError() << "\n";
701  }
702  }
703  }
704 
705  }
706 
707  break;
708  case 1: {
709  myCout << "\nL1T-Report "
710  << "---------- L1 Trigger Global Summary - DAQ Partition " << m_physicsDaqPartition << "----------\n\n";
711 
712  myCout << "\n\n Number of events written after applying L1 prescale factors"
713  << " and trigger masks\n"
714  << " if not explicitly mentioned.\n\n";
715 
716  for (CItL1Menu itMenu = menuList.begin(); itMenu != menuList.end(); itMenu++) {
717  myCout << "\nReport for L1 menu: " << (*itMenu) << "\n" << std::endl;
718  myCout << std::right << std::setw(45) << "Algorithm Key"
719  << " " << std::right << std::setw(10) << "Prescale"
720  << " " << std::right << std::setw(5) << "Mask"
721  << " " << std::right << std::setw(10) << "Passed"
722  << " " << std::right << std::setw(10) << "Rejected"
723  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
724  << "\n";
725 
726  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
727  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
728  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
729  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(2) //<< std::setfill('0')
730  << std::hex << (*itEntry)->gtTriggerMask() //<< std::setfill(' ')
731  << std::dec << " " << std::right << std::setw(10) << (*itEntry)->gtNrEventsAccept() << " "
732  << std::right << std::setw(10) << (*itEntry)->gtNrEventsReject() << " " << std::right
733  << std::setw(10) << (*itEntry)->gtNrEventsError() << std::setw(2) << " "
734  << "\n";
735  }
736  }
737 
738  myCout << "\n\n"
739  << std::right << std::setw(45) << "Technical Trigger Key"
740  << " " << std::right << std::setw(10) << "Prescale"
741  << " " << std::right << std::setw(5) << "Mask"
742  << " " << std::right << std::setw(10) << "Passed"
743  << " " << std::right << std::setw(10) << "Rejected"
744  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
745  << "\n";
746 
747  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
748  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
749  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
750  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(2) //<< std::setfill('0')
751  << std::hex << (*itEntry)->gtTriggerMask() //<< std::setfill(' ')
752  << std::dec << " " << std::right << std::setw(10) << (*itEntry)->gtNrEventsAccept() << " "
753  << std::right << std::setw(10) << (*itEntry)->gtNrEventsReject() << " " << std::right
754  << std::setw(10) << (*itEntry)->gtNrEventsError() << std::setw(2) << " "
755  << "\n";
756  }
757  }
758  }
759 
760  }
761 
762  break;
763  case 2: {
764  for (CItL1Menu itMenu = menuList.begin(); itMenu != menuList.end(); itMenu++) {
765  myCout << "\nReport for L1 menu: " << (*itMenu) << "\n" << std::endl;
766 
767  myCout << std::right << std::setw(45) << "Algorithm Key"
768  << " " << std::right << std::setw(10) << "Passed"
769  << " " << std::right << std::setw(10) << "Rejected"
770  << " " << std::right << std::setw(10) << "Error"
771  << "\n";
772 
773  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
774  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
775  int nrEventsAccept = (*itEntry)->gtNrEventsAccept();
776  int nrEventsReject = (*itEntry)->gtNrEventsReject();
777  int nrEventsError = (*itEntry)->gtNrEventsError();
778 
779  myCout << std::right << std::setw(45) << ((*itEntry)->gtAlgoName()) << " " << std::right << std::setw(10)
780  << nrEventsAccept << " " << std::right << std::setw(10) << nrEventsReject << " " << std::right
781  << std::setw(10) << nrEventsError << "\n";
782  }
783  }
784 
785  // efficiency and its statistical error
786 
787  myCout << "\n\n"
788  << std::right << std::setw(45) << "Algorithm Key"
789  << " " << std::right << std::setw(10) << "Efficiency "
790  << " " << std::right << std::setw(10) << "Stat error (%)"
791  << "\n";
792 
793  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
794  if (((*itEntry)->gtDaqPartition() == 0) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
795  int nrEventsAccept = (*itEntry)->gtNrEventsAccept();
796  int nrEventsReject = (*itEntry)->gtNrEventsReject();
797  int nrEventsError = (*itEntry)->gtNrEventsError();
798 
799  int totalEvents = nrEventsAccept + nrEventsReject + nrEventsError;
800 
801  // efficiency and their statistical error
802  float eff = 0.;
803  float statErrEff = 0.;
804 
805  if (totalEvents != 0) {
806  eff = static_cast<float>(nrEventsAccept) / static_cast<float>(totalEvents);
807  statErrEff = sqrt(eff * (1.0 - eff) / static_cast<float>(totalEvents));
808  }
809 
810  myCout << std::right << std::setw(45) << ((*itEntry)->gtAlgoName()) << " " << std::right << std::setw(10)
811  << std::fixed << std::setprecision(2) << 100. * eff << " +- " << std::right << std::setw(10)
812  << std::setprecision(2) << 100. * statErrEff << "\n";
813  }
814  }
815 
816  myCout << "\n\n"
817  << std::right << std::setw(45) << "Technical Trigger Key"
818  << " " << std::right << std::setw(10) << "Passed"
819  << " " << std::right << std::setw(10) << "Rejected"
820  << " " << std::right << std::setw(10) << "Error"
821  << "\n";
822 
823  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
824  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
825  int nrEventsAccept = (*itEntry)->gtNrEventsAccept();
826  int nrEventsReject = (*itEntry)->gtNrEventsReject();
827  int nrEventsError = (*itEntry)->gtNrEventsError();
828 
829  myCout << std::right << std::setw(45) << ((*itEntry)->gtAlgoName()) << " " << std::right << std::setw(10)
830  << nrEventsAccept << " " << std::right << std::setw(10) << nrEventsReject << " " << std::right
831  << std::setw(10) << nrEventsError << "\n";
832  }
833  }
834 
835  // efficiency and its statistical error
836 
837  myCout << "\n\n"
838  << std::right << std::setw(45) << "Technical Trigger Key"
839  << " " << std::right << std::setw(10) << "Efficiency "
840  << " " << std::right << std::setw(10) << "Stat error (%)"
841  << "\n";
842 
843  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
844  if (((*itEntry)->gtDaqPartition() == 0) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
845  int nrEventsAccept = (*itEntry)->gtNrEventsAccept();
846  int nrEventsReject = (*itEntry)->gtNrEventsReject();
847  int nrEventsError = (*itEntry)->gtNrEventsError();
848 
849  int totalEvents = nrEventsAccept + nrEventsReject + nrEventsError;
850 
851  // efficiency and their statistical error
852  float eff = 0.;
853  float statErrEff = 0.;
854 
855  if (totalEvents != 0) {
856  eff = static_cast<float>(nrEventsAccept) / static_cast<float>(totalEvents);
857  statErrEff = sqrt(eff * (1.0 - eff) / static_cast<float>(totalEvents));
858  }
859 
860  myCout << std::right << std::setw(45) << ((*itEntry)->gtAlgoName()) << " " << std::right << std::setw(10)
861  << std::fixed << std::setprecision(2) << 100. * eff << " +- " << std::right << std::setw(10)
862  << std::setprecision(2) << 100. * statErrEff << "\n";
863  }
864  }
865  }
866 
867  } break;
868 
869  case 10: {
870  myCout << "\nL1T-Report "
871  << "---------- L1 Trigger Global Summary - DAQ Partition " << m_physicsDaqPartition << "----------\n\n";
872 
873  for (CItL1Menu itMenu = menuList.begin(); itMenu != menuList.end(); itMenu++) {
874  myCout << "\nReport for L1 menu: " << (*itMenu) << "\n" << std::endl;
875  myCout << std::right << std::setw(45) << "Algorithm Key"
876  << " " << std::right << std::setw(10) << "Prescale"
877  << " " << std::right << std::setw(5) << "Mask"
878  << " " << std::right << std::setw(25) << "Before Mask"
879  << " " << std::right << std::setw(30) << "After Mask"
880  << " " << std::right << std::setw(22) << "Error"
881  << "\n"
882  << std::right << std::setw(64) << " " << std::setw(15) << "Passed" << std::right << std::setw(1) << " "
883  << std::setw(15) << "Rejected" << std::right << std::setw(1) << " " << std::setw(15) << "Passed"
884  << std::right << std::setw(1) << " " << std::setw(15) << "Rejected"
885  << "\n";
886 
887  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
888  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
889  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
890  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(5) << " " << std::hex
891  << (*itEntry)->gtTriggerMask() << std::dec << " " << std::right << std::setw(15)
892  << (*itEntry)->gtNrEventsAcceptBeforeMask() << " " << std::right << std::setw(15)
893  << (*itEntry)->gtNrEventsRejectBeforeMask() << " " << std::right << std::setw(15)
894  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(15)
895  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(15)
896  << (*itEntry)->gtNrEventsError() << "\n";
897  }
898  }
899 
900  myCout << "\n\n"
901  << std::right << std::setw(45) << "Technical Trigger Key"
902  << " " << std::right << std::setw(10) << "Prescale"
903  << " " << std::right << std::setw(5) << "Mask"
904  << " " << std::right << std::setw(25) << "Before Mask"
905  << " " << std::right << std::setw(30) << "After Mask"
906  << " " << std::right << std::setw(22) << "Error"
907  << "\n"
908  << std::right << std::setw(64) << " " << std::setw(15) << "Passed" << std::right << std::setw(1) << " "
909  << std::setw(15) << "Rejected" << std::right << std::setw(1) << " " << std::setw(15) << "Passed"
910  << std::right << std::setw(1) << " " << std::setw(15) << "Rejected"
911  << "\n";
912 
913  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
914  if (((*itEntry)->gtDaqPartition() == m_physicsDaqPartition) && ((*itEntry)->gtTriggerMenuName() == *itMenu)) {
915  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
916  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(5) << " " << std::hex
917  << (*itEntry)->gtTriggerMask() << std::dec << " " << std::right << std::setw(15)
918  << (*itEntry)->gtNrEventsAcceptBeforeMask() << " " << std::right << std::setw(15)
919  << (*itEntry)->gtNrEventsRejectBeforeMask() << " " << std::right << std::setw(15)
920  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(15)
921  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(15)
922  << (*itEntry)->gtNrEventsError() << "\n";
923  }
924  }
925  }
926  }
927 
928  break;
929  case 100: {
930  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
931  myCout << "\nL1T-Report "
932  << "---------- L1 Trigger Global Summary - DAQ Partition " << iDaqPartition << " "
933  << "----------\n\n";
934 
935  myCout << std::right << std::setw(45) << "Algorithm Key"
936  << " " << std::right << std::setw(10) << "Passed"
937  << " " << std::right << std::setw(10) << "Rejected"
938  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
939  << "\n";
940 
941  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
942  if (((*itEntry)->gtDaqPartition() == 0)) {
943  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
944  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(10)
945  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(10)
946  << (*itEntry)->gtNrEventsError() << std::setw(2) << " "
947  << "\n";
948  }
949  }
950 
951  myCout << "\n\n"
952  << std::right << std::setw(45) << "Technical Trigger Key"
953  << " " << std::right << std::setw(10) << "Passed"
954  << " " << std::right << std::setw(10) << "Rejected"
955  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
956  << "\n";
957 
958  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
959  if ((*itEntry)->gtDaqPartition() == 0) {
960  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
961  << (*itEntry)->gtNrEventsAccept() << " " << std::right << std::setw(10)
962  << (*itEntry)->gtNrEventsReject() << " " << std::right << std::setw(10)
963  << (*itEntry)->gtNrEventsError() << std::setw(2) << " " << std::right << std::setw(20)
964  << (*itEntry)->gtTriggerMenuName() << "\n";
965  }
966  }
967  }
968  }
969 
970  break;
971  case 101: {
972  for (unsigned int iDaqPartition = 0; iDaqPartition < m_numberDaqPartitions; ++iDaqPartition) {
973  myCout << "\nL1T-Report "
974  << "---------- L1 Trigger Global Summary - DAQ Partition " << iDaqPartition << " "
975  << "----------\n\n";
976 
977  myCout << std::right << std::setw(45) << "Algorithm Key"
978  << " " << std::right << std::setw(10) << "Prescale"
979  << " " << std::right << std::setw(5) << "Mask"
980  << " " << std::right << std::setw(10) << "Passed"
981  << " " << std::right << std::setw(10) << "Rejected"
982  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
983  << "\n";
984 
985  for (CItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) {
986  if ((*itEntry)->gtDaqPartition() == 0) {
987  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
988  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(2) //<< std::setfill('0')
989  << std::hex << (*itEntry)->gtTriggerMask() //<< std::setfill(' ')
990  << std::dec << " " << std::right << std::setw(10) << (*itEntry)->gtNrEventsAccept() << " "
991  << std::right << std::setw(10) << (*itEntry)->gtNrEventsReject() << " " << std::right
992  << std::setw(10) << (*itEntry)->gtNrEventsError() << std::setw(2) << " "
993  << "\n";
994  }
995  }
996 
997  myCout << "\n\n"
998  << std::right << std::setw(45) << "Technical Trigger Key"
999  << " " << std::right << std::setw(10) << "Prescale"
1000  << " " << std::right << std::setw(5) << "Mask"
1001  << " " << std::right << std::setw(10) << "Passed"
1002  << " " << std::right << std::setw(10) << "Rejected"
1003  << " " << std::right << std::setw(10) << "Error" << std::setw(2) << " "
1004  << "\n";
1005 
1006  for (CItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) {
1007  if ((*itEntry)->gtDaqPartition() == 0) {
1008  myCout << std::right << std::setw(45) << (*itEntry)->gtAlgoName() << " " << std::right << std::setw(10)
1009  << (*itEntry)->gtPrescaleFactor() << " " << std::right << std::setw(2) //<< std::setfill('0')
1010  << std::hex << (*itEntry)->gtTriggerMask() //<< std::setfill(' ')
1011  << std::dec << " " << std::right << std::setw(10) << (*itEntry)->gtNrEventsAccept() << " "
1012  << std::right << std::setw(10) << (*itEntry)->gtNrEventsReject() << " " << std::right
1013  << std::setw(10) << (*itEntry)->gtNrEventsError() << std::setw(2) << " "
1014  << "\n";
1015  }
1016  }
1017  }
1018  }
1019 
1020  break;
1021  default: {
1022  myCout << "\n\nL1GtTrigReport: Error - no print verbosity level = " << m_printVerbosity
1023  << " defined! \nCheck available values in the cfi file."
1024  << "\n";
1025  }
1026 
1027  break;
1028  }
1029 
1030  // TODO for other verbosity levels
1031  // print the trigger menu, the prescale factors and the trigger mask, etc
1032 
1033  myCout << std::endl;
1034  myCout << "L1T-Report end!" << std::endl;
1035  myCout << std::endl;
1036 
1037  switch (m_printOutput) {
1038  case 0: {
1039  std::cout << myCout.str() << std::endl;
1040 
1041  }
1042 
1043  break;
1044  case 1: {
1045  LogTrace("L1GtTrigReport") << myCout.str() << std::endl;
1046 
1047  } break;
1048 
1049  case 2: {
1050  edm::LogVerbatim("L1GtTrigReport") << myCout.str() << std::endl;
1051 
1052  }
1053 
1054  break;
1055  case 3: {
1056  edm::LogInfo("L1GtTrigReport") << myCout.str();
1057 
1058  }
1059 
1060  break;
1061  default: {
1062  std::cout << "\n\n L1GtTrigReport: Error - no print output = " << m_printOutput
1063  << " defined! \n Check available values in the cfi file."
1064  << "\n"
1065  << std::endl;
1066 
1067  } break;
1068  }
1069 }
L1GtTriggerMenu.h
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
L1GtTrigReport::m_numberDaqPartitions
unsigned int m_numberDaqPartitions
number of DAQ partitions
Definition: L1GtTrigReport.h:83
L1GtTrigReport::m_globalNrAccepts
std::vector< int > m_globalNrAccepts
global number of events accepted by any of the L1 algorithm in any menu
Definition: L1GtTrigReport.h:153
L1GtTriggerMenu::gtTriggerMenuName
const std::string & gtTriggerMenuName() const
Definition: L1GtTriggerMenu.h:91
electrons_cff.bool
bool
Definition: electrons_cff.py:366
L1GlobalTriggerReadoutRecord::finalOR
const cms_uint16_t finalOR(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:159
L1GtTrigReport.h
L1GtTrigReport::m_pfTechToken
const edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > m_pfTechToken
Definition: L1GtTrigReport.h:131
L1GtTrigReport::m_stableParToken
const edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_stableParToken
Definition: L1GtTrigReport.h:129
MessageLogger.h
L1GtTriggerMaskAlgoTrigRcd.h
L1GtTriggerMask.h
ESHandle.h
L1GtTrigReport::m_totalEvents
int m_totalEvents
counters
Definition: L1GtTrigReport.h:147
L1GtStableParameters::gtNumberTechnicalTriggers
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
Definition: L1GtStableParameters.h:53
L1GtTrigReport::m_l1GtTmVetoTech
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GtTrigReport.h:106
L1GtTrigReport::m_l1GtStablePar
const L1GtStableParameters * m_l1GtStablePar
cached stuff
Definition: L1GtTrigReport.h:73
L1GlobalTriggerReadoutSetupFwd.h
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GtTrigReport::m_triggerMaskTechTrig
std::vector< unsigned int > m_triggerMaskTechTrig
Definition: L1GtTrigReport.h:110
L1GtTriggerMenuRcd.h
L1GtTrigReport::m_l1GtPfTech
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GtTrigReport.h:90
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1GtTrigReport::m_numberTechnicalTriggers
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtTrigReport.h:80
L1GtPrescaleFactors::gtPrescaleFactors
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtPrescaleFactors.h:45
L1GtTrigReport::m_menuToken
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_menuToken
Definition: L1GtTrigReport.h:136
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
L1GtTriggerMaskTechTrigRcd.h
L1GtStableParametersRcd.h
L1GtTrigReport::L1GtTrigReport
L1GtTrigReport(const edm::ParameterSet &)
constructor
Definition: L1GtTrigReport.cc:68
L1GtTrigReport::ItEntry
std::list< L1GtTrigReportEntry * >::iterator ItEntry
Definition: L1GtTrigReport.h:162
L1GtTriggerMaskVetoTechTrigRcd
Definition: L1GtTriggerMaskVetoTechTrigRcd.h:39
L1GtTrigReportEntry
Definition: L1GtTrigReportEntry.h:23
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo
const unsigned int gtPrescaleFactorIndexAlgo() const
Definition: L1GlobalTriggerRecord.h:87
L1GtPrescaleFactorsTechTrigRcd
Definition: L1GtPrescaleFactorsTechTrigRcd.h:38
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
L1GtTrigReport::m_l1GtTmVetoAlgo
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GtTrigReport.h:103
L1GtTrigReport::m_l1GtTmVetoTechCacheID
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtTrigReport.h:107
L1GlobalTriggerRecord::decisionWord
const DecisionWord decisionWord() const
Definition: L1GlobalTriggerRecord.h:60
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
MakerMacros.h
L1GtTrigReport::m_l1GtRecordInputToken2
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtRecordInputToken2
Definition: L1GtTrigReport.h:127
L1GtTrigReport::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
analyze each event
Definition: L1GtTrigReport.cc:171
L1GtTrigReport::m_entryList
std::list< L1GtTrigReportEntry * > m_entryList
list of individual entries in the report for physics algorithms
Definition: L1GtTrigReport.h:156
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
L1GtTrigReport::m_printVerbosity
const int m_printVerbosity
print verbosity
Definition: L1GtTrigReport.h:139
L1GtTrigReport::m_printOutput
const int m_printOutput
print output
Definition: L1GtTrigReport.h:142
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1GtTrigReport::m_tmVetoTechToken
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd > m_tmVetoTechToken
Definition: L1GtTrigReport.h:135
L1GtTrigReport::m_l1GtRecordInputToken1
const edm::EDGetTokenT< L1GlobalTriggerRecord > m_l1GtRecordInputToken1
Definition: L1GtTrigReport.h:126
L1GtTrigReport::m_tmVetoAlgoToken
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd > m_tmVetoAlgoToken
Definition: L1GtTrigReport.h:134
L1GtTrigReport::m_entryListTechTrig
std::list< L1GtTrigReportEntry * > m_entryListTechTrig
list of individual entries in the report for technical triggers
Definition: L1GtTrigReport.h:159
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
L1GtTriggerMaskTechTrigRcd
Definition: L1GtTriggerMaskTechTrigRcd.h:39
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
L1GtTrigReport::m_l1GtPfAlgoCacheID
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtTrigReport.h:88
L1GtTrigReport::~L1GtTrigReport
~L1GtTrigReport() override
destructor
Definition: L1GtTrigReport.cc:143
AlgorithmMap
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:31
L1GtTrigReport::beginJob
void beginJob() override
Definition: L1GtTrigReport.cc:166
L1GtTriggerMaskAlgoTrigRcd
Definition: L1GtTriggerMaskAlgoTrigRcd.h:39
L1GtTrigReport::m_l1GtPfAlgo
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GtTrigReport.h:87
L1GtTrigReport::m_useL1GlobalTriggerRecord
const bool m_useL1GlobalTriggerRecord
boolean flag to select the input record
Definition: L1GtTrigReport.h:121
L1GtTrigReport::m_numberDaqPartitionsMax
unsigned int m_numberDaqPartitionsMax
Definition: L1GtTrigReport.h:84
L1GtTrigReport::m_l1GtTmTechCacheID
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtTrigReport.h:101
L1GtTrigReportEntry.h
L1GtTrigReport::m_l1GtTmAlgoCacheID
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtTrigReport.h:98
L1GtTrigReport::m_numberPhysTriggers
unsigned int m_numberPhysTriggers
number of physics triggers
Definition: L1GtTrigReport.h:77
L1GtTriggerMaskVetoTechTrigRcd.h
L1GtTrigReport::m_l1GtStableParCacheID
unsigned long long m_l1GtStableParCacheID
Definition: L1GtTrigReport.h:74
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
L1GtTrigReport::m_globalNrErrors
std::vector< int > m_globalNrErrors
global number of events with error (EDProduct[s] not found)
Definition: L1GtTrigReport.h:150
edm::ParameterSet
Definition: ParameterSet.h:47
L1GtTrigReportEntry::addErrorEntry
void addErrorEntry()
increase # of events with error
Definition: L1GtTrigReportEntry.cc:115
L1GtTrigReport::m_l1GtTmVetoAlgoCacheID
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtTrigReport.h:104
Event.h
L1GtTriggerMask::gtTriggerMask
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
Definition: L1GtTriggerMask.h:47
L1GtTrigReport::endJob
void endJob() override
end of job
Definition: L1GtTrigReport.cc:612
L1GtTrigReport::m_physicsDaqPartition
const unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtTrigReport.h:165
L1GlobalTriggerRecord::technicalTriggerWord
const TechnicalTriggerWord technicalTriggerWord() const
Definition: L1GlobalTriggerRecord.h:62
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:186
L1GtTrigReport::m_triggerMaskVetoAlgoTrig
std::vector< unsigned int > m_triggerMaskVetoAlgoTrig
Definition: L1GtTrigReport.h:112
L1GtTrigReport::m_triggerMaskVetoTechTrig
std::vector< unsigned int > m_triggerMaskVetoTechTrig
Definition: L1GtTrigReport.h:113
L1GtTrigReport::m_tmTechToken
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > m_tmTechToken
Definition: L1GtTrigReport.h:133
createfilelist.int
int
Definition: createfilelist.py:10
Skims_PDWG_cff.prescaleFactor
prescaleFactor
Definition: Skims_PDWG_cff.py:25
L1GlobalTriggerRecord::decision
const bool decision() const
Definition: L1GlobalTriggerRecord.h:58
iEvent
int iEvent
Definition: GenABIO.cc:224
L1GtPrescaleFactorsAlgoTrigRcd.h
L1GtTrigReport::m_triggerMaskAlgoTrig
std::vector< unsigned int > m_triggerMaskAlgoTrig
Definition: L1GtTrigReport.h:109
L1GtTrigReport::m_l1GtMenu
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtTrigReport.h:116
L1GtStableParameters::gtNumberPhysTriggers
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
Definition: L1GtStableParameters.h:43
edm::EventSetup
Definition: EventSetup.h:58
L1GtTrigReport::m_pfAlgoToken
const edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_pfAlgoToken
Definition: L1GtTrigReport.h:130
L1GtStableParametersRcd
Definition: L1GtStableParametersRcd.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtTriggerMaskVetoAlgoTrigRcd
Definition: L1GtTriggerMaskVetoAlgoTrigRcd.h:39
InputTag.h
L1GtTrigReportEntry::addValidEntry
void addValidEntry(const bool algResultAfterMask, const bool algResultBeforeMask)
increase # of events accepted/rejected for this entry
Definition: L1GtTrigReportEntry.cc:100
L1GtTrigReport::m_l1GtTmAlgo
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
Definition: L1GtTrigReport.h:97
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
L1GtTrigReport::m_tmAlgoToken
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > m_tmAlgoToken
Definition: L1GtTrigReport.h:132
L1GlobalTriggerRecord::decisionWordBeforeMask
const DecisionWord decisionWordBeforeMask() const
Definition: L1GlobalTriggerRecord.h:64
L1GlobalTriggerRecord::gtPrescaleFactorIndexTech
const unsigned int gtPrescaleFactorIndexTech() const
get/set index of the set of prescale factors
Definition: L1GlobalTriggerRecord.h:81
Frameworkfwd.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
L1GtTrigReport::m_l1GtRecordInputTag
const edm::InputTag m_l1GtRecordInputTag
input tag for GT record (L1 GT DAQ record or L1 GT "lite" record):
Definition: L1GtTrigReport.h:124
EventSetup.h
L1GtTrigReport::m_l1GtPfTechCacheID
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtTrigReport.h:91
L1GtTrigReport::m_l1GtTmTech
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GtTrigReport.h:100
L1GtTrigReport::m_prescaleFactorsAlgoTrig
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtTrigReport.h:93
L1GtTrigReport::m_prescaleFactorsTechTrig
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtTrigReport.h:94
L1GlobalTriggerReadoutRecord::technicalTriggerWord
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:212
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
ParameterSet.h
TechnicalTriggerWord
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
Definition: L1GlobalTriggerReadoutSetupFwd.h:41
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38
L1GlobalTriggerRecord
Definition: L1GlobalTriggerRecord.h:33
L1GtTriggerMaskVetoAlgoTrigRcd.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
L1GlobalTriggerRecord::technicalTriggerWordBeforeMask
const TechnicalTriggerWord technicalTriggerWordBeforeMask() const
Definition: L1GlobalTriggerRecord.h:66
edm::Event
Definition: Event.h:73
L1GtTrigReport::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: L1GtTrigReport.h:117
L1GtTriggerMenu::gtTechnicalTriggerMap
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
Definition: L1GtTriggerMenu.h:197
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:372
L1GtStableParameters.h
L1GtPrescaleFactors.h
L1GlobalTriggerReadoutRecord::gtFdlVector
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
Definition: L1GlobalTriggerReadoutRecord.h:119
L1GtTriggerMenu::gtAlgorithmMap
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenu.h:187
L1GtTrigReport::CItEntry
std::list< L1GtTrigReportEntry * >::const_iterator CItEntry
Definition: L1GtTrigReport.h:161
L1GtPrescaleFactorsTechTrigRcd.h