78 m_l1UseL1TriggerObjectMaps(parSet.getParameter<bool> (
79 "L1UseL1TriggerObjectMaps")),
82 m_l1NrBxInEvent(parSet.getParameter<int> (
86 m_l1TechTriggerSeeding(parSet.getParameter<bool> (
87 "L1TechTriggerSeeding")),
90 m_l1UseAliasesForSeeding(parSet.getParameter<bool> (
91 "L1UseAliasesForSeeding")),
94 m_l1SeedsLogicalExpression(parSet.getParameter<std::
string> (
95 "L1SeedsLogicalExpression")),
98 m_l1GtReadoutRecordTag(parSet.getParameter<edm::InputTag> (
99 "L1GtReadoutRecordTag")),
103 m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag> (
104 "L1GtObjectMapTag")),
108 m_l1CollectionsTag(parSet.getParameter<edm::InputTag> (
109 "L1CollectionsTag")),
112 m_l1MuonCollectionTag(parSet.getParameter<edm::InputTag> (
113 "L1MuonCollectionTag")),
116 m_l1ExtraTag(edm::InputTag(m_l1CollectionsTag.
label())),
117 m_l1MuonTag(edm::InputTag(m_l1MuonCollectionTag.
label())),
119 m_l1IsoEGTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Isolated")),
121 m_l1NoIsoEGTag(edm::InputTag(m_l1CollectionsTag.
label(),
"NonIsolated")),
123 m_l1CenJetTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Central")),
125 m_l1ForJetTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Forward")),
127 m_l1TauJetTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Tau")),
129 m_l1IsoTauJetTag(edm::InputTag(m_l1CollectionsTag.
label(),
"IsoTau")),
131 m_l1EtMissMETTag(edm::InputTag(m_l1CollectionsTag.
label(),
"MET")),
133 m_l1EtMissMHTTag(edm::InputTag(m_l1CollectionsTag.
label(),
"MHT")),
135 m_l1GlobalDecision(
false),
163 <<
"L1 Seeding using L1 trigger object maps: "
165 <<
" if false: seeding with L1Extra\n"
166 <<
"Number of BxInEvent when seeding with L1Extra: "
168 <<
" aka w/o object maps\n " <<
"\n"
169 <<
"L1 Seeding via Technical Triggers: "
171 <<
"L1 Seeding uses algorithm aliases: "
173 <<
"L1 Seeds Logical Expression: " <<
"\n "
175 <<
"Input tag for L1 GT DAQ record: "
177 <<
"Input tag for L1 GT object map record: "
179 <<
"Input tag for L1 extra collections: "
181 <<
"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 =
357 const AlgorithmMap& algorithmMap = l1GtMenu->gtAlgorithmMap();
358 const AlgorithmMap& algorithmAliasMap = l1GtMenu->gtAlgorithmAliasMap();
360 LogTrace(
"HLTLevel1GTSeed") <<
"\n L1 trigger menu "
361 << l1GtMenu->gtTriggerMenuInterface()
362 <<
"\n Number of algorithm names: "
363 << (algorithmMap.size())
364 <<
"\n Number of algorithm aliases: "
365 << (algorithmAliasMap.size()) <<
"\n" << std::endl;
398 CItCond itCond = conditionMap.find(cndName);
399 if (itCond != conditionMap.end())
400 return (&((itCond->second)->objectType()));
403 throw cms::Exception(
"FailModule") <<
"\nCondition " << cndName <<
" not found in the condition map" <<
" for chip number " << chipNr;
422 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
424 CItAlgo itAlgo = algorithmMap.find((algOpTokenVector[
i]).tokenName);
425 if (itAlgo != algorithmMap.end()) {
427 int bitNr = (itAlgo->second).algoBitNumber();
428 int chipNr = (itAlgo->second).algoChipNumber();
430 (algOpTokenVector[
i]).tokenNumber = bitNr;
434 if (jSeed < l1AlgoSeedsSize) {
441 == (algOpTokenVector[
i]).tokenName) {
445 const std::vector<L1GtLogicParser::TokenRPN>& aRpnVector =
446 (itAlgo->second).algoRpnVector();
447 size_t aRpnVectorSize = aRpnVector.size();
452 std::vector<const std::vector<L1GtObject>*> tmpObjTypeVec;
453 tmpObjTypeVec.reserve(aRpnVectorSize);
455 for (
size_t opI = 0; opI < aRpnVectorSize; ++opI) {
459 if (!cName.empty()) {
461 tmpObjTypeVec.push_back(
478 << (algOpTokenVector[
i]).tokenName
479 <<
", requested as seed by a HLT path, not found in the L1 trigger menu\n "
481 <<
"\nIncompatible L1 and HLT menus.\n" << std::endl;
498 const std::vector<unsigned int>& triggerMask,
499 const int physicsDaqPartition) {
501 std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
504 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
505 int iBit = (algOpTokenVector[
i]).tokenNumber;
506 bool iResult = gtWord.at(iBit);
508 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
515 if (triggerMaskBit) {
523 (algOpTokenVector[
i]).tokenResult = iResult;
529 bool iResult = gtWord.at(iBit);
531 int triggerMaskBit = triggerMask[iBit] & (1 << physicsDaqPartition);
538 if (triggerMaskBit) {
551 bool newMenu =
false;
561 std::vector<L1GtLogicParser::OperandToken> & algOpTokenVector =
564 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
566 std::string bitString = (algOpTokenVector[
i]).tokenName;
567 std::istringstream bitStream(bitString);
570 if ((bitStream >> bitInt).
fail()) {
573 <<
"\nL1 Seeds Logical Expression: = '"
575 <<
"\n Conversion to integer failed for " << bitString
579 (algOpTokenVector[
i]).tokenNumber = bitInt;
586 std::istringstream bitStream(bitString);
589 if ((bitStream >> bitInt).
fail()) {
592 <<
"\nL1 Seeds Logical Expression: = '"
594 <<
"\n Conversion to integer failed for " << bitString
610 <<
"\n\nupdateAlgoLogicParser: seeding via technical trigger"
611 <<
"\n update event quantities." << std::endl;
617 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu changed to "
621 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu unchanged ("
623 <<
")\n update event quantities." << std::endl;
627 std::vector<L1GtLogicParser::OperandToken>
const & algOpTokenVector =
631 <<
"\n\nupdateAlgoLogicParser: algOpTokenVector.size() = "
632 << algOpTokenVector.size() << std::endl;
634 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
636 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
637 << (algOpTokenVector[
i]).tokenNumber <<
"\t" << std::setw(25)
638 << (algOpTokenVector[
i]).tokenName <<
"\t"
639 << (algOpTokenVector[
i]).tokenResult << std::endl;
642 LogTrace(
"HLTLevel1GTSeed") << std::endl;
645 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = "
650 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
656 LogTrace(
"HLTLevel1GTSeed") << std::endl;
663 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeedsRpn.size() = "
668 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: "
673 LogTrace(
"HLTLevel1GTSeed") <<
" ( "
680 LogTrace(
"HLTLevel1GTSeed") << std::endl;
682 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: "
683 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = "
689 <<
" Conditions for an algorithm: vector size: "
695 <<
" Condition object type vector: size: "
701 LogTrace(
"HLTLevel1GTSeed") <<
" " << obj <<
" ";
705 LogTrace(
"HLTLevel1GTSeed") << std::endl;
710 LogTrace(
"HLTLevel1GTSeed") << std::endl;
720 const int physicsDaqPartition) {
724 const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->
decisionWord();
732 std::ostringstream myCoutStream;
736 << myCoutStream.str()
737 <<
"\nHLTLevel1GTSeed::hltFilter "
739 <<
"\n Result for logical expression: " << seedsResult <<
"\n"
752 std::list<int> listMuon;
754 std::list<int> listIsoEG;
755 std::list<int> listNoIsoEG;
757 std::list<int> listCenJet;
758 std::list<int> listForJet;
759 std::list<int> listTauJet;
760 std::list<int> listIsoTauJet;
762 std::list<int> listETM;
763 std::list<int> listETT;
764 std::list<int> listHTT;
765 std::list<int> listHTM;
767 std::list<int> listJetCounts;
773 if (!gtObjectMapRecord.
isValid()) {
775 <<
"\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
777 <<
"\nrequested in configuration, but not found in the event." << std::endl;
790 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
796 int algBit = (*itSeed).tokenNumber;
798 bool algResult = (*itSeed).tokenResult;
801 <<
"\nHLTLevel1GTSeed::hltFilter "
802 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
803 <<
" in the object map seed list"
804 <<
"\n Algorithm result = " << algResult <<
"\n"
817 <<
"\nWarning: L1GlobalTriggerObjectMap for algorithm " << algName
818 <<
" (bit number " << algBit <<
") does not exist.\nReturn false.\n"
823 const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap =
826 const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn =
829 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
836 std::vector<L1GtLogicParser::OperandToken> condSeeds =
842 <<
"\n HLTLevel1GTSeed::hltFilter "
843 <<
"\n condSeeds.size() = "
847 for (
size_t i = 0;
i < condSeeds.size(); ++
i) {
850 <<
" " << std::setw(5) << (condSeeds[
i]).tokenNumber <<
"\t"
851 << std::setw(25) << (condSeeds[
i]).tokenName <<
"\t"
852 << (condSeeds[
i]).tokenResult
860 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
861 itCond = condSeeds.begin(); itCond != condSeeds.end(); itCond++) {
864 int cndNumber = (*itCond).tokenNumber;
865 bool cndResult = (*itCond).tokenResult;
867 const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
884 for (std::vector<SingleCombInCond>::const_iterator
885 itComb = (*cndComb).begin(); itComb != (*cndComb).end(); itComb++) {
889 for (SingleCombInCond::const_iterator
890 itObject = (*itComb).begin(); itObject != (*itComb).end(); itObject++) {
893 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
901 switch (objTypeVal) {
903 listMuon.push_back(*itObject);
908 listNoIsoEG.push_back(*itObject);
913 listIsoEG.push_back(*itObject);
918 listCenJet.push_back(*itObject);
923 listForJet.push_back(*itObject);
928 listTauJet.push_back(*itObject);
937 int hfInd = (*itObject);
938 if(cndName.find(
"Ind0")!=std::string::npos)
940 else if(cndName.find(
"Ind1")!=std::string::npos)
942 else if(cndName.find(
"Ind2")!=std::string::npos)
944 else if(cndName.find(
"Ind3")!=std::string::npos)
946 listIsoTauJet.push_back(hfInd);
951 listETM.push_back(*itObject);
957 listETT.push_back(*itObject);
963 listHTT.push_back(*itObject);
969 listHTM.push_back(*itObject);
975 listJetCounts.push_back(*itObject);
983 <<
"\n HLTLevel1GTSeed::hltFilter "
984 <<
"\n Unknown object of type " << objTypeVal
985 <<
" and index " << (*itObject) <<
" in the seed list."
1010 listNoIsoEG.unique();
1013 listCenJet.unique();
1016 listForJet.unique();
1019 listTauJet.unique();
1021 listIsoTauJet.sort();
1022 listIsoTauJet.unique();
1036 listJetCounts.sort();
1037 listJetCounts.unique();
1044 if (!listMuon.empty()) {
1051 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag
1052 <<
"\nrequested in configuration, but not found in the event."
1053 <<
"\nNo muon added to filterproduct." << std::endl;
1057 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1068 if (!listIsoEG.empty()) {
1074 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag
1075 <<
"\nrequested in configuration, but not found in the event."
1076 <<
"\nNo IsoEG added to filterproduct." << std::endl;
1079 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1089 if (!listNoIsoEG.empty()) {
1095 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag
1096 <<
"\nrequested in configuration, but not found in the event."
1097 <<
"\nNo NoIsoEG added to filterproduct." << std::endl;
1100 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1101 != listNoIsoEG.end(); ++itObj) {
1104 l1NoIsoEG, *itObj));
1111 if (!listCenJet.empty()) {
1117 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag
1118 <<
"\nrequested in configuration, but not found in the event."
1119 <<
"\nNo CenJet added to filterproduct." << std::endl;
1122 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1123 != listCenJet.end(); ++itObj) {
1133 if (!listForJet.empty()) {
1139 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag
1140 <<
"\nrequested in configuration, but not found in the event."
1141 <<
"\nNo ForJet added to filterproduct." << std::endl;
1144 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1145 != listForJet.end(); ++itObj) {
1155 if (!listTauJet.empty()) {
1161 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag
1162 <<
"\nrequested in configuration, but not found in the event."
1163 <<
"\nNo TauJet added to filterproduct." << std::endl;
1166 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1167 != listTauJet.end(); ++itObj) {
1177 if (!listIsoTauJet.empty()) {
1183 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1IsoTauJetTag
1184 <<
"\nrequested in configuration, but not found in the event."
1185 <<
"\nNo IsoTauJet added to filterproduct." << std::endl;
1188 for (std::list<int>::const_iterator itObj = listIsoTauJet.begin(); itObj
1189 != listIsoTauJet.end(); ++itObj) {
1192 l1IsoTauJet, *itObj));
1199 if (!listETM.empty()) {
1203 if (!l1EnergySums.
isValid()) {
1205 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1206 <<
"\nrequested in configuration, but not found in the event."
1207 <<
"\nNo ETM added to filterproduct." << std::endl;
1208 }
else if (l1EnergySums->size() == 0) {
1210 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1211 <<
"\nfound in the event but with 0 size." <<
"\nNo ETM added to filterproduct."
1216 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1219 l1EnergySums, *itObj));
1227 if (!listETT.empty()) {
1231 if (!l1EnergySums.
isValid()) {
1233 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1234 <<
"\nrequested in configuration, but not found in the event."
1235 <<
"\nNo ETT added to filterproduct." << std::endl;
1236 }
else if (l1EnergySums->size() == 0) {
1238 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMETTag
1239 <<
"\nfound in the event but with 0 size." <<
"\nNo ETT added to filterproduct."
1244 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1247 l1EnergySums, *itObj));
1255 if (!listHTT.empty()) {
1259 if (!l1EnergySums.
isValid()) {
1261 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1262 <<
"\nrequested in configuration, but not found in the event."
1263 <<
"\nNo HTT added to filterproduct." << std::endl;
1265 }
else if (l1EnergySums->size() == 0) {
1267 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1268 <<
"\nfound in the event but with 0 size." <<
"\nNo HTT added to filterproduct."
1273 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1276 l1EnergySums, *itObj));
1283 if (!listHTM.empty()) {
1287 if (!l1EnergySums.
isValid()) {
1289 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1290 <<
"\nrequested in configuration, but not found in the event."
1291 <<
"\nNo HTM added to filterproduct." << std::endl;
1293 }
else if (l1EnergySums->size() == 0) {
1295 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHTTag
1296 <<
"\nfound in the event but with 0 size." <<
"\nNo HTM added to filterproduct."
1301 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1304 l1EnergySums, *itObj));
1366 bool includeMuon =
true;
1368 bool includeIsoEG =
true;
1369 bool includeNoIsoEG =
true;
1371 bool includeCenJet =
true;
1372 bool includeForJet =
true;
1373 bool includeTauJet =
true;
1374 bool includeIsoTauJet =
true;
1376 bool includeETM =
true;
1377 bool includeETT =
true;
1378 bool includeHTT =
true;
1379 bool includeHTM =
true;
1381 bool includeJetCounts =
true;
1384 bool objectsInFilter =
false;
1389 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
1395 int algBit = (*itSeed).tokenNumber;
1397 bool algResult = (*itSeed).tokenResult;
1399 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1400 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1401 <<
" in the object map seed list" <<
"\n Algorithm result = "
1402 << algResult << std::endl;
1404 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1412 for (std::vector<
const std::vector<L1GtObject>*>::const_iterator itVec =
1413 algoSeedsObjTypeVec.begin(); itVec != algoSeedsObjTypeVec.end(); ++itVec) {
1415 const std::vector<L1GtObject>* condObj = *itVec;
1416 for (std::vector<L1GtObject>::const_iterator itObj =
1417 (*condObj).begin(); itObj != (*condObj).end(); ++itObj) {
1420 <<
" Object type in conditions from this algorithm = "
1421 << (*itObj) << std::endl;
1432 <<
"\nWarning: L1MuonParticleCollection with input tag "
1434 <<
"\nrequested in configuration, but not found in the event."
1435 <<
"\nNo muon added to filterproduct."
1440 for (l1extra::L1MuonParticleCollection::const_iterator
1441 objIter = l1Muon->begin(); objIter
1442 != l1Muon->end(); ++objIter) {
1446 int bxNr = objIter->bx();
1447 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1449 objectsInFilter =
true;
1458 includeMuon =
false;
1470 <<
"\nWarning: L1EmParticleCollection with input tag "
1472 <<
"\nrequested in configuration, but not found in the event."
1473 <<
"\nNo IsoEG added to filterproduct."
1478 for (l1extra::L1EmParticleCollection::const_iterator
1479 objIter = l1IsoEG->begin(); objIter
1480 != l1IsoEG->end(); ++objIter) {
1484 int bxNr = objIter->bx();
1485 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1487 objectsInFilter =
true;
1496 includeIsoEG =
false;
1502 if (includeNoIsoEG) {
1508 <<
"\nWarning: L1EmParticleCollection with input tag "
1510 <<
"\nrequested in configuration, but not found in the event."
1511 <<
"\nNo NoIsoEG added to filterproduct."
1516 for (l1extra::L1EmParticleCollection::const_iterator
1517 objIter = l1NoIsoEG->begin(); objIter
1518 != l1NoIsoEG->end(); ++objIter) {
1522 int bxNr = objIter->bx();
1523 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1525 objectsInFilter =
true;
1534 includeNoIsoEG =
false;
1540 if (includeCenJet) {
1546 <<
"\nWarning: L1JetParticleCollection with input tag "
1548 <<
"\nrequested in configuration, but not found in the event."
1549 <<
"\nNo CenJet added to filterproduct."
1554 for (l1extra::L1JetParticleCollection::const_iterator
1555 objIter = l1CenJet->begin(); objIter
1556 != l1CenJet->end(); ++objIter) {
1560 int bxNr = objIter->bx();
1561 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1563 objectsInFilter =
true;
1572 includeCenJet =
false;
1579 if (includeForJet) {
1585 <<
"\nWarning: L1JetParticleCollection with input tag "
1587 <<
"\nrequested in configuration, but not found in the event."
1588 <<
"\nNo ForJet added to filterproduct."
1593 for (l1extra::L1JetParticleCollection::const_iterator
1594 objIter = l1ForJet->begin(); objIter
1595 != l1ForJet->end(); ++objIter) {
1599 int bxNr = objIter->bx();
1600 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1602 objectsInFilter =
true;
1611 includeForJet =
false;
1618 if (includeTauJet) {
1624 <<
"\nWarning: L1JetParticleCollection with input tag "
1626 <<
"\nrequested in configuration, but not found in the event."
1627 <<
"\nNo TauJet added to filterproduct."
1632 for (l1extra::L1JetParticleCollection::const_iterator
1633 objIter = l1TauJet->begin(); objIter
1634 != l1TauJet->end(); ++objIter) {
1638 int bxNr = objIter->bx();
1639 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1641 objectsInFilter =
true;
1650 includeTauJet =
false;
1656 if (includeIsoTauJet) {
1662 <<
"\nWarning: L1JetParticleCollection with input tag "
1664 <<
"\nrequested in configuration, but not found in the event."
1665 <<
"\nNo IsoTauJet added to filterproduct."
1670 for (l1extra::L1JetParticleCollection::const_iterator
1671 objIter = l1IsoTauJet->begin(); objIter
1672 != l1IsoTauJet->end(); ++objIter) {
1676 int bxNr = objIter->bx();
1677 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1679 objectsInFilter =
true;
1683 l1IsoTauJet, iObj));
1688 includeIsoTauJet =
false;
1699 if (!l1EnergySums.
isValid()) {
1701 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1703 <<
"\nrequested in configuration, but not found in the event."
1704 <<
"\nNo ETM added to filterproduct."
1707 }
else if (l1EnergySums->size() == 0) {
1709 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1711 <<
"\nfound in the event but with 0 size."
1712 <<
"\nNo ETM added to filterproduct."
1717 for (l1extra::L1EtMissParticleCollection::const_iterator
1718 objIter = l1EnergySums->begin(); objIter
1719 != l1EnergySums->end(); ++objIter) {
1723 int bxNr = objIter->bx();
1724 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1726 objectsInFilter =
true;
1730 l1EnergySums, iObj));
1746 if (!l1EnergySums.
isValid()) {
1748 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1750 <<
"\nrequested in configuration, but not found in the event."
1751 <<
"\nNo ETT added to filterproduct."
1754 }
else if (l1EnergySums->size() == 0) {
1756 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1758 <<
"\nfound in the event but with 0 size."
1759 <<
"\nNo ETT added to filterproduct."
1764 for (l1extra::L1EtMissParticleCollection::const_iterator
1765 objIter = l1EnergySums->begin(); objIter
1766 != l1EnergySums->end(); ++objIter) {
1770 int bxNr = objIter->bx();
1771 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1773 objectsInFilter =
true;
1777 l1EnergySums, iObj));
1793 if (!l1EnergySums.
isValid()) {
1795 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1797 <<
"\nrequested in configuration, but not found in the event."
1798 <<
"\nNo HTT added to filterproduct."
1801 }
else if (l1EnergySums->size() == 0) {
1803 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1805 <<
"\nfound in the event but with 0 size."
1806 <<
"\nNo HTT added to filterproduct."
1811 for (l1extra::L1EtMissParticleCollection::const_iterator
1812 objIter = l1EnergySums->begin(); objIter
1813 != l1EnergySums->end(); ++objIter) {
1817 int bxNr = objIter->bx();
1818 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1820 objectsInFilter =
true;
1824 l1EnergySums, iObj));
1839 if (!l1EnergySums.
isValid()) {
1841 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1843 <<
"\nrequested in configuration, but not found in the event."
1844 <<
"\nNo HTM added to filterproduct."
1847 }
else if (l1EnergySums->size() == 0) {
1849 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1851 <<
"\nfound in the event but with 0 size."
1852 <<
"\nNo HTM added to filterproduct."
1857 for (l1extra::L1EtMissParticleCollection::const_iterator
1858 objIter = l1EnergySums->begin(); objIter
1859 != l1EnergySums->end(); ++objIter) {
1863 int bxNr = objIter->bx();
1864 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1866 objectsInFilter =
true;
1870 l1EnergySums, iObj));
1881 if (includeJetCounts) {
1891 <<
"\n HLTLevel1GTSeed::hltFilter "
1892 <<
"\n Unknown object of type " << *itObj
1893 <<
" in the seed list." << std::endl;
1902 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1905 return objectsInFilter;
1912 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::hltFilter "
1913 <<
"\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1915 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1917 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1918 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1920 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1921 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1922 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1923 std::vector<l1extra::L1JetParticleRef> seedsL1IsoTauJet;
1925 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1926 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1927 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1928 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1931 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1934 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1937 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1940 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1943 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1946 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1949 const size_t sizeSeedsL1IsoTauJet = seedsL1IsoTauJet.size();
1952 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1955 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1958 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1961 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1963 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n"
1964 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n"
1965 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n"
1966 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n"
1967 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n"
1968 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n"
1969 <<
" L1IsoTauJet seeds: " << sizeSeedsL1IsoTauJet <<
"\n"
1970 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n"
1971 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n"
1972 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n"
1973 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n" << std::endl;
1975 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1980 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu " <<
"\t" <<
"q*PT = "
1981 << obj->charge() * obj->pt() <<
"\t" <<
"eta = " << obj->eta()
1982 <<
"\t" <<
"phi = " << obj->phi() <<
"\t" <<
"BX = "
1986 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1991 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG " <<
"\t" <<
"ET = "
1992 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1993 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1997 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
2002 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG" <<
"\t" <<
"ET = "
2003 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2004 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2007 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
2012 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet " <<
"\t" <<
"ET = "
2013 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2014 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2017 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
2022 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet " <<
"\t" <<
"ET = "
2023 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2024 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2027 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
2032 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet " <<
"\t" <<
"ET = "
2033 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2034 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2037 for (
size_t i = 0;
i != sizeSeedsL1IsoTauJet;
i++) {
2040 seedsL1IsoTauJet[
i]);
2042 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoTauJet " <<
"\t" <<
"ET = "
2043 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
2044 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
2047 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
2052 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM " <<
"\t" <<
"ET = "
2053 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
2057 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
2062 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT " <<
"\t" <<
"ET = "
2063 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2066 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
2071 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT " <<
"\t" <<
"ET = "
2072 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
2075 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
2080 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM " <<
"\t" <<
"ET = "
2081 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
2085 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
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.
L1GtTriggerMenu * m_l1GtMenu
trigger menu
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
parameter description
virtual const bool expressionResult() const