86 iC.consumes<std::vector<L1MuGMTCand>>(m_muGmtInputTag);
113 const int iBxInEvent,
114 const bool receiveMu,
117 LogDebug(
"L1GlobalTrigger") <<
"\n**** L1GlobalTriggerGTL receiving muon data for BxInEvent = " << iBxInEvent
118 <<
"\n from input tag " << muGmtInputTag <<
"\n"
127 iEvent.getByLabel(muGmtInputTag, muonData);
131 edm::LogWarning(
"L1GlobalTrigger") <<
"\nWarning: std::vector<L1MuGMTCand> with input tag " << muGmtInputTag
132 <<
"\nrequested in configuration, but not found in the event.\n"
136 std::vector<L1MuGMTCand>::const_iterator itMuon;
137 for (itMuon = muonData->begin(); itMuon != muonData->end(); itMuon++) {
138 if ((*itMuon).bx() == iBxInEvent) {
139 (*m_candL1Mu).push_back(&(*itMuon));
156 const bool produceL1GtObjectMapRecord,
157 const int iBxInEvent,
159 const unsigned int numberPhysTriggers,
161 const int nrL1NoIsoEG,
163 const int nrL1CenJet,
164 const int nrL1ForJet,
165 const int nrL1TauJet,
166 const int nrL1JetCounts,
167 const int ifMuEtaNumberBits,
168 const int ifCaloEtaNumberBits) {
172 const std::vector<ConditionMap> &conditionMap = l1GtMenu.gtConditionMap();
173 const AlgorithmMap &algorithmMap = l1GtMenu.gtAlgorithmMap();
175 const std::vector<std::vector<L1GtMuonTemplate>> &corrMuon = l1GtMenu.corMuonTemplate();
177 const std::vector<std::vector<L1GtCaloTemplate>> &corrCalo = l1GtMenu.corCaloTemplate();
179 const std::vector<std::vector<L1GtEnergySumTemplate>> &corrEnergySum = l1GtMenu.corEnergySumTemplate();
184 bool convertScale =
false;
214 std::ostringstream myCout;
217 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
223 convertScale =
false;
238 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
239 itCondOnChip != conditionMap.end();
248 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
250 switch ((itCond->second)->condCategory()) {
258 cMapResults[itCond->first] = muCondition;
261 std::ostringstream myCout;
262 muCondition->
print(myCout);
264 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
272 itCond->second, ptrGtPSB, nrL1NoIsoEG, nrL1IsoEG, nrL1CenJet, nrL1ForJet, nrL1TauJet, ifCaloEtaNumberBits);
279 cMapResults[itCond->first] = caloCondition;
282 std::ostringstream myCout;
283 caloCondition->
print(myCout);
285 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
296 cMapResults[itCond->first] = eSumCondition;
299 std::ostringstream myCout;
300 eSumCondition->
print(myCout);
302 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
313 cMapResults[itCond->first] = jcCondition;
316 std::ostringstream myCout;
317 jcCondition->
print(myCout);
319 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
331 cMapResults[itCond->first] = bcCondition;
334 std::ostringstream myCout;
335 bcCondition->
print(myCout);
337 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
349 cMapResults[itCond->first] = etCondition;
352 std::ostringstream myCout;
353 etCondition->
print(myCout);
355 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
362 bool castorCondResult =
false;
374 cMapResults[itCond->first] = castorCondition;
377 std::ostringstream myCout;
378 castorCondition->
print(myCout);
380 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
387 bool bptxCondResult =
true;
396 cMapResults[itCond->first] = bptxCondition;
399 std::ostringstream myCout;
400 bptxCondition->
print(myCout);
402 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
409 bool externalCondResult =
true;
418 cMapResults[itCond->first] = externalCondition;
421 std::ostringstream myCout;
422 externalCondition->
print(myCout);
424 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
435 const int cond0Ind = corrTemplate->
cond0Index();
436 const int cond1Ind = corrTemplate->
cond1Index();
442 int cond0NrL1Objects = 0;
443 int cond1NrL1Objects = 0;
445 int cond0EtaBits = 0;
446 int cond1EtaBits = 0;
448 switch (cond0Categ) {
450 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
451 cond0NrL1Objects = nrL1Mu;
452 cond0EtaBits = ifMuEtaNumberBits;
455 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
459 cond0NrL1Objects = nrL1NoIsoEG;
462 cond0NrL1Objects = nrL1IsoEG;
465 cond0NrL1Objects = nrL1CenJet;
468 cond0NrL1Objects = nrL1ForJet;
471 cond0NrL1Objects = nrL1TauJet;
474 cond0NrL1Objects = 0;
478 cond0EtaBits = ifCaloEtaNumberBits;
481 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
482 cond0NrL1Objects = 1;
489 switch (cond1Categ) {
491 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
492 cond1NrL1Objects = nrL1Mu;
493 cond1EtaBits = ifMuEtaNumberBits;
496 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
500 cond1NrL1Objects = nrL1NoIsoEG;
503 cond1NrL1Objects = nrL1IsoEG;
506 cond1NrL1Objects = nrL1CenJet;
509 cond1NrL1Objects = nrL1ForJet;
512 cond1NrL1Objects = nrL1TauJet;
515 cond1NrL1Objects = 0;
519 cond1EtaBits = ifCaloEtaNumberBits;
522 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
523 cond1NrL1Objects = 1;
544 cMapResults[itCond->first] = correlationCond;
547 std::ostringstream myCout;
548 correlationCond->
print(myCout);
550 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
571 std::vector<L1GlobalTriggerObjectMap> objMapVec;
572 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
573 objMapVec.reserve(numberPhysTriggers);
575 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
579 int algBitNumber = (itAlgo->second).algoBitNumber();
587 std::ostringstream myCout;
588 (itAlgo->second).
print(myCout);
591 LogTrace(
"L1GlobalTrigger") << myCout.str() << std::endl;
595 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
607 std::ostringstream myCout1;
608 objMap.
print(myCout1);
610 LogTrace(
"L1GlobalTrigger") << myCout1.str() << std::endl;
613 objMapVec.push_back(objMap);
618 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
626 for (std::vector<L1GtAlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
631 delete itCond->second;
632 itCond->second =
nullptr;
647 LogTrace(
"L1GlobalTrigger") <<
"\nL1GlobalTrigger: GMT data received for BxInEvent = " << iBxInEvent << std::endl;
650 LogTrace(
"L1GlobalTrigger") <<
"Number of GMT muons = " << nrL1Mu <<
"\n" << std::endl;
652 for (std::vector<const L1MuGMTCand *>::const_iterator iter =
m_candL1Mu->begin(); iter !=
m_candL1Mu->end(); iter++) {
653 LogTrace(
"L1GlobalTrigger") << *(*iter) << std::endl;
656 LogTrace(
"L1GlobalTrigger") << std::endl;