CMS 3D CMS Logo

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