72 m_l1GtMenuCacheID(0ULL),
76 m_l1GtTriggerMaskAlgoTrigRcdToken(
esConsumes()),
77 m_l1GtTriggerMaskTechTrigRcdToken(
esConsumes()),
80 m_l1UseL1TriggerObjectMaps(parSet.getParameter<bool>(
"L1UseL1TriggerObjectMaps")),
83 m_l1NrBxInEvent(parSet.getParameter<int>(
"L1NrBxInEvent")),
86 m_l1TechTriggerSeeding(parSet.getParameter<bool>(
"L1TechTriggerSeeding")),
89 m_l1UseAliasesForSeeding(parSet.getParameter<bool>(
"L1UseAliasesForSeeding")),
92 m_l1SeedsLogicalExpression(parSet.getParameter<std::
string>(
"L1SeedsLogicalExpression")),
95 m_l1GtReadoutRecordTag(parSet.getParameter<edm::
InputTag>(
"L1GtReadoutRecordTag")),
99 m_l1GtObjectMapTag(parSet.getParameter<edm::
InputTag>(
"L1GtObjectMapTag")),
103 m_l1CollectionsTag(parSet.getParameter<edm::
InputTag>(
"L1CollectionsTag")),
106 m_l1MuonCollectionTag(parSet.getParameter<edm::
InputTag>(
"L1MuonCollectionTag")),
112 m_l1IsoEGTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"Isolated")),
114 m_l1NoIsoEGTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"NonIsolated")),
116 m_l1CenJetTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"Central")),
118 m_l1ForJetTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"Forward")),
120 m_l1TauJetTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"Tau")),
122 m_l1IsoTauJetTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"IsoTau")),
124 m_l1EtMissMETTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"MET")),
126 m_l1EtMissMHTTag(edm::
InputTag(m_l1CollectionsTag.
label(),
"MHT")),
128 m_l1GlobalDecision(
false),
155 <<
" if false: seeding with L1Extra\n"
156 <<
"Number of BxInEvent when seeding with L1Extra: " <<
m_l1NrBxInEvent <<
"\n"
157 <<
" aka w/o object maps\n "
161 <<
"L1 Seeds Logical Expression: "
189 desc.
add<
bool>(
"L1UseL1TriggerObjectMaps",
true);
193 desc.
add<
int>(
"L1NrBxInEvent", 3);
197 desc.
add<
bool>(
"L1TechTriggerSeeding",
false);
200 desc.
add<
bool>(
"L1UseAliasesForSeeding",
true);
231 descriptions.
add(
"hltLevel1GTSeed", desc);
263 if (!gtReadoutRecord.
isValid()) {
264 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerReadoutRecord with input tag "
266 <<
"\nrequested in configuration, but not found in the event." << std::endl;
271 uint16_t gtFinalOR = gtReadoutRecord->finalOR();
272 int physicsDaqPartition = 0;
273 bool gtDecision =
static_cast<bool>(gtFinalOR & (1 << physicsDaqPartition));
294 const std::vector<bool>& gtTechTrigWord = gtReadoutRecord->technicalTriggerWord();
319 const AlgorithmMap& algorithmMap = l1GtMenu->gtAlgorithmMap();
320 const AlgorithmMap& algorithmAliasMap = l1GtMenu->gtAlgorithmAliasMap();
322 LogTrace(
"HLTLevel1GTSeed") <<
"\n L1 trigger menu " << l1GtMenu->gtTriggerMenuInterface()
323 <<
"\n Number of algorithm names: " << (algorithmMap.size())
324 <<
"\n Number of algorithm aliases: " << (algorithmAliasMap.size()) <<
"\n"
338 iEvent, filterproduct, l1GtTmAlgo.product(), gtReadoutRecordPtr, physicsDaqPartition))
355 auto itCond = conditionMap.find(cndName);
356 if (itCond != conditionMap.end())
357 return (&((itCond->second)->objectType()));
360 throw cms::Exception(
"FailModule") <<
"\nCondition " << cndName <<
" not found in the condition map"
361 <<
" for chip number " << chipNr;
379 for (
auto&
i : algOpTokenVector) {
380 auto itAlgo = algorithmMap.find(
i.tokenName);
381 if (itAlgo != algorithmMap.end()) {
382 int bitNr = (itAlgo->second).algoBitNumber();
383 int chipNr = (itAlgo->second).algoChipNumber();
385 i.tokenNumber = bitNr;
389 if (jSeed < l1AlgoSeedsSize) {
397 const std::vector<L1GtLogicParser::TokenRPN>& aRpnVector = (itAlgo->second).algoRpnVector();
398 size_t aRpnVectorSize = aRpnVector.size();
403 std::vector<const std::vector<L1GtObject>*> tmpObjTypeVec;
404 tmpObjTypeVec.reserve(aRpnVectorSize);
406 for (
size_t opI = 0; opI < aRpnVectorSize; ++opI) {
409 if (!cName.empty()) {
425 <<
", requested as seed by a HLT path, not found in the L1 trigger menu\n "
441 const std::vector<unsigned int>& triggerMask,
442 const int physicsDaqPartition) {
445 for (
auto&
i : algOpTokenVector) {
446 int iBit =
i.tokenNumber;
447 bool iResult = gtWord.at(iBit);
449 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
456 if (triggerMaskBit) {
464 i.tokenResult = iResult;
468 int iBit = m_l1AlgoSeed.tokenNumber;
469 bool iResult = gtWord.at(iBit);
471 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
478 if (triggerMaskBit) {
486 m_l1AlgoSeed.tokenResult = iResult;
490 bool newMenu =
false;
500 for (
auto&
i : algOpTokenVector) {
502 std::istringstream bitStream(bitString);
505 if ((bitStream >> bitInt).fail()) {
507 <<
"\n Conversion to integer failed for " << bitString << std::endl;
510 i.tokenNumber = bitInt;
515 std::istringstream bitStream(bitString);
518 if ((bitStream >> bitInt).fail()) {
520 <<
"\n Conversion to integer failed for " << bitString << std::endl;
523 m_l1AlgoSeed.tokenNumber = bitInt;
531 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: seeding via technical trigger"
532 <<
"\n update event quantities." << std::endl;
536 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: L1 trigger menu changed to "
539 LogDebug(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: L1 trigger menu unchanged ("
546 LogTrace(
"HLTLevel1GTSeed") <<
"\n\nupdateAlgoLogicParser: algOpTokenVector.size() = " << algOpTokenVector.size()
549 for (
auto const&
i : algOpTokenVector) {
550 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) <<
i.tokenNumber <<
"\t" << std::setw(25) <<
i.tokenName
551 <<
"\t" <<
i.tokenResult << std::endl;
554 LogTrace(
"HLTLevel1GTSeed") << std::endl;
556 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = " <<
m_l1AlgoSeeds.size()
560 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) << m_l1AlgoSeed.tokenNumber <<
"\t" << std::setw(25)
561 << m_l1AlgoSeed.tokenName <<
"\t" << m_l1AlgoSeed.tokenResult << std::endl;
564 LogTrace(
"HLTLevel1GTSeed") << std::endl;
574 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: " <<
i->size() << std::endl;
576 for (
size_t j = 0;
j <
i->size(); ++
j) {
577 LogTrace(
"HLTLevel1GTSeed") <<
" ( " << (*i)[
j].operation <<
", " << (*i)[
j].operand <<
" )" << std::endl;
581 LogTrace(
"HLTLevel1GTSeed") << std::endl;
583 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: "
584 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = "
588 LogTrace(
"HLTLevel1GTSeed") <<
" Conditions for an algorithm: vector size: " <<
i.size() << std::endl;
590 for (
size_t j = 0;
j <
i.size(); ++
j) {
591 LogTrace(
"HLTLevel1GTSeed") <<
" Condition object type vector: size: " << (
i[
j])->
size() << std::endl;
593 for (
size_t k = 0;
k < (
i[
j])->
size(); ++
k) {
595 LogTrace(
"HLTLevel1GTSeed") <<
" " << obj <<
" ";
598 LogTrace(
"HLTLevel1GTSeed") << std::endl;
602 LogTrace(
"HLTLevel1GTSeed") << std::endl;
610 const int physicsDaqPartition) {
613 const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->
decisionWord();
621 std::ostringstream myCoutStream;
624 LogTrace(
"HLTLevel1GTSeed") << myCoutStream.str() <<
"\nHLTLevel1GTSeed::hltFilter "
626 <<
"\n Result for logical expression: " << seedsResult <<
"\n"
637 std::list<int> listMuon;
639 std::list<int> listIsoEG;
640 std::list<int> listNoIsoEG;
642 std::list<int> listCenJet;
643 std::list<int> listForJet;
644 std::list<int> listTauJet;
645 std::list<int> listIsoTauJet;
647 std::list<int> listETM;
648 std::list<int> listETT;
649 std::list<int> listHTT;
650 std::list<int> listHTM;
652 std::list<int> listJetCounts;
658 if (!gtObjectMapRecord.
isValid()) {
659 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
661 <<
"\nrequested in configuration, but not found in the event." << std::endl;
674 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
m_l1AlgoSeeds.begin();
680 int algBit = (*itSeed).tokenNumber;
682 bool algResult = (*itSeed).tokenResult;
684 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
685 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
686 <<
" in the object map seed list"
687 <<
"\n Algorithm result = " << algResult <<
"\n"
698 if (objMap ==
nullptr) {
699 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
700 <<
" (bit number " << algBit <<
") does not exist.\nReturn false.\n"
705 const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap = objMap->
operandTokenVector();
707 const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn = *(
m_l1AlgoSeedsRpn.at(iAlgo));
709 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
m_l1AlgoSeedsObjType[iAlgo];
718 LogTrace(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter "
719 <<
"\n condSeeds.size() = " << condSeeds.size() << std::endl;
721 for (
auto& condSeed : condSeeds) {
722 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5) << condSeed.tokenNumber <<
"\t" << std::setw(25)
723 << condSeed.tokenName <<
"\t" << condSeed.tokenResult << std::endl;
726 LogTrace(
"HLTLevel1GTSeed") << std::endl;
729 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itCond = condSeeds.begin();
730 itCond != condSeeds.end();
733 int cndNumber = (*itCond).tokenNumber;
734 bool cndResult = (*itCond).tokenResult;
736 const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
753 for (
auto const& itComb : (*cndComb)) {
756 for (
auto itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
758 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
766 switch (objTypeVal) {
768 listMuon.push_back(*itObject);
773 listNoIsoEG.push_back(*itObject);
778 listIsoEG.push_back(*itObject);
783 listCenJet.push_back(*itObject);
788 listForJet.push_back(*itObject);
793 listTauJet.push_back(*itObject);
802 int hfInd = (*itObject);
803 if (cndName.find(
"Ind0") != std::string::npos)
805 else if (cndName.find(
"Ind1") != std::string::npos)
807 else if (cndName.find(
"Ind2") != std::string::npos)
809 else if (cndName.find(
"Ind3") != std::string::npos)
811 listIsoTauJet.push_back(hfInd);
816 listETM.push_back(*itObject);
822 listETT.push_back(*itObject);
828 listHTT.push_back(*itObject);
834 listHTM.push_back(*itObject);
840 listJetCounts.push_back(*itObject);
847 LogDebug(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter "
848 <<
"\n Unknown object of type " << objTypeVal <<
" and index "
849 << (*itObject) <<
" in the seed list." << std::endl;
868 listNoIsoEG.unique();
879 listIsoTauJet.sort();
880 listIsoTauJet.unique();
894 listJetCounts.sort();
895 listJetCounts.unique();
902 if (!listMuon.empty()) {
908 <<
"\nrequested in configuration, but not found in the event."
909 <<
"\nNo muon added to filterproduct." << std::endl;
912 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
919 if (!listIsoEG.empty()) {
925 <<
"\nrequested in configuration, but not found in the event."
926 <<
"\nNo IsoEG added to filterproduct." << std::endl;
929 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
936 if (!listNoIsoEG.empty()) {
942 <<
"\nrequested in configuration, but not found in the event."
943 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
946 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj != listNoIsoEG.end(); ++itObj) {
953 if (!listCenJet.empty()) {
959 <<
"\nrequested in configuration, but not found in the event."
960 <<
"\nNo CenJet added to filterproduct." << std::endl;
963 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj != listCenJet.end(); ++itObj) {
970 if (!listForJet.empty()) {
976 <<
"\nrequested in configuration, but not found in the event."
977 <<
"\nNo ForJet added to filterproduct." << std::endl;
980 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj != listForJet.end(); ++itObj) {
987 if (!listTauJet.empty()) {
993 <<
"\nrequested in configuration, but not found in the event."
994 <<
"\nNo TauJet added to filterproduct." << std::endl;
997 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj != listTauJet.end(); ++itObj) {
1004 if (!listIsoTauJet.empty()) {
1010 <<
"\nrequested in configuration, but not found in the event."
1011 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1014 for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj != listIsoTauJet.end(); ++itObj) {
1021 if (!listETM.empty()) {
1025 if (!l1EnergySums.
isValid()) {
1027 <<
"\nrequested in configuration, but not found in the event."
1028 <<
"\nNo ETM added to filterproduct." << std::endl;
1029 }
else if (l1EnergySums->empty()) {
1031 <<
"\nfound in the event but with 0 size."
1032 <<
"\nNo ETM added to filterproduct." << std::endl;
1035 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1041 if (!listETT.empty()) {
1045 if (!l1EnergySums.
isValid()) {
1047 <<
"\nrequested in configuration, but not found in the event."
1048 <<
"\nNo ETT added to filterproduct." << std::endl;
1049 }
else if (l1EnergySums->empty()) {
1051 <<
"\nfound in the event but with 0 size."
1052 <<
"\nNo ETT added to filterproduct." << std::endl;
1055 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1061 if (!listHTT.empty()) {
1065 if (!l1EnergySums.
isValid()) {
1067 <<
"\nrequested in configuration, but not found in the event."
1068 <<
"\nNo HTT added to filterproduct." << std::endl;
1070 }
else if (l1EnergySums->empty()) {
1072 <<
"\nfound in the event but with 0 size."
1073 <<
"\nNo HTT added to filterproduct." << std::endl;
1076 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1082 if (!listHTM.empty()) {
1086 if (!l1EnergySums.
isValid()) {
1088 <<
"\nrequested in configuration, but not found in the event."
1089 <<
"\nNo HTM added to filterproduct." << std::endl;
1091 }
else if (l1EnergySums->empty()) {
1093 <<
"\nfound in the event but with 0 size."
1094 <<
"\nNo HTM added to filterproduct." << std::endl;
1097 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1155 bool includeMuon =
true;
1157 bool includeIsoEG =
true;
1158 bool includeNoIsoEG =
true;
1160 bool includeCenJet =
true;
1161 bool includeForJet =
true;
1162 bool includeTauJet =
true;
1163 bool includeIsoTauJet =
true;
1165 bool includeETM =
true;
1166 bool includeETT =
true;
1167 bool includeHTT =
true;
1168 bool includeHTM =
true;
1170 bool includeJetCounts =
true;
1173 bool objectsInFilter =
false;
1182 int algBit = m_l1AlgoSeed.tokenNumber;
1184 bool algResult = m_l1AlgoSeed.tokenResult;
1186 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1187 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1188 <<
" in the object map seed list"
1189 <<
"\n Algorithm result = " << algResult << std::endl;
1191 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
m_l1AlgoSeedsObjType[iAlgo];
1198 for (
auto condObj : algoSeedsObjTypeVec) {
1199 for (
auto itObj : (*condObj)) {
1200 LogTrace(
"HLTLevel1GTSeed") <<
" Object type in conditions from this algorithm = " << itObj << std::endl;
1210 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag
1211 <<
"\nrequested in configuration, but not found in the event."
1212 <<
"\nNo muon added to filterproduct." << std::endl;
1216 for (
auto objIter = l1Muon->begin(); objIter != l1Muon->end(); ++objIter) {
1219 int bxNr = objIter->bx();
1220 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1221 objectsInFilter =
true;
1226 includeMuon =
false;
1238 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag
1239 <<
"\nrequested in configuration, but not found in the event."
1240 <<
"\nNo IsoEG added to filterproduct." << std::endl;
1244 for (
auto objIter = l1IsoEG->begin(); objIter != l1IsoEG->end(); ++objIter) {
1247 int bxNr = objIter->bx();
1248 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1249 objectsInFilter =
true;
1254 includeIsoEG =
false;
1259 if (includeNoIsoEG) {
1265 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag
1266 <<
"\nrequested in configuration, but not found in the event."
1267 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
1271 for (
auto objIter = l1NoIsoEG->begin(); objIter != l1NoIsoEG->end(); ++objIter) {
1274 int bxNr = objIter->bx();
1275 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1276 objectsInFilter =
true;
1281 includeNoIsoEG =
false;
1286 if (includeCenJet) {
1292 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag
1293 <<
"\nrequested in configuration, but not found in the event."
1294 <<
"\nNo CenJet added to filterproduct." << std::endl;
1298 for (
auto objIter = l1CenJet->begin(); objIter != l1CenJet->end(); ++objIter) {
1301 int bxNr = objIter->bx();
1302 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1303 objectsInFilter =
true;
1308 includeCenJet =
false;
1315 if (includeForJet) {
1321 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag
1322 <<
"\nrequested in configuration, but not found in the event."
1323 <<
"\nNo ForJet added to filterproduct." << std::endl;
1327 for (
auto objIter = l1ForJet->begin(); objIter != l1ForJet->end(); ++objIter) {
1330 int bxNr = objIter->bx();
1331 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1332 objectsInFilter =
true;
1337 includeForJet =
false;
1344 if (includeTauJet) {
1350 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag
1351 <<
"\nrequested in configuration, but not found in the event."
1352 <<
"\nNo TauJet added to filterproduct." << std::endl;
1356 for (
auto objIter = l1TauJet->begin(); objIter != l1TauJet->end(); ++objIter) {
1359 int bxNr = objIter->bx();
1360 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1361 objectsInFilter =
true;
1366 includeTauJet =
false;
1370 if (includeIsoTauJet) {
1376 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1IsoTauJetTag
1377 <<
"\nrequested in configuration, but not found in the event."
1378 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1382 for (
auto objIter = l1IsoTauJet->begin(); objIter != l1IsoTauJet->end(); ++objIter) {
1385 int bxNr = objIter->bx();
1386 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1387 objectsInFilter =
true;
1392 includeIsoTauJet =
false;
1403 if (!l1EnergySums.
isValid()) {
1405 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1406 <<
"\nrequested in configuration, but not found in the event."
1407 <<
"\nNo ETM added to filterproduct." << std::endl;
1409 }
else if (l1EnergySums->empty()) {
1410 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag "
1412 <<
"\nNo ETM added to filterproduct." << std::endl;
1416 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1419 int bxNr = objIter->bx();
1420 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1421 objectsInFilter =
true;
1437 if (!l1EnergySums.
isValid()) {
1439 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1440 <<
"\nrequested in configuration, but not found in the event."
1441 <<
"\nNo ETT added to filterproduct." << std::endl;
1443 }
else if (l1EnergySums->empty()) {
1444 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag "
1446 <<
"\nNo ETT added to filterproduct." << std::endl;
1450 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1453 int bxNr = objIter->bx();
1454 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1455 objectsInFilter =
true;
1471 if (!l1EnergySums.
isValid()) {
1473 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1474 <<
"\nrequested in configuration, but not found in the event."
1475 <<
"\nNo HTT added to filterproduct." << std::endl;
1477 }
else if (l1EnergySums->empty()) {
1478 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag "
1480 <<
"\nNo HTT added to filterproduct." << std::endl;
1484 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1487 int bxNr = objIter->bx();
1488 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1489 objectsInFilter =
true;
1504 if (!l1EnergySums.
isValid()) {
1506 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1507 <<
"\nrequested in configuration, but not found in the event."
1508 <<
"\nNo HTM added to filterproduct." << std::endl;
1510 }
else if (l1EnergySums->empty()) {
1511 edm::LogWarning(
"HLTLevel1GTSeed") <<
"\nWarning: L1EtMissParticleCollection with input tag "
1513 <<
"\nNo HTM added to filterproduct." << std::endl;
1517 for (
auto objIter = l1EnergySums->begin(); objIter != l1EnergySums->end(); ++objIter) {
1520 int bxNr = objIter->bx();
1521 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1522 objectsInFilter =
true;
1533 if (includeJetCounts) {
1542 LogDebug(
"HLTLevel1GTSeed") <<
"\n HLTLevel1GTSeed::hltFilter "
1543 <<
"\n Unknown object of type " << itObj <<
" in the seed list."
1550 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1553 return objectsInFilter;
1558 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1559 <<
"\n Dump TriggerFilterObjectWithRefs\n"
1562 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1564 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1565 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1567 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1568 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1569 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1570 std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1572 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1573 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1574 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1575 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1578 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1581 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1584 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1587 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1590 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1593 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1596 const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1599 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1602 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1605 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1608 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1610 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n"
1611 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n"
1612 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n"
1613 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n"
1614 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n"
1615 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n"
1616 <<
" L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet <<
"\n"
1617 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n"
1618 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n"
1619 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n"
1620 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n"
1623 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1626 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu "
1628 <<
"q*PT = " << obj->charge() * obj->pt() <<
"\t"
1629 <<
"eta = " << obj->eta() <<
"\t"
1630 <<
"phi = " << obj->phi() <<
"\t"
1631 <<
"BX = " << obj->bx();
1634 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1637 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG "
1639 <<
"ET = " << obj->et() <<
"\t"
1640 <<
"eta = " << obj->eta() <<
"\t"
1641 <<
"phi = " << obj->phi() <<
"\t"
1642 <<
"BX = " << obj->bx();
1646 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
1649 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG"
1651 <<
"ET = " << obj->et() <<
"\t"
1652 <<
"eta = " << obj->eta() <<
"\t"
1653 <<
"phi = " << obj->phi() <<
"\t"
1654 <<
"BX = " << obj->bx();
1657 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
1660 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet "
1662 <<
"ET = " << obj->et() <<
"\t"
1663 <<
"eta = " << obj->eta() <<
"\t"
1664 <<
"phi = " << obj->phi() <<
"\t"
1665 <<
"BX = " << obj->bx();
1668 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
1671 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet "
1673 <<
"ET = " << obj->et() <<
"\t"
1674 <<
"eta = " << obj->eta() <<
"\t"
1675 <<
"phi = " << obj->phi() <<
"\t"
1676 <<
"BX = " << obj->bx();
1679 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
1682 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet "
1684 <<
"ET = " << obj->et() <<
"\t"
1685 <<
"eta = " << obj->eta() <<
"\t"
1686 <<
"phi = " << obj->phi() <<
"\t"
1687 <<
"BX = " << obj->bx();
1690 for (
size_t i = 0;
i != sizeSeedsL1IsoTauJet;
i++) {
1693 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoTauJet "
1695 <<
"ET = " << obj->et() <<
"\t"
1696 <<
"eta = " << obj->eta() <<
"\t"
1697 <<
"phi = " << obj->phi() <<
"\t"
1698 <<
"BX = " << obj->bx();
1701 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
1704 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM "
1706 <<
"ET = " << obj->etMiss() <<
"\t"
1707 <<
"phi = " << obj->phi() <<
"BX = " << obj->bx();
1710 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
1713 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT "
1715 <<
"ET = " << obj->etTotal() <<
"\t"
1716 <<
"BX = " << obj->bx();
1719 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
1722 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT "
1724 <<
"ET = " << obj->etTotal() <<
"\t"
1725 <<
"BX = " << obj->bx();
1728 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
1731 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM "
1733 <<
"ET = " << obj->etMiss() <<
"\t"
1734 <<
"phi = " << obj->phi() <<
"BX = " << obj->bx();
1737 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
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > const m_l1GtTriggerMenuToken
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
#define DEFINE_FWK_MODULE(type)
const std::vector< L1GtLogicParser::OperandToken > & operandTokenVector() const
edm::InputTag m_l1EtMissMETTag
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > m_l1EtMissMHTToken
void debugPrint(bool) 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
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.
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > const m_l1GtTriggerMaskTechTrigRcdToken
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::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > const m_l1GtTriggerMaskAlgoTrigRcdToken
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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Warning, false > LogWarning
edm::InputTag m_l1TauJetTag
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
~HLTLevel1GTSeed() override
destructor
tuple size
Write out results.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
parameter description
virtual const bool expressionResult() const