CMS 3D CMS Logo

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