93 delete m_candL1MuShower;
98 delete m_candL1External;
108 const int nrL1MuShower,
117 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
118 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
119 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
120 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
121 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
122 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
123 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
127 LogDebug(
"L1TGlobal") <<
"\t Initializing Board with bxFirst = " << m_bxFirst_ <<
", bxLast = " << m_bxLast_;
136 const bool receiveEG,
138 const bool receiveTau,
140 const bool receiveJet,
142 const bool receiveEtSums) {
144 LogDebug(
"L1TGlobal") <<
"\n**** Board receiving Calo Data ";
153 iEvent.getByToken(egInputToken, egData);
157 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::EGamma> with input tag " 159 <<
"\nrequested in configuration, but not found in the event.\n";
163 for (
int i = egData->getFirstBX();
i <= egData->getLastBX(); ++
i) {
165 if (i < m_bxFirst_ || i > m_bxLast_)
170 for (std::vector<l1t::EGamma>::const_iterator eg = egData->begin(
i); eg != egData->end(
i); ++eg) {
172 (*m_candL1EG).push_back(
i, &(*eg));
174 edm::LogWarning(
"L1TGlobal") <<
" Too many EG (" << nObj <<
") for uGT Configuration maxEG =" << nrL1EG;
176 LogDebug(
"L1TGlobal") <<
"EG Pt " << eg->hwPt() <<
" Eta " << eg->hwEta() <<
" Phi " << eg->hwPhi()
177 <<
" Qual " << eg->hwQual() <<
" Iso " << eg->hwIso();
187 iEvent.getByToken(tauInputToken, tauData);
191 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Tau> with input tag " 193 <<
"\nrequested in configuration, but not found in the event.\n";
197 for (
int i = tauData->getFirstBX();
i <= tauData->getLastBX(); ++
i) {
199 if (i < m_bxFirst_ || i > m_bxLast_)
204 for (std::vector<l1t::Tau>::const_iterator
tau = tauData->begin(
i);
tau != tauData->end(
i); ++
tau) {
205 if (nObj < nrL1Tau) {
206 (*m_candL1Tau).push_back(
i, &(*
tau));
208 LogTrace(
"L1TGlobal") <<
" Too many Tau (" << nObj <<
") for uGT Configuration maxTau =" << nrL1Tau;
211 LogDebug(
"L1TGlobal") <<
"tau Pt " <<
tau->hwPt() <<
" Eta " <<
tau->hwEta() <<
" Phi " <<
tau->hwPhi()
212 <<
" Qual " <<
tau->hwQual() <<
" Iso " <<
tau->hwIso();
226 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Jet> with input tag " 228 <<
"\nrequested in configuration, but not found in the event.\n";
234 if (i < m_bxFirst_ || i > m_bxLast_)
240 if (nObj < nrL1Jet) {
241 (*m_candL1Jet).push_back(
i, &(*
jet));
243 edm::LogWarning(
"L1TGlobal") <<
" Too many Jets (" << nObj <<
") for uGT Configuration maxJet =" << nrL1Jet;
246 LogDebug(
"L1TGlobal") <<
"Jet Pt " <<
jet->hwPt() <<
" Eta " <<
jet->hwEta() <<
" Phi " <<
jet->hwPhi()
247 <<
" Qual " <<
jet->hwQual() <<
" Iso " <<
jet->hwIso();
256 iEvent.getByToken(sumInputToken, etSumData);
260 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::EtSum> with input tag " 262 <<
"\nrequested in configuration, but not found in the event.\n";
265 for (
int i = etSumData->getFirstBX();
i <= etSumData->getLastBX(); ++
i) {
267 if (i < m_bxFirst_ || i > m_bxLast_)
271 for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(
i); etsum != etSumData->end(
i); ++etsum) {
272 (*m_candL1EtSum).push_back(
i, &(*etsum));
321 const bool receiveMu,
324 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving muon data = ";
333 iEvent.getByToken(muInputToken, muonData);
337 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::Muon> with input tag " 339 <<
"\nrequested in configuration, but not found in the event.\n";
343 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
345 if (i < m_bxFirst_ || i > m_bxLast_)
350 for (std::vector<l1t::Muon>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
352 (*m_candL1Mu).push_back(
i, &(*
mu));
354 edm::LogWarning(
"L1TGlobal") <<
" Too many Muons (" << nObj <<
") for uGT Configuration maxMu =" << nrL1Mu;
357 LogDebug(
"L1TGlobal") <<
"Muon Pt " <<
mu->hwPt() <<
" EtaAtVtx " <<
mu->hwEtaAtVtx() <<
" PhiAtVtx " 358 <<
mu->hwPhiAtVtx() <<
" Qual " <<
mu->hwQual() <<
" Iso " <<
mu->hwIso();
369 const bool receiveMuShower,
370 const int nrL1MuShower) {
372 if (receiveMuShower) {
374 iEvent.getByToken(muShowerInputToken, muonData);
378 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<l1t::MuonShower> with input tag " 379 <<
"\nrequested in configuration, but not found in the event.\n";
384 for (
auto mu = muonData->begin(0);
mu != muonData->end(0); ++
mu) {
385 if (nObj < nrL1MuShower) {
390 std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
391 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
392 std::shared_ptr<l1t::MuonShower> musOneTightInTime =
393 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
394 std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
395 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
396 std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
397 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
399 musOneNominalInTime->setOneNominalInTime(
mu->isOneNominalInTime());
400 musOneTightInTime->setOneTightInTime(
mu->isOneTightInTime());
401 musOutOfTime0->setMusOutOfTime0(
mu->musOutOfTime0());
402 musOutOfTime1->setMusOutOfTime1(
mu->musOutOfTime1());
404 (*m_candL1MuShower).push_back(0, musOneNominalInTime);
405 (*m_candL1MuShower).push_back(0, musOneTightInTime);
406 (*m_candL1MuShower).push_back(0, musOutOfTime0);
407 (*m_candL1MuShower).push_back(0, musOutOfTime1);
411 <<
") for uGT Configuration maxMuShower =" << nrL1MuShower;
422 const bool receiveExt) {
424 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving external data = ";
433 iEvent.getByToken(extInputToken, extData);
437 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: BXVector<GlobalExtBlk> with input tag " 439 <<
"\nrequested in configuration, but not found in the event.\n";
443 for (
int i = extData->getFirstBX();
i <= extData->getLastBX(); ++
i) {
445 if (i < m_bxFirst_ || i > m_bxLast_)
449 for (std::vector<GlobalExtBlk>::const_iterator
ext = extData->begin(
i);
ext != extData->end(
i); ++
ext) {
450 (*m_candL1External).push_back(
i, &(*
ext));
461 const bool produceL1GtObjectMapRecord,
462 const int iBxInEvent,
463 std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord,
464 const unsigned int numberPhysTriggers,
466 const int nrL1MuShower,
470 const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->
gtConditionMap();
474 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName;
478 m_algInitialOr =
false;
479 m_algPrescaledOr =
false;
480 m_algIntermOr =
false;
481 m_algFinalOr =
false;
482 m_algFinalOrVeto =
false;
484 const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->
corMuonTemplate();
487 const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->
corCaloTemplate();
489 const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->
corEnergySumTemplate();
491 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
492 <<
"\nSize corrSums " << corrEnergySum.size();
500 if (m_conditionResultMaps.size() != conditionMap.size()) {
501 m_conditionResultMaps.clear();
502 m_conditionResultMaps.resize(conditionMap.size());
507 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
508 itCondOnChip != conditionMap.end();
514 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
516 switch ((itCond->second)->condCategory()) {
519 const int ifMuEtaNumberBits = 0;
528 cMapResults[itCond->first] = muCondition;
530 if (m_verbosity && m_isDebugEnabled) {
531 std::ostringstream myCout;
532 muCondition->
print(myCout);
534 LogTrace(
"L1TGlobal") << myCout.str();
546 cMapResults[itCond->first] = muShowerCondition;
548 if (m_verbosity && m_isDebugEnabled) {
549 std::ostringstream myCout;
550 muShowerCondition->
print(myCout);
552 edm::LogWarning(
"L1TGlobal") <<
"MuonShowerCondition " << myCout.str();
559 const int ifCaloEtaNumberBits = 0;
562 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
568 cMapResults[itCond->first] = caloCondition;
570 if (m_verbosity && m_isDebugEnabled) {
571 std::ostringstream myCout;
572 caloCondition->
print(myCout);
574 LogTrace(
"L1TGlobal") << myCout.str();
585 cMapResults[itCond->first] = eSumCondition;
587 if (m_verbosity && m_isDebugEnabled) {
588 std::ostringstream myCout;
589 eSumCondition->
print(myCout);
591 LogTrace(
"L1TGlobal") << myCout.str();
603 cMapResults[itCond->first] = extCondition;
605 if (m_verbosity && m_isDebugEnabled) {
606 std::ostringstream myCout;
607 extCondition->
print(myCout);
609 LogTrace(
"L1TGlobal") << myCout.str();
619 const int cond0Ind = corrTemplate->
cond0Index();
620 const int cond1Ind = corrTemplate->
cond1Index();
626 int cond0NrL1Objects = 0;
627 int cond1NrL1Objects = 0;
628 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " 631 switch (cond0Categ) {
633 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
636 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
639 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
646 switch (cond1Categ) {
648 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
651 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
654 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
667 cMapResults[itCond->first] = correlationCond;
669 if (m_verbosity && m_isDebugEnabled) {
670 std::ostringstream myCout;
671 correlationCond->
print(myCout);
673 LogTrace(
"L1TGlobal") << myCout.str();
686 const int cond0Ind = corrTemplate->
cond0Index();
687 const int cond1Ind = corrTemplate->
cond1Index();
688 const int cond2Ind = corrTemplate->
cond2Index();
695 int cond0NrL1Objects = 0;
696 int cond1NrL1Objects = 0;
697 int cond2NrL1Objects = 0;
698 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects " 699 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects;
701 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
703 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
706 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
708 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
711 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
713 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
720 correlationThreeBodyCond->
setScales(>Scales);
722 cMapResults[itCond->first] = correlationThreeBodyCond;
724 if (m_verbosity && m_isDebugEnabled) {
725 std::ostringstream myCout;
726 correlationThreeBodyCond->
print(myCout);
728 LogTrace(
"L1TGlobal") << myCout.str();
740 const int cond0Ind = corrTemplate->
cond0Index();
741 const int cond1Ind = corrTemplate->
cond1Index();
742 const int cond2Ind = corrTemplate->
cond2Index();
749 int cond0NrL1Objects = 0;
750 int cond1NrL1Objects = 0;
751 int cond2NrL1Objects = 0;
752 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
753 <<
" cond2NrL1Objects " << cond2NrL1Objects;
755 switch (cond0Categ) {
757 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
760 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
763 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
770 switch (cond1Categ) {
772 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
775 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
778 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
785 switch (cond2Categ) {
787 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
790 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
793 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
804 correlationCondWOR->
setScales(>Scales);
807 cMapResults[itCond->first] = correlationCondWOR;
809 if (m_verbosity && m_isDebugEnabled) {
810 std::ostringstream myCout;
811 correlationCondWOR->
print(myCout);
813 LogTrace(
"L1TGlobal") << myCout.str();
835 std::vector<GlobalObjectMap> objMapVec;
836 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
837 objMapVec.reserve(numberPhysTriggers);
839 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
841 gtAlg.
evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
843 int algBitNumber = (itAlgo->second).algoBitNumber();
846 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
847 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult;
851 m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
852 m_algInitialOr =
true;
855 if (m_verbosity && m_isDebugEnabled) {
856 std::ostringstream myCout;
857 (itAlgo->second).
print(myCout);
860 LogTrace(
"L1TGlobal") << myCout.str();
864 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
865 std::vector<L1TObjectTypeInCond> otypes;
871 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
873 auto match = imap->find(iop->tokenName);
875 if (match != imap->end()) {
879 otype = match->second->objectType();
881 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
887 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
889 otypes.push_back(
otype);
904 if (m_verbosity && m_isDebugEnabled) {
905 std::ostringstream myCout1;
906 objMap.
print(myCout1);
908 LogTrace(
"L1TGlobal") << myCout1.str();
911 objMapVec.push_back(objMap);
916 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
917 gtObjectMapRecord->swapGtObjectMap(objMapVec);
923 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
924 itCondOnChip != m_conditionResultMaps.end();
927 delete itCond->second;
928 itCond->second =
nullptr;
937 const int iBxInEvent,
938 const int totalBxInEvent,
939 const unsigned int numberPhysTriggers,
940 const std::vector<double>& prescaleFactorsAlgoTrig,
941 const std::vector<unsigned int>& triggerMaskAlgoTrig,
942 const std::vector<int>& triggerMaskVetoAlgoTrig,
943 const bool algorithmTriggersUnprescaled,
944 const bool algorithmTriggersUnmasked) {
946 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard apply Final Decision Logic ";
950 if (m_prescaleCounterAlgoTrig.empty()
or 951 (m_currentLumi !=
iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
952 m_prescaleCounterAlgoTrig.clear();
953 m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
954 auto const& prescaleCountersAlgoTrig =
955 m_semiRandomInitialPSCounters ? prescaleCountersWithSemirandomInitialCounter(prescaleFactorsAlgoTrig,
iEvent)
956 : prescaleCounters(prescaleFactorsAlgoTrig);
957 for (
int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
958 m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
961 m_currentLumi =
iEvent.luminosityBlock();
966 m_uGtAlgBlk.copyInitialToInterm();
971 if (!algorithmTriggersUnprescaled) {
973 int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
975 bool temp_algPrescaledOr =
false;
976 bool alreadyReported =
false;
977 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
978 bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
981 if (iBit < prescaleFactorsAlgoTrig.size()) {
982 if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
983 bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
985 temp_algPrescaledOr =
true;
988 m_uGtAlgBlk.setAlgoDecisionInterm(iBit,
false);
992 temp_algPrescaledOr =
true;
995 else if (!alreadyReported) {
996 alreadyReported =
true;
997 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1002 m_algPrescaledOr = temp_algPrescaledOr;
1006 m_algPrescaledOr = m_algInitialOr;
1012 m_uGtAlgBlk.copyIntermToFinal();
1014 if (!algorithmTriggersUnmasked) {
1015 bool temp_algFinalOr =
false;
1016 bool alreadyReported =
false;
1017 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1018 const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1022 bool isMasked =
false;
1023 if (iBit < triggerMaskAlgoTrig.size())
1024 isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1025 else if (!alreadyReported) {
1026 alreadyReported =
true;
1027 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1030 bool const passMask = (bitValue && !isMasked);
1033 temp_algFinalOr =
true;
1035 m_uGtAlgBlk.setAlgoDecisionFinal(iBit,
false);
1038 if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1039 m_algFinalOrVeto =
true;
1043 m_algIntermOr = temp_algFinalOr;
1046 m_algIntermOr = m_algPrescaledOr;
1053 m_algFinalOr = (m_algIntermOr & !m_algFinalOrVeto);
1058 std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
1063 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1067 m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1068 m_uGtAlgBlk.setPreScColumn(prescaleSet);
1069 m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1070 m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1072 m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto);
1073 m_uGtAlgBlk.setFinalORPreVeto(m_algIntermOr);
1074 m_uGtAlgBlk.setFinalOR(m_algFinalOr);
1076 uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1086 m_uGtAlgBlk.reset();
1088 m_gtlDecisionWord.reset();
1089 m_gtlAlgorithmOR.reset();
1094 m_candL1Mu->clear();
1095 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
1100 m_candL1MuShower->clear();
1101 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
1106 m_candL1EG->clear();
1107 m_candL1Tau->clear();
1108 m_candL1Jet->clear();
1109 m_candL1EtSum->clear();
1111 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
1112 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
1113 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
1114 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
1118 m_candL1External->clear();
1119 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
1124 LogTrace(
"L1TGlobal") <<
"\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1126 int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1127 LogTrace(
"L1TGlobal") <<
"Number of GMT muons = " << nrL1Mu <<
"\n";
1132 std::vector<double>
const& prescaleFactorsAlgoTrig) {
1133 std::vector<PrescaleCounter>
out;
1134 out.reserve(prescaleFactorsAlgoTrig.size());
1135 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1136 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1143 std::vector<double>
const& prescaleFactorsAlgoTrig,
edm::Event const&
iEvent) {
1147 std::srand(
iEvent.id().run());
1148 std::srand(std::rand() +
iEvent.id().luminosityBlock());
1149 std::srand(std::rand() +
iEvent.id().event());
1150 int const semirandom = std::rand();
1152 std::vector<PrescaleCounter>
out;
1153 out.reserve(prescaleFactorsAlgoTrig.size());
1155 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1156 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1160 auto& prescaleCounter =
out.back();
1161 if (prescaleCounter.prescale_count > 0) {
1162 prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1171 trigger_counter += m_singlestep;
1173 if (prescale_count == 0
or trigger_counter < prescale_count)
1176 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