20 #include <ext/hash_map>
91 iC.consumes<std::vector<L1MuGMTCand>>(m_muGmtInputTag);
118 const int iBxInEvent,
119 const bool receiveMu,
122 LogDebug(
"L1GlobalTrigger") <<
"\n**** L1GlobalTriggerGTL receiving muon data for BxInEvent = " << iBxInEvent
123 <<
"\n from input tag " << muGmtInputTag <<
"\n"
132 iEvent.getByLabel(muGmtInputTag, muonData);
136 edm::LogWarning(
"L1GlobalTrigger") <<
"\nWarning: std::vector<L1MuGMTCand> with input tag " << muGmtInputTag
137 <<
"\nrequested in configuration, but not found in the event.\n"
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));
161 const bool produceL1GtObjectMapRecord,
162 const int iBxInEvent,
164 const unsigned int numberPhysTriggers,
166 const int nrL1NoIsoEG,
168 const int nrL1CenJet,
169 const int nrL1ForJet,
170 const int nrL1TauJet,
171 const int nrL1JetCounts,
172 const int ifMuEtaNumberBits,
173 const int ifCaloEtaNumberBits) {
198 bool convertScale =
false;
234 std::ostringstream myCout;
237 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
243 convertScale =
false;
258 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
259 itCondOnChip != conditionMap.end();
268 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
270 switch ((itCond->second)->condCategory()) {
278 cMapResults[itCond->first] = muCondition;
281 std::ostringstream myCout;
282 muCondition->
print(myCout);
284 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
292 itCond->second, ptrGtPSB, nrL1NoIsoEG, nrL1IsoEG, nrL1CenJet, nrL1ForJet, nrL1TauJet, ifCaloEtaNumberBits);
299 cMapResults[itCond->first] = caloCondition;
302 std::ostringstream myCout;
303 caloCondition->
print(myCout);
305 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
316 cMapResults[itCond->first] = eSumCondition;
319 std::ostringstream myCout;
320 eSumCondition->
print(myCout);
322 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
333 cMapResults[itCond->first] = jcCondition;
336 std::ostringstream myCout;
337 jcCondition->
print(myCout);
339 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
351 cMapResults[itCond->first] = bcCondition;
354 std::ostringstream myCout;
355 bcCondition->
print(myCout);
357 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
369 cMapResults[itCond->first] = etCondition;
372 std::ostringstream myCout;
373 etCondition->
print(myCout);
375 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
382 bool castorCondResult =
false;
394 cMapResults[itCond->first] = castorCondition;
397 std::ostringstream myCout;
398 castorCondition->
print(myCout);
400 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
407 bool bptxCondResult =
true;
416 cMapResults[itCond->first] = bptxCondition;
419 std::ostringstream myCout;
420 bptxCondition->
print(myCout);
422 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
429 bool externalCondResult =
true;
438 cMapResults[itCond->first] = externalCondition;
441 std::ostringstream myCout;
442 externalCondition->
print(myCout);
444 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
455 const int cond0Ind = corrTemplate->
cond0Index();
456 const int cond1Ind = corrTemplate->
cond1Index();
462 int cond0NrL1Objects = 0;
463 int cond1NrL1Objects = 0;
465 int cond0EtaBits = 0;
466 int cond1EtaBits = 0;
468 switch (cond0Categ) {
470 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
471 cond0NrL1Objects = nrL1Mu;
472 cond0EtaBits = ifMuEtaNumberBits;
475 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
479 cond0NrL1Objects = nrL1NoIsoEG;
482 cond0NrL1Objects = nrL1IsoEG;
485 cond0NrL1Objects = nrL1CenJet;
488 cond0NrL1Objects = nrL1ForJet;
491 cond0NrL1Objects = nrL1TauJet;
494 cond0NrL1Objects = 0;
498 cond0EtaBits = ifCaloEtaNumberBits;
501 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
502 cond0NrL1Objects = 1;
509 switch (cond1Categ) {
511 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
512 cond1NrL1Objects = nrL1Mu;
513 cond1EtaBits = ifMuEtaNumberBits;
516 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
520 cond1NrL1Objects = nrL1NoIsoEG;
523 cond1NrL1Objects = nrL1IsoEG;
526 cond1NrL1Objects = nrL1CenJet;
529 cond1NrL1Objects = nrL1ForJet;
532 cond1NrL1Objects = nrL1TauJet;
535 cond1NrL1Objects = 0;
539 cond1EtaBits = ifCaloEtaNumberBits;
542 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
543 cond1NrL1Objects = 1;
564 cMapResults[itCond->first] = correlationCond;
567 std::ostringstream myCout;
568 correlationCond->
print(myCout);
570 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
591 std::vector<L1GlobalTriggerObjectMap> objMapVec;
592 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
593 objMapVec.reserve(numberPhysTriggers);
595 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
599 int algBitNumber = (itAlgo->second).algoBitNumber();
607 std::ostringstream myCout;
608 (itAlgo->second).
print(myCout);
611 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
615 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
627 std::ostringstream myCout1;
628 objMap.
print(myCout1);
630 LogTrace(
"L1GlobalTrigger") << myCout1.str() << std::endl;
633 objMapVec.push_back(objMap);
638 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
646 for (std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
651 delete itCond->second;
652 itCond->second =
nullptr;
667 LogTrace(
"L1GlobalTrigger") <<
"\nL1GlobalTrigger: GMT data received for BxInEvent = " << iBxInEvent << std::endl;
670 LogTrace(
"L1GlobalTrigger") <<
"Number of GMT muons = " << nrL1Mu <<
"\n" << std::endl;
672 for (std::vector<const L1MuGMTCand *>::const_iterator iter =
m_candL1Mu->begin(); iter !=
m_candL1Mu->end(); iter++) {
673 LogTrace(
"L1GlobalTrigger") << *(*iter) << std::endl;
676 LogTrace(
"L1GlobalTrigger") << std::endl;