92 delete m_candL1MuShower;
97 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();
190 iEvent.getByToken(tauInputToken, tauData);
194 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Tau> with input tag " 196 <<
"\nrequested in configuration, but not found in the event.\n";
200 for (
int i = tauData->getFirstBX();
i <= tauData->getLastBX(); ++
i) {
202 if (i < m_bxFirst_ || i > m_bxLast_)
207 for (std::vector<l1t::Tau>::const_iterator
tau = tauData->begin(
i);
tau != tauData->end(
i); ++
tau) {
208 if (nObj < nrL1Tau) {
209 (*m_candL1Tau).push_back(
i, &(*
tau));
211 LogTrace(
"L1TGlobal") <<
" Too many Tau (" << nObj <<
") for uGT Configuration maxTau =" << nrL1Tau;
214 LogDebug(
"L1TGlobal") <<
"tau Pt " <<
tau->hwPt() <<
" Eta " <<
tau->hwEta() <<
" Phi " <<
tau->hwPhi()
215 <<
" Qual " <<
tau->hwQual() <<
" Iso " <<
tau->hwIso();
231 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Jet> with input tag " 233 <<
"\nrequested in configuration, but not found in the event.\n";
239 if (i < m_bxFirst_ || i > m_bxLast_)
245 if (nObj < nrL1Jet) {
246 (*m_candL1Jet).push_back(
i, &(*
jet));
248 edm::LogWarning(
"L1TGlobal") <<
" Too many Jets (" << nObj <<
") for uGT Configuration maxJet =" << nrL1Jet;
251 LogDebug(
"L1TGlobal") <<
"Jet Pt " <<
jet->hwPt() <<
" Eta " <<
jet->hwEta() <<
" Phi " <<
jet->hwPhi()
252 <<
" Qual " <<
jet->hwQual() <<
" Iso " <<
jet->hwIso();
263 iEvent.getByToken(sumInputToken, etSumData);
267 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::EtSum> with input tag " 269 <<
"\nrequested in configuration, but not found in the event.\n";
272 for (
int i = etSumData->getFirstBX();
i <= etSumData->getLastBX(); ++
i) {
274 if (i < m_bxFirst_ || i > m_bxLast_)
278 for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(
i); etsum != etSumData->end(
i); ++etsum) {
279 (*m_candL1EtSum).push_back(
i, &(*etsum));
328 const bool receiveMu,
331 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving muon data = ";
340 iEvent.getByToken(muInputToken, muonData);
344 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Muon> with input tag " 346 <<
"\nrequested in configuration, but not found in the event.\n";
350 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
352 if (i < m_bxFirst_ || i > m_bxLast_)
357 for (std::vector<l1t::Muon>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
359 (*m_candL1Mu).push_back(
i, &(*
mu));
361 edm::LogWarning(
"L1TGlobal") <<
" Too many Muons (" << nObj <<
") for uGT Configuration maxMu =" << nrL1Mu;
364 LogDebug(
"L1TGlobal") <<
"Muon Pt " <<
mu->hwPt() <<
" EtaAtVtx " <<
mu->hwEtaAtVtx() <<
" PhiAtVtx " 365 <<
mu->hwPhiAtVtx() <<
" Qual " <<
mu->hwQual() <<
" Iso " <<
mu->hwIso();
378 const bool receiveMuShower,
379 const int nrL1MuShower) {
381 if (receiveMuShower) {
383 iEvent.getByToken(muShowerInputToken, muonData);
387 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::MuonShower> with input tag " 388 <<
"\nrequested in configuration, but not found in the event.\n";
393 for (
auto mu = muonData->begin(0);
mu != muonData->end(0); ++
mu) {
394 if (nObj < nrL1MuShower) {
408 (*m_candL1MuShower).push_back(0, &mus0);
409 (*m_candL1MuShower).push_back(0, &mus1);
410 (*m_candL1MuShower).push_back(0, &musOutOfTime0);
411 (*m_candL1MuShower).push_back(0, &musOutOfTime1);
414 <<
") for uGT Configuration maxMuShower =" << nrL1MuShower;
425 const bool receiveExt) {
427 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving external data = ";
436 iEvent.getByToken(extInputToken, extData);
440 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<GlobalExtBlk> with input tag " 442 <<
"\nrequested in configuration, but not found in the event.\n";
446 for (
int i = extData->getFirstBX();
i <= extData->getLastBX(); ++
i) {
448 if (i < m_bxFirst_ || i > m_bxLast_)
452 for (std::vector<GlobalExtBlk>::const_iterator
ext = extData->begin(
i);
ext != extData->end(
i); ++
ext) {
453 (*m_candL1External).push_back(
i, &(*
ext));
466 const bool produceL1GtObjectMapRecord,
467 const int iBxInEvent,
468 std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord,
469 const unsigned int numberPhysTriggers,
471 const int nrL1MuShower,
475 const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->
gtConditionMap();
479 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName;
483 m_algInitialOr =
false;
484 m_algPrescaledOr =
false;
485 m_algIntermOr =
false;
486 m_algFinalOr =
false;
487 m_algFinalOrVeto =
false;
489 const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->
corMuonTemplate();
492 const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->
corCaloTemplate();
494 const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->
corEnergySumTemplate();
496 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
497 <<
"\nSize corrSums " << corrEnergySum.size();
504 if (m_conditionResultMaps.size() != conditionMap.size()) {
505 m_conditionResultMaps.clear();
506 m_conditionResultMaps.resize(conditionMap.size());
511 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
512 itCondOnChip != conditionMap.end();
518 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
520 switch ((itCond->second)->condCategory()) {
523 const int ifMuEtaNumberBits = 0;
532 cMapResults[itCond->first] = muCondition;
534 if (m_verbosity && m_isDebugEnabled) {
535 std::ostringstream myCout;
536 muCondition->
print(myCout);
538 LogTrace(
"L1TGlobal") << myCout.str();
550 cMapResults[itCond->first] = muShowerCondition;
552 if (m_verbosity && m_isDebugEnabled) {
553 std::ostringstream myCout;
554 muShowerCondition->
print(myCout);
556 edm::LogWarning(
"L1TGlobal") <<
"MuonShowerCondition " << myCout.str();
563 const int ifCaloEtaNumberBits = 0;
566 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
572 cMapResults[itCond->first] = caloCondition;
574 if (m_verbosity && m_isDebugEnabled) {
575 std::ostringstream myCout;
576 caloCondition->
print(myCout);
578 LogTrace(
"L1TGlobal") << myCout.str();
589 cMapResults[itCond->first] = eSumCondition;
591 if (m_verbosity && m_isDebugEnabled) {
592 std::ostringstream myCout;
593 eSumCondition->
print(myCout);
595 LogTrace(
"L1TGlobal") << myCout.str();
607 cMapResults[itCond->first] = extCondition;
609 if (m_verbosity && m_isDebugEnabled) {
610 std::ostringstream myCout;
611 extCondition->
print(myCout);
613 LogTrace(
"L1TGlobal") << myCout.str();
623 const int cond0Ind = corrTemplate->
cond0Index();
624 const int cond1Ind = corrTemplate->
cond1Index();
630 int cond0NrL1Objects = 0;
631 int cond1NrL1Objects = 0;
632 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " 635 switch (cond0Categ) {
637 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
640 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
643 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
650 switch (cond1Categ) {
652 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
655 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
658 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
671 cMapResults[itCond->first] = correlationCond;
673 if (m_verbosity && m_isDebugEnabled) {
674 std::ostringstream myCout;
675 correlationCond->
print(myCout);
677 LogTrace(
"L1TGlobal") << myCout.str();
690 const int cond0Ind = corrTemplate->
cond0Index();
691 const int cond1Ind = corrTemplate->
cond1Index();
692 const int cond2Ind = corrTemplate->
cond2Index();
699 int cond0NrL1Objects = 0;
700 int cond1NrL1Objects = 0;
701 int cond2NrL1Objects = 0;
702 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects " 703 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects;
705 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
707 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
710 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
712 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
715 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
717 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
724 correlationThreeBodyCond->
setScales(>Scales);
726 cMapResults[itCond->first] = correlationThreeBodyCond;
728 if (m_verbosity && m_isDebugEnabled) {
729 std::ostringstream myCout;
730 correlationThreeBodyCond->
print(myCout);
732 LogTrace(
"L1TGlobal") << myCout.str();
744 const int cond0Ind = corrTemplate->
cond0Index();
745 const int cond1Ind = corrTemplate->
cond1Index();
746 const int cond2Ind = corrTemplate->
cond2Index();
753 int cond0NrL1Objects = 0;
754 int cond1NrL1Objects = 0;
755 int cond2NrL1Objects = 0;
756 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
757 <<
" cond2NrL1Objects " << cond2NrL1Objects;
759 switch (cond0Categ) {
761 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
764 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
767 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
774 switch (cond1Categ) {
776 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
779 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
782 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
789 switch (cond2Categ) {
791 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
794 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
797 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
808 correlationCondWOR->
setScales(>Scales);
811 cMapResults[itCond->first] = correlationCondWOR;
813 if (m_verbosity && m_isDebugEnabled) {
814 std::ostringstream myCout;
815 correlationCondWOR->
print(myCout);
817 LogTrace(
"L1TGlobal") << myCout.str();
838 std::vector<GlobalObjectMap> objMapVec;
839 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
840 objMapVec.reserve(numberPhysTriggers);
842 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
844 gtAlg.
evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
846 int algBitNumber = (itAlgo->second).algoBitNumber();
849 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
850 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult;
854 m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
855 m_algInitialOr =
true;
858 if (m_verbosity && m_isDebugEnabled) {
859 std::ostringstream myCout;
860 (itAlgo->second).
print(myCout);
863 LogTrace(
"L1TGlobal") << myCout.str();
867 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
868 std::vector<L1TObjectTypeInCond> otypes;
874 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
876 auto match = imap->find(iop->tokenName);
878 if (match != imap->end()) {
882 otype = match->second->objectType();
884 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
890 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
892 otypes.push_back(
otype);
907 if (m_verbosity && m_isDebugEnabled) {
908 std::ostringstream myCout1;
909 objMap.
print(myCout1);
911 LogTrace(
"L1TGlobal") << myCout1.str();
914 objMapVec.push_back(objMap);
919 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
920 gtObjectMapRecord->swapGtObjectMap(objMapVec);
926 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
927 itCondOnChip != m_conditionResultMaps.end();
930 delete itCond->second;
931 itCond->second =
nullptr;
938 const int iBxInEvent,
939 const int totalBxInEvent,
940 const unsigned int numberPhysTriggers,
941 const std::vector<double>& prescaleFactorsAlgoTrig,
942 const std::vector<unsigned int>& triggerMaskAlgoTrig,
943 const std::vector<int>& triggerMaskVetoAlgoTrig,
944 const bool algorithmTriggersUnprescaled,
945 const bool algorithmTriggersUnmasked) {
947 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard apply Final Decision Logic ";
951 if (m_prescaleCounterAlgoTrig.empty()
or 952 (m_currentLumi !=
iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
953 m_prescaleCounterAlgoTrig.clear();
954 m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
955 auto const& prescaleCountersAlgoTrig =
956 m_semiRandomInitialPSCounters ? prescaleCountersWithSemirandomInitialCounter(prescaleFactorsAlgoTrig,
iEvent)
957 : prescaleCounters(prescaleFactorsAlgoTrig);
958 for (
int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
959 m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
962 m_currentLumi =
iEvent.luminosityBlock();
967 m_uGtAlgBlk.copyInitialToInterm();
972 if (!algorithmTriggersUnprescaled) {
974 int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
976 bool temp_algPrescaledOr =
false;
977 bool alreadyReported =
false;
978 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
979 bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
982 if (iBit < prescaleFactorsAlgoTrig.size()) {
983 if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
984 bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
986 temp_algPrescaledOr =
true;
989 m_uGtAlgBlk.setAlgoDecisionInterm(iBit,
false);
993 temp_algPrescaledOr =
true;
996 else if (!alreadyReported) {
997 alreadyReported =
true;
998 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1003 m_algPrescaledOr = temp_algPrescaledOr;
1007 m_algPrescaledOr = m_algInitialOr;
1013 m_uGtAlgBlk.copyIntermToFinal();
1015 if (!algorithmTriggersUnmasked) {
1016 bool temp_algFinalOr =
false;
1017 bool alreadyReported =
false;
1018 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1019 const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1023 bool isMasked =
false;
1024 if (iBit < triggerMaskAlgoTrig.size())
1025 isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1026 else if (!alreadyReported) {
1027 alreadyReported =
true;
1028 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1031 bool const passMask = (bitValue && !isMasked);
1034 temp_algFinalOr =
true;
1036 m_uGtAlgBlk.setAlgoDecisionFinal(iBit,
false);
1039 if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1040 m_algFinalOrVeto =
true;
1044 m_algIntermOr = temp_algFinalOr;
1047 m_algIntermOr = m_algPrescaledOr;
1052 m_algFinalOr = (m_algIntermOr & !m_algFinalOrVeto);
1057 std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
1062 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1066 m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1067 m_uGtAlgBlk.setPreScColumn(prescaleSet);
1068 m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1069 m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1071 m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto);
1072 m_uGtAlgBlk.setFinalORPreVeto(m_algIntermOr);
1073 m_uGtAlgBlk.setFinalOR(m_algFinalOr);
1075 uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1085 m_uGtAlgBlk.reset();
1087 m_gtlDecisionWord.reset();
1088 m_gtlAlgorithmOR.reset();
1093 m_candL1Mu->clear();
1094 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
1099 m_candL1MuShower->clear();
1100 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
1105 m_candL1EG->clear();
1106 m_candL1Tau->clear();
1107 m_candL1Jet->clear();
1108 m_candL1EtSum->clear();
1110 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
1111 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
1112 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
1113 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
1117 m_candL1External->clear();
1118 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
1123 LogTrace(
"L1TGlobal") <<
"\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1125 int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1126 LogTrace(
"L1TGlobal") <<
"Number of GMT muons = " << nrL1Mu <<
"\n";
1131 std::vector<double>
const& prescaleFactorsAlgoTrig) {
1132 std::vector<PrescaleCounter>
out;
1133 out.reserve(prescaleFactorsAlgoTrig.size());
1134 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1135 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1142 std::vector<double>
const& prescaleFactorsAlgoTrig,
edm::Event const&
iEvent) {
1146 std::srand(
iEvent.id().run());
1147 std::srand(std::rand() +
iEvent.id().luminosityBlock());
1148 std::srand(std::rand() +
iEvent.id().event());
1149 int const semirandom = std::rand();
1151 std::vector<PrescaleCounter>
out;
1152 out.reserve(prescaleFactorsAlgoTrig.size());
1154 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1155 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1159 auto& prescaleCounter =
out.back();
1160 if (prescaleCounter.prescale_count > 0) {
1161 prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1170 trigger_counter += m_singlestep;
1172 if (prescale_count == 0
or trigger_counter < prescale_count)
1175 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)
void setMus0(const bool bit)
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 setMusOutOfTime1(const bool bit)
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
void setMus1(const bool bit)
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 setMusOutOfTime0(const bool bit)
void print(std::ostream &myCout) const override
print condition