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 edm::ESGetToken< L1CaloGeometry, L1CaloGeometryRecordm_l1CaloGeometryToken
 
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcdm_l1GtMenuToken
 
const L1MuTriggerScalesm_l1MuTriggerScales
 
unsigned long long m_l1MuTriggerScalesCacheID
 
const edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcdm_l1MuTriggerScalesToken
 
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 48 of file L1GlobalTriggerGTL.h.

Constructor & Destructor Documentation

◆ L1GlobalTriggerGTL()

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

Definition at line 72 of file L1GlobalTriggerGTL.cc.

76  m_candL1Mu(new std::vector<const L1MuGMTCand *>),
78  m_gtlAlgorithmOR.reset();
79  m_gtlDecisionWord.reset();
80 
81  // initialize cached IDs
84 
85  // pointer to conversion - actually done in the event loop (cached)
88 
89  iC.consumes<std::vector<L1MuGMTCand>>(m_muGmtInputTag);
90 }

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

◆ ~L1GlobalTriggerGTL()

L1GlobalTriggerGTL::~L1GlobalTriggerGTL ( )
virtual

Definition at line 93 of file L1GlobalTriggerGTL.cc.

93  {
94  reset();
95  delete m_candL1Mu;
96  delete m_gtEtaPhiConversions;
97 }

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 94 of file L1GlobalTriggerGTL.h.

94  {
95  return m_gtlAlgorithmOR;
96  }

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 99 of file L1GlobalTriggerGTL.h.

99 { 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 89 of file L1GlobalTriggerGTL.h.

89  {
90  return m_gtlDecisionWord;
91  }

References m_gtlDecisionWord.

◆ init()

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

initialize the class (mainly reserve)

Definition at line 100 of file L1GlobalTriggerGTL.cc.

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

References m_candL1Mu.

Referenced by L1GlobalTrigger::produce().

◆ printGmtData()

void L1GlobalTriggerGTL::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 649 of file L1GlobalTriggerGTL.cc.

649  {
650  LogTrace("L1GlobalTrigger") << "\nL1GlobalTrigger: GMT data received for BxInEvent = " << iBxInEvent << std::endl;
651 
652  int nrL1Mu = m_candL1Mu->size();
653  LogTrace("L1GlobalTrigger") << "Number of GMT muons = " << nrL1Mu << "\n" << std::endl;
654 
655  for (std::vector<const L1MuGMTCand *>::const_iterator iter = m_candL1Mu->begin(); iter != m_candL1Mu->end(); iter++) {
656  LogTrace("L1GlobalTrigger") << *(*iter) << std::endl;
657  }
658 
659  LogTrace("L1GlobalTrigger") << std::endl;
660 }

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 114 of file L1GlobalTriggerGTL.cc.

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

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 641 of file L1GlobalTriggerGTL.cc.

641  {
642  m_candL1Mu->clear();
643 
644  m_gtlDecisionWord.reset();
645  m_gtlAlgorithmOR.reset();
646 }

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 156 of file L1GlobalTriggerGTL.cc.

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

References CenJet, L1GtCorrelationTemplate::cond0Category(), L1GtCorrelationTemplate::cond0Index(), L1GtCorrelationTemplate::cond1Category(), L1GtCorrelationTemplate::cond1Index(), CondBptx, CondCalo, CondCastor, CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, CondMuon, CondNull, L1GtEtaPhiConversions::convertL1Scales(), L1GtAlgorithmEvaluation::evaluateAlgorithm(), L1GtConditionEvaluation::evaluateConditionStoreResult(), ForJet, edm::EventSetup::get(), edm::EventSetup::getData(), L1GtAlgorithmEvaluation::gtAlgoCombinationVector(), L1GtAlgorithmEvaluation::gtAlgoResult(), L1GtEtaPhiConversions::gtObjectNrBinsPhi(), IsoEG, LogTrace, m_conditionResultMaps, m_gtEtaPhiConversions, m_gtlAlgorithmOR, m_isDebugEnabled, m_l1CaloGeometry, m_l1CaloGeometryCacheID, m_l1CaloGeometryToken, m_l1GtMenuToken, m_l1MuTriggerScales, m_l1MuTriggerScalesCacheID, m_l1MuTriggerScalesToken, m_verbosity, Mu, NoIsoEG, L1GtCondition::objectType(), L1GtAlgorithmEvaluation::operandTokenVector(), print(), L1GtHfRingEtSumsCondition::print(), L1GtCastorCondition::print(), L1GtBptxCondition::print(), L1GtExternalCondition::print(), L1GtHfBitCountsCondition::print(), L1GtEnergySumCondition::print(), L1GtJetCountsCondition::print(), L1GtMuonCondition::print(), L1GtCaloCondition::print(), L1GtCorrelationCondition::print(), L1GtEtaPhiConversions::print(), L1GtAlgorithmEvaluation::print(), L1GlobalTriggerObjectMap::print(), 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 123 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 129 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_gtEtaPhiConversions

L1GtEtaPhiConversions* L1GlobalTriggerGTL::m_gtEtaPhiConversions
private

Definition at line 120 of file L1GlobalTriggerGTL.h.

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

◆ m_gtlAlgorithmOR

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

Definition at line 125 of file L1GlobalTriggerGTL.h.

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

◆ m_gtlDecisionWord

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

Definition at line 126 of file L1GlobalTriggerGTL.h.

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

◆ m_isDebugEnabled

bool L1GlobalTriggerGTL::m_isDebugEnabled
private

Definition at line 134 of file L1GlobalTriggerGTL.h.

Referenced by receiveGmtObjectData(), and run().

◆ m_l1CaloGeometry

const L1CaloGeometry* L1GlobalTriggerGTL::m_l1CaloGeometry
private

Definition at line 112 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1CaloGeometryCacheID

unsigned long long L1GlobalTriggerGTL::m_l1CaloGeometryCacheID
private

Definition at line 113 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), and run().

◆ m_l1CaloGeometryToken

const edm::ESGetToken<L1CaloGeometry, L1CaloGeometryRecord> L1GlobalTriggerGTL::m_l1CaloGeometryToken
private

Definition at line 111 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1GtMenuToken

const edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> L1GlobalTriggerGTL::m_l1GtMenuToken
private

Definition at line 108 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* L1GlobalTriggerGTL::m_l1MuTriggerScales
private

Definition at line 116 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_l1MuTriggerScalesCacheID

unsigned long long L1GlobalTriggerGTL::m_l1MuTriggerScalesCacheID
private

Definition at line 117 of file L1GlobalTriggerGTL.h.

Referenced by L1GlobalTriggerGTL(), and run().

◆ m_l1MuTriggerScalesToken

const edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> L1GlobalTriggerGTL::m_l1MuTriggerScalesToken
private

Definition at line 115 of file L1GlobalTriggerGTL.h.

Referenced by run().

◆ m_verbosity

int L1GlobalTriggerGTL::m_verbosity
private

verbosity level

Definition at line 133 of file L1GlobalTriggerGTL.h.

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

HIPAlignmentAlgorithm_cfi.verbosity
verbosity
Definition: HIPAlignmentAlgorithm_cfi.py:7
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
CItCond
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
Definition: L1GtTriggerMenuFwd.h:34
L1GtHfRingEtSumsCondition
Definition: L1GtHfRingEtSumsCondition.h:32
L1GtCaloCondition::setGtCorrParDeltaPhiNrBins
void setGtCorrParDeltaPhiNrBins(const int &)
Definition: L1GtCaloCondition.cc:135
CondBptx
Definition: L1GtDefinitions.h:36
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:112
L1GlobalTriggerGTL::m_l1MuTriggerScalesCacheID
unsigned long long m_l1MuTriggerScalesCacheID
Definition: L1GlobalTriggerGTL.h:117
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
CondMuon
Definition: L1GtDefinitions.h:28
L1GlobalTriggerGTL::reset
void reset()
clear GTL
Definition: L1GlobalTriggerGTL.cc:641
L1GtExternalCondition
Definition: L1GtExternalCondition.h:32
L1GlobalTriggerGTL::m_l1CaloGeometryCacheID
unsigned long long m_l1CaloGeometryCacheID
Definition: L1GlobalTriggerGTL.h:113
L1GlobalTriggerObjectMap::setAlgoGtlResult
void setAlgoGtlResult(bool algoGtlResultValue)
Definition: L1GlobalTriggerObjectMap.h:56
NoIsoEG
Definition: L1GtObject.h:30
CondEnergySum
Definition: L1GtDefinitions.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:125
L1GlobalTriggerGTL::m_conditionResultMaps
std::vector< L1GtAlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: L1GlobalTriggerGTL.h:129
L1GlobalTriggerGTL::m_l1CaloGeometryToken
const edm::ESGetToken< L1CaloGeometry, L1CaloGeometryRecord > m_l1CaloGeometryToken
Definition: L1GlobalTriggerGTL.h:111
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:133
CondJetCounts
Definition: L1GtDefinitions.h:31
L1GtCastorCondition
Definition: L1GtCastorCondition.h:32
IsoEG
Definition: L1GtObject.h:31
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1GtHfBitCountsCondition
Definition: L1GtHfBitCountsCondition.h:32
L1GtConditionCategory
L1GtConditionCategory
condition categories
Definition: L1GtDefinitions.h:26
L1GtEnergySumCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtEnergySumCondition.cc:251
CondNull
Definition: L1GtDefinitions.h:27
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
L1GlobalTriggerGTL::m_l1MuTriggerScalesToken
const edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > m_l1MuTriggerScalesToken
Definition: L1GlobalTriggerGTL.h:115
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
L1GtEtaPhiConversions
Definition: L1GtEtaPhiConversions.h:36
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1GtExternalCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtExternalCondition.cc:79
L1GtCorrelationTemplate
Definition: L1GtCorrelationTemplate.h:37
L1GlobalTriggerGTL::m_l1MuTriggerScales
const L1MuTriggerScales * m_l1MuTriggerScales
Definition: L1GlobalTriggerGTL.h:116
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
CenJet
Definition: L1GtObject.h:32
L1GtMuonCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtMuonCondition.cc:476
L1GlobalTriggerGTL::m_candL1Mu
std::vector< const L1MuGMTCand * > * m_candL1Mu
Definition: L1GlobalTriggerGTL.h:123
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
CondExternal
Definition: L1GtDefinitions.h:37
L1GlobalTriggerGTL::m_gtEtaPhiConversions
L1GtEtaPhiConversions * m_gtEtaPhiConversions
Definition: L1GlobalTriggerGTL.h:120
L1GlobalTriggerGTL::m_l1GtMenuToken
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_l1GtMenuToken
Definition: L1GlobalTriggerGTL.h:108
L1GtCorrelationCondition
Definition: L1GtCorrelationCondition.h:34
L1CaloGeometryRecord
Definition: L1CaloGeometryRecord.h:30
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
L1GtCastorCondition::print
void print(std::ostream &myCout) const override
print condition
Definition: L1GtCastorCondition.cc:79
TauJet
Definition: L1GtObject.h:34
L1GtBptxCondition
Definition: L1GtBptxCondition.h:32
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
L1GlobalTriggerObjectMap::print
void print(std::ostream &myCout) const
print the full object map
Definition: L1GlobalTriggerObjectMap.cc:100
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
CondCastor
Definition: L1GtDefinitions.h:33
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
CondCalo
Definition: L1GtDefinitions.h:29
L1GlobalTriggerGTL::m_gtlDecisionWord
std::bitset< L1GlobalTriggerReadoutSetup::NumberPhysTriggers > m_gtlDecisionWord
Definition: L1GlobalTriggerGTL.h:126
L1MuTriggerScalesRcd
Definition: L1MuTriggerScalesRcd.h:12
CondHfBitCounts
Definition: L1GtDefinitions.h:34
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
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
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:35
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:12
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
L1GtAlgorithmEvaluation::ItEvalMap
ConditionEvaluationMap::iterator ItEvalMap
Definition: L1GtAlgorithmEvaluation.h:84
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1GlobalTriggerGTL::m_isDebugEnabled
bool m_isDebugEnabled
Definition: L1GlobalTriggerGTL.h:134
L1GtEnergySumCondition
Definition: L1GtEnergySumCondition.h:33
L1GtEtaPhiConversions::print
virtual void print(std::ostream &myCout) const
print all the performed conversions
Definition: L1GtEtaPhiConversions.cc:1195
L1GtMuonCondition::setGtCorrParDeltaPhiNrBins
void setGtCorrParDeltaPhiNrBins(const int &)
Definition: L1GtMuonCondition.cc:100
CondCorrelation
Definition: L1GtDefinitions.h:32
L1GlobalTriggerGTL::printGmtData
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
Definition: L1GlobalTriggerGTL.cc:649