94 delete m_candL1MuShower;
99 delete m_candL1External;
109 const int nrL1MuShower,
118 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
119 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
120 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
121 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
122 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
123 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
124 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
128 LogDebug(
"L1TGlobal") <<
"\t Initializing Board with bxFirst = " << m_bxFirst_ <<
", bxLast = " << m_bxLast_;
137 const bool receiveEG,
139 const bool receiveTau,
141 const bool receiveJet,
143 const bool receiveEtSums) {
145 LogDebug(
"L1TGlobal") <<
"\n**** Board receiving Calo Data ";
154 iEvent.getByToken(egInputToken, egData);
158 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::EGamma> with input tag " 160 <<
"\nrequested in configuration, but not found in the event.\n";
164 for (
int i = egData->getFirstBX();
i <= egData->getLastBX(); ++
i) {
166 if (i < m_bxFirst_ || i > m_bxLast_)
171 for (std::vector<l1t::EGamma>::const_iterator eg = egData->begin(
i); eg != egData->end(
i); ++eg) {
173 (*m_candL1EG).push_back(
i, &(*eg));
175 edm::LogWarning(
"L1TGlobal") <<
" Too many EG (" << nObj <<
") for uGT Configuration maxEG =" << nrL1EG;
177 LogDebug(
"L1TGlobal") <<
"EG Pt " << eg->hwPt() <<
" Eta " << eg->hwEta() <<
" Phi " << eg->hwPhi()
178 <<
" Qual " << eg->hwQual() <<
" Iso " << eg->hwIso();
188 iEvent.getByToken(tauInputToken, tauData);
192 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Tau> with input tag " 194 <<
"\nrequested in configuration, but not found in the event.\n";
198 for (
int i = tauData->getFirstBX();
i <= tauData->getLastBX(); ++
i) {
200 if (i < m_bxFirst_ || i > m_bxLast_)
205 for (std::vector<l1t::Tau>::const_iterator
tau = tauData->begin(
i);
tau != tauData->end(
i); ++
tau) {
206 if (nObj < nrL1Tau) {
207 (*m_candL1Tau).push_back(
i, &(*
tau));
209 LogTrace(
"L1TGlobal") <<
" Too many Tau (" << nObj <<
") for uGT Configuration maxTau =" << nrL1Tau;
212 LogDebug(
"L1TGlobal") <<
"tau Pt " <<
tau->hwPt() <<
" Eta " <<
tau->hwEta() <<
" Phi " <<
tau->hwPhi()
213 <<
" Qual " <<
tau->hwQual() <<
" Iso " <<
tau->hwIso();
227 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Jet> with input tag " 229 <<
"\nrequested in configuration, but not found in the event.\n";
235 if (i < m_bxFirst_ || i > m_bxLast_)
241 if (nObj < nrL1Jet) {
242 (*m_candL1Jet).push_back(
i, &(*
jet));
244 edm::LogWarning(
"L1TGlobal") <<
" Too many Jets (" << nObj <<
") for uGT Configuration maxJet =" << nrL1Jet;
247 LogDebug(
"L1TGlobal") <<
"Jet Pt " <<
jet->hwPt() <<
" Eta " <<
jet->hwEta() <<
" Phi " <<
jet->hwPhi()
248 <<
" Qual " <<
jet->hwQual() <<
" Iso " <<
jet->hwIso();
257 iEvent.getByToken(sumInputToken, etSumData);
261 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::EtSum> with input tag " 263 <<
"\nrequested in configuration, but not found in the event.\n";
266 for (
int i = etSumData->getFirstBX();
i <= etSumData->getLastBX(); ++
i) {
268 if (i < m_bxFirst_ || i > m_bxLast_)
272 for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(
i); etsum != etSumData->end(
i); ++etsum) {
273 (*m_candL1EtSum).push_back(
i, &(*etsum));
322 const bool receiveMu,
325 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving muon data = ";
334 iEvent.getByToken(muInputToken, muonData);
338 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Muon> with input tag " 340 <<
"\nrequested in configuration, but not found in the event.\n";
344 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
346 if (i < m_bxFirst_ || i > m_bxLast_)
351 for (std::vector<l1t::Muon>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
353 (*m_candL1Mu).push_back(
i, &(*
mu));
355 edm::LogWarning(
"L1TGlobal") <<
" Too many Muons (" << nObj <<
") for uGT Configuration maxMu =" << nrL1Mu;
358 LogDebug(
"L1TGlobal") <<
"Muon Pt " <<
mu->hwPt() <<
" EtaAtVtx " <<
mu->hwEtaAtVtx() <<
" PhiAtVtx " 359 <<
mu->hwPhiAtVtx() <<
" Qual " <<
mu->hwQual() <<
" Iso " <<
mu->hwIso();
370 const bool receiveMuShower,
371 const int nrL1MuShower) {
373 if (receiveMuShower) {
375 iEvent.getByToken(muShowerInputToken, muonData);
379 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::MuonShower> with input tag " 380 <<
"\nrequested in configuration, but not found in the event.\n";
384 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
386 if (i < m_bxFirst_ || i > m_bxLast_)
391 for (std::vector<l1t::MuonShower>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
392 if (nObj < nrL1MuShower) {
397 std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
398 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
399 std::shared_ptr<l1t::MuonShower> musOneTightInTime =
400 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
401 std::shared_ptr<l1t::MuonShower> musTwoLooseDiffSectorsInTime =
402 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
403 std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
404 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
405 std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
406 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
408 musOneNominalInTime->setOneNominalInTime(
mu->isOneNominalInTime());
409 musOneTightInTime->setOneTightInTime(
mu->isOneTightInTime());
410 musTwoLooseDiffSectorsInTime->setTwoLooseDiffSectorsInTime(
mu->isTwoLooseDiffSectorsInTime());
411 musOutOfTime0->setMusOutOfTime0(
mu->musOutOfTime0());
412 musOutOfTime1->setMusOutOfTime1(
mu->musOutOfTime1());
414 (*m_candL1MuShower).push_back(
i, musOneNominalInTime);
415 (*m_candL1MuShower).push_back(
i, musOneTightInTime);
416 (*m_candL1MuShower).push_back(
i, musTwoLooseDiffSectorsInTime);
417 (*m_candL1MuShower).push_back(
i, musOutOfTime0);
418 (*m_candL1MuShower).push_back(
i, musOutOfTime1);
422 <<
") for uGT Configuration maxMuShower =" << nrL1MuShower;
434 const bool receiveExt) {
436 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving external data = ";
445 iEvent.getByToken(extInputToken, extData);
449 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<GlobalExtBlk> with input tag " 451 <<
"\nrequested in configuration, but not found in the event.\n";
455 for (
int i = extData->getFirstBX();
i <= extData->getLastBX(); ++
i) {
457 if (i < m_bxFirst_ || i > m_bxLast_)
461 for (std::vector<GlobalExtBlk>::const_iterator
ext = extData->begin(
i);
ext != extData->end(
i); ++
ext) {
462 (*m_candL1External).push_back(
i, &(*
ext));
473 const bool produceL1GtObjectMapRecord,
474 const int iBxInEvent,
475 std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord,
476 const unsigned int numberPhysTriggers,
478 const int nrL1MuShower,
482 const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->
gtConditionMap();
486 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName;
490 m_algInitialOr =
false;
491 m_algPrescaledOr =
false;
492 m_algIntermOr =
false;
493 m_algFinalOr =
false;
494 m_algFinalOrVeto =
false;
496 const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->
corMuonTemplate();
499 const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->
corCaloTemplate();
501 const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->
corEnergySumTemplate();
503 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
504 <<
"\nSize corrSums " << corrEnergySum.size();
512 if (m_conditionResultMaps.size() != conditionMap.size()) {
513 m_conditionResultMaps.clear();
514 m_conditionResultMaps.resize(conditionMap.size());
519 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
520 itCondOnChip != conditionMap.end();
526 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
528 switch ((itCond->second)->condCategory()) {
531 const int ifMuEtaNumberBits = 0;
540 cMapResults[itCond->first] = muCondition;
542 if (m_verbosity && m_isDebugEnabled) {
543 std::ostringstream myCout;
544 muCondition->
print(myCout);
546 LogTrace(
"L1TGlobal") << myCout.str();
558 cMapResults[itCond->first] = muShowerCondition;
560 if (m_verbosity && m_isDebugEnabled) {
561 std::ostringstream myCout;
562 muShowerCondition->
print(myCout);
564 edm::LogWarning(
"L1TGlobal") <<
"MuonShowerCondition " << myCout.str();
571 const int ifCaloEtaNumberBits = 0;
574 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
580 cMapResults[itCond->first] = caloCondition;
582 if (m_verbosity && m_isDebugEnabled) {
583 std::ostringstream myCout;
584 caloCondition->
print(myCout);
586 LogTrace(
"L1TGlobal") << myCout.str();
597 cMapResults[itCond->first] = eSumCondition;
599 if (m_verbosity && m_isDebugEnabled) {
600 std::ostringstream myCout;
601 eSumCondition->
print(myCout);
603 LogTrace(
"L1TGlobal") << myCout.str();
615 cMapResults[itCond->first] = extCondition;
617 if (m_verbosity && m_isDebugEnabled) {
618 std::ostringstream myCout;
619 extCondition->
print(myCout);
621 LogTrace(
"L1TGlobal") << myCout.str();
631 const int cond0Ind = corrTemplate->
cond0Index();
632 const int cond1Ind = corrTemplate->
cond1Index();
638 int cond0NrL1Objects = 0;
639 int cond1NrL1Objects = 0;
640 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " 643 switch (cond0Categ) {
645 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
648 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
651 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
658 switch (cond1Categ) {
660 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
663 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
666 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
679 cMapResults[itCond->first] = correlationCond;
681 if (m_verbosity && m_isDebugEnabled) {
682 std::ostringstream myCout;
683 correlationCond->
print(myCout);
685 LogTrace(
"L1TGlobal") << myCout.str();
698 const int cond0Ind = corrTemplate->
cond0Index();
699 const int cond1Ind = corrTemplate->
cond1Index();
700 const int cond2Ind = corrTemplate->
cond2Index();
707 int cond0NrL1Objects = 0;
708 int cond1NrL1Objects = 0;
709 int cond2NrL1Objects = 0;
710 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects " 711 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects;
713 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
715 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
718 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
720 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
723 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
725 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
732 correlationThreeBodyCond->
setScales(>Scales);
734 cMapResults[itCond->first] = correlationThreeBodyCond;
736 if (m_verbosity && m_isDebugEnabled) {
737 std::ostringstream myCout;
738 correlationThreeBodyCond->
print(myCout);
740 LogTrace(
"L1TGlobal") << myCout.str();
752 const int cond0Ind = corrTemplate->
cond0Index();
753 const int cond1Ind = corrTemplate->
cond1Index();
754 const int cond2Ind = corrTemplate->
cond2Index();
761 int cond0NrL1Objects = 0;
762 int cond1NrL1Objects = 0;
763 int cond2NrL1Objects = 0;
764 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
765 <<
" cond2NrL1Objects " << cond2NrL1Objects;
767 switch (cond0Categ) {
769 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
772 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
775 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
782 switch (cond1Categ) {
784 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
787 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
790 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
797 switch (cond2Categ) {
799 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
802 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
805 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
816 correlationCondWOR->
setScales(>Scales);
819 cMapResults[itCond->first] = correlationCondWOR;
821 if (m_verbosity && m_isDebugEnabled) {
822 std::ostringstream myCout;
823 correlationCondWOR->
print(myCout);
825 LogTrace(
"L1TGlobal") << myCout.str();
847 std::vector<GlobalObjectMap> objMapVec;
848 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
849 objMapVec.reserve(numberPhysTriggers);
851 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
853 gtAlg.
evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
855 int algBitNumber = (itAlgo->second).algoBitNumber();
858 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
859 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult;
863 m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
864 m_algInitialOr =
true;
867 if (m_verbosity && m_isDebugEnabled) {
868 std::ostringstream myCout;
869 (itAlgo->second).
print(myCout);
872 LogTrace(
"L1TGlobal") << myCout.str();
876 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
877 std::vector<L1TObjectTypeInCond> otypes;
882 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
883 auto match = imap->find(iop->tokenName);
885 if (match != imap->end()) {
889 otype = match->second->objectType();
891 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
897 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
899 otypes.push_back(
otype);
914 if (m_verbosity && m_isDebugEnabled) {
915 std::ostringstream myCout1;
916 objMap.
print(myCout1);
918 LogTrace(
"L1TGlobal") << myCout1.str();
921 objMapVec.push_back(objMap);
926 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
927 gtObjectMapRecord->swapGtObjectMap(objMapVec);
933 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
934 itCondOnChip != m_conditionResultMaps.end();
937 delete itCond->second;
938 itCond->second =
nullptr;
947 const int iBxInEvent,
948 const int totalBxInEvent,
949 const unsigned int numberPhysTriggers,
950 const std::vector<double>& prescaleFactorsAlgoTrig,
951 const std::vector<unsigned int>& triggerMaskAlgoTrig,
952 const std::vector<int>& triggerMaskVetoAlgoTrig,
953 const bool algorithmTriggersUnprescaled,
954 const bool algorithmTriggersUnmasked) {
956 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard apply Final Decision Logic ";
960 if (m_prescaleCounterAlgoTrig.empty()
or 961 (m_currentLumi !=
iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
962 m_prescaleCounterAlgoTrig.clear();
963 m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
964 auto const& prescaleCountersAlgoTrig =
965 m_semiRandomInitialPSCounters ? prescaleCountersWithSemirandomInitialCounter(prescaleFactorsAlgoTrig,
iEvent)
966 : prescaleCounters(prescaleFactorsAlgoTrig);
967 for (
int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
968 m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
971 m_currentLumi =
iEvent.luminosityBlock();
976 m_uGtAlgBlk.copyInitialToInterm();
981 if (!algorithmTriggersUnprescaled) {
983 int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
985 bool temp_algPrescaledOr =
false;
986 bool alreadyReported =
false;
987 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
988 bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
991 if (iBit < prescaleFactorsAlgoTrig.size()) {
992 if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
993 bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
995 temp_algPrescaledOr =
true;
998 m_uGtAlgBlk.setAlgoDecisionInterm(iBit,
false);
1002 temp_algPrescaledOr =
true;
1005 else if (!alreadyReported) {
1006 alreadyReported =
true;
1007 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1012 m_algPrescaledOr = temp_algPrescaledOr;
1016 m_algPrescaledOr = m_algInitialOr;
1022 m_uGtAlgBlk.copyIntermToFinal();
1024 if (!algorithmTriggersUnmasked) {
1025 bool temp_algFinalOr =
false;
1026 bool alreadyReported =
false;
1027 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1028 const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1032 bool isMasked =
false;
1033 if (iBit < triggerMaskAlgoTrig.size())
1034 isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1035 else if (!alreadyReported) {
1036 alreadyReported =
true;
1037 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1040 bool const passMask = (bitValue && !isMasked);
1043 temp_algFinalOr =
true;
1045 m_uGtAlgBlk.setAlgoDecisionFinal(iBit,
false);
1048 if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1049 m_algFinalOrVeto =
true;
1053 m_algIntermOr = temp_algFinalOr;
1056 m_algIntermOr = m_algPrescaledOr;
1063 m_algFinalOr = (m_algIntermOr & !m_algFinalOrVeto);
1068 std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
1073 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1077 m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1078 m_uGtAlgBlk.setPreScColumn(prescaleSet);
1079 m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1080 m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1082 m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto);
1083 m_uGtAlgBlk.setFinalORPreVeto(m_algIntermOr);
1084 m_uGtAlgBlk.setFinalOR(m_algFinalOr);
1086 uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1096 m_uGtAlgBlk.reset();
1098 m_gtlDecisionWord.reset();
1099 m_gtlAlgorithmOR.reset();
1104 m_candL1Mu->clear();
1105 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
1110 m_candL1MuShower->clear();
1111 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
1116 m_candL1EG->clear();
1117 m_candL1Tau->clear();
1118 m_candL1Jet->clear();
1119 m_candL1EtSum->clear();
1121 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
1122 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
1123 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
1124 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
1128 m_candL1External->clear();
1129 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
1134 LogTrace(
"L1TGlobal") <<
"\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1136 int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1137 LogTrace(
"L1TGlobal") <<
"Number of GMT muons = " << nrL1Mu <<
"\n";
1142 std::vector<double>
const& prescaleFactorsAlgoTrig) {
1143 std::vector<PrescaleCounter>
out;
1144 out.reserve(prescaleFactorsAlgoTrig.size());
1145 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1146 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1153 std::vector<double>
const& prescaleFactorsAlgoTrig,
edm::Event const&
iEvent) {
1157 std::srand(
iEvent.id().run());
1158 std::srand(std::rand() +
iEvent.id().luminosityBlock());
1159 std::srand(std::rand() +
iEvent.id().event());
1160 int const semirandom = std::rand();
1162 std::vector<PrescaleCounter>
out;
1163 out.reserve(prescaleFactorsAlgoTrig.size());
1165 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1166 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1170 auto& prescaleCounter =
out.back();
1171 if (prescaleCounter.prescale_count > 0) {
1172 prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1181 trigger_counter += m_singlestep;
1183 if (prescale_count == 0
or trigger_counter < prescale_count)
1186 trigger_counter -= prescale_count;
void setAlgoBitNumber(int algoBitNumberValue)
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
void evaluateConditionStoreResult(const int bxEval)
call evaluateCondition and save last result
std::vector< l1t::GlobalObject > L1TObjectTypeInCond
void swapOperandTokenVector(std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
void print(std::ostream &myCout) const override
print condition
void print(std::ostream &myCout) const override
print condition
void print(std::ostream &myCout) const override
print condition
static std::vector< PrescaleCounter > prescaleCountersWithSemirandomInitialCounter(std::vector< double > const &prescaleFactorsAlgoTrig, edm::Event const &iEvent)
void setVerbosity(const int verbosity)
const int cond1Index() const
virtual std::string getScalesName() const
void fillAlgRecord(int iBxInEvent, std::unique_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
Fill the Daq Records.
unsigned long long m_l1MuTriggerScalesCacheID
const l1t::GtConditionCategory cond1Category() const
void runFDL(const 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)
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
void print(std::ostream &myCout) const
print the full object map
const l1t::GtConditionCategory cond1Category() const
void swapObjectTypeVector(std::vector< L1TObjectTypeInCond > &objectTypeVectorValue)
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
ConditionEvaluationMap::iterator ItEvalMap
void printGmtData(const int iBxInEvent) const
print received Muon dataWord
void print(std::ostream &myCout) const
unsigned long long m_l1GtMenuCacheID
void print(std::ostream &myCout) const override
print condition
static std::vector< PrescaleCounter > prescaleCounters(std::vector< double > const &prescaleFactorsAlgoTrig)
const l1t::GtConditionCategory cond2Category() const
const int cond1Index() const
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
GtConditionCategory
condition categories
const l1t::GtConditionCategory cond0Category() const
get / set the category of the thre sub-conditions
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
unsigned int m_boardEventCount
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
void reset()
reset the content of a GlobalAlgBlk
void print(std::ostream &myCout) const override
print condition
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void runGTL(const edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::unique_ptr< GlobalObjectMapRecord > >ObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1MuShower, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
run the uGT GTL (Conditions and Algorithms)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
unsigned long long m_l1CaloGeometryCacheID
const l1t::GtConditionCategory cond1Category() const
void setAlgoGtlResult(bool algoGtlResultValue)
const int cond2Index() const
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
std::vector< std::vector< PrescaleCounter > > m_prescaleCounterAlgoTrig
void setScales(const GlobalScales *)
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm
void receiveExternalData(const edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk >> &, const bool receiveExt)
bool gtAlgoResult() const
get / set the result of the algorithm
const int cond2Index() const
void setAlgoName(const std::string &algoNameValue)
const int cond1Index() const
void print(std::ostream &myCout) const override
print condition
void setScales(const GlobalScales *)
std::vector< GlobalLogicParser::OperandToken > & operandTokenVector()
void setScales(const GlobalScales *)
const int cond0Index() const
get / set the index of the three subconditions in the cor* vector from menu
void init(const int numberPhysTriggers, const int nrL1Mu, const int nrL1MuShower, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
initialize the class (mainly reserve)
void receiveCaloObjectData(const 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
void print(std::ostream &myCout) const override
print condition
std::unordered_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
const l1t::GtConditionCategory cond0Category() const
get / set the category of the three subconditions
Log< level::Warning, false > LogWarning
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
std::map< std::string, GlobalAlgorithm > AlgorithmMap
map containing the algorithms
const l1t::GtConditionCategory cond2Category() const
void receiveMuonShowerObjectData(const edm::Event &, const edm::EDGetTokenT< BXVector< l1t::MuonShower >> &, const bool receiveMuShower, const int nrL1MuShower)
void receiveMuonObjectData(const edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon >> &, const bool receiveMu, const int nrL1Mu)
void print(std::ostream &myCout) const override
print condition