CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1GlobalTriggerGTL Class Reference

#include <L1GlobalTriggerGTL.h>

Public Member Functions

const std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > & getAlgorithmOR () const
 return algorithm OR decision More...
 
const std::vector< const L1MuGMTCand * > * getCandL1Mu () const
 return global muon trigger candidate More...
 
const std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > & getDecisionWord () const
 return decision More...
 
void init (const int nrL1Mu, const int numberPhysTriggers)
 initialize the class (mainly reserve) More...
 
 L1GlobalTriggerGTL (const edm::InputTag &mutag, edm::ConsumesCollector &&iC)
 
void printGmtData (const int iBxInEvent) const
 print received Muon dataWord More...
 
void receiveGmtObjectData (edm::Event &, const edm::InputTag &, const int iBxInEvent, const bool receiveMu, const int nrL1Mu)
 receive data from Global Muon Trigger More...
 
void reset ()
 clear GTL More...
 
void run (edm::Event &iEvent, const edm::EventSetup &evSetup, const L1GlobalTriggerPSB *ptrGtPSB, const bool produceL1GtObjectMapRecord, const int iBxInEvent, L1GlobalTriggerObjectMapRecord *gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1NoIsoEG, const int nrL1IsoEG, const int nrL1CenJet, const int nrL1ForJet, const int nrL1TauJet, const int nrL1JetCounts, const int ifMuEtaNumberBits, const int ifCaloEtaNumberBits)
 run the GTL More...
 
void setVerbosity (const int verbosity)
 
virtual ~L1GlobalTriggerGTL ()
 

Private Attributes

std::vector< const L1MuGMTCand * > * m_candL1Mu
 
std::vector< L1GtAlgorithmEvaluation::ConditionEvaluationMapm_conditionResultMaps
 
L1GtEtaPhiConversionsm_gtEtaPhiConversions
 
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggersm_gtlAlgorithmOR
 
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggersm_gtlDecisionWord
 
bool m_isDebugEnabled
 
const L1CaloGeometrym_l1CaloGeometry
 
unsigned long long m_l1CaloGeometryCacheID
 
const L1GtTriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1MuTriggerScalesm_l1MuTriggerScales
 
unsigned long long m_l1MuTriggerScalesCacheID
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Description: Global Trigger Logic board.

Implementation: <TODO: enter implementation details>

Author
: M. Fierro - HEPHY Vienna - ORCA version
: Vasile Mihai Ghete - HEPHY Vienna - CMSSW version

Description: Global Trigger Logic board, see header file for details.

Implementation: <TODO: enter implementation details>

Author
: M. Fierro - HEPHY Vienna - ORCA version
: Vasile Mihai Ghete - HEPHY Vienna - CMSSW version

Definition at line 45 of file L1GlobalTriggerGTL.h.

Constructor & Destructor Documentation

◆ L1GlobalTriggerGTL()

L1GlobalTriggerGTL::L1GlobalTriggerGTL ( const edm::InputTag mutag,
edm::ConsumesCollector &&  iC 
)

Definition at line 77 of file L1GlobalTriggerGTL.cc.

78  : m_candL1Mu(new std::vector<const L1MuGMTCand *>), m_isDebugEnabled(edm::isDebugEnabled()) {
79  m_gtlAlgorithmOR.reset();
80  m_gtlDecisionWord.reset();
81 
82  // initialize cached IDs
83  m_l1GtMenuCacheID = 0ULL;
86 
87  // pointer to conversion - actually done in the event loop (cached)
90 
91  iC.consumes<std::vector<L1MuGMTCand>>(m_muGmtInputTag);
92 }

References m_gtEtaPhiConversions, m_gtlAlgorithmOR, m_gtlDecisionWord, m_l1CaloGeometryCacheID, m_l1GtMenuCacheID, m_l1MuTriggerScalesCacheID, m_verbosity, and L1GtEtaPhiConversions::setVerbosity().

◆ ~L1GlobalTriggerGTL()

L1GlobalTriggerGTL::~L1GlobalTriggerGTL ( )
virtual

Definition at line 95 of file L1GlobalTriggerGTL.cc.

95  {
96  reset();
97  delete m_candL1Mu;
98  delete m_gtEtaPhiConversions;
99 }

References m_candL1Mu, m_gtEtaPhiConversions, and reset().

Member Function Documentation

◆ getAlgorithmOR()

const std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers>& L1GlobalTriggerGTL::getAlgorithmOR ( ) const
inline

return algorithm OR decision

Definition at line 91 of file L1GlobalTriggerGTL.h.

91  {
92  return m_gtlAlgorithmOR;
93  }

References m_gtlAlgorithmOR.

Referenced by L1GlobalTriggerFDL::run().

◆ getCandL1Mu()

const std::vector<const L1MuGMTCand *>* L1GlobalTriggerGTL::getCandL1Mu ( ) const
inline

return global muon trigger candidate

Definition at line 96 of file L1GlobalTriggerGTL.h.

96 { return m_candL1Mu; }

References m_candL1Mu.

Referenced by L1GtMuonCondition::evaluateCondition(), L1GtCorrelationCondition::evaluateCondition(), and L1GtMuonCondition::getCandidate().

◆ getDecisionWord()

const std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers>& L1GlobalTriggerGTL::getDecisionWord ( ) const
inline

return decision

Definition at line 86 of file L1GlobalTriggerGTL.h.

86  {
87  return m_gtlDecisionWord;
88  }

References m_gtlDecisionWord.

◆ init()

void L1GlobalTriggerGTL::init ( const int  nrL1Mu,
const int  numberPhysTriggers 
)

initialize the class (mainly reserve)

Definition at line 102 of file L1GlobalTriggerGTL.cc.

102  {
103  m_candL1Mu->reserve(nrL1Mu);
104 
105  // FIXME move from bitset to std::vector<bool> to be able to use
106  // numberPhysTriggers from EventSetup
107 
108  // m_gtlAlgorithmOR.reserve(numberPhysTriggers);
109  // m_gtlAlgorithmOR.assign(numberPhysTriggers, false);
110 
111  // m_gtlDecisionWord.reserve(numberPhysTriggers);
112  // m_gtlDecisionWord.assign(numberPhysTriggers, false);
113 }

References m_candL1Mu.

Referenced by L1GlobalTrigger::produce().

◆ printGmtData()

void L1GlobalTriggerGTL::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 666 of file L1GlobalTriggerGTL.cc.

666  {
667  LogTrace("L1GlobalTrigger") << "\nL1GlobalTrigger: GMT data received for BxInEvent = " << iBxInEvent << std::endl;
668 
669  int nrL1Mu = m_candL1Mu->size();
670  LogTrace("L1GlobalTrigger") << "Number of GMT muons = " << nrL1Mu << "\n" << std::endl;
671 
672  for (std::vector<const L1MuGMTCand *>::const_iterator iter = m_candL1Mu->begin(); iter != m_candL1Mu->end(); iter++) {
673  LogTrace("L1GlobalTrigger") << *(*iter) << std::endl;
674  }
675 
676  LogTrace("L1GlobalTrigger") << std::endl;
677 }

References LogTrace, and m_candL1Mu.

Referenced by receiveGmtObjectData().

◆ receiveGmtObjectData()

void L1GlobalTriggerGTL::receiveGmtObjectData ( edm::Event iEvent,
const edm::InputTag muGmtInputTag,
const int  iBxInEvent,
const bool  receiveMu,
const int  nrL1Mu 
)

receive data from Global Muon Trigger

Definition at line 116 of file L1GlobalTriggerGTL.cc.

120  {
121  if (m_verbosity) {
122  LogDebug("L1GlobalTrigger") << "\n**** L1GlobalTriggerGTL receiving muon data for BxInEvent = " << iBxInEvent
123  << "\n from input tag " << muGmtInputTag << "\n"
124  << std::endl;
125  }
126 
127  reset();
128 
129  // get data from Global Muon Trigger
130  if (receiveMu) {
132  iEvent.getByLabel(muGmtInputTag, muonData);
133 
134  if (!muonData.isValid()) {
135  if (m_verbosity) {
136  edm::LogWarning("L1GlobalTrigger") << "\nWarning: std::vector<L1MuGMTCand> with input tag " << muGmtInputTag
137  << "\nrequested in configuration, but not found in the event.\n"
138  << std::endl;
139  }
140  } else {
141  std::vector<L1MuGMTCand>::const_iterator itMuon;
142  for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
143  if ((*itMuon).bx() == iBxInEvent) {
144  (*m_candL1Mu).push_back(&(*itMuon));
145  // LogTrace("L1GlobalTrigger") << (*itMuon)
146  // << std::endl;
147  }
148  }
149  }
150  }
151 
152  if (m_verbosity && m_isDebugEnabled) {
153  printGmtData(iBxInEvent);
154  }
155 }

References iEvent, edm::HandleBase::isValid(), LogDebug, m_isDebugEnabled, m_verbosity, printGmtData(), and reset().

Referenced by L1GlobalTrigger::produce().

◆ reset()

void L1GlobalTriggerGTL::reset ( void  )

clear GTL

Definition at line 658 of file L1GlobalTriggerGTL.cc.

658  {
659  m_candL1Mu->clear();
660 
661  m_gtlDecisionWord.reset();
662  m_gtlAlgorithmOR.reset();
663 }

References m_candL1Mu, m_gtlAlgorithmOR, and m_gtlDecisionWord.

Referenced by L1GlobalTrigger::produce(), receiveGmtObjectData(), and ~L1GlobalTriggerGTL().

◆ run()

void L1GlobalTriggerGTL::run ( edm::Event iEvent,
const edm::EventSetup evSetup,
const L1GlobalTriggerPSB ptrGtPSB,
const bool  produceL1GtObjectMapRecord,
const int  iBxInEvent,
L1GlobalTriggerObjectMapRecord gtObjectMapRecord,
const unsigned int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1NoIsoEG,
const int  nrL1IsoEG,
const int  nrL1CenJet,
const int  nrL1ForJet,
const int  nrL1TauJet,
const int  nrL1JetCounts,
const int  ifMuEtaNumberBits,
const int  ifCaloEtaNumberBits 
)

run the GTL

Definition at line 158 of file L1GlobalTriggerGTL.cc.

173  {
174  // get / update the trigger menu from the EventSetup
175  // local cache & check on cacheIdentifier
176 
177  unsigned long long l1GtMenuCacheID = evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
178 
179  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
181  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
182  m_l1GtMenu = l1GtMenu.product();
183  m_l1GtMenuCacheID = l1GtMenuCacheID;
184  }
185 
186  const std::vector<ConditionMap> &conditionMap = m_l1GtMenu->gtConditionMap();
187  const AlgorithmMap &algorithmMap = m_l1GtMenu->gtAlgorithmMap();
188 
189  const std::vector<std::vector<L1GtMuonTemplate>> &corrMuon = m_l1GtMenu->corMuonTemplate();
190 
191  const std::vector<std::vector<L1GtCaloTemplate>> &corrCalo = m_l1GtMenu->corCaloTemplate();
192 
193  const std::vector<std::vector<L1GtEnergySumTemplate>> &corrEnergySum = m_l1GtMenu->corEnergySumTemplate();
194 
195  // conversion needed for correlation conditions
196  // done in the condition loop when the first correlation template is in the
197  // menu
198  bool convertScale = false;
199 
200  // get / update the calorimeter geometry from the EventSetup
201  // local cache & check on cacheIdentifier
202  unsigned long long l1CaloGeometryCacheID = evSetup.get<L1CaloGeometryRecord>().cacheIdentifier();
203 
204  if (m_l1CaloGeometryCacheID != l1CaloGeometryCacheID) {
207  m_l1CaloGeometry = l1CaloGeometry.product();
208 
209  m_l1CaloGeometryCacheID = l1CaloGeometryCacheID;
210  convertScale = true;
211  }
212 
213  // get / update the eta and phi muon trigger scales from the EventSetup
214  // local cache & check on cacheIdentifier
215  unsigned long long l1MuTriggerScalesCacheID = evSetup.get<L1MuTriggerScalesRcd>().cacheIdentifier();
216 
217  if (m_l1MuTriggerScalesCacheID != l1MuTriggerScalesCacheID) {
218  edm::ESHandle<L1MuTriggerScales> l1MuTriggerScales;
219  evSetup.get<L1MuTriggerScalesRcd>().get(l1MuTriggerScales);
220  m_l1MuTriggerScales = l1MuTriggerScales.product();
221 
222  m_l1MuTriggerScalesCacheID = l1MuTriggerScalesCacheID;
223  convertScale = true;
224  }
225 
226  if (convertScale) {
229  m_l1CaloGeometry, m_l1MuTriggerScales, ifCaloEtaNumberBits, ifMuEtaNumberBits);
230 
231  // print the conversions if DEBUG and verbosity enabled
232 
233  if (m_verbosity && m_isDebugEnabled) {
234  std::ostringstream myCout;
235  m_gtEtaPhiConversions->print(myCout);
236 
237  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
238  }
239 
240  // set convertScale to false to avoid executing the conversion
241  // more than once - in case the scales change it will be set to true
242  // in the cache check
243  convertScale = false;
244  }
245 
246  // loop over condition maps (one map per condition chip)
247  // then loop over conditions in the map
248  // save the results in temporary maps
249 
250  // never happens in production but at first event...
251  if (m_conditionResultMaps.size() != conditionMap.size()) {
252  m_conditionResultMaps.clear();
253  m_conditionResultMaps.resize(conditionMap.size());
254  }
255 
256  int iChip = -1;
257 
258  for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
259  itCondOnChip != conditionMap.end();
260  itCondOnChip++) {
261  iChip++;
262 
263  // L1GtAlgorithmEvaluation::ConditionEvaluationMap cMapResults;
264  // L1GtAlgorithmEvaluation::ConditionEvaluationMap
265  // cMapResults((*itCondOnChip).size()); // hash map
267 
268  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
269  // evaluate condition
270  switch ((itCond->second)->condCategory()) {
271  case CondMuon: {
272  L1GtMuonCondition *muCondition = new L1GtMuonCondition(itCond->second, this, nrL1Mu, ifMuEtaNumberBits);
273 
274  muCondition->setVerbosity(m_verbosity);
276  muCondition->evaluateConditionStoreResult();
277 
278  cMapResults[itCond->first] = muCondition;
279 
280  if (m_verbosity && m_isDebugEnabled) {
281  std::ostringstream myCout;
282  muCondition->print(myCout);
283 
284  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
285  }
286 
287  // delete muCondition;
288 
289  } break;
290  case CondCalo: {
291  L1GtCaloCondition *caloCondition = new L1GtCaloCondition(
292  itCond->second, ptrGtPSB, nrL1NoIsoEG, nrL1IsoEG, nrL1CenJet, nrL1ForJet, nrL1TauJet, ifCaloEtaNumberBits);
293 
294  caloCondition->setVerbosity(m_verbosity);
295  caloCondition->setGtCorrParDeltaPhiNrBins(
296  (m_gtEtaPhiConversions->gtObjectNrBinsPhi(((itCond->second)->objectType())[0])) / 2 + 1);
297  caloCondition->evaluateConditionStoreResult();
298 
299  cMapResults[itCond->first] = caloCondition;
300 
301  if (m_verbosity && m_isDebugEnabled) {
302  std::ostringstream myCout;
303  caloCondition->print(myCout);
304 
305  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
306  }
307  // delete caloCondition;
308 
309  } break;
310  case CondEnergySum: {
311  L1GtEnergySumCondition *eSumCondition = new L1GtEnergySumCondition(itCond->second, ptrGtPSB);
312 
313  eSumCondition->setVerbosity(m_verbosity);
314  eSumCondition->evaluateConditionStoreResult();
315 
316  cMapResults[itCond->first] = eSumCondition;
317 
318  if (m_verbosity && m_isDebugEnabled) {
319  std::ostringstream myCout;
320  eSumCondition->print(myCout);
321 
322  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
323  }
324  // delete eSumCondition;
325 
326  } break;
327  case CondJetCounts: {
328  L1GtJetCountsCondition *jcCondition = new L1GtJetCountsCondition(itCond->second, ptrGtPSB, nrL1JetCounts);
329 
330  jcCondition->setVerbosity(m_verbosity);
331  jcCondition->evaluateConditionStoreResult();
332 
333  cMapResults[itCond->first] = jcCondition;
334 
335  if (m_verbosity && m_isDebugEnabled) {
336  std::ostringstream myCout;
337  jcCondition->print(myCout);
338 
339  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
340  }
341 
342  // delete jcCondition;
343 
344  } break;
345  case CondHfBitCounts: {
346  L1GtHfBitCountsCondition *bcCondition = new L1GtHfBitCountsCondition(itCond->second, ptrGtPSB);
347 
348  bcCondition->setVerbosity(m_verbosity);
349  bcCondition->evaluateConditionStoreResult();
350 
351  cMapResults[itCond->first] = bcCondition;
352 
353  if (m_isDebugEnabled) {
354  std::ostringstream myCout;
355  bcCondition->print(myCout);
356 
357  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
358  }
359 
360  // delete bcCondition;
361 
362  } break;
363  case CondHfRingEtSums: {
364  L1GtHfRingEtSumsCondition *etCondition = new L1GtHfRingEtSumsCondition(itCond->second, ptrGtPSB);
365 
366  etCondition->setVerbosity(m_verbosity);
367  etCondition->evaluateConditionStoreResult();
368 
369  cMapResults[itCond->first] = etCondition;
370 
371  if (m_verbosity && m_isDebugEnabled) {
372  std::ostringstream myCout;
373  etCondition->print(myCout);
374 
375  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
376  }
377 
378  // delete etCondition;
379 
380  } break;
381  case CondCastor: {
382  bool castorCondResult = false;
383 
384  // FIXME need a solution to read CASTOR
385  // if (castorConditionFlag) {
386  // castorCondResult = castorData->conditionResult(itCond->first);
387  //}
388 
389  L1GtCastorCondition *castorCondition = new L1GtCastorCondition(itCond->second, castorCondResult);
390 
391  castorCondition->setVerbosity(m_verbosity);
392  castorCondition->evaluateConditionStoreResult();
393 
394  cMapResults[itCond->first] = castorCondition;
395 
396  if (m_verbosity && m_isDebugEnabled) {
397  std::ostringstream myCout;
398  castorCondition->print(myCout);
399 
400  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
401  }
402 
403  // delete castorCondition;
404 
405  } break;
406  case CondBptx: {
407  bool bptxCondResult = true;
408 
409  // FIXME need a solution to read BPTX with real value
410 
411  L1GtBptxCondition *bptxCondition = new L1GtBptxCondition(itCond->second, bptxCondResult);
412 
413  bptxCondition->setVerbosity(m_verbosity);
414  bptxCondition->evaluateConditionStoreResult();
415 
416  cMapResults[itCond->first] = bptxCondition;
417 
418  if (m_verbosity && m_isDebugEnabled) {
419  std::ostringstream myCout;
420  bptxCondition->print(myCout);
421 
422  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
423  }
424 
425  // delete bptxCondition;
426 
427  } break;
428  case CondExternal: {
429  bool externalCondResult = true;
430 
431  // FIXME need a solution to read External with real value
432 
433  L1GtExternalCondition *externalCondition = new L1GtExternalCondition(itCond->second, externalCondResult);
434 
435  externalCondition->setVerbosity(m_verbosity);
436  externalCondition->evaluateConditionStoreResult();
437 
438  cMapResults[itCond->first] = externalCondition;
439 
440  if (m_verbosity && m_isDebugEnabled) {
441  std::ostringstream myCout;
442  externalCondition->print(myCout);
443 
444  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
445  }
446 
447  // delete externalCondition;
448 
449  } break;
450  case CondCorrelation: {
451  // get first the sub-conditions
452  const L1GtCorrelationTemplate *corrTemplate = static_cast<const L1GtCorrelationTemplate *>(itCond->second);
453  const L1GtConditionCategory cond0Categ = corrTemplate->cond0Category();
454  const L1GtConditionCategory cond1Categ = corrTemplate->cond1Category();
455  const int cond0Ind = corrTemplate->cond0Index();
456  const int cond1Ind = corrTemplate->cond1Index();
457 
458  const L1GtCondition *cond0Condition = nullptr;
459  const L1GtCondition *cond1Condition = nullptr;
460 
461  // maximum number of objects received for evaluation of Type1s condition
462  int cond0NrL1Objects = 0;
463  int cond1NrL1Objects = 0;
464 
465  int cond0EtaBits = 0;
466  int cond1EtaBits = 0;
467 
468  switch (cond0Categ) {
469  case CondMuon: {
470  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
471  cond0NrL1Objects = nrL1Mu;
472  cond0EtaBits = ifMuEtaNumberBits;
473  } break;
474  case CondCalo: {
475  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
476 
477  switch ((cond0Condition->objectType())[0]) {
478  case NoIsoEG:
479  cond0NrL1Objects = nrL1NoIsoEG;
480  break;
481  case IsoEG:
482  cond0NrL1Objects = nrL1IsoEG;
483  break;
484  case CenJet:
485  cond0NrL1Objects = nrL1CenJet;
486  break;
487  case ForJet:
488  cond0NrL1Objects = nrL1ForJet;
489  break;
490  case TauJet:
491  cond0NrL1Objects = nrL1TauJet;
492  break;
493  default:
494  cond0NrL1Objects = 0;
495  break;
496  }
497 
498  cond0EtaBits = ifCaloEtaNumberBits;
499  } break;
500  case CondEnergySum: {
501  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
502  cond0NrL1Objects = 1;
503  } break;
504  default: {
505  // do nothing, should not arrive here
506  } break;
507  }
508 
509  switch (cond1Categ) {
510  case CondMuon: {
511  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
512  cond1NrL1Objects = nrL1Mu;
513  cond1EtaBits = ifMuEtaNumberBits;
514  } break;
515  case CondCalo: {
516  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
517 
518  switch ((cond1Condition->objectType())[0]) {
519  case NoIsoEG:
520  cond1NrL1Objects = nrL1NoIsoEG;
521  break;
522  case IsoEG:
523  cond1NrL1Objects = nrL1IsoEG;
524  break;
525  case CenJet:
526  cond1NrL1Objects = nrL1CenJet;
527  break;
528  case ForJet:
529  cond1NrL1Objects = nrL1ForJet;
530  break;
531  case TauJet:
532  cond1NrL1Objects = nrL1TauJet;
533  break;
534  default:
535  cond1NrL1Objects = 0;
536  break;
537  }
538 
539  cond1EtaBits = ifCaloEtaNumberBits;
540  } break;
541  case CondEnergySum: {
542  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
543  cond1NrL1Objects = 1;
544  } break;
545  default: {
546  // do nothing, should not arrive here
547  } break;
548  }
549 
550  L1GtCorrelationCondition *correlationCond = new L1GtCorrelationCondition(itCond->second,
551  cond0Condition,
552  cond1Condition,
553  cond0NrL1Objects,
554  cond1NrL1Objects,
555  cond0EtaBits,
556  cond1EtaBits,
557  this,
558  ptrGtPSB,
560 
561  correlationCond->setVerbosity(m_verbosity);
562  correlationCond->evaluateConditionStoreResult();
563 
564  cMapResults[itCond->first] = correlationCond;
565 
566  if (m_verbosity && m_isDebugEnabled) {
567  std::ostringstream myCout;
568  correlationCond->print(myCout);
569 
570  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
571  }
572 
573  // delete correlationCond;
574 
575  } break;
576  case CondNull: {
577  // do nothing
578 
579  } break;
580  default: {
581  // do nothing
582 
583  } break;
584  }
585  }
586  }
587 
588  // loop over algorithm map
589 
590  // empty vector for object maps - filled during loop
591  std::vector<L1GlobalTriggerObjectMap> objMapVec;
592  if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
593  objMapVec.reserve(numberPhysTriggers);
594 
595  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
596  L1GtAlgorithmEvaluation gtAlg(itAlgo->second);
597  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
598 
599  int algBitNumber = (itAlgo->second).algoBitNumber();
600  bool algResult = gtAlg.gtAlgoResult();
601 
602  if (algResult) {
603  m_gtlAlgorithmOR.set(algBitNumber);
604  }
605 
606  if (m_verbosity && m_isDebugEnabled) {
607  std::ostringstream myCout;
608  (itAlgo->second).print(myCout);
609  gtAlg.print(myCout);
610 
611  LogTrace("L1GlobalTrigger") << myCout.str() << std::endl;
612  }
613 
614  // object maps only for BxInEvent = 0
615  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
616  // set object map
618 
619  objMap.setAlgoName(itAlgo->first);
620  objMap.setAlgoBitNumber(algBitNumber);
621  objMap.setAlgoGtlResult(algResult);
622  objMap.swapOperandTokenVector(gtAlg.operandTokenVector());
623  objMap.swapCombinationVector(gtAlg.gtAlgoCombinationVector());
624  // gtAlg is empty now...
625 
626  if (m_verbosity && m_isDebugEnabled) {
627  std::ostringstream myCout1;
628  objMap.print(myCout1);
629 
630  LogTrace("L1GlobalTrigger") << myCout1.str() << std::endl;
631  }
632 
633  objMapVec.push_back(objMap);
634  }
635  }
636 
637  // object maps only for BxInEvent = 0
638  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
639  gtObjectMapRecord->swapGtObjectMap(objMapVec);
640  }
641 
642  // loop over condition maps (one map per condition chip)
643  // then loop over conditions in the map
644  // delete the conditions created with new, zero pointer, do not clear map,
645  // keep the vector as is...
646  for (std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
647  m_conditionResultMaps.begin();
648  itCondOnChip != m_conditionResultMaps.end();
649  itCondOnChip++) {
650  for (L1GtAlgorithmEvaluation::ItEvalMap itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
651  delete itCond->second;
652  itCond->second = nullptr;
653  }
654  }
655 }

References CenJet, L1GtCorrelationTemplate::cond0Category(), L1GtCorrelationTemplate::cond0Index(), L1GtCorrelationTemplate::cond1Category(), L1GtCorrelationTemplate::cond1Index(), CondBptx, CondCalo, CondCastor, CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, CondMuon, CondNull, L1GtEtaPhiConversions::convertL1Scales(), L1GtTriggerMenu::corCaloTemplate(), L1GtTriggerMenu::corEnergySumTemplate(), L1GtTriggerMenu::corMuonTemplate(), L1GtAlgorithmEvaluation::evaluateAlgorithm(), L1GtConditionEvaluation::evaluateConditionStoreResult(), ForJet, edm::EventSetup::get(), get, L1GtAlgorithmEvaluation::gtAlgoCombinationVector(), L1GtAlgorithmEvaluation::gtAlgoResult(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtTriggerMenu::gtConditionMap(), L1GtEtaPhiConversions::gtObjectNrBinsPhi(), IsoEG, l1CaloGeometry_cfi::l1CaloGeometry, LogTrace, m_conditionResultMaps, m_gtEtaPhiConversions, m_gtlAlgorithmOR, m_isDebugEnabled, m_l1CaloGeometry, m_l1CaloGeometryCacheID, m_l1GtMenu, m_l1GtMenuCacheID, m_l1MuTriggerScales, m_l1MuTriggerScalesCacheID, m_verbosity, Mu, NoIsoEG, L1GtCondition::objectType(), L1GtAlgorithmEvaluation::operandTokenVector(), L1GtHfBitCountsCondition::print(), L1GtHfRingEtSumsCondition::print(), L1GtCastorCondition::print(), L1GtBptxCondition::print(), L1GtExternalCondition::print(), L1GtJetCountsCondition::print(), L1GtEnergySumCondition::print(), L1GtMuonCondition::print(), L1GtCaloCondition::print(), edm::print(), L1GtCorrelationCondition::print(), L1GtEtaPhiConversions::print(), L1GtAlgorithmEvaluation::print(), L1GlobalTriggerObjectMap::print(), edm::ESHandle< T >::product(), L1GlobalTriggerObjectMap::setAlgoBitNumber(), L1GlobalTriggerObjectMap::setAlgoGtlResult(), L1GlobalTriggerObjectMap::setAlgoName(), L1GtMuonCondition::setGtCorrParDeltaPhiNrBins(), L1GtCaloCondition::setGtCorrParDeltaPhiNrBins(), L1GtEtaPhiConversions::setVerbosity(), L1GtConditionEvaluation::setVerbosity(), L1GlobalTriggerObjectMap::swapCombinationVector(), L1GlobalTriggerObjectMapRecord::swapGtObjectMap(), L1GlobalTriggerObjectMap::swapOperandTokenVector(), and TauJet.

Referenced by L1GlobalTrigger::produce().

◆ setVerbosity()

void L1GlobalTriggerGTL::setVerbosity ( const int  verbosity)
inline

Member Data Documentation

◆ m_candL1Mu

std::vector<const L1MuGMTCand *>* L1GlobalTriggerGTL::m_candL1Mu
private

Definition at line 119 of file L1GlobalTriggerGTL.h.

Referenced by getCandL1Mu(), init(), printGmtData(), reset(), and ~L1GlobalTriggerGTL().

◆ m_conditionResultMaps

std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap> L1GlobalTriggerGTL::m_conditionResultMaps
private

Definition at line 125 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_gtEtaPhiConversions

L1GtEtaPhiConversions* L1GlobalTriggerGTL::m_gtEtaPhiConversions
private

Definition at line 116 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), run(), and ~L1GlobalTriggerGTL().

◆ m_gtlAlgorithmOR

std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers> L1GlobalTriggerGTL::m_gtlAlgorithmOR
private

Definition at line 121 of file L1GlobalTriggerGTL.h.

Referenced by getAlgorithmOR(), L1GlobalTriggerGTL(), reset(), and run().

◆ m_gtlDecisionWord

std::bitset<L1GlobalTriggerReadoutSetup::NumberPhysTriggers> L1GlobalTriggerGTL::m_gtlDecisionWord
private

Definition at line 122 of file L1GlobalTriggerGTL.h.

Referenced by getDecisionWord(), L1GlobalTriggerGTL(), and reset().

◆ m_isDebugEnabled

bool L1GlobalTriggerGTL::m_isDebugEnabled
private

Definition at line 130 of file L1GlobalTriggerGTL.h.

Referenced by receiveGmtObjectData(), and run().

◆ m_l1CaloGeometry

const L1CaloGeometry* L1GlobalTriggerGTL::m_l1CaloGeometry
private

Definition at line 109 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1CaloGeometryCacheID

unsigned long long L1GlobalTriggerGTL::m_l1CaloGeometryCacheID
private

Definition at line 110 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), and run().

◆ m_l1GtMenu

const L1GtTriggerMenu* L1GlobalTriggerGTL::m_l1GtMenu
private

Definition at line 105 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1GtMenuCacheID

unsigned long long L1GlobalTriggerGTL::m_l1GtMenuCacheID
private

Definition at line 106 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), and run().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* L1GlobalTriggerGTL::m_l1MuTriggerScales
private

Definition at line 112 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1MuTriggerScalesCacheID

unsigned long long L1GlobalTriggerGTL::m_l1MuTriggerScalesCacheID
private

Definition at line 113 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), and run().

◆ m_verbosity

int L1GlobalTriggerGTL::m_verbosity
private

verbosity level

Definition at line 129 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), receiveGmtObjectData(), run(), and setVerbosity().

HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1GtCorrelationTemplate::cond0Category
const L1GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
Definition: L1GtCorrelationTemplate.h:74
L1GtMuonCondition
Definition: L1GtMuonCondition.h:35
L1GtCondition
Definition: L1GtCondition.h:35
CondCastor
Definition: L1GtDefinitions.h:128
CItCond
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
Definition: L1GtTriggerMenuFwd.h:34
L1GtHfRingEtSumsCondition
Definition: L1GtHfRingEtSumsCondition.h:32
CondEnergySum
Definition: L1GtDefinitions.h:125
L1GtCaloCondition::setGtCorrParDeltaPhiNrBins
void setGtCorrParDeltaPhiNrBins(const int &)
Definition: L1GtCaloCondition.cc:135
L1GtJetCountsCondition
Definition: L1GtJetCountsCondition.h:33
L1GlobalTriggerObjectMap::setAlgoName
void setAlgoName(const std::string &algoNameValue)
Definition: L1GlobalTriggerObjectMap.h:45
L1GlobalTriggerGTL::m_l1CaloGeometry
const L1CaloGeometry * m_l1CaloGeometry
Definition: L1GlobalTriggerGTL.h:109
L1GtTriggerMenu::corMuonTemplate
const std::vector< std::vector< L1GtMuonTemplate > > & corMuonTemplate() const
Definition: L1GtTriggerMenu.h:169
L1GlobalTriggerGTL::m_l1MuTriggerScalesCacheID
unsigned long long m_l1MuTriggerScalesCacheID
Definition: L1GlobalTriggerGTL.h:113
L1GtCaloCondition
Definition: L1GtCaloCondition.h:35
L1GtEtaPhiConversions::setVerbosity
void setVerbosity(const int verbosity)
Definition: L1GtEtaPhiConversions.h:78
L1GtHfBitCountsCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtHfBitCountsCondition.cc:144
L1GtEtaPhiConversions::gtObjectNrBinsPhi
const unsigned int gtObjectNrBinsPhi(const L1GtObject &) const
return the number of phi bins for a GT object
Definition: L1GtEtaPhiConversions.cc:758
L1GlobalTriggerGTL::reset
void reset()
clear GTL
Definition: L1GlobalTriggerGTL.cc:658
L1GtExternalCondition
Definition: L1GtExternalCondition.h:32
L1GlobalTriggerGTL::m_l1CaloGeometryCacheID
unsigned long long m_l1CaloGeometryCacheID
Definition: L1GlobalTriggerGTL.h:110
L1GlobalTriggerObjectMap::setAlgoGtlResult
void setAlgoGtlResult(bool algoGtlResultValue)
Definition: L1GlobalTriggerObjectMap.h:56
NoIsoEG
Definition: L1GtObject.h:30
L1GtCondition::objectType
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:67
L1GlobalTriggerGTL::m_gtlAlgorithmOR
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlAlgorithmOR
Definition: L1GlobalTriggerGTL.h:121
L1GlobalTriggerGTL::m_conditionResultMaps
std::vector< L1GtAlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: L1GlobalTriggerGTL.h:125
L1GtCorrelationCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtCorrelationCondition.cc:769
L1GtCorrelationTemplate::cond1Category
const L1GtConditionCategory cond1Category() const
Definition: L1GtCorrelationTemplate.h:76
L1GlobalTriggerGTL::m_verbosity
int m_verbosity
verbosity level
Definition: L1GlobalTriggerGTL.h:129
L1GtCastorCondition
Definition: L1GtCastorCondition.h:32
IsoEG
Definition: L1GtObject.h:31
edm::Handle
Definition: AssociativeIterator.h:50
L1GtHfBitCountsCondition
Definition: L1GtHfBitCountsCondition.h:32
CondExternal
Definition: L1GtDefinitions.h:132
CondCorrelation
Definition: L1GtDefinitions.h:127
L1GlobalTriggerGTL::m_l1GtMenu
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GlobalTriggerGTL.h:105
L1GtEnergySumCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtEnergySumCondition.cc:251
L1GtConditionEvaluation::setVerbosity
void setVerbosity(const int verbosity)
Definition: L1GtConditionEvaluation.h:78
L1GlobalTriggerObjectMap
Definition: L1GlobalTriggerObjectMap.h:33
L1GtEtaPhiConversions::convertL1Scales
void convertL1Scales(const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
perform all scale conversions
Definition: L1GtEtaPhiConversions.cc:841
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
L1GtEtaPhiConversions
Definition: L1GtEtaPhiConversions.h:36
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1GlobalTriggerGTL::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: L1GlobalTriggerGTL.h:106
L1GtExternalCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtExternalCondition.cc:79
L1GtCorrelationTemplate
Definition: L1GtCorrelationTemplate.h:37
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
L1GlobalTriggerGTL::m_l1MuTriggerScales
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: L1GlobalTriggerGTL.h:112
CondMuon
Definition: L1GtDefinitions.h:123
L1GtConditionEvaluation::evaluateConditionStoreResult
void evaluateConditionStoreResult()
call evaluateCondition and save last result
Definition: L1GtConditionEvaluation.h:58
AlgorithmMap
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:31
edm::ESHandle< L1GtTriggerMenu >
CenJet
Definition: L1GtObject.h:32
L1GtMuonCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtMuonCondition.cc:476
L1GtConditionCategory
L1GtConditionCategory
condition categories
Definition: L1GtDefinitions.h:121
L1GlobalTriggerGTL::m_candL1Mu
std::vector< const L1MuGMTCand * > * m_candL1Mu
Definition: L1GlobalTriggerGTL.h:119
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
L1GlobalTriggerGTL::m_gtEtaPhiConversions
L1GtEtaPhiConversions * m_gtEtaPhiConversions
Definition: L1GlobalTriggerGTL.h:116
L1GtCorrelationCondition
Definition: L1GtCorrelationCondition.h:34
L1CaloGeometryRecord
Definition: L1CaloGeometryRecord.h:30
CondCalo
Definition: L1GtDefinitions.h:124
CondNull
Definition: L1GtDefinitions.h:122
L1GtCorrelationTemplate::cond0Index
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
Definition: L1GtCorrelationTemplate.h:82
edm::LogWarning
Definition: MessageLogger.h:141
L1GtCastorCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtCastorCondition.cc:79
CondJetCounts
Definition: L1GtDefinitions.h:126
TauJet
Definition: L1GtObject.h:34
L1GtTriggerMenu::corEnergySumTemplate
const std::vector< std::vector< L1GtEnergySumTemplate > > & corEnergySumTemplate() const
Definition: L1GtTriggerMenu.h:180
L1GtBptxCondition
Definition: L1GtBptxCondition.h:32
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
L1GlobalTriggerObjectMap::print
void print(std::ostream &myCout) const
print the full object map
Definition: L1GlobalTriggerObjectMap.cc:100
L1GtHfRingEtSumsCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtHfRingEtSumsCondition.cc:144
L1GtCaloCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtCaloCondition.cc:419
L1GlobalTriggerObjectMap::swapCombinationVector
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
Definition: L1GlobalTriggerObjectMap.h:65
iEvent
int iEvent
Definition: GenABIO.cc:224
CondHfBitCounts
Definition: L1GtDefinitions.h:129
get
#define get
L1GlobalTriggerGTL::m_gtlDecisionWord
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
Definition: L1GlobalTriggerGTL.h:122
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
L1MuTriggerScalesRcd
Definition: L1MuTriggerScalesRcd.h:12
L1GlobalTriggerObjectMapRecord::swapGtObjectMap
void swapGtObjectMap(std::vector< L1GlobalTriggerObjectMap > &gtObjectMapValue)
Definition: L1GlobalTriggerObjectMapRecord.h:70
L1GtBptxCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtBptxCondition.cc:77
L1GtTriggerMenu::corCaloTemplate
const std::vector< std::vector< L1GtCaloTemplate > > & corCaloTemplate() const
Definition: L1GtTriggerMenu.h:174
L1GtTriggerMenu::gtConditionMap
const std::vector< ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: L1GtTriggerMenu.h:80
CondBptx
Definition: L1GtDefinitions.h:131
Mu
Definition: L1GtObject.h:29
L1GtAlgorithmEvaluation
Definition: L1GtAlgorithmEvaluation.h:62
L1GlobalTriggerObjectMap::swapOperandTokenVector
void swapOperandTokenVector(std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
Definition: L1GlobalTriggerObjectMap.h:76
L1GtJetCountsCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtJetCountsCondition.cc:146
L1GtCorrelationTemplate::cond1Index
const int cond1Index() const
Definition: L1GtCorrelationTemplate.h:84
ForJet
Definition: L1GtObject.h:33
CondHfRingEtSums
Definition: L1GtDefinitions.h:130
L1GtAlgorithmEvaluation::ConditionEvaluationMap
__gnu_cxx ::hash_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
copy constructor
Definition: L1GtAlgorithmEvaluation.h:82
L1GlobalTriggerObjectMap::setAlgoBitNumber
void setAlgoBitNumber(int algoBitNumberValue)
Definition: L1GlobalTriggerObjectMap.h:50
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:71
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
L1GtAlgorithmEvaluation::ItEvalMap
ConditionEvaluationMap::iterator ItEvalMap
Definition: L1GtAlgorithmEvaluation.h:84
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
l1CaloGeometry_cfi.l1CaloGeometry
l1CaloGeometry
Definition: l1CaloGeometry_cfi.py:3
L1GlobalTriggerGTL::m_isDebugEnabled
bool m_isDebugEnabled
Definition: L1GlobalTriggerGTL.h:130
L1GtEnergySumCondition
Definition: L1GtEnergySumCondition.h:33
L1GtEtaPhiConversions::print
virtual void print(std::ostream &myCout) const
print all the performed conversions
Definition: L1GtEtaPhiConversions.cc:1195
L1GtTriggerMenu::gtAlgorithmMap
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenu.h:187
L1GtMuonCondition::setGtCorrParDeltaPhiNrBins
void setGtCorrParDeltaPhiNrBins(const int &)
Definition: L1GtMuonCondition.cc:100
L1GlobalTriggerGTL::printGmtData
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
Definition: L1GlobalTriggerGTL.cc:666