CMS 3D CMS Logo

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