101 delete m_candL1MuShower;
105 delete m_candL1EtSum;
106 delete m_candL1EtSumZdc;
107 delete m_candL1External;
117 m_axol1tlModelVersion = axol1tlModelVersion;
122 const int nrL1MuShower,
131 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
132 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
133 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
134 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
135 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
136 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
137 m_candL1EtSumZdc->setBXRange(m_bxFirst_, m_bxLast_);
138 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
142 LogDebug(
"L1TGlobal") <<
"\t Initializing Board with bxFirst = " << m_bxFirst_ <<
", bxLast = " << m_bxLast_;
152 const bool receiveEG,
154 const bool receiveTau,
156 const bool receiveJet,
158 const bool receiveEtSums,
159 const bool receiveEtSumsZdc) {
161 LogDebug(
"L1TGlobal") <<
"\n**** Board receiving Calo Data ";
169 iEvent.getByToken(egInputToken, egData);
173 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::EGamma> collection" 174 <<
"\nrequested in configuration, but not found in the event.\n";
178 for (
int i = egData->getFirstBX();
i <= egData->getLastBX(); ++
i) {
180 if (i < m_bxFirst_ || i > m_bxLast_)
185 for (std::vector<l1t::EGamma>::const_iterator eg = egData->begin(
i); eg != egData->end(
i); ++eg) {
187 (*m_candL1EG).push_back(
i, &(*eg));
189 edm::LogWarning(
"L1TGlobal") <<
" Too many EG (" << nObj <<
") for uGT Configuration maxEG =" << nrL1EG;
191 LogDebug(
"L1TGlobal") <<
"EG Pt " << eg->hwPt() <<
" Eta " << eg->hwEta() <<
" Phi " << eg->hwPhi()
192 <<
" Qual " << eg->hwQual() <<
" Iso " << eg->hwIso();
202 iEvent.getByToken(tauInputToken, tauData);
206 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::Tau> collection" 207 <<
"\nrequested in configuration, but not found in the event.\n";
211 for (
int i = tauData->getFirstBX();
i <= tauData->getLastBX(); ++
i) {
213 if (i < m_bxFirst_ || i > m_bxLast_)
218 for (std::vector<l1t::Tau>::const_iterator
tau = tauData->begin(
i);
tau != tauData->end(
i); ++
tau) {
219 if (nObj < nrL1Tau) {
220 (*m_candL1Tau).push_back(
i, &(*
tau));
222 LogTrace(
"L1TGlobal") <<
" Too many Tau (" << nObj <<
") for uGT Configuration maxTau =" << nrL1Tau;
225 LogDebug(
"L1TGlobal") <<
"tau Pt " <<
tau->hwPt() <<
" Eta " <<
tau->hwEta() <<
" Phi " <<
tau->hwPhi()
226 <<
" Qual " <<
tau->hwQual() <<
" Iso " <<
tau->hwIso();
240 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::Jet> collection" 241 <<
"\nrequested in configuration, but not found in the event.\n";
247 if (i < m_bxFirst_ || i > m_bxLast_)
253 if (nObj < nrL1Jet) {
254 (*m_candL1Jet).push_back(
i, &(*
jet));
256 edm::LogWarning(
"L1TGlobal") <<
" Too many Jets (" << nObj <<
") for uGT Configuration maxJet =" << nrL1Jet;
259 LogDebug(
"L1TGlobal") <<
"Jet Pt " <<
jet->hwPt() <<
" Eta " <<
jet->hwEta() <<
" Phi " <<
jet->hwPhi()
260 <<
" Qual " <<
jet->hwQual() <<
" Iso " <<
jet->hwIso();
269 iEvent.getByToken(sumInputToken, etSumData);
273 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::EtSum> collection" 274 <<
"\nrequested in configuration, but not found in the event.\n";
277 for (
int i = etSumData->getFirstBX();
i <= etSumData->getLastBX(); ++
i) {
279 if (i < m_bxFirst_ || i > m_bxLast_)
283 for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(
i); etsum != etSumData->end(
i); ++etsum) {
284 (*m_candL1EtSum).push_back(
i, &(*etsum));
329 if (receiveEtSumsZdc) {
331 iEvent.getByToken(sumZdcInputToken, etSumData);
335 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the ZDC Energy Sums collection" 336 <<
"\nrequested in configuration, but not found in the event.\n";
339 for (
int i = etSumData->getFirstBX();
i <= etSumData->getLastBX(); ++
i) {
341 if (i < m_bxFirst_ || i > m_bxLast_)
344 for (std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(
i); etsum != etSumData->end(
i); ++etsum) {
345 (*m_candL1EtSumZdc).push_back(
i, &(*etsum));
355 const bool receiveMu,
358 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving muon data = ";
367 iEvent.getByToken(muInputToken, muonData);
371 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::Muon> collection" 372 <<
"\nrequested in configuration, but not found in the event.\n";
376 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
378 if (i < m_bxFirst_ || i > m_bxLast_)
383 for (std::vector<l1t::Muon>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
385 (*m_candL1Mu).push_back(
i, &(*
mu));
387 edm::LogWarning(
"L1TGlobal") <<
" Too many Muons (" << nObj <<
") for uGT Configuration maxMu =" << nrL1Mu;
390 LogDebug(
"L1TGlobal") <<
"Muon Pt " <<
mu->hwPt() <<
" EtaAtVtx " <<
mu->hwEtaAtVtx() <<
" PhiAtVtx " 391 <<
mu->hwPhiAtVtx() <<
" Qual " <<
mu->hwQual() <<
" Iso " <<
mu->hwIso();
402 const bool receiveMuShower,
403 const int nrL1MuShower) {
405 if (receiveMuShower) {
407 iEvent.getByToken(muShowerInputToken, muonData);
411 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<l1t::MuonShower> collection" 412 <<
"\nrequested in configuration, but not found in the event.\n";
416 for (
int i = muonData->getFirstBX();
i <= muonData->getLastBX(); ++
i) {
418 if (i < m_bxFirst_ || i > m_bxLast_)
423 for (std::vector<l1t::MuonShower>::const_iterator
mu = muonData->begin(
i);
mu != muonData->end(
i); ++
mu) {
424 if (nObj < nrL1MuShower) {
429 std::shared_ptr<l1t::MuonShower> musOneNominalInTime =
430 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
431 std::shared_ptr<l1t::MuonShower> musOneTightInTime =
432 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
433 std::shared_ptr<l1t::MuonShower> musTwoLooseDiffSectorsInTime =
434 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
435 std::shared_ptr<l1t::MuonShower> musOutOfTime0 =
436 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
437 std::shared_ptr<l1t::MuonShower> musOutOfTime1 =
438 std::make_shared<l1t::MuonShower>(
false,
false,
false,
false,
false,
false);
440 musOneNominalInTime->setOneNominalInTime(
mu->isOneNominalInTime());
441 musOneTightInTime->setOneTightInTime(
mu->isOneTightInTime());
442 musTwoLooseDiffSectorsInTime->setTwoLooseDiffSectorsInTime(
mu->isTwoLooseDiffSectorsInTime());
443 musOutOfTime0->setMusOutOfTime0(
mu->musOutOfTime0());
444 musOutOfTime1->setMusOutOfTime1(
mu->musOutOfTime1());
446 (*m_candL1MuShower).push_back(
i, musOneNominalInTime);
447 (*m_candL1MuShower).push_back(
i, musOneTightInTime);
448 (*m_candL1MuShower).push_back(
i, musTwoLooseDiffSectorsInTime);
449 (*m_candL1MuShower).push_back(
i, musOutOfTime0);
450 (*m_candL1MuShower).push_back(
i, musOutOfTime1);
454 <<
") for uGT Configuration maxMuShower =" << nrL1MuShower;
466 const bool receiveExt) {
468 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard receiving external data = ";
477 iEvent.getByToken(extInputToken, extData);
481 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: Input tag for the BXVector<GlobalExtBlk> collection" 482 <<
"\nrequested in configuration, but not found in the event.\n";
486 for (
int i = extData->getFirstBX();
i <= extData->getLastBX(); ++
i) {
488 if (i < m_bxFirst_ || i > m_bxLast_)
492 for (std::vector<GlobalExtBlk>::const_iterator
ext = extData->begin(
i);
ext != extData->end(
i); ++
ext) {
493 (*m_candL1External).push_back(
i, &(*
ext));
504 const bool produceL1GtObjectMapRecord,
505 const int iBxInEvent,
506 std::unique_ptr<GlobalObjectMapRecord>& gtObjectMapRecord,
507 const unsigned int numberPhysTriggers,
509 const int nrL1MuShower,
513 const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->
gtConditionMap();
517 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName;
521 m_algInitialOr =
false;
522 m_algPrescaledOr =
false;
523 m_algIntermOr =
false;
524 m_algFinalOr =
false;
525 m_algFinalOrVeto =
false;
527 const std::vector<std::vector<MuonTemplate>>& corrMuon = m_l1GtMenu->
corMuonTemplate();
529 const std::vector<std::vector<CaloTemplate>>& corrCalo = m_l1GtMenu->
corCaloTemplate();
531 const std::vector<std::vector<EnergySumTemplate>>& corrEnergySum = m_l1GtMenu->
corEnergySumTemplate();
533 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
534 <<
"\nSize corrSums " << corrEnergySum.size();
542 if (m_conditionResultMaps.size() != conditionMap.size()) {
543 m_conditionResultMaps.clear();
544 m_conditionResultMaps.resize(conditionMap.size());
549 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
550 itCondOnChip != conditionMap.end();
556 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
558 switch ((itCond->second)->condCategory()) {
561 const int ifMuEtaNumberBits = 0;
569 cMapResults[itCond->first] = muCondition;
571 if (m_verbosity && m_isDebugEnabled) {
572 std::ostringstream myCout;
573 muCondition->
print(myCout);
575 LogTrace(
"L1TGlobal") << myCout.str();
587 cMapResults[itCond->first] = muShowerCondition;
589 if (m_verbosity && m_isDebugEnabled) {
590 std::ostringstream myCout;
591 muShowerCondition->
print(myCout);
593 edm::LogWarning(
"L1TGlobal") <<
"MuonShowerCondition " << myCout.str();
600 const int ifCaloEtaNumberBits = 0;
603 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
609 cMapResults[itCond->first] = caloCondition;
611 if (m_verbosity && m_isDebugEnabled) {
612 std::ostringstream myCout;
613 caloCondition->
print(myCout);
615 LogTrace(
"L1TGlobal") << myCout.str();
626 cMapResults[itCond->first] = eSumCondition;
628 if (m_verbosity && m_isDebugEnabled) {
629 std::ostringstream myCout;
630 eSumCondition->
print(myCout);
632 LogTrace(
"L1TGlobal") << myCout.str();
643 cMapResults[itCond->first] = eSumZdcCondition;
645 if (m_verbosity && m_isDebugEnabled) {
646 std::ostringstream myCout;
647 eSumZdcCondition->
print(myCout);
649 LogTrace(
"L1TGlobal") << myCout.str();
663 cMapResults[itCond->first] = axol1tlCondition;
665 if (m_verbosity && m_isDebugEnabled) {
666 std::ostringstream myCout;
667 axol1tlCondition->
print(myCout);
681 cMapResults[itCond->first] = extCondition;
683 if (m_verbosity && m_isDebugEnabled) {
684 std::ostringstream myCout;
685 extCondition->
print(myCout);
687 LogTrace(
"L1TGlobal") << myCout.str();
697 const int cond0Ind = corrTemplate->
cond0Index();
698 const int cond1Ind = corrTemplate->
cond1Index();
704 int cond0NrL1Objects = 0;
705 int cond1NrL1Objects = 0;
706 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " 709 switch (cond0Categ) {
711 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
714 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
717 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
724 switch (cond1Categ) {
726 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
729 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
732 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
745 cMapResults[itCond->first] = correlationCond;
747 if (m_verbosity && m_isDebugEnabled) {
748 std::ostringstream myCout;
749 correlationCond->
print(myCout);
751 LogTrace(
"L1TGlobal") << myCout.str();
764 const int cond0Ind = corrTemplate->
cond0Index();
765 const int cond1Ind = corrTemplate->
cond1Index();
766 const int cond2Ind = corrTemplate->
cond2Index();
773 int cond0NrL1Objects = 0;
774 int cond1NrL1Objects = 0;
775 int cond2NrL1Objects = 0;
776 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects " 777 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects;
779 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
781 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
784 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
786 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
789 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
791 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
798 correlationThreeBodyCond->
setScales(>Scales);
800 cMapResults[itCond->first] = correlationThreeBodyCond;
802 if (m_verbosity && m_isDebugEnabled) {
803 std::ostringstream myCout;
804 correlationThreeBodyCond->
print(myCout);
806 LogTrace(
"L1TGlobal") << myCout.str();
818 const int cond0Ind = corrTemplate->
cond0Index();
819 const int cond1Ind = corrTemplate->
cond1Index();
820 const int cond2Ind = corrTemplate->
cond2Index();
827 int cond0NrL1Objects = 0;
828 int cond1NrL1Objects = 0;
829 int cond2NrL1Objects = 0;
830 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
831 <<
" cond2NrL1Objects " << cond2NrL1Objects;
833 switch (cond0Categ) {
835 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
838 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
841 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
848 switch (cond1Categ) {
850 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
853 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
856 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
863 switch (cond2Categ) {
865 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
868 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
871 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
882 correlationCondWOR->
setScales(>Scales);
885 cMapResults[itCond->first] = correlationCondWOR;
887 if (m_verbosity && m_isDebugEnabled) {
888 std::ostringstream myCout;
889 correlationCondWOR->
print(myCout);
891 LogTrace(
"L1TGlobal") << myCout.str();
913 std::vector<GlobalObjectMap> objMapVec;
914 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
915 objMapVec.reserve(numberPhysTriggers);
917 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
919 gtAlg.
evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
921 int algBitNumber = (itAlgo->second).algoBitNumber();
924 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
925 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult;
929 m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber, algResult);
930 m_algInitialOr =
true;
933 if (m_verbosity && m_isDebugEnabled) {
934 std::ostringstream myCout;
935 (itAlgo->second).
print(myCout);
938 LogTrace(
"L1TGlobal") << myCout.str();
942 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
943 std::vector<L1TObjectTypeInCond> otypes;
948 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
949 auto match = imap->find(iop->tokenName);
951 if (match != imap->end()) {
955 otype = match->second->objectType();
957 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
963 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
965 otypes.push_back(
otype);
980 if (m_verbosity && m_isDebugEnabled) {
981 std::ostringstream myCout1;
982 objMap.
print(myCout1);
984 LogTrace(
"L1TGlobal") << myCout1.str();
987 objMapVec.push_back(objMap);
992 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
993 gtObjectMapRecord->swapGtObjectMap(objMapVec);
999 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip = m_conditionResultMaps.begin();
1000 itCondOnChip != m_conditionResultMaps.end();
1003 delete itCond->second;
1004 itCond->second =
nullptr;
1013 const int iBxInEvent,
1014 const int totalBxInEvent,
1015 const unsigned int numberPhysTriggers,
1016 const std::vector<double>& prescaleFactorsAlgoTrig,
1017 const std::vector<unsigned int>& triggerMaskAlgoTrig,
1018 const std::vector<int>& triggerMaskVetoAlgoTrig,
1019 const bool algorithmTriggersUnprescaled,
1020 const bool algorithmTriggersUnmasked) {
1022 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard apply Final Decision Logic ";
1026 if (m_prescaleCounterAlgoTrig.empty()
or 1027 (m_currentLumi !=
iEvent.luminosityBlock() and m_resetPSCountersEachLumiSec)) {
1028 m_prescaleCounterAlgoTrig.clear();
1029 m_prescaleCounterAlgoTrig.reserve(totalBxInEvent);
1030 auto const& prescaleCountersAlgoTrig =
1031 m_semiRandomInitialPSCounters ? prescaleCountersWithSemirandomInitialCounter(prescaleFactorsAlgoTrig,
iEvent)
1032 : prescaleCounters(prescaleFactorsAlgoTrig);
1033 for (
int iBxInEvent = 0; iBxInEvent < totalBxInEvent; ++iBxInEvent) {
1034 m_prescaleCounterAlgoTrig.push_back(prescaleCountersAlgoTrig);
1037 m_currentLumi =
iEvent.luminosityBlock();
1042 m_uGtAlgBlk.copyInitialToInterm();
1047 if (!algorithmTriggersUnprescaled) {
1049 int const inBxInEvent = totalBxInEvent / 2 + iBxInEvent;
1051 bool temp_algPrescaledOr =
false;
1052 bool alreadyReported =
false;
1053 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1054 bool const bitValue = m_uGtAlgBlk.getAlgoDecisionInitial(iBit);
1057 if (iBit < prescaleFactorsAlgoTrig.size()) {
1058 if (prescaleFactorsAlgoTrig.at(iBit) != 1) {
1059 bool const triggered = m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit).accept();
1061 temp_algPrescaledOr =
true;
1064 m_uGtAlgBlk.setAlgoDecisionInterm(iBit,
false);
1068 temp_algPrescaledOr =
true;
1071 else if (!alreadyReported) {
1072 alreadyReported =
true;
1073 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= prescaleFactorsAlgoTrig.size() in bx " << iBxInEvent;
1078 m_algPrescaledOr = temp_algPrescaledOr;
1082 m_algPrescaledOr = m_algInitialOr;
1088 m_uGtAlgBlk.copyIntermToFinal();
1090 if (!algorithmTriggersUnmasked) {
1091 bool temp_algFinalOr =
false;
1092 bool alreadyReported =
false;
1093 for (
unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) {
1094 const bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm(iBit);
1098 bool isMasked =
false;
1099 if (iBit < triggerMaskAlgoTrig.size())
1100 isMasked = (triggerMaskAlgoTrig.at(iBit) == 0);
1101 else if (!alreadyReported) {
1102 alreadyReported =
true;
1103 edm::LogWarning(
"L1TGlobal") <<
"\nWarning: algoBit >= triggerMaskAlgoTrig.size() in bx " << iBxInEvent;
1106 bool const passMask = (bitValue && !isMasked);
1109 temp_algFinalOr =
true;
1111 m_uGtAlgBlk.setAlgoDecisionFinal(iBit,
false);
1114 if (triggerMaskVetoAlgoTrig.at(iBit) == 1)
1115 m_algFinalOrVeto =
true;
1119 m_algIntermOr = temp_algFinalOr;
1122 m_algIntermOr = m_algPrescaledOr;
1129 m_algFinalOr = (m_algIntermOr & !m_algFinalOrVeto);
1134 std::unique_ptr<GlobalAlgBlkBxCollection>& uGtAlgRecord,
1139 LogDebug(
"L1TGlobal") <<
"\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent;
1143 m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
1144 m_uGtAlgBlk.setPreScColumn(prescaleSet);
1145 m_uGtAlgBlk.setL1MenuUUID(menuUUID);
1146 m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
1148 m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto);
1149 m_uGtAlgBlk.setFinalORPreVeto(m_algIntermOr);
1150 m_uGtAlgBlk.setFinalOR(m_algFinalOr);
1152 uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
1162 m_uGtAlgBlk.reset();
1164 m_gtlDecisionWord.reset();
1165 m_gtlAlgorithmOR.reset();
1170 m_candL1Mu->clear();
1171 m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
1176 m_candL1MuShower->clear();
1177 m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
1182 m_candL1EG->clear();
1183 m_candL1Tau->clear();
1184 m_candL1Jet->clear();
1185 m_candL1EtSum->clear();
1186 m_candL1EtSumZdc->clear();
1188 m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
1189 m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
1190 m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
1191 m_candL1EtSum->setBXRange(m_bxFirst_, m_bxLast_);
1192 m_candL1EtSumZdc->setBXRange(m_bxFirst_, m_bxLast_);
1196 m_candL1External->clear();
1197 m_candL1External->setBXRange(m_bxFirst_, m_bxLast_);
1202 LogTrace(
"L1TGlobal") <<
"\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = " << iBxInEvent;
1204 int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1205 LogTrace(
"L1TGlobal") <<
"Number of GMT muons = " << nrL1Mu <<
"\n";
1210 std::vector<double>
const& prescaleFactorsAlgoTrig) {
1211 std::vector<PrescaleCounter>
out;
1212 out.reserve(prescaleFactorsAlgoTrig.size());
1213 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1214 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1221 std::vector<double>
const& prescaleFactorsAlgoTrig,
edm::Event const&
iEvent) {
1225 std::srand(
iEvent.id().run());
1226 std::srand(std::rand() +
iEvent.id().luminosityBlock());
1227 std::srand(std::rand() +
iEvent.id().event());
1228 int const semirandom = std::rand();
1230 std::vector<PrescaleCounter>
out;
1231 out.reserve(prescaleFactorsAlgoTrig.size());
1233 for (
size_t iAlgo = 0; iAlgo < prescaleFactorsAlgoTrig.size(); ++iAlgo) {
1234 out.emplace_back(prescaleFactorsAlgoTrig[iAlgo]);
1238 auto& prescaleCounter =
out.back();
1239 if (prescaleCounter.prescale_count > 0) {
1240 prescaleCounter.trigger_counter = semirandom % prescaleCounter.prescale_count;
1249 trigger_counter += m_singlestep;
1251 if (prescale_count == 0
or trigger_counter < prescale_count)
1254 trigger_counter -= prescale_count;
void setAlgoBitNumber(int algoBitNumberValue)
void print(std::ostream &myCout) const override
print condition
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
void setAXOL1TLModelVersion(std::string axol1tlModelVersion)
static std::vector< PrescaleCounter > prescaleCountersWithSemirandomInitialCounter(std::vector< double > const &prescaleFactorsAlgoTrig, edm::Event const &iEvent)
void setVerbosity(const int verbosity)
const int cond1Index() const
void setModelVersion(const std::string modelversionname)
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 print(std::ostream &myCout) const override
print condition
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)
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 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, const bool receiveEtSumsZdc)
receive data from Global Muon Trigger
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 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