CMS 3D CMS Logo

GlobalBoard.cc
Go to the documentation of this file.
1 
20 // this class header
22 
23 // system include files
24 #include <ext/hash_map>
25 
26 // user include files
30 
40 
43 
44 // Conditions for uGt
49 
51 
54 
56 
57 // forward declarations
58 
59 // constructor
61  : m_candL1Mu(new BXVector<const l1t::Muon*>),
62  m_candL1EG(new BXVector<const l1t::L1Candidate*>),
63  m_candL1Tau(new BXVector<const l1t::L1Candidate*>),
64  m_candL1Jet(new BXVector<const l1t::L1Candidate*>),
65  m_candL1EtSum(new BXVector<const l1t::EtSum*>),
66  m_candL1External(new BXVector<const GlobalExtBlk*>),
67  m_firstEv(true),
68  m_firstEvLumiSegment(true),
69  m_currentLumi(0),
70  m_isDebugEnabled(edm::isDebugEnabled()) {
72 
73  m_gtlAlgorithmOR.reset();
74  m_gtlDecisionWord.reset();
75 
76  // initialize cached IDs
77  m_l1GtMenuCacheID = 0ULL;
80 
81  // Counter for number of events board sees
83 
84  // Need to expand use with more than one uGt GlobalBoard for now assume 1
85  m_uGtBoardNumber = 0;
86  m_uGtFinalBoard = true;
87 }
88 
89 // destructor
91  //reset(); //why would we need a reset?
92  delete m_candL1Mu;
93  delete m_candL1EG;
94  delete m_candL1Tau;
95  delete m_candL1Jet;
96  delete m_candL1EtSum;
97  delete m_candL1External;
98 
99  // delete m_gtEtaPhiConversions;
100 }
101 
102 // operations
103 void l1t::GlobalBoard::setBxFirst(int bx) { m_bxFirst_ = bx; }
104 
105 void l1t::GlobalBoard::setBxLast(int bx) { m_bxLast_ = bx; }
106 
107 void l1t::GlobalBoard::init(const int numberPhysTriggers,
108  const int nrL1Mu,
109  const int nrL1EG,
110  const int nrL1Tau,
111  const int nrL1Jet,
112  int bxFirst,
113  int bxLast) {
114  setBxFirst(bxFirst);
115  setBxLast(bxLast);
116 
117  m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
118  m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
119  m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
120  m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
121  m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
122  m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
123 
124  m_uGtAlgBlk.reset();
125 
126  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_
127  << std::endl;
128 }
129 
130 // receive data from Calorimeter
132  const edm::EDGetTokenT<BXVector<l1t::EGamma>>& egInputToken,
133  const edm::EDGetTokenT<BXVector<l1t::Tau>>& tauInputToken,
134  const edm::EDGetTokenT<BXVector<l1t::Jet>>& jetInputToken,
135  const edm::EDGetTokenT<BXVector<l1t::EtSum>>& sumInputToken,
136  const bool receiveEG,
137  const int nrL1EG,
138  const bool receiveTau,
139  const int nrL1Tau,
140  const bool receiveJet,
141  const int nrL1Jet,
142  const bool receiveEtSums) {
143  if (m_verbosity) {
144  LogDebug("L1TGlobal") << "\n**** Board receiving Calo Data "
145  //<< "\n from input tag " << caloInputTag << "\n"
146  << std::endl;
147  }
148 
149  resetCalo();
150 
151  // get data from Calorimeter
152  if (receiveEG) {
154  iEvent.getByToken(egInputToken, egData);
155 
156  if (!egData.isValid()) {
157  if (m_verbosity) {
158  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<l1t::EGamma> with input tag "
159  //<< caloInputTag
160  << "\nrequested in configuration, but not found in the event.\n"
161  << std::endl;
162  }
163  } else {
164  // bx in EG data
165  for (int i = egData->getFirstBX(); i <= egData->getLastBX(); ++i) {
166  // Prevent from pushing back bx that is outside of allowed range
167  if (i < m_bxFirst_ || i > m_bxLast_)
168  continue;
169 
170  //Loop over EG in this bx
171  int nObj = 0;
172  for (std::vector<l1t::EGamma>::const_iterator eg = egData->begin(i); eg != egData->end(i); ++eg) {
173  if (nObj < nrL1EG) {
174  (*m_candL1EG).push_back(i, &(*eg));
175  } else {
176  edm::LogWarning("L1TGlobal") << " Too many EG (" << nObj << ") for uGT Configuration maxEG =" << nrL1EG
177  << std::endl;
178  }
179  LogDebug("L1TGlobal") << "EG Pt " << eg->hwPt() << " Eta " << eg->hwEta() << " Phi " << eg->hwPhi()
180  << " Qual " << eg->hwQual() << " Iso " << eg->hwIso() << std::endl;
181 
182  nObj++;
183  } //end loop over EG in bx
184  } //end loop over bx
185 
186  } //end if over valid EG data
187 
188  } //end if ReveiveEG data
189 
190  if (receiveTau) {
192  iEvent.getByToken(tauInputToken, tauData);
193 
194  if (!tauData.isValid()) {
195  if (m_verbosity) {
196  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<l1t::Tau> with input tag "
197  //<< caloInputTag
198  << "\nrequested in configuration, but not found in the event.\n"
199  << std::endl;
200  }
201  } else {
202  // bx in tau data
203  for (int i = tauData->getFirstBX(); i <= tauData->getLastBX(); ++i) {
204  // Prevent from pushing back bx that is outside of allowed range
205  if (i < m_bxFirst_ || i > m_bxLast_)
206  continue;
207 
208  //Loop over tau in this bx
209  int nObj = 0;
210  for (std::vector<l1t::Tau>::const_iterator tau = tauData->begin(i); tau != tauData->end(i); ++tau) {
211  if (nObj < nrL1Tau) {
212  (*m_candL1Tau).push_back(i, &(*tau));
213  } else {
214  LogTrace("L1TGlobal") << " Too many Tau (" << nObj << ") for uGT Configuration maxTau =" << nrL1Tau
215  << std::endl;
216  }
217 
218  LogDebug("L1TGlobal") << "tau Pt " << tau->hwPt() << " Eta " << tau->hwEta() << " Phi " << tau->hwPhi()
219  << " Qual " << tau->hwQual() << " Iso " << tau->hwIso() << std::endl;
220  nObj++;
221 
222  } //end loop over tau in bx
223  } //end loop over bx
224 
225  } //end if over valid tau data
226 
227  } //end if ReveiveTau data
228 
229  if (receiveJet) {
231  iEvent.getByToken(jetInputToken, jetData);
232 
233  if (!jetData.isValid()) {
234  if (m_verbosity) {
235  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<l1t::Jet> with input tag "
236  //<< caloInputTag
237  << "\nrequested in configuration, but not found in the event.\n"
238  << std::endl;
239  }
240  } else {
241  // bx in jet data
242  for (int i = jetData->getFirstBX(); i <= jetData->getLastBX(); ++i) {
243  // Prevent from pushing back bx that is outside of allowed range
244  if (i < m_bxFirst_ || i > m_bxLast_)
245  continue;
246 
247  //Loop over jet in this bx
248  int nObj = 0;
249  for (std::vector<l1t::Jet>::const_iterator jet = jetData->begin(i); jet != jetData->end(i); ++jet) {
250  if (nObj < nrL1Jet) {
251  (*m_candL1Jet).push_back(i, &(*jet));
252  } else {
253  edm::LogWarning("L1TGlobal") << " Too many Jets (" << nObj << ") for uGT Configuration maxJet =" << nrL1Jet
254  << std::endl;
255  }
256 
257  LogDebug("L1TGlobal") << "Jet Pt " << jet->hwPt() << " Eta " << jet->hwEta() << " Phi " << jet->hwPhi()
258  << " Qual " << jet->hwQual() << " Iso " << jet->hwIso() << std::endl;
259  nObj++;
260  } //end loop over jet in bx
261  } //end loop over bx
262 
263  } //end if over valid jet data
264 
265  } //end if ReveiveJet data
266 
267  if (receiveEtSums) {
269  iEvent.getByToken(sumInputToken, etSumData);
270 
271  if (!etSumData.isValid()) {
272  if (m_verbosity) {
273  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<l1t::EtSum> with input tag "
274  //<< caloInputTag
275  << "\nrequested in configuration, but not found in the event.\n"
276  << std::endl;
277  }
278  } else {
279  for (int i = etSumData->getFirstBX(); i <= etSumData->getLastBX(); ++i) {
280  // Prevent from pushing back bx that is outside of allowed range
281  if (i < m_bxFirst_ || i > m_bxLast_)
282  continue;
283 
284  //Loop over jet in this bx
285  for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(i); etsum != etSumData->end(i); ++etsum) {
286  (*m_candL1EtSum).push_back(i, &(*etsum));
287 
288  /* In case we need to split these out
289  switch ( etsum->getType() ) {
290  case l1t::EtSum::EtSumType::kMissingEt:
291  {
292  //(*m_candETM).push_back(i,&(*etsum));
293  LogDebug("L1TGlobal") << "ETM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
294  }
295  break;
296  case l1t::EtSum::EtSumType::kMissingHt:
297  {
298  //(*m_candHTM).push_back(i,&(*etsum));
299  LogDebug("L1TGlobal") << "HTM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
300  }
301  break;
302  case l1t::EtSum::EtSumType::kTotalEt:
303  {
304  //(*m_candETT).push_back(i,&(*etsum));
305  LogDebug("L1TGlobal") << "ETT: Pt " << etsum->hwPt() << std::endl;
306  }
307  break;
308  case l1t::EtSum::EtSumType::kTotalHt:
309  {
310  //(*m_candHTT).push_back(i,&(*etsum));
311  LogDebug("L1TGlobal") << "HTT: Pt " << etsum->hwPt() << std::endl;
312  }
313  break;
314  case l1t::EtSum::EtSumType::kTowerCount:
315  {
316  //(*m_candTowerCount).push_back(i,&(*etsum));
317  LogDebug("L1TGlobal") << "TowerCount: " << etsum->hwPt() << std::endl;
318  }
319  break;
320  default:
321  LogDebug("L1TGlobal") << "Default encounted " << std::endl;
322  break;
323  }
324 */
325 
326  } //end loop over jet in bx
327  } //end loop over Bx
328  }
329  }
330 }
331 
332 // receive data from Global Muon Trigger
334  const edm::EDGetTokenT<BXVector<l1t::Muon>>& muInputToken,
335  const bool receiveMu,
336  const int nrL1Mu) {
337  if (m_verbosity) {
338  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving muon data = "
339  //<< "\n from input tag " << muInputTag << "\n"
340  << std::endl;
341  }
342 
343  resetMu();
344 
345  // get data from Global Muon Trigger
346  if (receiveMu) {
348  iEvent.getByToken(muInputToken, muonData);
349 
350  if (!muonData.isValid()) {
351  if (m_verbosity) {
352  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<l1t::Muon> with input tag "
353  //<< muInputTag
354  << "\nrequested in configuration, but not found in the event.\n"
355  << std::endl;
356  }
357  } else {
358  // bx in muon data
359  for (int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
360  // Prevent from pushing back bx that is outside of allowed range
361  if (i < m_bxFirst_ || i > m_bxLast_)
362  continue;
363 
364  //Loop over Muons in this bx
365  int nObj = 0;
366  for (std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
367  if (nObj < nrL1Mu) {
368  (*m_candL1Mu).push_back(i, &(*mu));
369  } else {
370  edm::LogWarning("L1TGlobal") << " Too many Muons (" << nObj << ") for uGT Configuration maxMu =" << nrL1Mu
371  << std::endl;
372  }
373 
374  LogDebug("L1TGlobal") << "Muon Pt " << mu->hwPt() << " EtaAtVtx " << mu->hwEtaAtVtx() << " PhiAtVtx "
375  << mu->hwPhiAtVtx() << " Qual " << mu->hwQual() << " Iso " << mu->hwIso()
376  << std::endl;
377  nObj++;
378  } //end loop over muons in bx
379  } //end loop over bx
380 
381  } //end if over valid muon data
382 
383  } //end if ReveiveMuon data
384 }
385 
386 // receive data from Global External Conditions
388  const edm::EDGetTokenT<BXVector<GlobalExtBlk>>& extInputToken,
389  const bool receiveExt) {
390  if (m_verbosity) {
391  LogDebug("L1TGlobal") << "\n**** GlobalBoard receiving external data = "
392  //<< "\n from input tag " << muInputTag << "\n"
393  << std::endl;
394  }
395 
396  resetExternal();
397 
398  // get data from Global Muon Trigger
399  if (receiveExt) {
401  iEvent.getByToken(extInputToken, extData);
402 
403  if (!extData.isValid()) {
404  if (m_verbosity) {
405  edm::LogWarning("L1TGlobal") << "\nWarning: BXVector<GlobalExtBlk> with input tag "
406  //<< muInputTag
407  << "\nrequested in configuration, but not found in the event.\n"
408  << std::endl;
409  }
410  } else {
411  // bx in muon data
412  for (int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
413  // Prevent from pushing back bx that is outside of allowed range
414  if (i < m_bxFirst_ || i > m_bxLast_)
415  continue;
416 
417  //Loop over ext in this bx
418  for (std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
419  (*m_candL1External).push_back(i, &(*ext));
420  } //end loop over ext in bx
421  } //end loop over bx
422 
423  } //end if over valid ext data
424 
425  } //end if ReveiveExt data
426 }
427 
428 // run GTL
430  const edm::EventSetup& evSetup,
431  const TriggerMenu* m_l1GtMenu,
432  const bool produceL1GtObjectMapRecord,
433  const int iBxInEvent,
434  std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord,
435  const unsigned int numberPhysTriggers,
436  const int nrL1Mu,
437  const int nrL1EG,
438  const int nrL1Tau,
439  const int nrL1Jet) {
440  const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->gtConditionMap();
441  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
442  const GlobalScales& gtScales = m_l1GtMenu->gtScales();
443  const std::string scaleSetName = gtScales.getScalesName();
444  LogDebug("L1TGlobal") << " L1 Menu Scales -- Set Name: " << scaleSetName << std::endl;
445 
446  // Reset AlgBlk for this bx
447  m_uGtAlgBlk.reset();
448  m_algInitialOr = false;
449  m_algPrescaledOr = false;
450  m_algIntermOr = false;
451  m_algFinalOr = false;
452  m_algFinalOrVeto = false;
453 
454  const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->corMuonTemplate();
455 
456  // Comment out for now
457  const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->corCaloTemplate();
458 
459  const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->corEnergySumTemplate();
460 
461  LogDebug("L1TGlobal") << "Size corrMuon " << corrMuon.size() << "\nSize corrCalo " << corrCalo.size()
462  << "\nSize corrSums " << corrEnergySum.size() << std::endl;
463 
464  // loop over condition maps (one map per condition chip)
465  // then loop over conditions in the map
466  // save the results in temporary maps
467 
468  // never happens in production but at first event...
469  if (m_conditionResultMaps.size() != conditionMap.size()) {
470  m_conditionResultMaps.clear();
471  m_conditionResultMaps.resize(conditionMap.size());
472  }
473 
474  int iChip = -1;
475 
476  for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
477  itCondOnChip != conditionMap.end();
478  itCondOnChip++) {
479  iChip++;
480 
481  AlgorithmEvaluation::ConditionEvaluationMap& cMapResults = m_conditionResultMaps[iChip];
482 
483  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
484  // evaluate condition
485  switch ((itCond->second)->condCategory()) {
486  case CondMuon: {
487  // BLW Not sure what to do with this for now
488  const int ifMuEtaNumberBits = 0;
489 
490  MuCondition* muCondition = new MuCondition(itCond->second, this, nrL1Mu, ifMuEtaNumberBits);
491 
492  muCondition->setVerbosity(m_verbosity);
493 
494  muCondition->evaluateConditionStoreResult(iBxInEvent);
495 
496  // BLW COmment out for now
497  cMapResults[itCond->first] = muCondition;
498 
499  if (m_verbosity && m_isDebugEnabled) {
500  std::ostringstream myCout;
501  muCondition->print(myCout);
502 
503  LogTrace("L1TGlobal") << myCout.str() << std::endl;
504  }
505  //delete muCondition;
506 
507  } break;
508  case CondCalo: {
509  // BLW Not sure w hat to do with this for now
510  const int ifCaloEtaNumberBits = 0;
511 
512  CaloCondition* caloCondition =
513  new CaloCondition(itCond->second, this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
514 
515  caloCondition->setVerbosity(m_verbosity);
516 
517  caloCondition->evaluateConditionStoreResult(iBxInEvent);
518 
519  cMapResults[itCond->first] = caloCondition;
520 
521  if (m_verbosity && m_isDebugEnabled) {
522  std::ostringstream myCout;
523  caloCondition->print(myCout);
524 
525  LogTrace("L1TGlobal") << myCout.str() << std::endl;
526  }
527  // delete caloCondition;
528 
529  } break;
530  case CondEnergySum: {
531  EnergySumCondition* eSumCondition = new EnergySumCondition(itCond->second, this);
532 
533  eSumCondition->setVerbosity(m_verbosity);
534  eSumCondition->evaluateConditionStoreResult(iBxInEvent);
535 
536  cMapResults[itCond->first] = eSumCondition;
537 
538  if (m_verbosity && m_isDebugEnabled) {
539  std::ostringstream myCout;
540  eSumCondition->print(myCout);
541 
542  LogTrace("L1TGlobal") << myCout.str() << std::endl;
543  }
544  // delete eSumCondition;
545 
546  } break;
547 
548  case CondExternal: {
549  ExternalCondition* extCondition = new ExternalCondition(itCond->second, this);
550 
551  extCondition->setVerbosity(m_verbosity);
552  extCondition->evaluateConditionStoreResult(iBxInEvent);
553 
554  cMapResults[itCond->first] = extCondition;
555 
556  if (m_verbosity && m_isDebugEnabled) {
557  std::ostringstream myCout;
558  extCondition->print(myCout);
559 
560  LogTrace("L1TGlobal") << myCout.str() << std::endl;
561  }
562  // delete extCondition;
563 
564  } break;
565  case CondCorrelation: {
566  // get first the sub-conditions
567  const CorrelationTemplate* corrTemplate = static_cast<const CorrelationTemplate*>(itCond->second);
568  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
569  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
570  const int cond0Ind = corrTemplate->cond0Index();
571  const int cond1Ind = corrTemplate->cond1Index();
572 
573  const GlobalCondition* cond0Condition = nullptr;
574  const GlobalCondition* cond1Condition = nullptr;
575 
576  // maximum number of objects received for evaluation of l1t::Type1s condition
577  int cond0NrL1Objects = 0;
578  int cond1NrL1Objects = 0;
579  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects " << cond1NrL1Objects
580  << std::endl;
581 
582  switch (cond0Categ) {
583  case CondMuon: {
584  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
585  } break;
586  case CondCalo: {
587  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
588  } break;
589  case CondEnergySum: {
590  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
591  } break;
592  default: {
593  // do nothing, should not arrive here
594  } break;
595  }
596 
597  switch (cond1Categ) {
598  case CondMuon: {
599  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
600  } break;
601  case CondCalo: {
602  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
603  } break;
604  case CondEnergySum: {
605  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
606  } break;
607  default: {
608  // do nothing, should not arrive here
609  } break;
610  }
611 
612  CorrCondition* correlationCond = new CorrCondition(itCond->second, cond0Condition, cond1Condition, this);
613 
614  correlationCond->setVerbosity(m_verbosity);
615  correlationCond->setScales(&gtScales);
616  correlationCond->evaluateConditionStoreResult(iBxInEvent);
617 
618  cMapResults[itCond->first] = correlationCond;
619 
620  if (m_verbosity && m_isDebugEnabled) {
621  std::ostringstream myCout;
622  correlationCond->print(myCout);
623 
624  LogTrace("L1TGlobal") << myCout.str() << std::endl;
625  }
626 
627  // delete correlationCond;
628 
629  } break;
631  // get first the sub-conditions
632  const CorrelationWithOverlapRemovalTemplate* corrTemplate =
633  static_cast<const CorrelationWithOverlapRemovalTemplate*>(itCond->second);
634  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
635  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
636  const GtConditionCategory cond2Categ = corrTemplate->cond2Category();
637  const int cond0Ind = corrTemplate->cond0Index();
638  const int cond1Ind = corrTemplate->cond1Index();
639  const int cond2Ind = corrTemplate->cond2Index();
640 
641  const GlobalCondition* cond0Condition = nullptr;
642  const GlobalCondition* cond1Condition = nullptr;
643  const GlobalCondition* cond2Condition = nullptr;
644 
645  // maximum number of objects received for evaluation of l1t::Type1s condition
646  int cond0NrL1Objects = 0;
647  int cond1NrL1Objects = 0;
648  int cond2NrL1Objects = 0;
649  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects " << cond1NrL1Objects
650  << " cond2NrL1Objects " << cond2NrL1Objects << std::endl;
651 
652  switch (cond0Categ) {
653  case CondMuon: {
654  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
655  } break;
656  case CondCalo: {
657  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
658  } break;
659  case CondEnergySum: {
660  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
661  } break;
662  default: {
663  // do nothing, should not arrive here
664  } break;
665  }
666 
667  switch (cond1Categ) {
668  case CondMuon: {
669  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
670  } break;
671  case CondCalo: {
672  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
673  } break;
674  case CondEnergySum: {
675  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
676  } break;
677  default: {
678  // do nothing, should not arrive here
679  } break;
680  }
681 
682  switch (cond2Categ) {
683  case CondMuon: {
684  cond2Condition = &((corrMuon[iChip])[cond2Ind]);
685  } break;
686  case CondCalo: {
687  cond2Condition = &((corrCalo[iChip])[cond2Ind]);
688  } break;
689  case CondEnergySum: {
690  cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
691  } break;
692  default: {
693  // do nothing, should not arrive here
694  } break;
695  }
696 
697  CorrWithOverlapRemovalCondition* correlationCondWOR =
698  new CorrWithOverlapRemovalCondition(itCond->second, cond0Condition, cond1Condition, cond2Condition, this);
699 
700  correlationCondWOR->setVerbosity(m_verbosity);
701  correlationCondWOR->setScales(&gtScales);
702  correlationCondWOR->evaluateConditionStoreResult(iBxInEvent);
703 
704  cMapResults[itCond->first] = correlationCondWOR;
705 
706  if (m_verbosity && m_isDebugEnabled) {
707  std::ostringstream myCout;
708  correlationCondWOR->print(myCout);
709 
710  LogTrace("L1TGlobal") << myCout.str() << std::endl;
711  }
712 
713  // delete correlationCondWOR;
714 
715  } break;
716  case CondNull: {
717  // do nothing
718 
719  } break;
720  default: {
721  // do nothing
722 
723  } break;
724  }
725  }
726  }
727 
728  // loop over algorithm map
730  // empty vector for object maps - filled during loop
731  std::vector<GlobalObjectMap> objMapVec;
732  if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
733  objMapVec.reserve(numberPhysTriggers);
734 
735  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
736  AlgorithmEvaluation gtAlg(itAlgo->second);
737  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
738 
739  int algBitNumber = (itAlgo->second).algoBitNumber();
740  bool algResult = gtAlg.gtAlgoResult();
741 
742  LogDebug("L1TGlobal") << " ===> for iBxInEvent = " << iBxInEvent << ":\t algBitName = " << itAlgo->first
743  << ",\t algBitNumber = " << algBitNumber << ",\t algResult = " << algResult << std::endl;
744 
745  if (algResult) {
746  // m_gtlAlgorithmOR.set(algBitNumber);
747  m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
748  m_algInitialOr = true;
749  }
750 
751  if (m_verbosity && m_isDebugEnabled) {
752  std::ostringstream myCout;
753  (itAlgo->second).print(myCout);
754  gtAlg.print(myCout);
755 
756  LogTrace("L1TGlobal") << myCout.str() << std::endl;
757  }
758 
759  // object maps only for BxInEvent = 0
760  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
761  std::vector<L1TObjectTypeInCond> otypes;
762  for (auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop) {
763  //cout << "INFO: operand name: " << iop->tokenName << "\n";
764  int myChip = -1;
765  int found = 0;
767  for (auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
768  myChip++;
769  auto match = imap->find(iop->tokenName);
770 
771  if (match != imap->end()) {
772  found = 1;
773  //cout << "DEBUG: found match for " << iop->tokenName << " at " << match->first << "\n";
774 
775  otype = match->second->objectType();
776 
777  for (auto itype = otype.begin(); itype != otype.end(); itype++) {
778  //cout << "type: " << *itype << "\n";
779  }
780  }
781  }
782  if (!found) {
783  edm::LogWarning("L1TGlobal") << "\n Failed to find match for operand token " << iop->tokenName << "\n";
784  } else {
785  otypes.push_back(otype);
786  }
787  }
788 
789  // set object map
790  GlobalObjectMap objMap;
791 
792  objMap.setAlgoName(itAlgo->first);
793  objMap.setAlgoBitNumber(algBitNumber);
794  objMap.setAlgoGtlResult(algResult);
797  // gtAlg is empty now...
798  objMap.swapObjectTypeVector(otypes);
799 
800  if (m_verbosity && m_isDebugEnabled) {
801  std::ostringstream myCout1;
802  objMap.print(myCout1);
803 
804  LogTrace("L1TGlobal") << myCout1.str() << std::endl;
805  }
806 
807  objMapVec.push_back(objMap);
808  }
809  }
810 
811  // object maps only for BxInEvent = 0
812  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
813  gtObjectMapRecord->swapGtObjectMap(objMapVec);
814  }
815 
816  // loop over condition maps (one map per condition chip)
817  // then loop over conditions in the map
818  // delete the conditions created with new, zero pointer, do not clear map, keep the vector as is...
819  for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
820  itCondOnChip != m_conditionResultMaps.end();
821  itCondOnChip++) {
822  for (AlgorithmEvaluation::ItEvalMap itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
823  delete itCond->second;
824  itCond->second = nullptr;
825  }
826  }
827 }
828 
829 // run GTL
831  const int iBxInEvent,
832  const int totalBxInEvent,
833  const unsigned int numberPhysTriggers,
834  const std::vector<double>& prescaleFactorsAlgoTrig,
835  const std::vector<unsigned int>& triggerMaskAlgoTrig,
836  const std::vector<int>& triggerMaskVetoAlgoTrig,
837  const bool algorithmTriggersUnprescaled,
838  const bool algorithmTriggersUnmasked) {
839  if (m_verbosity) {
840  LogDebug("L1TGlobal") << "\n**** GlobalBoard apply Final Decision Logic " << std::endl;
841  }
842 
843  // prescale counters are reset at the beginning of the luminosity segment
844  if (m_firstEv) {
845  // prescale counters: numberPhysTriggers counters per bunch cross
846  m_prescaleCounterAlgoTrig.reserve(numberPhysTriggers * totalBxInEvent);
847 
848  for (int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent) {
849  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
850  }
851  m_firstEv = false;
852  m_currentLumi = iEvent.luminosityBlock();
853  }
854 
855  // update and clear prescales at the beginning of the luminosity segment
856  if (m_firstEvLumiSegment || m_currentLumi != iEvent.luminosityBlock()) {
857  m_prescaleCounterAlgoTrig.clear();
858  for (int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent) {
859  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
860  }
861 
862  m_firstEvLumiSegment = false;
863  m_currentLumi = iEvent.luminosityBlock();
864  }
865 
866  // Copy Algorithm bits to Prescaled word
867  // Prescaling and Masking done below if requested.
868  m_uGtAlgBlk.copyInitialToInterm();
869 
870  // -------------------------------------------
871  // Apply Prescales or skip if turned off
872  // -------------------------------------------
873  if (!algorithmTriggersUnprescaled) {
874  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
875  int inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
876 
877  bool temp_algPrescaledOr = false;
878  bool alreadyReported = false;
879  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
880  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
881  if (bitValue) {
882  // Make sure algo bit in range, warn otherwise
883  if (iBit < prescaleFactorsAlgoTrig.size()) {
884  if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
885  (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--;
886  if (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0) {
887  // bit already true in algoDecisionWord, just reset counter
888  m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) = prescaleFactorsAlgoTrig.at(iBit);
889  temp_algPrescaledOr = true;
890  } else {
891  // change bit to false in prescaled word and final decision word
892  m_uGtAlgBlk.setAlgoDecisionInterm(iBit, false);
893 
894  } //if Prescale counter reached zero
895  } //if prescale factor is not 1 (ie. no prescale)
896  else {
897  temp_algPrescaledOr = true;
898  }
899  } // require bit in range
900  else if (!alreadyReported) {
901  alreadyReported = true;
902  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent
903  << std::endl;
904  }
905  } //if algo bit is set true
906  } //loop over alg bits
907 
908  m_algPrescaledOr = temp_algPrescaledOr; //temp
909 
910  } else {
911  // Since not Prescaling just take OR of Initial Work
912  m_algPrescaledOr = m_algInitialOr;
913 
914  } //if we are going to apply prescales.
915 
916  // Copy Algorithm bits fron Prescaled word to Final Word
917  // Masking done below if requested.
918  m_uGtAlgBlk.copyIntermToFinal();
919 
920  if (!algorithmTriggersUnmasked) {
921  bool temp_algFinalOr = false;
922  bool alreadyReported = false;
923  for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
924  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
925 
926  if (bitValue) {
927  //bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
928  bool isMasked = false;
929  if (iBit < triggerMaskAlgoTrig.size())
930  isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
931  else if (!alreadyReported) {
932  alreadyReported = true;
933  edm::LogWarning("L1TGlobal") << "\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent
934  << std::endl;
935  }
936 
937  bool passMask = (bitValue && !isMasked);
938 
939  if (passMask)
940  temp_algFinalOr = true;
941  else
942  m_uGtAlgBlk.setAlgoDecisionFinal(iBit, false);
943 
944  // Check if veto mask is true, if it is, set the event veto flag.
945  if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
946  m_algFinalOrVeto = true;
947  }
948  }
949 
950  m_algIntermOr = temp_algFinalOr;
951 
952  } else {
953  m_algIntermOr = m_algPrescaledOr;
954 
955  }
956 
957  // Set FinalOR for this board
958  m_algFinalOr = (m_algIntermOr & !m_algFinalOrVeto);
959 }
960 
961 // Fill DAQ Record
963  std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
964  int prescaleSet,
965  int menuUUID,
966  int firmwareUUID) {
967  if (m_verbosity) {
968  LogDebug("L1TGlobal") << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent << std::endl;
969  }
970 
971  // Set header information
972  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
973  m_uGtAlgBlk.setPreScColumn(prescaleSet);
974  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
975  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
976 
977  m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto);
978  m_uGtAlgBlk.setFinalORPreVeto(m_algIntermOr);
979  m_uGtAlgBlk.setFinalOR(m_algFinalOr);
980 
981  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
982 }
983 
984 // clear GTL
986  resetMu();
987  resetCalo();
988  resetExternal();
989 
990  m_uGtAlgBlk.reset();
991 
992  m_gtlDecisionWord.reset();
993  m_gtlAlgorithmOR.reset();
994 }
995 
996 // clear muon
998  m_candL1Mu->clear();
999  m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
1000 }
1001 
1002 // clear calo
1004  m_candL1EG->clear();
1005  m_candL1Tau->clear();
1006  m_candL1Jet->clear();
1007  m_candL1EtSum->clear();
1008 
1009  m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
1010  m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
1011  m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
1012  m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
1013 }
1014 
1016  m_candL1External->clear();
1017  m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
1018 }
1019 
1020 // print Global Muon Trigger data received
1021 void l1t::GlobalBoard::printGmtData(const int iBxInEvent) const {
1022  LogTrace("L1TGlobal") << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent << std::endl;
1023 
1024  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1025  LogTrace("L1TGlobal") << "Number of GMT muons = " << nrL1Mu << "\n" << std::endl;
1026 
1027  LogTrace("L1TGlobal") << std::endl;
1028 }
l1t::AlgorithmEvaluation::ConditionEvaluationMap
__gnu_cxx ::hash_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
Definition: AlgorithmEvaluation.h:87
ext
Definition: memstream.h:15
TriggerMenu::gtScales
const l1t::GlobalScales & gtScales() const
get the scales
Definition: TriggerMenu.h:172
l1t::AlgorithmEvaluation::ItEvalMap
ConditionEvaluationMap::iterator ItEvalMap
Definition: AlgorithmEvaluation.h:89
l1t::GlobalBoard::reset
void reset()
clear uGT
Definition: GlobalBoard.cc:985
mps_fire.i
i
Definition: mps_fire.py:428
GlobalBoard.h
MessageLogger.h
l1t::AlgorithmEvaluation::operandTokenVector
std::vector< GlobalLogicParser::OperandToken > & operandTokenVector()
Definition: AlgorithmEvaluation.h:104
CorrelationWithOverlapRemovalTemplate.h
GlobalObjectMap
Definition: GlobalObjectMap.h:32
ESHandle.h
metsig::tau
Definition: SignAlgoResolutions.h:49
l1t::GlobalBoard::m_uGtFinalBoard
bool m_uGtFinalBoard
Definition: GlobalBoard.h:252
l1t::GlobalBoard::receiveExternalData
void receiveExternalData(edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &, const bool receiveExt)
Definition: GlobalBoard.cc:387
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
l1t::GlobalBoard::setBxFirst
void setBxFirst(int bx)
Definition: GlobalBoard.cc:103
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
l1t::ConditionEvaluation::setVerbosity
void setVerbosity(const int verbosity)
Definition: ConditionEvaluation.h:80
TriggerMenu::corCaloTemplate
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
Definition: TriggerMenu.h:149
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
l1t::CondCorrelationWithOverlapRemoval
Definition: GlobalDefinitions.h:99
TriggerMenu::gtAlgorithmMap
const l1t::AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: TriggerMenu.h:162
GlobalCondition.h
GlobalObjectMap::swapCombinationVector
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
Definition: GlobalObjectMap.h:64
watchdog.const
const
Definition: watchdog.py:83
CorrelationWithOverlapRemovalTemplate::cond0Category
const l1t::GtConditionCategory cond0Category() const
get / set the category of the thre sub-conditions
Definition: CorrelationWithOverlapRemovalTemplate.h:108
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle
Definition: AssociativeIterator.h:50
l1t::CaloCondition
Definition: CaloCondition.h:38
jetData
Definition: GctErrorAnalyzerDefinitions.h:19
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
l1t::CorrCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: CorrCondition.cc:1291
Muon
Definition: Muon.py:1
l1t::CorrWithOverlapRemovalCondition
Definition: CorrWithOverlapRemovalCondition.h:39
CorrelationTemplate::cond0Category
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
Definition: CorrelationTemplate.h:90
BXVector
Definition: BXVector.h:15
GlobalAlgorithm.h
l1t::CondCalo
Definition: GlobalDefinitions.h:95
l1t::ExternalCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: ExternalCondition.cc:152
l1t::CondNull
Definition: GlobalDefinitions.h:93
MuonTemplate.h
l1t::CorrCondition::setScales
void setScales(const GlobalScales *)
Definition: CorrCondition.cc:92
l1t::L1Candidate
Definition: L1Candidate.h:15
ExternalTemplate.h
TriggerMenu::corMuonTemplate
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
Definition: TriggerMenu.h:144
CorrelationTemplate::cond1Index
const int cond1Index() const
Definition: CorrelationTemplate.h:100
CorrelationWithOverlapRemovalTemplate::cond0Index
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
Definition: CorrelationWithOverlapRemovalTemplate.h:119
CorrelationWithOverlapRemovalTemplate::cond1Category
const l1t::GtConditionCategory cond1Category() const
Definition: CorrelationWithOverlapRemovalTemplate.h:110
l1t::GlobalBoard::~GlobalBoard
virtual ~GlobalBoard()
Definition: GlobalBoard.cc:90
l1t::CorrWithOverlapRemovalCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: CorrWithOverlapRemovalCondition.cc:2199
GlobalObjectMap::setAlgoBitNumber
void setAlgoBitNumber(int algoBitNumberValue)
Definition: GlobalObjectMap.h:49
l1t::AlgorithmEvaluation::gtAlgoResult
bool gtAlgoResult() const
get / set the result of the algorithm
Definition: AlgorithmEvaluation.h:93
CaloCondition.h
l1t::CaloCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: CaloCondition.cc:540
l1t::GlobalScales
Definition: GlobalScales.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalObjectMap::setAlgoGtlResult
void setAlgoGtlResult(bool algoGtlResultValue)
Definition: GlobalObjectMap.h:55
funct::true
true
Definition: Factorize.h:173
CorrelationTemplate::cond0Index
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
Definition: CorrelationTemplate.h:98
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
MessageDrop.h
l1t::GlobalScales::getScalesName
virtual std::string getScalesName() const
Definition: GlobalScales.cc:27
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
l1t
delete x;
Definition: CaloConfig.h:22
GlobalObjectMap.h
l1t::MuCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: MuCondition.cc:511
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
l1t::AlgorithmEvaluation
Definition: AlgorithmEvaluation.h:68
CorrWithOverlapRemovalCondition.h
l1t::EtSum
Definition: EtSum.h:20
TriggerMenu.h
l1t::EnergySumCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: EnergySumCondition.cc:303
l1t::MuCondition
Definition: MuCondition.h:37
iEvent
int iEvent
Definition: GenABIO.cc:224
l1t::AlgorithmMap
std::map< std::string, GlobalAlgorithm > AlgorithmMap
map containing the algorithms
Definition: TriggerMenuFwd.h:32
l1t::GlobalBoard::receiveMuonObjectData
void receiveMuonObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon >> &, const bool receiveMu, const int nrL1Mu)
Definition: GlobalBoard.cc:333
l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:199
ConditionEvaluation.h
TriggerMenu::corEnergySumTemplate
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
Definition: TriggerMenu.h:155
l1t::GlobalBoard::m_uGtBoardNumber
int m_uGtBoardNumber
Definition: GlobalBoard.h:251
MuCondition.h
GlobalExtBlk
Definition: GlobalExtBlk.h:34
GlobalObjectMap::swapObjectTypeVector
void swapObjectTypeVector(std::vector< L1TObjectTypeInCond > &objectTypeVectorValue)
Definition: GlobalObjectMap.h:85
l1t::GlobalBoard::m_gtlAlgorithmOR
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:220
edm::EventSetup
Definition: EventSetup.h:57
l1t::ConditionEvaluation::evaluateConditionStoreResult
void evaluateConditionStoreResult(const int bxEval)
call evaluateCondition and save last result
Definition: ConditionEvaluation.h:60
CorrelationTemplate
Definition: CorrelationTemplate.h:34
l1t::CondEnergySum
Definition: GlobalDefinitions.h:96
l1t::GlobalBoard::runGTL
void runGTL(edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::unique_ptr< GlobalObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
run the uGT GTL (Conditions and Algorithms)
Definition: GlobalBoard.cc:429
l1t::AlgorithmEvaluation::evaluateAlgorithm
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm
Definition: AlgorithmEvaluation.cc:50
l1t::CItCond
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
Definition: TriggerMenuFwd.h:35
l1t::GlobalBoard::resetCalo
void resetCalo()
Definition: GlobalBoard.cc:1003
TriggerMenu::gtConditionMap
const std::vector< l1t::ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: TriggerMenu.h:74
simCaloStage2Layer1Digis_cfi.bxFirst
bxFirst
Definition: simCaloStage2Layer1Digis_cfi.py:7
CaloTemplate.h
l1t::CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: TriggerMenuFwd.h:39
l1t::GlobalBoard::resetExternal
void resetExternal()
Definition: GlobalBoard.cc:1015
l1t::GlobalBoard::m_l1CaloGeometryCacheID
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:196
CorrelationTemplate.h
l1t::GlobalBoard::fillAlgRecord
void fillAlgRecord(int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
Definition: GlobalBoard.cc:962
CalibrationSummaryClient_cfi.otype
otype
Definition: CalibrationSummaryClient_cfi.py:38
simCaloStage2Layer1Digis_cfi.bxLast
bxLast
Definition: simCaloStage2Layer1Digis_cfi.py:8
TriggerMenu
Definition: TriggerMenu.h:46
metsig::jet
Definition: SignAlgoResolutions.h:47
l1t::GlobalBoard::GlobalBoard
GlobalBoard()
Definition: GlobalBoard.cc:60
EnergySumCondition.h
l1t::CondCorrelation
Definition: GlobalDefinitions.h:97
l1t::GlobalBoard::m_gtlDecisionWord
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:221
l1t::AlgorithmEvaluation::gtAlgoCombinationVector
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
Definition: AlgorithmEvaluation.h:102
CorrelationWithOverlapRemovalTemplate::cond2Category
const l1t::GtConditionCategory cond2Category() const
Definition: CorrelationWithOverlapRemovalTemplate.h:112
ExternalCondition.h
EnergySumTemplate.h
GlobalObjectMap::print
void print(std::ostream &myCout) const
print the full object map
Definition: GlobalObjectMap.cc:98
l1t::ExternalCondition
Definition: ExternalCondition.h:37
l1t::CondExternal
Definition: GlobalDefinitions.h:98
Exception.h
GlobalObjectMap::swapOperandTokenVector
void swapOperandTokenVector(std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
Definition: GlobalObjectMap.h:75
l1t::CondMuon
Definition: GlobalDefinitions.h:94
AlgorithmEvaluation.h
l1t::GlobalBoard::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:192
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:12
CorrelationWithOverlapRemovalTemplate::cond2Index
const int cond2Index() const
Definition: CorrelationWithOverlapRemovalTemplate.h:123
l1t::GlobalBoard::printGmtData
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
Definition: GlobalBoard.cc:1021
l1t::GtConditionCategory
GtConditionCategory
condition categories
Definition: GlobalDefinitions.h:92
l1t::GlobalBoard::receiveCaloObjectData
void receiveCaloObjectData(edm::Event &, const edm::EDGetTokenT< BXVector< l1t::EGamma >> &, const edm::EDGetTokenT< BXVector< l1t::Tau >> &, const edm::EDGetTokenT< BXVector< l1t::Jet >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums)
receive data from Global Muon Trigger
Definition: GlobalBoard.cc:131
CorrelationWithOverlapRemovalTemplate::cond1Index
const int cond1Index() const
Definition: CorrelationWithOverlapRemovalTemplate.h:121
l1t::GlobalBoard::setBxLast
void setBxLast(int bx)
Definition: GlobalBoard.cc:105
l1t::GlobalBoard::m_uGtAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:223
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
GlobalCondition
Definition: GlobalCondition.h:33
l1t::CorrWithOverlapRemovalCondition::setScales
void setScales(const GlobalScales *)
Definition: CorrWithOverlapRemovalCondition.cc:131
CorrelationWithOverlapRemovalTemplate
Definition: CorrelationWithOverlapRemovalTemplate.h:34
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
l1t::GlobalBoard::resetMu
void resetMu()
Definition: GlobalBoard.cc:997
edm::Event
Definition: Event.h:73
l1t::GlobalBoard::m_boardEventCount
unsigned int m_boardEventCount
Definition: GlobalBoard.h:248
GlobalAlgBlk::reset
void reset()
reset the content of a GlobalAlgBlk
Definition: GlobalAlgBlk.cc:124
l1t::AlgorithmEvaluation::print
void print(std::ostream &myCout) const
Definition: AlgorithmEvaluation.cc:164
CorrCondition.h
l1t::EnergySumCondition
Definition: EnergySumCondition.h:37
l1t::CorrCondition
Definition: CorrCondition.h:38
l1t::GlobalBoard::init
void init(const int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
initialize the class (mainly reserve)
Definition: GlobalBoard.cc:107
l1t::GlobalBoard::runFDL
void runFDL(edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< double > &prescaleFactorsAlgoTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< int > &triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked)
run the uGT FDL (Apply Prescales and Veto)
Definition: GlobalBoard.cc:830
L1TObjectTypeInCond
std::vector< l1t::GlobalObject > L1TObjectTypeInCond
Definition: GlobalObjectMapFwd.h:34
GlobalObjectMap::setAlgoName
void setAlgoName(const std::string &algoNameValue)
Definition: GlobalObjectMap.h:44
CorrelationTemplate::cond1Category
const l1t::GtConditionCategory cond1Category() const
Definition: CorrelationTemplate.h:92