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")),
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));
325 const std::vector<bool>& gtTechTrigWord = gtReadoutRecord->technicalTriggerWord();
344 unsigned long long l1GtMenuCacheID =
354 const AlgorithmMap& algorithmMap = l1GtMenu->gtAlgorithmMap();
355 const AlgorithmMap& algorithmAliasMap = l1GtMenu->gtAlgorithmAliasMap();
357 LogTrace(
"HLTLevel1GTSeed") <<
"\n L1 trigger menu "
358 << l1GtMenu->gtTriggerMenuInterface()
359 <<
"\n Number of algorithm names: "
360 << (algorithmMap.size())
361 <<
"\n Number of algorithm aliases: "
362 << (algorithmAliasMap.size()) <<
"\n" << std::endl;
395 CItCond 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 (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
421 CItAlgo itAlgo = algorithmMap.find((algOpTokenVector[
i]).tokenName);
422 if (itAlgo != algorithmMap.end()) {
424 int bitNr = (itAlgo->second).algoBitNumber();
425 int chipNr = (itAlgo->second).algoChipNumber();
427 (algOpTokenVector[
i]).tokenNumber = bitNr;
431 if (jSeed < l1AlgoSeedsSize) {
438 == (algOpTokenVector[
i]).tokenName) {
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(
475 << (algOpTokenVector[
i]).tokenName
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 (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
502 int iBit = (algOpTokenVector[
i]).tokenNumber;
503 bool iResult = gtWord.at(iBit);
505 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
512 if (triggerMaskBit) {
520 (algOpTokenVector[
i]).tokenResult = iResult;
526 bool iResult = gtWord.at(iBit);
528 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
535 if (triggerMaskBit) {
548 bool newMenu =
false;
558 std::vector<L1GtLogicParser::OperandToken> & algOpTokenVector =
561 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
563 std::string bitString = (algOpTokenVector[
i]).tokenName;
564 std::istringstream bitStream(bitString);
567 if ((bitStream >> bitInt).
fail()) {
570 <<
"\nL1 Seeds Logical Expression: = '"
572 <<
"\n Conversion to integer failed for " << bitString
576 (algOpTokenVector[
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
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 (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
633 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
634 << (algOpTokenVector[
i]).tokenNumber <<
"\t" << std::setw(25)
635 << (algOpTokenVector[
i]).tokenName <<
"\t"
636 << (algOpTokenVector[
i]).tokenResult << std::endl;
639 LogTrace(
"HLTLevel1GTSeed") << std::endl;
642 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = "
647 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
653 LogTrace(
"HLTLevel1GTSeed") << std::endl;
660 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeedsRpn.size() = "
665 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: "
670 LogTrace(
"HLTLevel1GTSeed") <<
" ( "
677 LogTrace(
"HLTLevel1GTSeed") << std::endl;
679 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: "
680 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = "
686 <<
" Conditions for an algorithm: vector size: "
692 <<
" Condition object type vector: size: "
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"
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 (
size_t i = 0;
i < condSeeds.size(); ++
i) {
847 <<
" " << std::setw(5) << (condSeeds[
i]).tokenNumber <<
"\t"
848 << std::setw(25) << (condSeeds[
i]).tokenName <<
"\t"
849 << (condSeeds[
i]).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 (std::vector<SingleCombInCond>::const_iterator
882 itComb = (*cndComb).begin(); itComb != (*cndComb).end(); itComb++) {
886 for (SingleCombInCond::const_iterator
887 itObject = (*itComb).begin(); itObject != (*itComb).end(); itObject++) {
890 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
898 switch (objTypeVal) {
900 listMuon.push_back(*itObject);
905 listNoIsoEG.push_back(*itObject);
910 listIsoEG.push_back(*itObject);
915 listCenJet.push_back(*itObject);
920 listForJet.push_back(*itObject);
925 listTauJet.push_back(*itObject);
934 int hfInd = (*itObject);
935 if(cndName.find(
"Ind0")!=std::string::npos)
937 else if(cndName.find(
"Ind1")!=std::string::npos)
939 else if(cndName.find(
"Ind2")!=std::string::npos)
941 else if(cndName.find(
"Ind3")!=std::string::npos)
943 listIsoTauJet.push_back(hfInd);
948 listETM.push_back(*itObject);
954 listETT.push_back(*itObject);
960 listHTT.push_back(*itObject);
966 listHTM.push_back(*itObject);
972 listJetCounts.push_back(*itObject);
980 <<
"\n HLTLevel1GTSeed::hltFilter "
981 <<
"\n Unknown object of type " << objTypeVal
982 <<
" and index " << (*itObject) <<
" in the seed list."
1007 listNoIsoEG.unique();
1010 listCenJet.unique();
1013 listForJet.unique();
1016 listTauJet.unique();
1018 listIsoTauJet.sort();
1019 listIsoTauJet.unique();
1033 listJetCounts.sort();
1034 listJetCounts.unique();
1041 if (!listMuon.empty()) {
1048 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag
1049 <<
"\nrequested in configuration, but not found in the event."
1050 <<
"\nNo muon added to filterproduct." << std::endl;
1054 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1065 if (!listIsoEG.empty()) {
1071 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag
1072 <<
"\nrequested in configuration, but not found in the event."
1073 <<
"\nNo IsoEG added to filterproduct." << std::endl;
1076 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1086 if (!listNoIsoEG.empty()) {
1092 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag
1093 <<
"\nrequested in configuration, but not found in the event."
1094 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
1097 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1098 != listNoIsoEG.end(); ++itObj) {
1101 l1NoIsoEG, *itObj));
1108 if (!listCenJet.empty()) {
1114 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag
1115 <<
"\nrequested in configuration, but not found in the event."
1116 <<
"\nNo CenJet added to filterproduct." << std::endl;
1119 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1120 != listCenJet.end(); ++itObj) {
1130 if (!listForJet.empty()) {
1136 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag
1137 <<
"\nrequested in configuration, but not found in the event."
1138 <<
"\nNo ForJet added to filterproduct." << std::endl;
1141 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1142 != listForJet.end(); ++itObj) {
1152 if (!listTauJet.empty()) {
1158 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag
1159 <<
"\nrequested in configuration, but not found in the event."
1160 <<
"\nNo TauJet added to filterproduct." << std::endl;
1163 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1164 != listTauJet.end(); ++itObj) {
1174 if (!listIsoTauJet.empty()) {
1180 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1IsoTauJetTag
1181 <<
"\nrequested in configuration, but not found in the event."
1182 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1185 for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj
1186 != listIsoTauJet.end(); ++itObj) {
1189 l1IsoTauJet, *itObj));
1196 if (!listETM.empty()) {
1200 if (!l1EnergySums.
isValid()) {
1202 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1203 <<
"\nrequested in configuration, but not found in the event."
1204 <<
"\nNo ETM added to filterproduct." << std::endl;
1205 }
else if (l1EnergySums->size() == 0) {
1207 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1208 <<
"\nfound in the event but with 0 size." <<
"\nNo ETM added to filterproduct."
1213 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1216 l1EnergySums, *itObj));
1224 if (!listETT.empty()) {
1228 if (!l1EnergySums.
isValid()) {
1230 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1231 <<
"\nrequested in configuration, but not found in the event."
1232 <<
"\nNo ETT added to filterproduct." << std::endl;
1233 }
else if (l1EnergySums->size() == 0) {
1235 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1236 <<
"\nfound in the event but with 0 size." <<
"\nNo ETT added to filterproduct."
1241 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1244 l1EnergySums, *itObj));
1252 if (!listHTT.empty()) {
1256 if (!l1EnergySums.
isValid()) {
1258 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1259 <<
"\nrequested in configuration, but not found in the event."
1260 <<
"\nNo HTT added to filterproduct." << std::endl;
1262 }
else if (l1EnergySums->size() == 0) {
1264 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1265 <<
"\nfound in the event but with 0 size." <<
"\nNo HTT added to filterproduct."
1270 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1273 l1EnergySums, *itObj));
1280 if (!listHTM.empty()) {
1284 if (!l1EnergySums.
isValid()) {
1286 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1287 <<
"\nrequested in configuration, but not found in the event."
1288 <<
"\nNo HTM added to filterproduct." << std::endl;
1290 }
else if (l1EnergySums->size() == 0) {
1292 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1293 <<
"\nfound in the event but with 0 size." <<
"\nNo HTM added to filterproduct."
1298 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1301 l1EnergySums, *itObj));
1363 bool includeMuon =
true;
1365 bool includeIsoEG =
true;
1366 bool includeNoIsoEG =
true;
1368 bool includeCenJet =
true;
1369 bool includeForJet =
true;
1370 bool includeTauJet =
true;
1371 bool includeIsoTauJet =
true;
1373 bool includeETM =
true;
1374 bool includeETT =
true;
1375 bool includeHTT =
true;
1376 bool includeHTM =
true;
1378 bool includeJetCounts =
true;
1381 bool objectsInFilter =
false;
1386 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
1392 int algBit = (*itSeed).tokenNumber;
1394 bool algResult = (*itSeed).tokenResult;
1396 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1397 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1398 <<
" in the object map seed list" <<
"\n Algorithm result = "
1399 << algResult << std::endl;
1401 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1409 for (std::vector<
const std::vector<L1GtObject>*>::const_iterator itVec =
1410 algoSeedsObjTypeVec.begin(); itVec != algoSeedsObjTypeVec.end(); ++itVec) {
1412 const std::vector<L1GtObject>* condObj = *itVec;
1413 for (std::vector<L1GtObject>::const_iterator itObj =
1414 (*condObj).begin(); itObj != (*condObj).end(); ++itObj) {
1417 <<
" Object type in conditions from this algorithm = "
1418 << (*itObj) << std::endl;
1429 <<
"\nWarning: L1MuonParticleCollection with input tag "
1431 <<
"\nrequested in configuration, but not found in the event."
1432 <<
"\nNo muon added to filterproduct."
1437 for (l1extra::L1MuonParticleCollection::const_iterator
1438 objIter = l1Muon->begin(); objIter
1439 != l1Muon->end(); ++objIter) {
1443 int bxNr = objIter->bx();
1444 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1446 objectsInFilter =
true;
1455 includeMuon =
false;
1467 <<
"\nWarning: L1EmParticleCollection with input tag "
1469 <<
"\nrequested in configuration, but not found in the event."
1470 <<
"\nNo IsoEG added to filterproduct."
1475 for (l1extra::L1EmParticleCollection::const_iterator
1476 objIter = l1IsoEG->begin(); objIter
1477 != l1IsoEG->end(); ++objIter) {
1481 int bxNr = objIter->bx();
1482 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1484 objectsInFilter =
true;
1493 includeIsoEG =
false;
1499 if (includeNoIsoEG) {
1505 <<
"\nWarning: L1EmParticleCollection with input tag "
1507 <<
"\nrequested in configuration, but not found in the event."
1508 <<
"\nNo NoIsoEG added to filterproduct."
1513 for (l1extra::L1EmParticleCollection::const_iterator
1514 objIter = l1NoIsoEG->begin(); objIter
1515 != l1NoIsoEG->end(); ++objIter) {
1519 int bxNr = objIter->bx();
1520 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1522 objectsInFilter =
true;
1531 includeNoIsoEG =
false;
1537 if (includeCenJet) {
1543 <<
"\nWarning: L1JetParticleCollection with input tag "
1545 <<
"\nrequested in configuration, but not found in the event."
1546 <<
"\nNo CenJet added to filterproduct."
1551 for (l1extra::L1JetParticleCollection::const_iterator
1552 objIter = l1CenJet->begin(); objIter
1553 != l1CenJet->end(); ++objIter) {
1557 int bxNr = objIter->bx();
1558 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1560 objectsInFilter =
true;
1569 includeCenJet =
false;
1576 if (includeForJet) {
1582 <<
"\nWarning: L1JetParticleCollection with input tag "
1584 <<
"\nrequested in configuration, but not found in the event."
1585 <<
"\nNo ForJet added to filterproduct."
1590 for (l1extra::L1JetParticleCollection::const_iterator
1591 objIter = l1ForJet->begin(); objIter
1592 != l1ForJet->end(); ++objIter) {
1596 int bxNr = objIter->bx();
1597 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1599 objectsInFilter =
true;
1608 includeForJet =
false;
1615 if (includeTauJet) {
1621 <<
"\nWarning: L1JetParticleCollection with input tag "
1623 <<
"\nrequested in configuration, but not found in the event."
1624 <<
"\nNo TauJet added to filterproduct."
1629 for (l1extra::L1JetParticleCollection::const_iterator
1630 objIter = l1TauJet->begin(); objIter
1631 != l1TauJet->end(); ++objIter) {
1635 int bxNr = objIter->bx();
1636 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1638 objectsInFilter =
true;
1647 includeTauJet =
false;
1653 if (includeIsoTauJet) {
1659 <<
"\nWarning: L1JetParticleCollection with input tag "
1661 <<
"\nrequested in configuration, but not found in the event."
1662 <<
"\nNo IsoTauJet added to filterproduct."
1667 for (l1extra::L1JetParticleCollection::const_iterator
1668 objIter = l1IsoTauJet->begin(); objIter
1669 != l1IsoTauJet->end(); ++objIter) {
1673 int bxNr = objIter->bx();
1674 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1676 objectsInFilter =
true;
1680 l1IsoTauJet, iObj));
1685 includeIsoTauJet =
false;
1696 if (!l1EnergySums.
isValid()) {
1698 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1700 <<
"\nrequested in configuration, but not found in the event."
1701 <<
"\nNo ETM added to filterproduct."
1704 }
else if (l1EnergySums->size() == 0) {
1706 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1708 <<
"\nfound in the event but with 0 size."
1709 <<
"\nNo ETM added to filterproduct."
1714 for (l1extra::L1EtMissParticleCollection::const_iterator
1715 objIter = l1EnergySums->begin(); objIter
1716 != l1EnergySums->end(); ++objIter) {
1720 int bxNr = objIter->bx();
1721 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1723 objectsInFilter =
true;
1727 l1EnergySums, iObj));
1743 if (!l1EnergySums.
isValid()) {
1745 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1747 <<
"\nrequested in configuration, but not found in the event."
1748 <<
"\nNo ETT added to filterproduct."
1751 }
else if (l1EnergySums->size() == 0) {
1753 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1755 <<
"\nfound in the event but with 0 size."
1756 <<
"\nNo ETT added to filterproduct."
1761 for (l1extra::L1EtMissParticleCollection::const_iterator
1762 objIter = l1EnergySums->begin(); objIter
1763 != l1EnergySums->end(); ++objIter) {
1767 int bxNr = objIter->bx();
1768 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1770 objectsInFilter =
true;
1774 l1EnergySums, iObj));
1790 if (!l1EnergySums.
isValid()) {
1792 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1794 <<
"\nrequested in configuration, but not found in the event."
1795 <<
"\nNo HTT added to filterproduct."
1798 }
else if (l1EnergySums->size() == 0) {
1800 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1802 <<
"\nfound in the event but with 0 size."
1803 <<
"\nNo HTT added to filterproduct."
1808 for (l1extra::L1EtMissParticleCollection::const_iterator
1809 objIter = l1EnergySums->begin(); objIter
1810 != l1EnergySums->end(); ++objIter) {
1814 int bxNr = objIter->bx();
1815 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1817 objectsInFilter =
true;
1821 l1EnergySums, iObj));
1836 if (!l1EnergySums.
isValid()) {
1838 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1840 <<
"\nrequested in configuration, but not found in the event."
1841 <<
"\nNo HTM added to filterproduct."
1844 }
else if (l1EnergySums->size() == 0) {
1846 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1848 <<
"\nfound in the event but with 0 size."
1849 <<
"\nNo HTM added to filterproduct."
1854 for (l1extra::L1EtMissParticleCollection::const_iterator
1855 objIter = l1EnergySums->begin(); objIter
1856 != l1EnergySums->end(); ++objIter) {
1860 int bxNr = objIter->bx();
1861 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1863 objectsInFilter =
true;
1867 l1EnergySums, iObj));
1878 if (includeJetCounts) {
1888 <<
"\n HLTLevel1GTSeed::hltFilter "
1889 <<
"\n Unknown object of type " << *itObj
1890 <<
" in the seed list." << std::endl;
1899 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1902 return objectsInFilter;
1909 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1910 <<
"\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1912 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1914 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1915 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1917 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1918 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1919 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1920 std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1922 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1923 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1924 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1925 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1928 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1931 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1934 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1937 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1940 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1943 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1946 const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1949 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1952 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1955 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1958 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1960 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n"
1961 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n"
1962 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n"
1963 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n"
1964 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n"
1965 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n"
1966 <<
" L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet <<
"\n"
1967 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n"
1968 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n"
1969 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n"
1970 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n" << std::endl;
1972 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1977 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu " <<
"\t" <<
"q*PT = "
1978 << obj->charge() * obj->pt() <<
"\t" <<
"eta = " << obj->eta()
1979 <<
"\t" <<
"phi = " << obj->phi() <<
"\t" <<
"BX = "
1983 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1988 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG " <<
"\t" <<
"ET = "
1989 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1990 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1994 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
1999 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG" <<
"\t" <<
"ET = "
2000 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2001 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2004 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
2009 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet " <<
"\t" <<
"ET = "
2010 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2011 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2014 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
2019 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet " <<
"\t" <<
"ET = "
2020 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2021 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2024 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
2029 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet " <<
"\t" <<
"ET = "
2030 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2031 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2034 for (
size_t i = 0;
i != sizeSeedsL1IsoTauJet;
i++) {
2037 seedsL1IsoTauJet[
i]);
2039 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoTauJet " <<
"\t" <<
"ET = "
2040 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2041 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2044 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
2049 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM " <<
"\t" <<
"ET = "
2050 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
2054 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
2059 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT " <<
"\t" <<
"ET = "
2060 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2063 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
2068 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT " <<
"\t" <<
"ET = "
2069 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2072 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
2077 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM " <<
"\t" <<
"ET = "
2078 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
2082 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 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.
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 ...
T const * product() const
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
volatile std::atomic< bool > shutdown_flag false
edm::InputTag m_l1TauJetTag
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
tuple size
Write out results.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
parameter description
virtual const bool expressionResult() const