80 m_l1GtMenuCacheID(0ULL),
83 m_l1UseL1TriggerObjectMaps(parSet.getParameter<
bool>(
"L1UseL1TriggerObjectMaps")),
86 m_l1NrBxInEvent(parSet.getParameter<
int>(
"L1NrBxInEvent")),
89 m_l1TechTriggerSeeding(parSet.getParameter<
bool>(
"L1TechTriggerSeeding")),
92 m_l1UseAliasesForSeeding(parSet.getParameter<
bool>(
"L1UseAliasesForSeeding")),
95 m_l1SeedsLogicalExpression(parSet.getParameter<
std::
string>(
"L1SeedsLogicalExpression")),
98 m_l1GtReadoutRecordTag(parSet.getParameter<
edm::
InputTag>(
"L1GtReadoutRecordTag")),
102 m_l1GtObjectMapTag(parSet.getParameter<
edm::
InputTag>(
"L1GtObjectMapTag")),
106 m_l1CollectionsTag(parSet.getParameter<
edm::
InputTag>(
"L1CollectionsTag")),
109 m_l1MuonCollectionTag(parSet.getParameter<
edm::
InputTag>(
"L1MuonCollectionTag")),
131 m_l1GlobalDecision(
false),
158 <<
" if false: seeding with L1Extra\n" 159 <<
"Number of BxInEvent when seeding with L1Extra: " <<
m_l1NrBxInEvent <<
"\n" 160 <<
" aka w/o object maps\n " 164 <<
"L1 Seeds Logical Expression: " 192 desc.
add<
bool>(
"L1UseL1TriggerObjectMaps",
true);
196 desc.
add<
int>(
"L1NrBxInEvent", 3);
200 desc.
add<
bool>(
"L1TechTriggerSeeding",
false);
203 desc.
add<
bool>(
"L1UseAliasesForSeeding",
true);
234 descriptions.
add(
"hltLevel1GTSeed", desc);
267 if (!gtReadoutRecord.
isValid()) {
268 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerReadoutRecord with input tag " 270 <<
"\nrequested in configuration, but not found in the event." << std::endl;
275 uint16_t gtFinalOR = gtReadoutRecord->
finalOR();
276 int physicsDaqPartition = 0;
277 bool gtDecision =
static_cast<bool>(gtFinalOR & (1 << physicsDaqPartition));
329 <<
"\n Number of algorithm names: " << (algorithmMap.size())
330 <<
"\n Number of algorithm aliases: " << (algorithmAliasMap.size()) <<
"\n" 344 iEvent, filterproduct, l1GtTmAlgo.
product(), gtReadoutRecordPtr, physicsDaqPartition))
361 auto itCond = conditionMap.find(cndName);
362 if (itCond != conditionMap.end())
363 return (&((itCond->second)->objectType()));
366 throw cms::Exception(
"FailModule") <<
"\nCondition " << cndName <<
" not found in the condition map" 367 <<
" for chip number " << chipNr;
385 for (
auto&
i : algOpTokenVector) {
386 auto itAlgo = algorithmMap.find(
i.tokenName);
387 if (itAlgo != algorithmMap.end()) {
388 int bitNr = (itAlgo->second).algoBitNumber();
389 int chipNr = (itAlgo->second).algoChipNumber();
391 i.tokenNumber = bitNr;
395 if (jSeed < l1AlgoSeedsSize) {
403 const std::vector<L1GtLogicParser::TokenRPN>& aRpnVector = (itAlgo->second).algoRpnVector();
404 size_t aRpnVectorSize = aRpnVector.size();
409 std::vector<const std::vector<L1GtObject>*> tmpObjTypeVec;
410 tmpObjTypeVec.reserve(aRpnVectorSize);
412 for (
size_t opI = 0; opI < aRpnVectorSize; ++opI) {
415 if (!cName.empty()) {
431 <<
", requested as seed by a HLT path, not found in the L1 trigger menu\n " 447 const std::vector<unsigned int>& triggerMask,
448 const int physicsDaqPartition) {
451 for (
auto&
i : algOpTokenVector) {
452 int iBit =
i.tokenNumber;
453 bool iResult = gtWord.at(iBit);
455 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
462 if (triggerMaskBit) {
470 i.tokenResult = iResult;
474 int iBit = m_l1AlgoSeed.tokenNumber;
475 bool iResult = gtWord.at(iBit);
477 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
484 if (triggerMaskBit) {
492 m_l1AlgoSeed.tokenResult = iResult;
496 bool newMenu =
false;
506 for (
auto&
i : algOpTokenVector) {
508 std::istringstream bitStream(bitString);
511 if ((bitStream >> bitInt).fail()) {
513 <<
"\n Conversion to integer failed for " << bitString << std::endl;
516 i.tokenNumber = bitInt;
521 std::istringstream bitStream(bitString);
524 if ((bitStream >> bitInt).fail()) {
526 <<
"\n Conversion to integer failed for " << bitString << std::endl;
529 m_l1AlgoSeed.tokenNumber = bitInt;
537 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: seeding via technical trigger" 538 <<
"\n update event quantities." << std::endl;
542 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: L1 trigger menu changed to " 545 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: L1 trigger menu unchanged (" 552 LogTrace(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: algOpTokenVector.size() = " << algOpTokenVector.size()
555 for (
auto const&
i : algOpTokenVector) {
556 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) <<
i.tokenNumber <<
"\t" << std::setw(25) <<
i.tokenName
557 <<
"\t" <<
i.tokenResult << std::endl;
560 LogTrace(
"HLTLevel1GTSeed") << std::endl;
562 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = " <<
m_l1AlgoSeeds.size()
566 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) << m_l1AlgoSeed.tokenNumber <<
"\t" << std::setw(25)
567 << m_l1AlgoSeed.tokenName <<
"\t" << m_l1AlgoSeed.tokenResult << std::endl;
570 LogTrace(
"HLTLevel1GTSeed") << std::endl;
580 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: " <<
i->size() << std::endl;
582 for (
size_t j = 0;
j <
i->size(); ++
j) {
583 LogTrace(
"HLTLevel1GTSeed") <<
" ( " << (*i)[
j].operation <<
", " << (*i)[
j].operand <<
" )" << std::endl;
587 LogTrace(
"HLTLevel1GTSeed") << std::endl;
589 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: " 590 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = " 594 LogTrace(
"HLTLevel1GTSeed") <<
" Conditions for an algorithm: vector size: " <<
i.size() << std::endl;
596 for (
size_t j = 0;
j <
i.size(); ++
j) {
597 LogTrace(
"HLTLevel1GTSeed") <<
" Condition object type vector: size: " << (
i[
j])->
size() << std::endl;
599 for (
size_t k = 0;
k < (
i[
j])->
size(); ++
k) {
601 LogTrace(
"HLTLevel1GTSeed") <<
" " << obj <<
" ";
604 LogTrace(
"HLTLevel1GTSeed") << std::endl;
608 LogTrace(
"HLTLevel1GTSeed") << std::endl;
616 const int physicsDaqPartition) {
619 const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->
decisionWord();
627 std::ostringstream myCoutStream;
630 LogTrace(
"HLTLevel1GTSeed") << myCoutStream.str() <<
"\nHLTLevel1GTSeed::hltFilter " 632 <<
"\n Result for logical expression: " << seedsResult <<
"\n" 643 std::list<int> listMuon;
645 std::list<int> listIsoEG;
646 std::list<int> listNoIsoEG;
648 std::list<int> listCenJet;
649 std::list<int> listForJet;
650 std::list<int> listTauJet;
651 std::list<int> listIsoTauJet;
653 std::list<int> listETM;
654 std::list<int> listETT;
655 std::list<int> listHTT;
656 std::list<int> listHTM;
658 std::list<int> listJetCounts;
664 if (!gtObjectMapRecord.
isValid()) {
665 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerObjectMapRecord with input tag " 667 <<
"\nrequested in configuration, but not found in the event." << std::endl;
680 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
m_l1AlgoSeeds.begin();
686 int algBit = (*itSeed).tokenNumber;
688 bool algResult = (*itSeed).tokenResult;
690 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter " 691 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
692 <<
" in the object map seed list" 693 <<
"\n Algorithm result = " << algResult <<
"\n" 704 if (objMap ==
nullptr) {
705 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
706 <<
" (bit number " << algBit <<
") does not exist.\nReturn false.\n" 711 const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap = objMap->
operandTokenVector();
713 const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn = *(
m_l1AlgoSeedsRpn.at(iAlgo));
715 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
m_l1AlgoSeedsObjType[iAlgo];
724 LogTrace(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter " 725 <<
"\n condSeeds.size() = " << condSeeds.size() << std::endl;
727 for (
auto& condSeed : condSeeds) {
728 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) << condSeed.tokenNumber <<
"\t" << std::setw(25)
729 << condSeed.tokenName <<
"\t" << condSeed.tokenResult << std::endl;
732 LogTrace(
"HLTLevel1GTSeed") << std::endl;
735 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itCond = condSeeds.begin();
736 itCond != condSeeds.end();
739 int cndNumber = (*itCond).tokenNumber;
740 bool cndResult = (*itCond).tokenResult;
742 const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
759 for (
auto const& itComb : (*cndComb)) {
762 for (
auto itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
764 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
772 switch (objTypeVal) {
774 listMuon.push_back(*itObject);
779 listNoIsoEG.push_back(*itObject);
784 listIsoEG.push_back(*itObject);
789 listCenJet.push_back(*itObject);
794 listForJet.push_back(*itObject);
799 listTauJet.push_back(*itObject);
808 int hfInd = (*itObject);
809 if (cndName.find(
"Ind0") != std::string::npos)
811 else if (cndName.find(
"Ind1") != std::string::npos)
813 else if (cndName.find(
"Ind2") != std::string::npos)
815 else if (cndName.find(
"Ind3") != std::string::npos)
817 listIsoTauJet.push_back(hfInd);
822 listETM.push_back(*itObject);
828 listETT.push_back(*itObject);
834 listHTT.push_back(*itObject);
840 listHTM.push_back(*itObject);
846 listJetCounts.push_back(*itObject);
853 LogDebug(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter " 854 <<
"\n Unknown object of type " << objTypeVal <<
" and index " 855 << (*itObject) <<
" in the seed list." << std::endl;
874 listNoIsoEG.unique();
885 listIsoTauJet.sort();
886 listIsoTauJet.unique();
900 listJetCounts.sort();
901 listJetCounts.unique();
908 if (!listMuon.empty()) {
914 <<
"\nrequested in configuration, but not found in the event." 915 <<
"\nNo muon added to filterproduct." << std::endl;
918 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
925 if (!listIsoEG.empty()) {
931 <<
"\nrequested in configuration, but not found in the event." 932 <<
"\nNo IsoEG added to filterproduct." << std::endl;
935 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
942 if (!listNoIsoEG.empty()) {
948 <<
"\nrequested in configuration, but not found in the event." 949 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
952 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj != listNoIsoEG.end(); ++itObj) {
959 if (!listCenJet.empty()) {
965 <<
"\nrequested in configuration, but not found in the event." 966 <<
"\nNo CenJet added to filterproduct." << std::endl;
969 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj != listCenJet.end(); ++itObj) {
976 if (!listForJet.empty()) {
982 <<
"\nrequested in configuration, but not found in the event." 983 <<
"\nNo ForJet added to filterproduct." << std::endl;
986 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj != listForJet.end(); ++itObj) {
993 if (!listTauJet.empty()) {
999 <<
"\nrequested in configuration, but not found in the event." 1000 <<
"\nNo TauJet added to filterproduct." << std::endl;
1003 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj != listTauJet.end(); ++itObj) {
1010 if (!listIsoTauJet.empty()) {
1016 <<
"\nrequested in configuration, but not found in the event." 1017 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1020 for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj != listIsoTauJet.end(); ++itObj) {
1027 if (!listETM.empty()) {
1031 if (!l1EnergySums.
isValid()) {
1033 <<
"\nrequested in configuration, but not found in the event." 1034 <<
"\nNo ETM added to filterproduct." << std::endl;
1035 }
else if (l1EnergySums->empty()) {
1037 <<
"\nfound in the event but with 0 size." 1038 <<
"\nNo ETM added to filterproduct." << std::endl;
1041 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1047 if (!listETT.empty()) {
1051 if (!l1EnergySums.
isValid()) {
1053 <<
"\nrequested in configuration, but not found in the event." 1054 <<
"\nNo ETT added to filterproduct." << std::endl;
1055 }
else if (l1EnergySums->empty()) {
1057 <<
"\nfound in the event but with 0 size." 1058 <<
"\nNo ETT added to filterproduct." << std::endl;
1061 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1067 if (!listHTT.empty()) {
1071 if (!l1EnergySums.
isValid()) {
1073 <<
"\nrequested in configuration, but not found in the event." 1074 <<
"\nNo HTT added to filterproduct." << std::endl;
1076 }
else if (l1EnergySums->empty()) {
1078 <<
"\nfound in the event but with 0 size." 1079 <<
"\nNo HTT added to filterproduct." << std::endl;
1082 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1088 if (!listHTM.empty()) {
1092 if (!l1EnergySums.
isValid()) {
1094 <<
"\nrequested in configuration, but not found in the event." 1095 <<
"\nNo HTM added to filterproduct." << std::endl;
1097 }
else if (l1EnergySums->empty()) {
1099 <<
"\nfound in the event but with 0 size." 1100 <<
"\nNo HTM added to filterproduct." << std::endl;
1103 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1161 bool includeMuon =
true;
1163 bool includeIsoEG =
true;
1164 bool includeNoIsoEG =
true;
1166 bool includeCenJet =
true;
1167 bool includeForJet =
true;
1168 bool includeTauJet =
true;
1169 bool includeIsoTauJet =
true;
1171 bool includeETM =
true;
1172 bool includeETT =
true;
1173 bool includeHTT =
true;
1174 bool includeHTM =
true;
1176 bool includeJetCounts =
true;
1179 bool objectsInFilter =
false;
1188 int algBit = m_l1AlgoSeed.tokenNumber;
1190 bool algResult = m_l1AlgoSeed.tokenResult;
1192 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter " 1193 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1194 <<
" in the object map seed list" 1195 <<
"\n Algorithm result = " << algResult << std::endl;
1197 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
m_l1AlgoSeedsObjType[iAlgo];
1204 for (
auto condObj : algoSeedsObjTypeVec) {
1205 for (
auto itObj : (*condObj)) {
1206 LogTrace(
"HLTLevel1GTSeed") <<
" Object type in conditions from this algorithm = " << itObj << std::endl;
1216 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag 1217 <<
"\nrequested in configuration, but not found in the event." 1218 <<
"\nNo muon added to filterproduct." << std::endl;
1222 for (
auto objIter = l1Muon->begin(); objIter != l1Muon->end(); ++objIter) {
1225 int bxNr = objIter->bx();
1226 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1227 objectsInFilter =
true;
1232 includeMuon =
false;
1244 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag 1245 <<
"\nrequested in configuration, but not found in the event." 1246 <<
"\nNo IsoEG added to filterproduct." << std::endl;
1250 for (
auto objIter = l1IsoEG->begin(); objIter != l1IsoEG->end(); ++objIter) {
1253 int bxNr = objIter->bx();
1254 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1255 objectsInFilter =
true;
1260 includeIsoEG =
false;
1265 if (includeNoIsoEG) {
1271 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag 1272 <<
"\nrequested in configuration, but not found in the event." 1273 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
1277 for (
auto objIter = l1NoIsoEG->begin(); objIter != l1NoIsoEG->end(); ++objIter) {
1280 int bxNr = objIter->bx();
1281 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1282 objectsInFilter =
true;
1287 includeNoIsoEG =
false;
1292 if (includeCenJet) {
1298 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag 1299 <<
"\nrequested in configuration, but not found in the event." 1300 <<
"\nNo CenJet added to filterproduct." << std::endl;
1304 for (
auto objIter = l1CenJet->begin(); objIter != l1CenJet->end(); ++objIter) {
1307 int bxNr = objIter->bx();
1308 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1309 objectsInFilter =
true;
1314 includeCenJet =
false;
1321 if (includeForJet) {
1327 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag 1328 <<
"\nrequested in configuration, but not found in the event." 1329 <<
"\nNo ForJet added to filterproduct." << std::endl;
1333 for (
auto objIter = l1ForJet->begin(); objIter != l1ForJet->end(); ++objIter) {
1336 int bxNr = objIter->bx();
1337 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1338 objectsInFilter =
true;
1343 includeForJet =
false;
1350 if (includeTauJet) {
1356 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag 1357 <<
"\nrequested in configuration, but not found in the event." 1358 <<
"\nNo TauJet added to filterproduct." << std::endl;
1362 for (
auto objIter = l1TauJet->begin(); objIter != l1TauJet->end(); ++objIter) {
1365 int bxNr = objIter->bx();
1366 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1367 objectsInFilter =
true;
1372 includeTauJet =
false;
1376 if (includeIsoTauJet) {
1382 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1IsoTauJetTag 1383 <<
"\nrequested in configuration, but not found in the event." 1384 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1388 for (
auto objIter = l1IsoTauJet->begin(); objIter != l1IsoTauJet->end(); ++objIter) {
1391 int bxNr = objIter->bx();
1392 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1393 objectsInFilter =
true;
1398 includeIsoTauJet =
false;
1409 if (!l1EnergySums.
isValid()) {
1411 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1412 <<
"\nrequested in configuration, but not found in the event." 1413 <<
"\nNo ETM added to filterproduct." << std::endl;
1415 }
else if (l1EnergySums->empty()) {
1416 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag " 1418 <<
"\nNo ETM added to filterproduct." << std::endl;
1422 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1425 int bxNr = objIter->bx();
1426 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1427 objectsInFilter =
true;
1443 if (!l1EnergySums.
isValid()) {
1445 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1446 <<
"\nrequested in configuration, but not found in the event." 1447 <<
"\nNo ETT added to filterproduct." << std::endl;
1449 }
else if (l1EnergySums->empty()) {
1450 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag " 1452 <<
"\nNo ETT added to filterproduct." << std::endl;
1456 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1459 int bxNr = objIter->bx();
1460 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1461 objectsInFilter =
true;
1477 if (!l1EnergySums.
isValid()) {
1479 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1480 <<
"\nrequested in configuration, but not found in the event." 1481 <<
"\nNo HTT added to filterproduct." << std::endl;
1483 }
else if (l1EnergySums->empty()) {
1484 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag " 1486 <<
"\nNo HTT added to filterproduct." << std::endl;
1490 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1493 int bxNr = objIter->bx();
1494 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1495 objectsInFilter =
true;
1510 if (!l1EnergySums.
isValid()) {
1512 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1513 <<
"\nrequested in configuration, but not found in the event." 1514 <<
"\nNo HTM added to filterproduct." << std::endl;
1516 }
else if (l1EnergySums->empty()) {
1517 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag " 1519 <<
"\nNo HTM added to filterproduct." << std::endl;
1523 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1526 int bxNr = objIter->bx();
1527 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1528 objectsInFilter =
true;
1539 if (includeJetCounts) {
1548 LogDebug(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter " 1549 <<
"\n Unknown object of type " << itObj <<
" in the seed list." 1556 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1559 return objectsInFilter;
1564 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter " 1565 <<
"\n Dump TriggerFilterObjectWithRefs\n" 1568 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1570 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1571 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1573 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1574 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1575 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1576 std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1578 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1579 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1580 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1581 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1584 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1587 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1590 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1593 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1596 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1599 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1602 const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1605 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1608 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1611 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1614 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1616 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n" 1617 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n" 1618 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n" 1619 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n" 1620 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n" 1621 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n" 1622 <<
" L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet <<
"\n" 1623 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n" 1624 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n" 1625 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n" 1626 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n" 1629 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1632 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu " 1634 <<
"q*PT = " << obj->charge() * obj->pt() <<
"\t" 1635 <<
"eta = " << obj->eta() <<
"\t" 1636 <<
"phi = " << obj->phi() <<
"\t" 1637 <<
"BX = " << obj->bx();
1640 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1643 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG " 1645 <<
"ET = " << obj->et() <<
"\t" 1646 <<
"eta = " << obj->eta() <<
"\t" 1647 <<
"phi = " << obj->phi() <<
"\t" 1648 <<
"BX = " << obj->bx();
1652 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
1655 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG" 1657 <<
"ET = " << obj->et() <<
"\t" 1658 <<
"eta = " << obj->eta() <<
"\t" 1659 <<
"phi = " << obj->phi() <<
"\t" 1660 <<
"BX = " << obj->bx();
1663 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
1666 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet " 1668 <<
"ET = " << obj->et() <<
"\t" 1669 <<
"eta = " << obj->eta() <<
"\t" 1670 <<
"phi = " << obj->phi() <<
"\t" 1671 <<
"BX = " << obj->bx();
1674 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
1677 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet " 1679 <<
"ET = " << obj->et() <<
"\t" 1680 <<
"eta = " << obj->eta() <<
"\t" 1681 <<
"phi = " << obj->phi() <<
"\t" 1682 <<
"BX = " << obj->bx();
1685 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
1688 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet " 1690 <<
"ET = " << obj->et() <<
"\t" 1691 <<
"eta = " << obj->eta() <<
"\t" 1692 <<
"phi = " << obj->phi() <<
"\t" 1693 <<
"BX = " << obj->bx();
1696 for (
size_t i = 0;
i != sizeSeedsL1IsoTauJet;
i++) {
1699 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoTauJet " 1701 <<
"ET = " << obj->et() <<
"\t" 1702 <<
"eta = " << obj->eta() <<
"\t" 1703 <<
"phi = " << obj->phi() <<
"\t" 1704 <<
"BX = " << obj->bx();
1707 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
1710 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM " 1712 <<
"ET = " << obj->etMiss() <<
"\t" 1713 <<
"phi = " << obj->phi() <<
"BX = " << obj->bx();
1716 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
1719 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT " 1721 <<
"ET = " << obj->etTotal() <<
"\t" 1722 <<
"BX = " << obj->bx();
1725 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
1728 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT " 1730 <<
"ET = " << obj->etTotal() <<
"\t" 1731 <<
"BX = " << obj->bx();
1734 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
1737 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM " 1739 <<
"ET = " << obj->etMiss() <<
"\t" 1740 <<
"phi = " << obj->phi() <<
"BX = " << obj->bx();
1743 LogTrace(
"HLTLevel1GTSeed") <<
" \n\n" << std::endl;
std::vector< L1GtLogicParser::OperandToken > expressionSeedsOperandList()
bool m_l1UseL1TriggerObjectMaps
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const
detailed print of filter content
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const L1GtTriggerMenu * m_l1GtMenu
trigger menu
bool getByToken(EDGetToken token, Handle< PROD > &result) const
enum start value shifted to 81 so as to avoid clashes with PDG codes
bool seedsL1Extra(edm::Event &, trigger::TriggerFilterObjectWithRefs &) const
const std::vector< L1GtLogicParser::OperandToken > & operandTokenVector() const
edm::InputTag m_l1EtMissMETTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMHTToken
void debugPrint(bool) const
const cms_uint16_t finalOR(int bxInEventValue) const
std::vector< L1GtLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
bool m_l1UseAliasesForSeeding
seeding uses algorithm aliases instead of algorithm names, if value is "true"
edm::InputTag m_l1IsoTauJetTag
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1ForJetToken
edm::InputTag m_l1ExtraTag
cached InputTags
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is "true"
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
edm::InputTag m_l1EtMissMHTTag
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps.
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override
filter the event
#define DEFINE_FWK_MODULE(type)
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMETToken
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtReadoutRecordToken
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1IsoTauJetToken
edm::InputTag m_l1CollectionsTag
Meta InputTag for L1 particle collections (except muon)
edm::InputTag m_l1MuonCollectionTag
Meta InputTag for L1 muon collection.
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1CenJetToken
void updateAlgoLogicParser(const L1GtTriggerMenu *, const AlgorithmMap &)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1IsoEGToken
std::string m_l1SeedsLogicalExpression
edm::InputTag m_l1IsoEGTag
unsigned long long m_l1GtMenuCacheID
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::InputTag m_l1ForJetTag
const DecisionWord & decisionWord(int bxInEventValue) const
bool m_isDebugEnabled
cache edm::isDebugEnabled()
edm::InputTag m_l1CenJetTag
edm::InputTag m_l1NoIsoEGTag
void convertStringToBitNumber()
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_l1TauJetToken
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > m_l1GtObjectMapToken
T const * product() const
const std::vector< L1GtObject > * objectTypeVec(const int chipNumber, const std::string &cndName) const
get the vector of object types for a condition cndName on the GTL chip chipNumber ...
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
bool m_l1GlobalDecision
replace string "L1GlobalDecision" with bool to speed up the "if"
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > m_l1MuonToken
HLTLevel1GTSeed(const edm::ParameterSet &)
constructor
edm::EDGetTokenT< l1extra::L1EmParticleCollection > m_l1NoIsoEGToken
bool seedsL1TriggerObjectMaps(edm::Event &, trigger::TriggerFilterObjectWithRefs &, const L1GtTriggerMask *, const L1GlobalTriggerReadoutRecord *, const int physicsDaqPartition)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...
edm::InputTag m_l1MuonTag
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
edm::InputTag m_l1TauJetTag
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
T const * product() const
~HLTLevel1GTSeed() override
destructor
const L1GlobalTriggerObjectMap * getObjectMap(const std::string &algoNameVal) const
return the object map for the algorithm algoNameVal
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
parameter description
virtual const bool expressionResult() const