79 m_l1UseL1TriggerObjectMaps(parSet.getParameter<bool> (
80 "L1UseL1TriggerObjectMaps")),
83 m_l1NrBxInEvent(parSet.getParameter<int> (
87 m_l1TechTriggerSeeding(parSet.getParameter<bool> (
88 "L1TechTriggerSeeding")),
91 m_l1UseAliasesForSeeding(parSet.getParameter<bool> (
92 "L1UseAliasesForSeeding")),
95 m_l1SeedsLogicalExpression(parSet.getParameter<std::string> (
96 "L1SeedsLogicalExpression")),
99 m_l1GtReadoutRecordTag(parSet.getParameter<edm::InputTag> (
100 "L1GtReadoutRecordTag")),
103 m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag> (
104 "L1GtObjectMapTag")),
107 m_l1CollectionsTag(parSet.getParameter<edm::InputTag> (
108 "L1CollectionsTag")),
111 m_l1MuonCollectionTag(parSet.getParameter<edm::InputTag> (
112 "L1MuonCollectionTag")),
115 m_l1MuonTag(edm::InputTag(m_l1MuonCollectionTag.
label())),
116 m_l1ExtraTag(edm::InputTag(m_l1CollectionsTag.
label())),
117 m_l1IsoEGTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Isolated")),
118 m_l1NoIsoEGTag(edm::InputTag(m_l1CollectionsTag.
label(),
119 "NonIsolated")), m_l1CenJetTag(edm::InputTag(
120 m_l1CollectionsTag.
label(),
"Central")), m_l1ForJetTag(
121 edm::InputTag(m_l1CollectionsTag.
label(),
"Forward")),
122 m_l1TauJetTag(edm::InputTag(m_l1CollectionsTag.
label(),
"Tau")),
123 m_l1EtMissMET(edm::InputTag(m_l1CollectionsTag.
label(),
"MET")),
124 m_l1EtMissMHT(edm::InputTag(m_l1CollectionsTag.
label(),
"MHT")),
127 saveTags_(parSet.getUntrackedParameter<bool> (
"saveTags",
true)),
152 <<
"L1 Seeding using L1 trigger object maps: "
154 <<
" if false: seeding with L1Extra\n"
155 <<
"Number of BxInEvent when seeding with L1Extra: "
157 <<
" aka w/o object maps\n " <<
"\n"
158 <<
"L1 Seeding via Technical Triggers: "
160 <<
"L1 Seeding uses algorithm aliases: "
162 <<
"L1 Seeds Logical Expression: " <<
"\n "
164 <<
"Input tag for L1 GT DAQ record: "
166 <<
"Input tag for L1 GT object map record: "
168 <<
"Input tag for L1 extra collections: "
170 <<
"Input tag for L1 muon collections: "
174 produces<trigger::TriggerFilterObjectWithRefs>();
198 std::auto_ptr<trigger::TriggerFilterObjectWithRefs> filterObject(
218 if (!gtReadoutRecord.
isValid()) {
220 <<
"\nWarning: L1GlobalTriggerReadoutRecord with input tag "
222 <<
"\nrequested in configuration, but not found in the event."
225 iEvent.
put(filterObject);
230 boost::uint16_t gtFinalOR = gtReadoutRecord->finalOR();
231 int physicsDaqPartition = 0;
233 static_cast<bool> (gtFinalOR & (1 << physicsDaqPartition));
238 iEvent.
put(filterObject);
247 iEvent.
put(filterObject);
260 unsigned long long l1GtTmTechCacheID = evSetup.
get<
277 const std::vector<bool>& gtTechTrigWord =
278 gtReadoutRecord->technicalTriggerWord();
280 physicsDaqPartition);
283 iEvent.
put(filterObject);
300 unsigned long long l1GtMenuCacheID =
312 const AlgorithmMap& algorithmMap = l1GtMenu->gtAlgorithmMap();
313 const AlgorithmMap& algorithmAliasMap = l1GtMenu->gtAlgorithmAliasMap();
315 LogTrace(
"HLTLevel1GTSeed") <<
"\n L1 trigger menu "
316 << l1GtMenu->gtTriggerMenuInterface()
317 <<
"\n Number of algorithm names: "
318 << (algorithmMap.size())
319 <<
"\n Number of algorithm aliases: "
320 << (algorithmAliasMap.size()) <<
"\n" << std::endl;
333 unsigned long long l1GtTmAlgoCacheID = evSetup.
get<
351 gtReadoutRecordPtr, physicsDaqPartition))) {
353 iEvent.
put(filterObject);
359 iEvent.
put(filterObject);
371 iEvent.
put(filterObject);
378 const std::string& cndName) {
380 bool foundCond =
false;
385 CItCond itCond = conditionMap.find(cndName);
386 if (itCond != conditionMap.end()) {
388 return (&((itCond->second)->objectType()));
395 <<
" not found in the condition map" <<
" for chip number "
396 << chipNr << std::endl;
409 std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
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) {
457 std::string cName = (aRpnVector[opI]).operand;
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
609 <<
"\n\nupdateAlgoLogicParser: seeding via technical trigger"
610 <<
"\n update event quantities." << std::endl;
616 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu changed to "
620 <<
"\n\nupdateAlgoLogicParser: L1 trigger menu unchanged ("
622 <<
")\n update event quantities." << std::endl;
626 std::vector<L1GtLogicParser::OperandToken>& algOpTokenVector =
630 <<
"\n\nupdateAlgoLogicParser: algOpTokenVector.size() = "
631 << algOpTokenVector.size() << std::endl;
633 for (
size_t i = 0;
i < algOpTokenVector.size(); ++
i) {
635 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
636 << (algOpTokenVector[
i]).tokenNumber <<
"\t" << std::setw(25)
637 << (algOpTokenVector[
i]).tokenName <<
"\t"
638 << (algOpTokenVector[
i]).tokenResult << std::endl;
641 LogTrace(
"HLTLevel1GTSeed") << std::endl;
644 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeeds.size() = "
649 LogTrace(
"HLTLevel1GTSeed") <<
" " << std::setw(5)
655 LogTrace(
"HLTLevel1GTSeed") << std::endl;
662 <<
"\nupdateAlgoLogicParser: m_l1AlgoSeedsRpn.size() = "
667 LogTrace(
"HLTLevel1GTSeed") <<
" Rpn vector size: "
672 LogTrace(
"HLTLevel1GTSeed") <<
" ( "
679 LogTrace(
"HLTLevel1GTSeed") << std::endl;
681 LogTrace(
"HLTLevel1GTSeed") <<
"\nupdateAlgoLogicParser: "
682 <<
"algorithms in seed expression: m_l1AlgoSeedsObjType.size() = "
688 <<
" Conditions for an algorithm: vector size: "
694 <<
" Condition object type vector: size: "
700 LogTrace(
"HLTLevel1GTSeed") <<
" " << obj <<
" ";
704 LogTrace(
"HLTLevel1GTSeed") << std::endl;
709 LogTrace(
"HLTLevel1GTSeed") << std::endl;
716 std::auto_ptr<trigger::TriggerFilterObjectWithRefs>& filterObject,
718 const int physicsDaqPartition) {
722 const std::vector<bool>& gtDecisionWord = gtReadoutRecordPtr->
decisionWord();
730 std::ostringstream myCoutStream;
734 << myCoutStream.str()
735 <<
"\nHLTLevel1GTSeed::filter "
737 <<
"\n Result for logical expression: " << seedsResult <<
"\n"
750 std::list<int> listMuon;
752 std::list<int> listIsoEG;
753 std::list<int> listNoIsoEG;
755 std::list<int> listCenJet;
756 std::list<int> listForJet;
757 std::list<int> listTauJet;
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;
794 std::string algName = (*itSeed).tokenName;
795 bool algResult = (*itSeed).tokenResult;
798 <<
"\nHLTLevel1GTSeed::filter "
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"
818 iEvent.
put(filterObject);
822 const std::vector<L1GtLogicParser::OperandToken>& opTokenVecObjMap =
825 const std::vector<L1GtLogicParser::TokenRPN>& algoSeedsRpn =
828 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
835 std::vector<L1GtLogicParser::OperandToken> condSeeds =
841 <<
"\n HLTLevel1GTSeed::filter "
842 <<
"\n condSeeds.size() = "
846 for (
size_t i = 0;
i < condSeeds.size(); ++
i) {
849 <<
" " << std::setw(5) << (condSeeds[
i]).tokenNumber <<
"\t"
850 << std::setw(25) << (condSeeds[
i]).tokenName <<
"\t"
851 << (condSeeds[
i]).tokenResult
859 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator
860 itCond = condSeeds.begin(); itCond != condSeeds.end(); itCond++) {
862 std::string cndName = (*itCond).tokenName;
863 int cndNumber = (*itCond).tokenNumber;
864 bool cndResult = (*itCond).tokenResult;
866 const std::vector<L1GtObject>* cndObjTypeVec = algoSeedsObjTypeVec.at(cndNumber);
883 for (std::vector<SingleCombInCond>::const_iterator
884 itComb = (*cndComb).begin(); itComb != (*cndComb).end(); itComb++) {
888 for (SingleCombInCond::const_iterator
889 itObject = (*itComb).begin(); itObject != (*itComb).end(); itObject++) {
892 const L1GtObject objTypeVal = (*cndObjTypeVec).at(iObj);
900 switch (objTypeVal) {
902 listMuon.push_back(*itObject);
907 listNoIsoEG.push_back(*itObject);
912 listIsoEG.push_back(*itObject);
917 listCenJet.push_back(*itObject);
922 listForJet.push_back(*itObject);
927 listTauJet.push_back(*itObject);
932 listETM.push_back(*itObject);
938 listETT.push_back(*itObject);
944 listHTT.push_back(*itObject);
950 listHTM.push_back(*itObject);
956 listJetCounts.push_back(*itObject);
964 <<
"\n HLTLevel1GTSeed::filter "
965 <<
"\n Unknown object of type " << objTypeVal
966 <<
" and index " << (*itObject) <<
" in the seed list."
991 listNoIsoEG.unique();
1000 listTauJet.unique();
1014 listJetCounts.sort();
1015 listJetCounts.unique();
1022 if (listMuon.size()) {
1029 <<
"\nWarning: L1MuonParticleCollection with input tag " <<
m_l1MuonTag
1030 <<
"\nrequested in configuration, but not found in the event."
1031 <<
"\nNo muon added to filterObject." << std::endl;
1035 for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
1046 if (listIsoEG.size()) {
1052 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1IsoEGTag
1053 <<
"\nrequested in configuration, but not found in the event."
1054 <<
"\nNo IsoEG added to filterObject." << std::endl;
1057 for (std::list<int>::const_iterator itObj = listIsoEG.begin(); itObj != listIsoEG.end(); ++itObj) {
1067 if (listNoIsoEG.size()) {
1073 <<
"\nWarning: L1EmParticleCollection with input tag " <<
m_l1NoIsoEGTag
1074 <<
"\nrequested in configuration, but not found in the event."
1075 <<
"\nNo NoIsoEG added to filterObject." << std::endl;
1078 for (std::list<int>::const_iterator itObj = listNoIsoEG.begin(); itObj
1079 != listNoIsoEG.end(); ++itObj) {
1082 l1NoIsoEG, *itObj));
1089 if (listCenJet.size()) {
1095 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1CenJetTag
1096 <<
"\nrequested in configuration, but not found in the event."
1097 <<
"\nNo CenJet added to filterObject." << std::endl;
1100 for (std::list<int>::const_iterator itObj = listCenJet.begin(); itObj
1101 != listCenJet.end(); ++itObj) {
1111 if (listForJet.size()) {
1117 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1ForJetTag
1118 <<
"\nrequested in configuration, but not found in the event."
1119 <<
"\nNo ForJet added to filterObject." << std::endl;
1122 for (std::list<int>::const_iterator itObj = listForJet.begin(); itObj
1123 != listForJet.end(); ++itObj) {
1133 if (listTauJet.size()) {
1139 <<
"\nWarning: L1JetParticleCollection with input tag " <<
m_l1TauJetTag
1140 <<
"\nrequested in configuration, but not found in the event."
1141 <<
"\nNo TauJet added to filterObject." << std::endl;
1144 for (std::list<int>::const_iterator itObj = listTauJet.begin(); itObj
1145 != listTauJet.end(); ++itObj) {
1155 if (listETM.size()) {
1159 if (!l1EnergySums.
isValid()) {
1161 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMET
1162 <<
"\nrequested in configuration, but not found in the event."
1163 <<
"\nNo ETM added to filterObject." << std::endl;
1164 }
else if (l1EnergySums->size() == 0) {
1166 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMET
1167 <<
"\nfound in the event but with 0 size." <<
"\nNo ETM added to filterObject."
1172 for (std::list<int>::const_iterator itObj = listETM.begin(); itObj != listETM.end(); ++itObj) {
1175 l1EnergySums, *itObj));
1183 if (listETT.size()) {
1187 if (!l1EnergySums.
isValid()) {
1189 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMET
1190 <<
"\nrequested in configuration, but not found in the event."
1191 <<
"\nNo ETT added to filterObject." << std::endl;
1192 }
else if (l1EnergySums->size() == 0) {
1194 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMET
1195 <<
"\nfound in the event but with 0 size." <<
"\nNo ETT added to filterObject."
1200 for (std::list<int>::const_iterator itObj = listETT.begin(); itObj != listETT.end(); ++itObj) {
1203 l1EnergySums, *itObj));
1211 if (listHTT.size()) {
1215 if (!l1EnergySums.
isValid()) {
1217 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHT
1218 <<
"\nrequested in configuration, but not found in the event."
1219 <<
"\nNo HTT added to filterObject." << std::endl;
1221 }
else if (l1EnergySums->size() == 0) {
1223 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHT
1224 <<
"\nfound in the event but with 0 size." <<
"\nNo HTT added to filterObject."
1229 for (std::list<int>::const_iterator itObj = listHTT.begin(); itObj != listHTT.end(); ++itObj) {
1232 l1EnergySums, *itObj));
1239 if (listHTM.size()) {
1243 if (!l1EnergySums.
isValid()) {
1245 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHT
1246 <<
"\nrequested in configuration, but not found in the event."
1247 <<
"\nNo HTM added to filterObject." << std::endl;
1249 }
else if (l1EnergySums->size() == 0) {
1251 <<
"\nWarning: L1EtMissParticleCollection with input tag " <<
m_l1EtMissMHT
1252 <<
"\nfound in the event but with 0 size." <<
"\nNo HTM added to filterObject."
1257 for (std::list<int>::const_iterator itObj = listHTM.begin(); itObj != listHTM.end(); ++itObj) {
1260 l1EnergySums, *itObj));
1323 bool includeMuon =
true;
1325 bool includeIsoEG =
true;
1326 bool includeNoIsoEG =
true;
1328 bool includeCenJet =
true;
1329 bool includeForJet =
true;
1330 bool includeTauJet =
true;
1332 bool includeETM =
true;
1333 bool includeETT =
true;
1334 bool includeHTT =
true;
1335 bool includeHTM =
true;
1337 bool includeJetCounts =
true;
1340 bool objectsInFilter =
false;
1345 for (std::vector<L1GtLogicParser::OperandToken>::const_iterator itSeed =
1351 int algBit = (*itSeed).tokenNumber;
1352 std::string algName = (*itSeed).tokenName;
1353 bool algResult = (*itSeed).tokenResult;
1355 LogTrace(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::filter "
1356 <<
"\n Algorithm " << algName <<
" with bit number " << algBit
1357 <<
" in the object map seed list" <<
"\n Algorithm result = "
1358 << algResult << std::endl;
1360 const std::vector<const std::vector<L1GtObject>*>& algoSeedsObjTypeVec =
1368 for (std::vector<
const std::vector<L1GtObject>*>::const_iterator itVec =
1369 algoSeedsObjTypeVec.begin(); itVec != algoSeedsObjTypeVec.end(); ++itVec) {
1371 const std::vector<L1GtObject>* condObj = *itVec;
1372 for (std::vector<L1GtObject>::const_iterator itObj =
1373 (*condObj).begin(); itObj != (*condObj).end(); ++itObj) {
1376 <<
" Object type in conditions from this algorithm = "
1377 << (*itObj) << std::endl;
1388 <<
"\nWarning: L1MuonParticleCollection with input tag "
1390 <<
"\nrequested in configuration, but not found in the event."
1391 <<
"\nNo muon added to filterObject."
1396 for (l1extra::L1MuonParticleCollection::const_iterator
1397 objIter = l1Muon->begin(); objIter
1398 != l1Muon->end(); ++objIter) {
1402 int bxNr = objIter->bx();
1403 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1405 objectsInFilter =
true;
1406 filterObject->addObject(
1414 includeMuon =
false;
1426 <<
"\nWarning: L1EmParticleCollection with input tag "
1428 <<
"\nrequested in configuration, but not found in the event."
1429 <<
"\nNo IsoEG added to filterObject."
1434 for (l1extra::L1EmParticleCollection::const_iterator
1435 objIter = l1IsoEG->begin(); objIter
1436 != l1IsoEG->end(); ++objIter) {
1440 int bxNr = objIter->bx();
1441 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1443 objectsInFilter =
true;
1444 filterObject->addObject(
1452 includeIsoEG =
false;
1458 if (includeNoIsoEG) {
1464 <<
"\nWarning: L1EmParticleCollection with input tag "
1466 <<
"\nrequested in configuration, but not found in the event."
1467 <<
"\nNo NoIsoEG added to filterObject."
1472 for (l1extra::L1EmParticleCollection::const_iterator
1473 objIter = l1NoIsoEG->begin(); objIter
1474 != l1NoIsoEG->end(); ++objIter) {
1478 int bxNr = objIter->bx();
1479 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1481 objectsInFilter =
true;
1482 filterObject->addObject(
1490 includeNoIsoEG =
false;
1496 if (includeCenJet) {
1502 <<
"\nWarning: L1JetParticleCollection with input tag "
1504 <<
"\nrequested in configuration, but not found in the event."
1505 <<
"\nNo CenJet added to filterObject."
1510 for (l1extra::L1JetParticleCollection::const_iterator
1511 objIter = l1CenJet->begin(); objIter
1512 != l1CenJet->end(); ++objIter) {
1516 int bxNr = objIter->bx();
1517 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1519 objectsInFilter =
true;
1520 filterObject->addObject(
1528 includeCenJet =
false;
1535 if (includeForJet) {
1541 <<
"\nWarning: L1JetParticleCollection with input tag "
1543 <<
"\nrequested in configuration, but not found in the event."
1544 <<
"\nNo ForJet added to filterObject."
1549 for (l1extra::L1JetParticleCollection::const_iterator
1550 objIter = l1ForJet->begin(); objIter
1551 != l1ForJet->end(); ++objIter) {
1555 int bxNr = objIter->bx();
1556 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1558 objectsInFilter =
true;
1559 filterObject->addObject(
1567 includeForJet =
false;
1574 if (includeTauJet) {
1580 <<
"\nWarning: L1JetParticleCollection with input tag "
1582 <<
"\nrequested in configuration, but not found in the event."
1583 <<
"\nNo TauJet added to filterObject."
1588 for (l1extra::L1JetParticleCollection::const_iterator
1589 objIter = l1TauJet->begin(); objIter
1590 != l1TauJet->end(); ++objIter) {
1594 int bxNr = objIter->bx();
1595 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1597 objectsInFilter =
true;
1598 filterObject->addObject(
1606 includeTauJet =
false;
1617 if (!l1EnergySums.
isValid()) {
1619 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1621 <<
"\nrequested in configuration, but not found in the event."
1622 <<
"\nNo ETM added to filterObject."
1625 }
else if (l1EnergySums->size() == 0) {
1627 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1629 <<
"\nfound in the event but with 0 size."
1630 <<
"\nNo ETM added to filterObject."
1635 for (l1extra::L1EtMissParticleCollection::const_iterator
1636 objIter = l1EnergySums->begin(); objIter
1637 != l1EnergySums->end(); ++objIter) {
1641 int bxNr = objIter->bx();
1642 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1644 objectsInFilter =
true;
1645 filterObject->addObject(
1648 l1EnergySums, iObj));
1664 if (!l1EnergySums.
isValid()) {
1666 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1668 <<
"\nrequested in configuration, but not found in the event."
1669 <<
"\nNo ETT added to filterObject."
1672 }
else if (l1EnergySums->size() == 0) {
1674 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1676 <<
"\nfound in the event but with 0 size."
1677 <<
"\nNo ETT added to filterObject."
1682 for (l1extra::L1EtMissParticleCollection::const_iterator
1683 objIter = l1EnergySums->begin(); objIter
1684 != l1EnergySums->end(); ++objIter) {
1688 int bxNr = objIter->bx();
1689 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1691 objectsInFilter =
true;
1692 filterObject->addObject(
1695 l1EnergySums, iObj));
1711 if (!l1EnergySums.
isValid()) {
1713 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1715 <<
"\nrequested in configuration, but not found in the event."
1716 <<
"\nNo HTT added to filterObject."
1719 }
else if (l1EnergySums->size() == 0) {
1721 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1723 <<
"\nfound in the event but with 0 size."
1724 <<
"\nNo HTT added to filterObject."
1729 for (l1extra::L1EtMissParticleCollection::const_iterator
1730 objIter = l1EnergySums->begin(); objIter
1731 != l1EnergySums->end(); ++objIter) {
1735 int bxNr = objIter->bx();
1736 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1738 objectsInFilter =
true;
1739 filterObject->addObject(
1742 l1EnergySums, iObj));
1757 if (!l1EnergySums.
isValid()) {
1759 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1761 <<
"\nrequested in configuration, but not found in the event."
1762 <<
"\nNo HTM added to filterObject."
1765 }
else if (l1EnergySums->size() == 0) {
1767 <<
"\nWarning: L1EtMissParticleCollection with input tag "
1769 <<
"\nfound in the event but with 0 size."
1770 <<
"\nNo HTM added to filterObject."
1775 for (l1extra::L1EtMissParticleCollection::const_iterator
1776 objIter = l1EnergySums->begin(); objIter
1777 != l1EnergySums->end(); ++objIter) {
1781 int bxNr = objIter->bx();
1782 if ((bxNr >= minBxInEvent) && (bxNr <= maxBxInEvent)) {
1784 objectsInFilter =
true;
1785 filterObject->addObject(
1788 l1EnergySums, iObj));
1799 if (includeJetCounts) {
1809 <<
"\n HLTLevel1GTSeed::filter "
1810 <<
"\n Unknown object of type " << *itObj
1811 <<
" in the seed list." << std::endl;
1820 LogTrace(
"HLTLevel1GTSeed") << std::endl;
1823 return objectsInFilter;
1831 LogDebug(
"HLTLevel1GTSeed") <<
"\nHLTLevel1GTSeed::filter "
1832 <<
"\n Dump TriggerFilterObjectWithRefs\n" << std::endl;
1834 std::vector<l1extra::L1MuonParticleRef> seedsL1Mu;
1836 std::vector<l1extra::L1EmParticleRef> seedsL1IsoEG;
1837 std::vector<l1extra::L1EmParticleRef> seedsL1NoIsoEG;
1839 std::vector<l1extra::L1JetParticleRef> seedsL1CenJet;
1840 std::vector<l1extra::L1JetParticleRef> seedsL1ForJet;
1841 std::vector<l1extra::L1JetParticleRef> seedsL1TauJet;
1843 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETM;
1844 std::vector<l1extra::L1EtMissParticleRef> seedsL1ETT;
1845 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTT;
1846 std::vector<l1extra::L1EtMissParticleRef> seedsL1HTM;
1849 const size_t sizeSeedsL1Mu = seedsL1Mu.size();
1852 const size_t sizeSeedsL1IsoEG = seedsL1IsoEG.size();
1855 const size_t sizeSeedsL1NoIsoEG = seedsL1NoIsoEG.size();
1858 const size_t sizeSeedsL1CenJet = seedsL1CenJet.size();
1861 const size_t sizeSeedsL1ForJet = seedsL1ForJet.size();
1864 const size_t sizeSeedsL1TauJet = seedsL1TauJet.size();
1867 const size_t sizeSeedsL1ETM = seedsL1ETM.size();
1870 const size_t sizeSeedsL1ETT = seedsL1ETT.size();
1873 const size_t sizeSeedsL1HTT = seedsL1HTT.size();
1876 const size_t sizeSeedsL1HTM = seedsL1HTM.size();
1878 LogTrace(
"HLTLevel1GTSeed") <<
" L1Mu seeds: " << sizeSeedsL1Mu <<
"\n"
1879 <<
" L1IsoEG seeds: " << sizeSeedsL1IsoEG <<
"\n"
1880 <<
" L1NoIsoEG seeds: " << sizeSeedsL1NoIsoEG <<
"\n"
1881 <<
" L1CenJet seeds: " << sizeSeedsL1CenJet <<
"\n"
1882 <<
" L1ForJet seeds: " << sizeSeedsL1ForJet <<
"\n"
1883 <<
" L1TauJet seeds: " << sizeSeedsL1TauJet <<
"\n"
1884 <<
" L1ETM seeds: " << sizeSeedsL1ETM <<
"\n"
1885 <<
" L1ETT seeds: " << sizeSeedsL1ETT <<
"\n"
1886 <<
" L1HTT seeds: " << sizeSeedsL1HTT <<
"\n"
1887 <<
" L1HTM seeds: " << sizeSeedsL1HTM <<
"\n" << std::endl;
1889 for (
size_t i = 0;
i != sizeSeedsL1Mu;
i++) {
1894 LogTrace(
"HLTLevel1GTSeed") <<
"L1Mu " <<
"\t" <<
"q*PT = "
1895 << obj->charge() * obj->pt() <<
"\t" <<
"eta = " << obj->eta()
1896 <<
"\t" <<
"phi = " << obj->phi() <<
"\t" <<
"BX = "
1900 for (
size_t i = 0;
i != sizeSeedsL1IsoEG;
i++) {
1905 LogTrace(
"HLTLevel1GTSeed") <<
"L1IsoEG " <<
"\t" <<
"ET = "
1906 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1907 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1911 for (
size_t i = 0;
i != sizeSeedsL1NoIsoEG;
i++) {
1916 LogTrace(
"HLTLevel1GTSeed") <<
"L1NoIsoEG" <<
"\t" <<
"ET = "
1917 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1918 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1921 for (
size_t i = 0;
i != sizeSeedsL1CenJet;
i++) {
1926 LogTrace(
"HLTLevel1GTSeed") <<
"L1CenJet " <<
"\t" <<
"ET = "
1927 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1928 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1931 for (
size_t i = 0;
i != sizeSeedsL1ForJet;
i++) {
1936 LogTrace(
"HLTLevel1GTSeed") <<
"L1ForJet " <<
"\t" <<
"ET = "
1937 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1938 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1941 for (
size_t i = 0;
i != sizeSeedsL1TauJet;
i++) {
1946 LogTrace(
"HLTLevel1GTSeed") <<
"L1TauJet " <<
"\t" <<
"ET = "
1947 << obj->et() <<
"\t" <<
"eta = " << obj->eta() <<
"\t"
1948 <<
"phi = " << obj->phi() <<
"\t" <<
"BX = " << obj->bx();
1951 for (
size_t i = 0;
i != sizeSeedsL1ETM;
i++) {
1956 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETM " <<
"\t" <<
"ET = "
1957 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
1961 for (
size_t i = 0;
i != sizeSeedsL1ETT;
i++) {
1966 LogTrace(
"HLTLevel1GTSeed") <<
"L1ETT " <<
"\t" <<
"ET = "
1967 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
1970 for (
size_t i = 0;
i != sizeSeedsL1HTT;
i++) {
1975 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTT " <<
"\t" <<
"ET = "
1976 << obj->etTotal() <<
"\t" <<
"BX = " << obj->bx();
1979 for (
size_t i = 0;
i != sizeSeedsL1HTM;
i++) {
1984 LogTrace(
"HLTLevel1GTSeed") <<
"L1HTM " <<
"\t" <<
"ET = "
1985 << obj->etMiss() <<
"\t" <<
"phi = " << obj->phi() <<
"BX = "
1989 LogTrace(
"HLTLevel1GTSeed") <<
" \n\n" << std::endl;
std::vector< L1GtLogicParser::OperandToken > expressionSeedsOperandList()
void dumpTriggerFilterObjectWithRefs(std::auto_ptr< trigger::TriggerFilterObjectWithRefs > &)
detailed print of filter content
bool m_l1UseL1TriggerObjectMaps
const L1GtTriggerMenu * m_l1GtMenu
trigger menu
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks
edm::InputTag m_l1EtMissMHT
enum start value shifted to 81 so as to avoid clashes with PDG codes
bool seedsL1Extra(edm::Event &, std::auto_ptr< trigger::TriggerFilterObjectWithRefs > &)
const std::vector< L1GtLogicParser::OperandToken > & operandTokenVector() 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"
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
edm::InputTag m_l1ExtraTag
std::vector< unsigned int > m_triggerMaskTechTrig
bool m_l1TechTriggerSeeding
seeding done via technical trigger bits, if value is "true"
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps.
tuple obj
Example code starts here #.
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
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::InputTag m_l1CollectionsTag
InputTag for L1 particle collections (except muon)
edm::InputTag m_l1MuonCollectionTag
InputTag for L1 muon collection.
void updateAlgoLogicParser(const L1GtTriggerMenu *, const AlgorithmMap &)
std::string m_l1SeedsLogicalExpression
edm::InputTag m_l1IsoEGTag
unsigned long long m_l1GtMenuCacheID
edm::InputTag m_l1ForJetTag
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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()
T const * product() const
unsigned long long m_l1GtTmTechCacheID
T const * product() const
unsigned long long m_l1GtTmAlgoCacheID
edm::InputTag m_l1GtReadoutRecordTag
InputTag for the L1 Global Trigger DAQ readout record.
virtual bool filter(edm::Event &, const edm::EventSetup &)
filter the event
const std::vector< L1GtObject > * objectTypeVec(const int chipNumber, const std::string &cndName)
get the vector of object types for a condition cndName on the GTL chip chipNumber ...
std::vector< unsigned int > m_triggerMaskAlgoTrig
HLTLevel1GTSeed(const edm::ParameterSet &)
constructor
virtual ~HLTLevel1GTSeed()
destructor
edm::InputTag m_l1EtMissMET
edm::InputTag m_l1MuonTag
cached InputTags
L1GtLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
bool saveTags_
Whether to save these tags.
edm::InputTag m_l1TauJetTag
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
tuple size
Write out results.
const L1GtTriggerMask * m_l1GtTmTech
virtual const bool expressionResult() const
bool seedsL1TriggerObjectMaps(edm::Event &, std::auto_ptr< trigger::TriggerFilterObjectWithRefs > &, const L1GlobalTriggerReadoutRecord *, const int physicsDaqPartition)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...