79 m_l1GtMenuCacheID( 0ULL ),
82 m_l1UseL1TriggerObjectMaps(parSet.getParameter<bool> (
83 "L1UseL1TriggerObjectMaps")),
86 m_l1NrBxInEvent(parSet.getParameter<
int> (
90 m_l1TechTriggerSeeding(parSet.getParameter<bool> (
91 "L1TechTriggerSeeding")),
94 m_l1UseAliasesForSeeding(parSet.getParameter<bool> (
95 "L1UseAliasesForSeeding")),
98 m_l1SeedsLogicalExpression(parSet.getParameter<
std::
string> (
99 "L1SeedsLogicalExpression")),
102 m_l1GtReadoutRecordTag(parSet.getParameter<
edm::InputTag> (
103 "L1GtReadoutRecordTag")),
107 m_l1GtObjectMapTag(parSet.getParameter<
edm::InputTag> (
108 "L1GtObjectMapTag")),
112 m_l1CollectionsTag(parSet.getParameter<
edm::InputTag> (
113 "L1CollectionsTag")),
116 m_l1MuonCollectionTag(parSet.getParameter<
edm::InputTag> (
117 "L1MuonCollectionTag")),
120 m_l1ExtraTag(
edm::InputTag(m_l1CollectionsTag.
label())),
121 m_l1MuonTag(
edm::InputTag(m_l1MuonCollectionTag.
label())),
123 m_l1IsoEGTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"Isolated")),
125 m_l1NoIsoEGTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"NonIsolated")),
127 m_l1CenJetTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"Central")),
129 m_l1ForJetTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"Forward")),
131 m_l1TauJetTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"Tau")),
133 m_l1IsoTauJetTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"IsoTau")),
135 m_l1EtMissMETTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"MET")),
137 m_l1EtMissMHTTag(
edm::InputTag(m_l1CollectionsTag.
label(),
"MHT")),
139 m_l1GlobalDecision(
false),
167 <<
"L1 Seeding using L1 trigger object maps: " 169 <<
" if false: seeding with L1Extra\n" 170 <<
"Number of BxInEvent when seeding with L1Extra: " 172 <<
" aka w/o object maps\n " <<
"\n" 173 <<
"L1 Seeding via Technical Triggers: " 175 <<
"L1 Seeding uses algorithm aliases: " 177 <<
"L1 Seeds Logical Expression: " <<
"\n " 179 <<
"Input tag for L1 GT DAQ record: " 181 <<
"Input tag for L1 GT object map record: " 183 <<
"Input tag for L1 extra collections: " 185 <<
"Input tag for L1 muon collections: " 209 desc.
add<
bool>(
"L1UseL1TriggerObjectMaps",
true);
213 desc.
add<
int>(
"L1NrBxInEvent",3);
217 desc.
add<
bool>(
"L1TechTriggerSeeding",
false);
220 desc.
add<
bool>(
"L1UseAliasesForSeeding",
true);
251 descriptions.
add(
"hltLevel1GTSeed", desc);
284 if (!gtReadoutRecord.
isValid()) {
286 <<
"\nWarning: L1GlobalTriggerReadoutRecord with input tag " 288 <<
"\nrequested in configuration, but not found in the event." 294 boost::uint16_t gtFinalOR = gtReadoutRecord->
finalOR();
295 int physicsDaqPartition = 0;
297 static_cast<bool> (gtFinalOR & (1 << physicsDaqPartition));
344 unsigned long long l1GtMenuCacheID =
357 LogTrace(
"HLTLevel1GTSeed") <<
"\n L1 trigger menu " 359 <<
"\n Number of algorithm names: " 360 << (algorithmMap.size())
361 <<
"\n Number of algorithm aliases: " 362 << (algorithmAliasMap.size()) <<
"\n" << std::endl;
395 auto itCond = conditionMap.find(cndName);
396 if (itCond != conditionMap.end())
397 return (&((itCond->second)->objectType()));
400 throw cms::Exception(
"FailModule") <<
"\nCondition " << cndName <<
" not found in the condition map" <<
" for chip number " << chipNr;
419 for (
auto &
i : algOpTokenVector) {
421 auto itAlgo = algorithmMap.find(
i.tokenName);
422 if (itAlgo != algorithmMap.end()) {
424 int bitNr = (itAlgo->second).algoBitNumber();
425 int chipNr = (itAlgo->second).algoChipNumber();
427 i.tokenNumber = bitNr;
431 if (jSeed < l1AlgoSeedsSize) {
442 const std::vector<L1GtLogicParser::TokenRPN>& aRpnVector =
443 (itAlgo->second).algoRpnVector();
444 size_t aRpnVectorSize = aRpnVector.size();
449 std::vector<const std::vector<L1GtObject>*> tmpObjTypeVec;
450 tmpObjTypeVec.reserve(aRpnVectorSize);
452 for (
size_t opI = 0; opI < aRpnVectorSize; ++opI) {
456 if (!cName.empty()) {
458 tmpObjTypeVec.push_back(
476 <<
", requested as seed by a HLT path, not found in the L1 trigger menu\n " 478 <<
"\nIncompatible L1 and HLT menus.\n" << std::endl;
495 const std::vector<unsigned int>& triggerMask,
496 const int physicsDaqPartition) {
498 std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
501 for (
auto &
i : algOpTokenVector) {
502 int iBit =
i.tokenNumber;
503 bool iResult = gtWord.at(iBit);
505 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
512 if (triggerMaskBit) {
520 i.tokenResult = iResult;
525 int iBit = m_l1AlgoSeed.tokenNumber;
526 bool iResult = gtWord.at(iBit);
528 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
535 if (triggerMaskBit) {
543 m_l1AlgoSeed.tokenResult = iResult;
548 bool newMenu =
false;
558 std::vector<L1GtLogicParser::OperandToken> & algOpTokenVector =
561 for (
auto &
i : algOpTokenVector) {
564 std::istringstream bitStream(bitString);
567 if ((bitStream >> bitInt).
fail()) {
570 <<
"\nL1 Seeds Logical Expression: = '" 572 <<
"\n Conversion to integer failed for " << bitString
576 i.tokenNumber = bitInt;
583 std::istringstream bitStream(bitString);
586 if ((bitStream >> bitInt).
fail()) {
589 <<
"\nL1 Seeds Logical Expression: = '" 591 <<
"\n Conversion to integer failed for " << bitString
595 m_l1AlgoSeed.tokenNumber = bitInt;
607 <<
"\n\nupdateAlgoLogicParser: seeding via technical trigger" 608 <<
"\n update event quantities." << std::endl;
614 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu changed to " 618 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu unchanged (" 620 <<
")\n update event quantities." << std::endl;
624 std::vector<L1GtLogicParser::OperandToken>
const & algOpTokenVector =
628 <<
"\n\nupdateAlgoLogicParser: algOpTokenVector.size() = " 629 << algOpTokenVector.size() << std::endl;
631 for (
auto const &
i : algOpTokenVector) {
633 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
634 <<
i.tokenNumber <<
"\t" << std::setw(25)
635 <<
i.tokenName <<
"\t" 636 <<
i.tokenResult << std::endl;
639 LogTrace(
"HLTLevel1GTSeed") << std::endl;
642 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = " 647 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
648 << m_l1AlgoSeed.tokenNumber <<
"\t" << std::setw(25)
649 << m_l1AlgoSeed.tokenName <<
"\t" 650 << m_l1AlgoSeed.tokenResult << std::endl;
653 LogTrace(
"HLTLevel1GTSeed") << std::endl;
660 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeedsRpn.size() = " 665 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: " 666 <<
i->size() << std::endl;
668 for (
size_t j = 0; j <
i->size(); ++j) {
670 LogTrace(
"HLTLevel1GTSeed") <<
" ( " 671 << (*i)[j].operation <<
", " 672 << (*i)[j].operand <<
" )" << std::endl;
677 LogTrace(
"HLTLevel1GTSeed") << std::endl;
679 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: " 680 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = " 686 <<
" Conditions for an algorithm: vector size: " 687 <<
i.size() << std::endl;
689 for (
size_t j = 0; j <
i.size(); ++j) {
692 <<
" Condition object type vector: size: " 693 << (
i[j])->
size() << std::endl;
695 for (
size_t k = 0;
k < (
i[j])->
size(); ++
k) {
698 LogTrace(
"HLTLevel1GTSeed") <<
" " << obj <<
" ";
702 LogTrace(
"HLTLevel1GTSeed") << std::endl;
707 LogTrace(
"HLTLevel1GTSeed") << std::endl;
717 const int physicsDaqPartition) {
721 const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->
decisionWord();
729 std::ostringstream myCoutStream;
733 << myCoutStream.str()
734 <<
"\nHLTLevel1GTSeed::hltFilter " 736 <<
"\n Result for logical expression: " << seedsResult <<
"\n" 749 std::list<int> listMuon;
751 std::list<int> listIsoEG;
752 std::list<int> listNoIsoEG;
754 std::list<int> listCenJet;
755 std::list<int> listForJet;
756 std::list<int> listTauJet;
757 std::list<int> listIsoTauJet;
759 std::list<int> listETM;
760 std::list<int> listETT;
761 std::list<int> listHTT;
762 std::list<int> listHTM;
764 std::list<int> listJetCounts;
770 if (!gtObjectMapRecord.
isValid()) {
772 <<
"\nWarning: L1GlobalTriggerObjectMapRecord with input tag " 774 <<
"\nrequested in configuration, but not found in the event." << std::endl;
787 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
793 int algBit = (*itSeed).tokenNumber;
795 bool algResult = (*itSeed).tokenResult;
798 <<
"\nHLTLevel1GTSeed::hltFilter " 799 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
800 <<
" in the object map seed list" 801 <<
"\n Algorithm result = " << algResult <<
"\n" 812 if (objMap ==
nullptr) {
814 <<
"\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
815 <<
" (bit number " << algBit <<
") does not exist.\nReturn false.\n" 820 const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap =
823 const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn =
826 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
833 std::vector<L1GtLogicParser::OperandToken> condSeeds =
839 <<
"\n HLTLevel1GTSeed::hltFilter " 840 <<
"\n condSeeds.size() = " 844 for (
auto & condSeed : condSeeds) {
847 <<
" " << std::setw(5) << condSeed.tokenNumber <<
"\t" 848 << std::setw(25) << condSeed.tokenName <<
"\t" 849 << condSeed.tokenResult
857 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
858 itCond = condSeeds.begin(); itCond != condSeeds.end(); itCond++) {
861 int cndNumber = (*itCond).tokenNumber;
862 bool cndResult = (*itCond).tokenResult;
864 const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
881 for (
auto const & itComb : (*cndComb)) {
886 itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
889 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
897 switch (objTypeVal) {
899 listMuon.push_back(*itObject);
904 listNoIsoEG.push_back(*itObject);
909 listIsoEG.push_back(*itObject);
914 listCenJet.push_back(*itObject);
919 listForJet.push_back(*itObject);
924 listTauJet.push_back(*itObject);
933 int hfInd = (*itObject);
934 if(cndName.find(
"Ind0")!=std::string::npos)
936 else if(cndName.find(
"Ind1")!=std::string::npos)
938 else if(cndName.find(
"Ind2")!=std::string::npos)
940 else if(cndName.find(
"Ind3")!=std::string::npos)
942 listIsoTauJet.push_back(hfInd);
947 listETM.push_back(*itObject);
953 listETT.push_back(*itObject);
959 listHTT.push_back(*itObject);
965 listHTM.push_back(*itObject);
971 listJetCounts.push_back(*itObject);
979 <<
"\n HLTLevel1GTSeed::hltFilter " 980 <<
"\n Unknown object of type " << objTypeVal
981 <<
" and index " << (*itObject) <<
" in the seed list." 1006 listNoIsoEG.unique();
1009 listCenJet.unique();
1012 listForJet.unique();
1015 listTauJet.unique();
1017 listIsoTauJet.sort();
1018 listIsoTauJet.unique();
1032 listJetCounts.sort();
1033 listJetCounts.unique();
1040 if (!listMuon.empty()) {
1047 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag 1048 <<
"\nrequested in configuration, but not found in the event." 1049 <<
"\nNo muon added to filterproduct." << std::endl;
1053 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1064 if (!listIsoEG.empty()) {
1070 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag 1071 <<
"\nrequested in configuration, but not found in the event." 1072 <<
"\nNo IsoEG added to filterproduct." << std::endl;
1075 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1085 if (!listNoIsoEG.empty()) {
1091 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag 1092 <<
"\nrequested in configuration, but not found in the event." 1093 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
1096 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1097 != listNoIsoEG.end(); ++itObj) {
1100 l1NoIsoEG, *itObj));
1107 if (!listCenJet.empty()) {
1113 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag 1114 <<
"\nrequested in configuration, but not found in the event." 1115 <<
"\nNo CenJet added to filterproduct." << std::endl;
1118 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1119 != listCenJet.end(); ++itObj) {
1129 if (!listForJet.empty()) {
1135 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag 1136 <<
"\nrequested in configuration, but not found in the event." 1137 <<
"\nNo ForJet added to filterproduct." << std::endl;
1140 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1141 != listForJet.end(); ++itObj) {
1151 if (!listTauJet.empty()) {
1157 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag 1158 <<
"\nrequested in configuration, but not found in the event." 1159 <<
"\nNo TauJet added to filterproduct." << std::endl;
1162 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1163 != listTauJet.end(); ++itObj) {
1173 if (!listIsoTauJet.empty()) {
1179 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1IsoTauJetTag 1180 <<
"\nrequested in configuration, but not found in the event." 1181 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1184 for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj
1185 != listIsoTauJet.end(); ++itObj) {
1188 l1IsoTauJet, *itObj));
1195 if (!listETM.empty()) {
1199 if (!l1EnergySums.
isValid()) {
1201 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1202 <<
"\nrequested in configuration, but not found in the event." 1203 <<
"\nNo ETM added to filterproduct." << std::endl;
1204 }
else if (l1EnergySums->size() == 0) {
1206 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1207 <<
"\nfound in the event but with 0 size." <<
"\nNo ETM added to filterproduct." 1212 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1215 l1EnergySums, *itObj));
1223 if (!listETT.empty()) {
1227 if (!l1EnergySums.
isValid()) {
1229 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1230 <<
"\nrequested in configuration, but not found in the event." 1231 <<
"\nNo ETT added to filterproduct." << std::endl;
1232 }
else if (l1EnergySums->size() == 0) {
1234 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag 1235 <<
"\nfound in the event but with 0 size." <<
"\nNo ETT added to filterproduct." 1240 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1243 l1EnergySums, *itObj));
1251 if (!listHTT.empty()) {
1255 if (!l1EnergySums.
isValid()) {
1257 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1258 <<
"\nrequested in configuration, but not found in the event." 1259 <<
"\nNo HTT added to filterproduct." << std::endl;
1261 }
else if (l1EnergySums->size() == 0) {
1263 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1264 <<
"\nfound in the event but with 0 size." <<
"\nNo HTT added to filterproduct." 1269 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1272 l1EnergySums, *itObj));
1279 if (!listHTM.empty()) {
1283 if (!l1EnergySums.
isValid()) {
1285 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1286 <<
"\nrequested in configuration, but not found in the event." 1287 <<
"\nNo HTM added to filterproduct." << std::endl;
1289 }
else if (l1EnergySums->size() == 0) {
1291 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag 1292 <<
"\nfound in the event but with 0 size." <<
"\nNo HTM added to filterproduct." 1297 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1300 l1EnergySums, *itObj));
1362 bool includeMuon =
true;
1364 bool includeIsoEG =
true;
1365 bool includeNoIsoEG =
true;
1367 bool includeCenJet =
true;
1368 bool includeForJet =
true;
1369 bool includeTauJet =
true;
1370 bool includeIsoTauJet =
true;
1372 bool includeETM =
true;
1373 bool includeETT =
true;
1374 bool includeHTT =
true;
1375 bool includeHTM =
true;
1377 bool includeJetCounts =
true;
1380 bool objectsInFilter =
false;
1390 int algBit = m_l1AlgoSeed.tokenNumber;
1392 bool algResult = m_l1AlgoSeed.tokenResult;
1394 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter " 1395 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1396 <<
" in the object map seed list" <<
"\n Algorithm result = " 1397 << algResult << std::endl;
1399 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1407 for (
auto condObj : algoSeedsObjTypeVec) {
1409 for (
auto itObj : (*condObj)) {
1412 <<
" Object type in conditions from this algorithm = " 1413 << itObj << std::endl;
1424 <<
"\nWarning: L1MuonParticleCollection with input tag " 1426 <<
"\nrequested in configuration, but not found in the event." 1427 <<
"\nNo muon added to filterproduct." 1433 objIter = l1Muon->begin(); objIter
1434 != l1Muon->end(); ++objIter) {
1438 int bxNr = objIter->bx();
1439 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1441 objectsInFilter =
true;
1450 includeMuon =
false;
1462 <<
"\nWarning: L1EmParticleCollection with input tag " 1464 <<
"\nrequested in configuration, but not found in the event." 1465 <<
"\nNo IsoEG added to filterproduct." 1471 objIter = l1IsoEG->begin(); objIter
1472 != l1IsoEG->end(); ++objIter) {
1476 int bxNr = objIter->bx();
1477 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1479 objectsInFilter =
true;
1488 includeIsoEG =
false;
1494 if (includeNoIsoEG) {
1500 <<
"\nWarning: L1EmParticleCollection with input tag " 1502 <<
"\nrequested in configuration, but not found in the event." 1503 <<
"\nNo NoIsoEG added to filterproduct." 1509 objIter = l1NoIsoEG->begin(); objIter
1510 != l1NoIsoEG->end(); ++objIter) {
1514 int bxNr = objIter->bx();
1515 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1517 objectsInFilter =
true;
1526 includeNoIsoEG =
false;
1532 if (includeCenJet) {
1538 <<
"\nWarning: L1JetParticleCollection with input tag " 1540 <<
"\nrequested in configuration, but not found in the event." 1541 <<
"\nNo CenJet added to filterproduct." 1547 objIter = l1CenJet->begin(); objIter
1548 != l1CenJet->end(); ++objIter) {
1552 int bxNr = objIter->bx();
1553 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1555 objectsInFilter =
true;
1564 includeCenJet =
false;
1571 if (includeForJet) {
1577 <<
"\nWarning: L1JetParticleCollection with input tag " 1579 <<
"\nrequested in configuration, but not found in the event." 1580 <<
"\nNo ForJet added to filterproduct." 1586 objIter = l1ForJet->begin(); objIter
1587 != l1ForJet->end(); ++objIter) {
1591 int bxNr = objIter->bx();
1592 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1594 objectsInFilter =
true;
1603 includeForJet =
false;
1610 if (includeTauJet) {
1616 <<
"\nWarning: L1JetParticleCollection with input tag " 1618 <<
"\nrequested in configuration, but not found in the event." 1619 <<
"\nNo TauJet added to filterproduct." 1625 objIter = l1TauJet->begin(); objIter
1626 != l1TauJet->end(); ++objIter) {
1630 int bxNr = objIter->bx();
1631 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1633 objectsInFilter =
true;
1642 includeTauJet =
false;
1648 if (includeIsoTauJet) {
1654 <<
"\nWarning: L1JetParticleCollection with input tag " 1656 <<
"\nrequested in configuration, but not found in the event." 1657 <<
"\nNo IsoTauJet added to filterproduct." 1663 objIter = l1IsoTauJet->begin(); objIter
1664 != l1IsoTauJet->end(); ++objIter) {
1668 int bxNr = objIter->bx();
1669 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1671 objectsInFilter =
true;
1675 l1IsoTauJet, iObj));
1680 includeIsoTauJet =
false;
1691 if (!l1EnergySums.
isValid()) {
1693 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1695 <<
"\nrequested in configuration, but not found in the event." 1696 <<
"\nNo ETM added to filterproduct." 1699 }
else if (l1EnergySums->size() == 0) {
1701 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1703 <<
"\nfound in the event but with 0 size." 1704 <<
"\nNo ETM added to filterproduct." 1710 objIter = l1EnergySums->begin(); objIter
1711 != l1EnergySums->end(); ++objIter) {
1715 int bxNr = objIter->bx();
1716 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1718 objectsInFilter =
true;
1722 l1EnergySums, iObj));
1738 if (!l1EnergySums.
isValid()) {
1740 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1742 <<
"\nrequested in configuration, but not found in the event." 1743 <<
"\nNo ETT added to filterproduct." 1746 }
else if (l1EnergySums->size() == 0) {
1748 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1750 <<
"\nfound in the event but with 0 size." 1751 <<
"\nNo ETT added to filterproduct." 1757 objIter = l1EnergySums->begin(); objIter
1758 != l1EnergySums->end(); ++objIter) {
1762 int bxNr = objIter->bx();
1763 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1765 objectsInFilter =
true;
1769 l1EnergySums, iObj));
1785 if (!l1EnergySums.
isValid()) {
1787 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1789 <<
"\nrequested in configuration, but not found in the event." 1790 <<
"\nNo HTT added to filterproduct." 1793 }
else if (l1EnergySums->size() == 0) {
1795 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1797 <<
"\nfound in the event but with 0 size." 1798 <<
"\nNo HTT added to filterproduct." 1804 objIter = l1EnergySums->begin(); objIter
1805 != l1EnergySums->end(); ++objIter) {
1809 int bxNr = objIter->bx();
1810 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1812 objectsInFilter =
true;
1816 l1EnergySums, iObj));
1831 if (!l1EnergySums.
isValid()) {
1833 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1835 <<
"\nrequested in configuration, but not found in the event." 1836 <<
"\nNo HTM added to filterproduct." 1839 }
else if (l1EnergySums->size() == 0) {
1841 <<
"\nWarning: L1EtMissParticleCollection with input tag " 1843 <<
"\nfound in the event but with 0 size." 1844 <<
"\nNo HTM added to filterproduct." 1850 objIter = l1EnergySums->begin(); objIter
1851 != l1EnergySums->end(); ++objIter) {
1855 int bxNr = objIter->bx();
1856 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1858 objectsInFilter =
true;
1862 l1EnergySums, iObj));
1873 if (includeJetCounts) {
1883 <<
"\n HLTLevel1GTSeed::hltFilter " 1884 <<
"\n Unknown object of type " << itObj
1885 <<
" in the seed list." << std::endl;
1894 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1897 return objectsInFilter;
1904 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter " 1905 <<
"\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1907 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1909 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1910 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1912 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1913 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1914 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1915 std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1917 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1918 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1919 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1920 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1923 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1926 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1929 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1932 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1935 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1938 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1941 const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1944 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1947 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1950 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1953 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1955 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n" 1956 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n" 1957 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n" 1958 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n" 1959 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n" 1960 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n" 1961 <<
" L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet <<
"\n" 1962 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n" 1963 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n" 1964 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n" 1965 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n" << std::endl;
1967 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1972 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu " <<
"\t" <<
"q*PT = " 1973 << obj->charge() * obj->pt() <<
"\t" <<
"eta = " << obj->eta()
1974 <<
"\t" <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " 1978 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1983 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG " <<
"\t" <<
"ET = " 1984 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 1985 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1989 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
1994 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG" <<
"\t" <<
"ET = " 1995 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 1996 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1999 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
2004 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet " <<
"\t" <<
"ET = " 2005 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 2006 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2009 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
2014 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet " <<
"\t" <<
"ET = " 2015 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 2016 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2019 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
2024 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet " <<
"\t" <<
"ET = " 2025 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 2026 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2029 for (
size_t i = 0;
i != sizeSeedsL1IsoTauJet;
i++) {
2032 seedsL1IsoTauJet[
i]);
2034 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoTauJet " <<
"\t" <<
"ET = " 2035 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t" 2036 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2039 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
2044 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM " <<
"\t" <<
"ET = " 2045 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = " 2049 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
2054 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT " <<
"\t" <<
"ET = " 2055 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2058 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
2063 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT " <<
"\t" <<
"ET = " 2064 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2067 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
2072 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM " <<
"\t" <<
"ET = " 2073 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = " 2077 LogTrace(
"HLTLevel1GTSeed") <<
" \n\n" << std::endl;
std::vector< L1GtLogicParser::OperandToken > expressionSeedsOperandList()
bool m_l1UseL1TriggerObjectMaps
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const
detailed print of filter content
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
#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
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.
virtual 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
std::vector< std::vector< const std::vector< L1GtObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
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
std::vector< const std::vector< L1GtLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
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
virtual ~HLTLevel1GTSeed()
destructor
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
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