44 : nameProcess_(iConfig.getParameter<
std::
string>(
"processName")),
45 autoProcessName_(nameProcess_ ==
"*"),
46 onlyStandAlone_(iConfig.getParameter<
bool>(
"onlyStandAlone")),
50 tagL1GlobalTriggerObjectMaps_(
"l1L1GtObjectMap"),
59 autoProcessNameL1ExtraMu_(
false),
60 autoProcessNameL1ExtraNoIsoEG_(
false),
61 autoProcessNameL1ExtraIsoEG_(
false),
62 autoProcessNameL1ExtraCenJet_(
false),
63 autoProcessNameL1ExtraForJet_(
false),
64 autoProcessNameL1ExtraTauJet_(
false),
65 autoProcessNameL1ExtraETM_(
false),
66 autoProcessNameL1ExtraHTM_(
false),
69 hltPrescaleProvider_(iConfig, consumesCollector(), *this),
70 hltConfigInit_(
false),
72 tagTriggerResults_(
"TriggerResults"),
73 tagTriggerEvent_(
"hltTriggerSummaryAOD"),
75 labelHltPrescaleTable_(),
76 hltPrescaleTableRun_(),
77 hltPrescaleTableLumi_(),
78 addPathModuleLabels_(
false),
79 packPathNames_(iConfig.existsAs<
bool>(
"packTriggerPathNames") ? iConfig.getParameter<
bool>(
"packTriggerPathNames")
81 packLabels_(iConfig.existsAs<
bool>(
"packTriggerLabels") ? iConfig.getParameter<
bool>(
"packTriggerLabels") :
true),
82 packPrescales_(iConfig.existsAs<
bool>(
"packTriggerPrescales") ? iConfig.getParameter<
bool>(
"packTriggerPrescales")
85 if (iConfig.
exists(
"addL1Algos"))
87 if (iConfig.
exists(
"l1GlobalTriggerObjectMaps"))
90 if (iConfig.
exists(
"l1ExtraMu")) {
101 if (iConfig.
exists(
"l1ExtraNoIsoEG")) {
112 if (iConfig.
exists(
"l1ExtraIsoEG")) {
123 if (iConfig.
exists(
"l1ExtraCenJet")) {
134 if (iConfig.
exists(
"l1ExtraForJet")) {
145 if (iConfig.
exists(
"l1ExtraTauJet")) {
156 if (iConfig.
exists(
"l1ExtraETM")) {
167 if (iConfig.
exists(
"l1ExtraHTM")) {
178 if (iConfig.
exists(
"mainBxOnly"))
180 if (iConfig.
exists(
"saveL1Refs"))
184 if (iConfig.
exists(
"triggerResults"))
191 if (iConfig.
exists(
"triggerEvent"))
195 if (iConfig.
exists(
"hltPrescaleLabel"))
197 if (iConfig.
exists(
"hltPrescaleTable")) {
206 if (iConfig.
exists(
"addPathModuleLabels"))
209 if (iConfig.
exists(
"exludeCollections"))
213 if (iConfig.
exists(
"l1ExtraMu"))
215 if (iConfig.
exists(
"l1ExtraNoIsoEG"))
217 if (iConfig.
exists(
"l1ExtraIsoEG"))
219 if (iConfig.
exists(
"l1ExtraCenJet"))
221 if (iConfig.
exists(
"l1ExtraForJet"))
223 if (iConfig.
exists(
"l1ExtraTauJet"))
225 if (iConfig.
exists(
"l1ExtraETM"))
227 if (iConfig.
exists(
"l1ExtraHTM"))
233 if (iConfig.
exists(
"hltPrescaleTable")) {
241 produces<TriggerAlgorithmCollection>();
242 produces<TriggerConditionCollection>();
243 produces<TriggerPathCollection>();
244 produces<TriggerFilterCollection>();
245 produces<TriggerObjectCollection>();
248 produces<PackedTriggerPrescales>();
249 produces<PackedTriggerPrescales>(
"l1max");
250 produces<PackedTriggerPrescales>(
"l1min");
252 produces<TriggerObjectStandAloneCollection>();
271 if (processHistory.getConfigurationForProcess(iHist->processName(), processConfiguration) &&
281 <<
"' not produced according to process history of input data\n" 282 <<
"No trigger information produced";
285 LogInfo(
"autoProcessName") <<
"HLT process name' " <<
nameProcess_ <<
"' used for PAT trigger information";
292 <<
"' differs from HLT process name '" <<
nameProcess_ <<
"'";
298 <<
"' differs from HLT process name '" <<
nameProcess_ <<
"'";
321 LogError(
"hltConfig") <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
322 }
else if (hltConfig.size() <= 0) {
323 LogError(
"hltConfig") <<
"HLT config size error";
339 if (handleHltPrescaleTable.
isValid()) {
341 handleHltPrescaleTable->
set(), handleHltPrescaleTable->
labels(), handleHltPrescaleTable->
table());
361 if (handleHltPrescaleTable.
isValid()) {
363 handleHltPrescaleTable->
set(), handleHltPrescaleTable->
labels(), handleHltPrescaleTable->
table());
374 auto triggerObjects = std::make_unique<TriggerObjectCollection>();
375 auto triggerObjectsStandAlone = std::make_unique<TriggerObjectStandAloneCollection>();
376 std::unique_ptr<PackedTriggerPrescales> packedPrescales, packedPrescalesL1min, packedPrescalesL1max;
388 if (!handleTriggerResults.
isValid()) {
390 <<
"' not in event\n" 391 <<
"No HLT information produced";
393 }
else if (!handleTriggerEvent.
isValid()) {
395 <<
"' not in event\n" 396 <<
"No HLT information produced";
412 if (handleHltPrescaleTable.
isValid()) {
414 handleHltPrescaleTable->
set(), handleHltPrescaleTable->
labels(), handleHltPrescaleTable->
table());
418 if (hltPrescaleTable.size() == 0) {
422 <<
"Using default from event setup";
428 LogDebug(
"hltPrescaleTable") <<
"HLT prescale table found in event setup";
430 LogWarning(
"hltPrescaleSet") <<
"HLTPrescaleTable from event setup has error";
434 unsigned set(hltPrescaleTable.set());
435 if (hltPrescaleTable.size() > 0) {
437 bool foundPrescaleLabel(
false);
438 for (
unsigned iLabel = 0; iLabel < hltPrescaleTable.labels().size(); ++iLabel) {
441 foundPrescaleLabel =
true;
445 if (!foundPrescaleLabel) {
452 LogError(
"hltPrescaleTable") <<
"No HLT prescale table found\n" 453 <<
"Using default empty table with all prescales 1";
457 const unsigned sizePaths(hltConfig.
size());
458 const unsigned sizeFilters(handleTriggerEvent->
sizeFilters());
459 const unsigned sizeObjects(handleTriggerEvent->
sizeObjects());
461 std::map<std::string, int> moduleStates;
464 auto triggerPaths = std::make_unique<TriggerPathCollection>();
467 for (
size_t indexPath = 0; indexPath < sizePaths; ++indexPath) {
468 const std::string& namePath = pathNames.at(indexPath);
469 unsigned indexLastFilterPathModules(handleTriggerResults->
index(indexPath) + 1);
470 while (indexLastFilterPathModules > 0) {
471 --indexLastFilterPathModules;
472 const std::string& labelLastFilterPathModules(hltConfig.
moduleLabel(indexPath, indexLastFilterPathModules));
473 unsigned indexLastFilterFilters =
475 if (indexLastFilterFilters < sizeFilters) {
476 if (hltConfig.
moduleType(labelLastFilterPathModules) ==
"HLTBool")
484 handleTriggerResults->
wasrun(indexPath),
485 handleTriggerResults->
accept(indexPath),
486 handleTriggerResults->
error(indexPath),
487 indexLastFilterPathModules,
490 const unsigned sizeModulesPath(hltConfig.
size(indexPath));
491 assert(indexLastFilterPathModules < sizeModulesPath);
492 std::map<unsigned, std::string> indicesModules;
493 for (
size_t iM = 0; iM < sizeModulesPath; ++iM) {
499 if (indexFilter < sizeFilters) {
502 const unsigned slotModule(hltConfig.
moduleIndex(indexPath, nameModule));
503 indicesModules.insert(std::pair<unsigned, std::string>(slotModule, nameModule));
507 for (L1SeedCollection::const_iterator iSeed = l1Seeds.begin(); iSeed != l1Seeds.end(); ++iSeed) {
513 for (std::map<unsigned, std::string>::const_iterator iM = indicesModules.begin(); iM != indicesModules.end();
515 if (iM->first < indexLastFilterPathModules) {
516 moduleStates[iM->second] = 1;
517 }
else if (iM->first == indexLastFilterPathModules) {
518 moduleStates[iM->second] = handleTriggerResults->
accept(indexPath);
519 }
else if (moduleStates.find(iM->second) == moduleStates.end()) {
520 moduleStates[iM->second] = -1;
531 std::multimap<trigger::size_type, int>
objectTypes;
532 std::multimap<trigger::size_type, std::string>
filterLabels;
534 for (
size_t iF = 0; iF < sizeFilters; ++iF) {
538 assert(types.size() == keys.size());
539 for (
size_t iK = 0; iK < keys.size(); ++iK) {
540 filterLabels.insert(std::pair<trigger::size_type, std::string>(keys[iK], nameFilter));
541 objectTypes.insert(std::pair<trigger::size_type, int>(keys[iK], types[iK]));
548 triggerObjectsStandAlone->reserve(sizeObjects);
551 std::map<trigger::size_type, trigger::size_type> newObjectKeys;
552 for (
size_t iO = 0, iC = 0, nC = handleTriggerEvent->
sizeCollections(); iO < sizeObjects && iC < nC; ++iO) {
557 while (iO >= collectionKeys[iC])
561 typedef std::multimap<trigger::size_type, int>::const_iterator it_type;
562 for (std::pair<it_type, it_type> trange = objectTypes.equal_range(iO); trange.first != trange.second;
564 triggerObject.addTriggerObjectType(trange.first->second);
570 bool excluded(
false);
581 typedef std::multimap<trigger::size_type, std::string>::const_iterator it_fl;
582 for (std::pair<it_fl, it_fl> frange = filterLabels.equal_range(iO); frange.first != frange.second;
585 const std::vector<ModuleLabelToPathAndFlags::PathAndFlags>&
paths =
587 for (std::vector<ModuleLabelToPathAndFlags::PathAndFlags>::const_iterator iP = paths.begin(); iP != paths.end();
589 bool pathFired = handleTriggerResults->
wasrun(iP->pathIndex) && handleTriggerResults->
accept(iP->pathIndex);
590 triggerObjectStandAlone.
addPathName(iP->pathName, pathFired && iP->lastFilter, pathFired && iP->l3Filter);
594 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
603 auto triggerFilters = std::make_unique<TriggerFilterCollection>();
604 triggerFilters->reserve(sizeFilters);
605 for (
size_t iF = 0; iF < sizeFilters; ++iF) {
612 triggerFilter.
setType(typeFilter);
615 for (
size_t iK = 0; iK < keys.size(); ++iK) {
617 if (newObjectKeys.find(keys.at(iK)) != newObjectKeys.end()) {
618 if (newObjectKeys[keys.at(iK)] == sizeObjects)
623 LogWarning(
"triggerObjectKey") <<
"TriggerFilter '" << nameFilter
624 <<
"' requests non-existing TriggerObject key " << keys.at(iK) <<
"\n" 625 <<
"Skipping object assignment";
629 std::map<std::string, int>::iterator iS(moduleStates.find(nameFilter));
630 if (iS != moduleStates.end()) {
631 if (!triggerFilter.
setStatus(iS->second)) {
638 triggerFilters->push_back(triggerFilter);
650 for (
unsigned int i = 0,
n = names.
size();
i <
n; ++
i) {
653 if (pvdet.first.empty()) {
654 packedPrescalesL1max->addPrescaledTrigger(
i, 1);
655 packedPrescalesL1min->addPrescaledTrigger(
i, 1);
657 int pmin = -1, pmax = -1;
658 for (
const auto&
p : pvdet.first) {
660 if (
p.second > 0 && (pmin == -1 || pmin >
p.second))
663 packedPrescalesL1max->addPrescaledTrigger(
i, pmax);
664 packedPrescalesL1min->addPrescaledTrigger(
i, pmin);
667 packedPrescales->addPrescaledTrigger(
i, pvdet.second);
681 std::map<L1GtObject, std::vector<unsigned> > l1ObjectTypeMap;
685 if (handleL1ExtraMu.
isValid()) {
686 std::vector<unsigned> muKeys;
687 for (
size_t l1Mu = 0; l1Mu < handleL1ExtraMu->size(); ++l1Mu) {
688 if (
mainBxOnly_ && handleL1ExtraMu->at(l1Mu).bx() != 0)
695 const reco::LeafCandidate leafCandidate(*(handleL1ExtraMu->at(l1Mu).reco::LeafCandidate::clone()));
703 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
704 if (handleL1ExtraMu->at(l1Mu).bx() == 0)
705 muKeys.push_back(triggerObjectsStandAlone->size() - 1);
707 l1ObjectTypeMap.insert(std::make_pair(
Mu, muKeys));
715 if (handleL1ExtraNoIsoEG.
isValid()) {
716 std::vector<unsigned> noIsoEGKeys;
717 for (
size_t l1NoIsoEG = 0; l1NoIsoEG < handleL1ExtraNoIsoEG->size(); ++l1NoIsoEG) {
718 if (
mainBxOnly_ && handleL1ExtraNoIsoEG->at(l1NoIsoEG).bx() != 0)
725 const reco::LeafCandidate leafCandidate(*(handleL1ExtraNoIsoEG->at(l1NoIsoEG).reco::LeafCandidate::clone()));
733 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
734 if (handleL1ExtraNoIsoEG->at(l1NoIsoEG).bx() == 0)
735 noIsoEGKeys.push_back(triggerObjectsStandAlone->size() - 1);
737 l1ObjectTypeMap.insert(std::make_pair(
NoIsoEG, noIsoEGKeys));
739 LogError(
"l1ExtraValid") <<
"l1extra::L1EmParticleCollection product with InputTag '" 745 if (handleL1ExtraIsoEG.
isValid()) {
746 std::vector<unsigned> isoEGKeys;
747 for (
size_t l1IsoEG = 0; l1IsoEG < handleL1ExtraIsoEG->size(); ++l1IsoEG) {
748 if (
mainBxOnly_ && handleL1ExtraIsoEG->at(l1IsoEG).bx() != 0)
755 const reco::LeafCandidate leafCandidate(*(handleL1ExtraIsoEG->at(l1IsoEG).reco::LeafCandidate::clone()));
763 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
764 if (handleL1ExtraIsoEG->at(l1IsoEG).bx() == 0)
765 isoEGKeys.push_back(triggerObjectsStandAlone->size() - 1);
767 l1ObjectTypeMap.insert(std::make_pair(
IsoEG, isoEGKeys));
775 if (handleL1ExtraCenJet.
isValid()) {
776 std::vector<unsigned> cenJetKeys;
777 for (
size_t l1CenJet = 0; l1CenJet < handleL1ExtraCenJet->size(); ++l1CenJet) {
778 if (
mainBxOnly_ && handleL1ExtraCenJet->at(l1CenJet).bx() != 0)
785 const reco::LeafCandidate leafCandidate(*(handleL1ExtraCenJet->at(l1CenJet).reco::LeafCandidate::clone()));
793 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
794 if (handleL1ExtraCenJet->at(l1CenJet).bx() == 0)
795 cenJetKeys.push_back(triggerObjectsStandAlone->size() - 1);
797 l1ObjectTypeMap.insert(std::make_pair(
CenJet, cenJetKeys));
799 LogError(
"l1ExtraValid") <<
"l1extra::L1JetParticleCollection product with InputTag '" 805 if (handleL1ExtraForJet.
isValid()) {
806 std::vector<unsigned> forJetKeys;
807 for (
size_t l1ForJet = 0; l1ForJet < handleL1ExtraForJet->size(); ++l1ForJet) {
808 if (
mainBxOnly_ && handleL1ExtraForJet->at(l1ForJet).bx() != 0)
815 const reco::LeafCandidate leafCandidate(*(handleL1ExtraForJet->at(l1ForJet).reco::LeafCandidate::clone()));
823 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
824 if (handleL1ExtraForJet->at(l1ForJet).bx() == 0)
825 forJetKeys.push_back(triggerObjectsStandAlone->size() - 1);
827 l1ObjectTypeMap.insert(std::make_pair(
ForJet, forJetKeys));
829 LogError(
"l1ExtraValid") <<
"l1extra::L1JetParticleCollection product with InputTag '" 835 if (handleL1ExtraTauJet.
isValid()) {
836 std::vector<unsigned> tauJetKeys;
837 for (
size_t l1TauJet = 0; l1TauJet < handleL1ExtraTauJet->size(); ++l1TauJet) {
838 if (
mainBxOnly_ && handleL1ExtraTauJet->at(l1TauJet).bx() != 0)
845 const reco::LeafCandidate leafCandidate(*(handleL1ExtraTauJet->at(l1TauJet).reco::LeafCandidate::clone()));
853 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
854 if (handleL1ExtraTauJet->at(l1TauJet).bx() == 0)
855 tauJetKeys.push_back(triggerObjectsStandAlone->size() - 1);
857 l1ObjectTypeMap.insert(std::make_pair(
TauJet, tauJetKeys));
859 LogError(
"l1ExtraValid") <<
"l1extra::L1JetParticleCollection product with InputTag '" 865 if (handleL1ExtraETM.
isValid()) {
866 std::vector<unsigned> etmKeys;
867 for (
size_t l1ETM = 0; l1ETM < handleL1ExtraETM->size(); ++l1ETM) {
868 if (
mainBxOnly_ && handleL1ExtraETM->at(l1ETM).bx() != 0)
875 const reco::LeafCandidate leafCandidate(*(handleL1ExtraETM->at(l1ETM).reco::LeafCandidate::clone()));
883 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
884 if (handleL1ExtraETM->at(l1ETM).bx() == 0)
885 etmKeys.push_back(triggerObjectsStandAlone->size() - 1);
887 l1ObjectTypeMap.insert(std::make_pair(
ETM, etmKeys));
889 LogError(
"l1ExtraValid") <<
"l1extra::L1EtMissParticleCollection product with InputTag '" 895 if (handleL1ExtraHTM.
isValid()) {
896 std::vector<unsigned> htmKeys;
897 for (
size_t l1HTM = 0; l1HTM < handleL1ExtraHTM->size(); ++l1HTM) {
898 if (
mainBxOnly_ && handleL1ExtraHTM->at(l1HTM).bx() != 0)
905 const reco::LeafCandidate leafCandidate(*(handleL1ExtraHTM->at(l1HTM).reco::LeafCandidate::clone()));
913 triggerObjectsStandAlone->push_back(triggerObjectStandAlone);
914 if (handleL1ExtraHTM->at(l1HTM).bx() == 0)
915 htmKeys.push_back(triggerObjectsStandAlone->size() - 1);
917 l1ObjectTypeMap.insert(std::make_pair(
HTM, htmKeys));
919 LogError(
"l1ExtraValid") <<
"l1extra::L1EtMissParticleCollection product with InputTag '" 929 auto triggerAlgos = std::make_unique<TriggerAlgorithmCollection>();
933 std::map<L1GtObject, trigger::TriggerObjectType> mapObjectTypes;
946 auto const& l1GtAlgorithms = handleL1GtTriggerMenu->
gtAlgorithmMap();
948 auto const& l1GtConditionsVector = handleL1GtTriggerMenu->
gtConditionMap();
951 for (
size_t iCv = 0; iCv < l1GtConditionsVector.size(); ++iCv) {
952 l1GtConditions.insert(l1GtConditionsVector.at(iCv).begin(), l1GtConditionsVector.at(iCv).end());
954 triggerAlgos->reserve(l1GtAlgorithms.size() + l1GtTechTriggers.size());
957 if (!handleL1GlobalTriggerObjectMaps.
isValid()) {
958 LogError(
"l1ObjectMap") <<
"L1GlobalTriggerObjectMaps product with InputTag '" 960 <<
"No L1 objects and GTL results available for physics algorithms";
967 LogError(
"l1ObjectMap") <<
"ParameterSet registry not available\n" 968 <<
"Skipping conditions for all L1 physics algorithm names in this run";
972 LogInfo(
"l1ObjectMap") <<
"ParameterSet registry not available\n" 973 <<
"Skipping conditions for all L1 physics algorithm names in this event";
977 for (
CItAlgo iAlgo = l1GtAlgorithms.begin(); iAlgo != l1GtAlgorithms.end(); ++iAlgo) {
980 LogError(
"l1Algo") <<
"L1 physics algorithm '" <<
algoName <<
"' has bit number " 981 << iAlgo->second.algoBitNumber()
989 LogError(
"l1Algo") <<
"L1 physics algorithm '" <<
algoName <<
"' not found in the L1 menu\n" 995 <<
"' does not have category 'AlgorithmTrigger' from 'L1GtUtils'\n" 999 bool decisionBeforeMask;
1000 bool decisionAfterMask;
1006 <<
" from 'L1GtUtils'\n" 1011 iAlgo->second.algoAlias(),
1020 if (!handleL1GlobalTriggerObjectMaps.
isValid()) {
1021 triggerAlgos->push_back(triggerAlgo);
1026 <<
"' is missing in L1GlobalTriggerObjectMaps\n" 1027 <<
"Skipping conditions and GTL result";
1028 triggerAlgos->push_back(triggerAlgo);
1031 bool algorithmResult = handleL1GlobalTriggerObjectMaps->
algorithmResult(bit);
1033 if ((algorithmResult != decisionBeforeMask) &&
1034 (decisionBeforeMask ==
true)) {
1035 LogInfo(
"l1ObjectMap") <<
"L1 physics algorithm '" <<
algoName <<
"' with different decisions in\n" 1036 <<
"L1GlobalTriggerObjectMaps (GTL result) : " << algorithmResult <<
"\n" 1037 <<
"L1GlobalTriggerReadoutRecord (decision before mask): " << decisionBeforeMask;
1044 triggerAlgos->push_back(triggerAlgo);
1050 <<
"' not available in ParameterSet registry\n" 1051 <<
"Skipping conditions for this algorithm in this run";
1054 <<
"' not available in ParameterSet registry\n" 1055 <<
"Skipping conditions for this algorithm in this event";
1057 triggerAlgos->push_back(triggerAlgo);
1062 for (
unsigned iT = 0; iT < conditionNames.size(); ++iT) {
1063 size_t key(triggerConditions->size());
1064 for (
size_t iC = 0; iC < triggerConditions->size(); ++iC) {
1065 if (conditionNames.at(iT) == triggerConditions->at(iC).name()) {
1070 if (
key == triggerConditions->size()) {
1072 LogError(
"l1CondMap") <<
"More condition names from ParameterSet registry than the " 1073 << conditions.
nConditions() <<
" conditions in L1GlobalTriggerObjectMaps\n" 1074 <<
"Skipping condition " << conditionNames.at(iT) <<
" in algorithm " <<
algoName;
1078 if (l1GtConditions.find(triggerCond.name()) != l1GtConditions.end()) {
1079 triggerCond.
setCategory(l1GtConditions[triggerCond.name()]->condCategory());
1080 triggerCond.setType(l1GtConditions[triggerCond.name()]->condType());
1081 const std::vector<L1GtObject> l1ObjectTypes(l1GtConditions[triggerCond.name()]->objectType());
1082 for (
size_t iType = 0; iType < l1ObjectTypes.size(); ++iType) {
1083 triggerCond.addTriggerObjectType(mapObjectTypes[l1ObjectTypes.at(iType)]);
1088 for (
size_t iVV = 0; iVV < combinations.
nCombinations(); ++iVV) {
1091 if (iV >= l1ObjectTypes.size()) {
1092 LogError(
"l1CondMap") <<
"Index " << iV <<
" in combinations vector overshoots size " 1093 << l1ObjectTypes.size() <<
" of types vector in conditions map\n" 1094 <<
"Skipping object key in condition " << triggerCond.name();
1095 }
else if (l1ObjectTypeMap.find(l1ObjectTypes.at(iV)) != l1ObjectTypeMap.end()) {
1096 if (objectIndex >= l1ObjectTypeMap[l1ObjectTypes.at(iV)].size()) {
1098 <<
"Index " << objectIndex <<
" in combination overshoots number " 1099 << l1ObjectTypeMap[l1ObjectTypes.at(iV)].size() <<
"of according trigger objects\n" 1100 <<
"Skipping object key in condition " << triggerCond.name();
1102 const unsigned objectKey(l1ObjectTypeMap[l1ObjectTypes.at(iV)].at(objectIndex));
1103 triggerCond.addObjectKey(objectKey);
1105 triggerObjectsStandAlone->at(objectKey).addAlgorithmName(
1106 triggerAlgo.
name(), (triggerAlgo.
decision() && triggerCond.wasAccept()));
1107 triggerObjectsStandAlone->at(objectKey).addConditionName(triggerCond.name());
1112 LogWarning(
"l1CondMap") <<
"L1 conditions '" << triggerCond.name() <<
"' not found in the L1 menu\n" 1113 <<
"Remains incomplete";
1115 triggerConditions->push_back(triggerCond);
1119 triggerAlgos->push_back(triggerAlgo);
1122 for (
CItAlgo iAlgo = l1GtTechTriggers.begin(); iAlgo != l1GtTechTriggers.end(); ++iAlgo) {
1125 LogError(
"l1Algo") <<
"L1 technical trigger '" <<
algoName <<
"' has bit number " 1126 << iAlgo->second.algoBitNumber()
1134 LogError(
"l1Algo") <<
"L1 technical trigger '" <<
algoName <<
"' not found in the L1 menu\n" 1140 <<
"' does not have category 'TechnicalTrigger' from 'L1GtUtils'\n" 1144 bool decisionBeforeMask;
1145 bool decisionAfterMask;
1151 <<
" from 'L1GtUtils'\n" 1156 iAlgo->second.algoAlias(),
1164 triggerAlgos->push_back(triggerAlgo);
1180 obj.packPathNames(names);
1182 obj.packFilterLabels(iEvent, *handleTriggerResults);
1194 unsigned int sizePaths = pathNames.size();
1195 for (
unsigned int indexPath = 0; indexPath < sizePaths; ++indexPath) {
1196 const std::string& namePath = pathNames[indexPath];
1198 const std::vector<std::string>& nameModules = hltConfig.
moduleLabels(indexPath);
1199 unsigned int sizeModulesPath = nameModules.size();
1200 bool lastFilter =
true;
1201 unsigned int iM = sizeModulesPath;
1203 const std::string& nameFilter = nameModules[--iM];
1206 if (hltConfig.
moduleType(nameFilter) ==
"HLTBool")
1209 insert(nameFilter, namePath, indexPath, lastFilter, saveTags);
unsigned int set() const
low-level const accessors for data members
unsigned int size() const
number of trigger paths in trigger table
const std::string & collectionTagEncoded(trigger::size_type index) const
collection_type::const_iterator const_iterator
T getParameter(std::string const &) const
bool getByLabel(std::string const &label, Handle< PROD > &result) const
unsigned char getObjectIndex(unsigned combination, unsigned object) const
std::vector< L1Seed > L1SeedCollection
Collection of L1Seed.
bool wasrun() const
Was at least one path run?
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
std::pair< std::vector< std::pair< std::string, int > >, int > prescaleValuesInDetail(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Analysis-level L1 trigger algorithm class.
void beginLuminosityBlock(const edm::LuminosityBlock &iLuminosityBlock, const edm::EventSetup &iSetup) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::InputTag tagL1ExtraForJet_
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool autoProcessNameL1ExtraHTM_
trigger::size_type sizeFilters() const
bool autoProcessNameL1ExtraIsoEG_
edm::EDGetTokenT< L1GlobalTriggerObjectMaps > l1GlobalTriggerObjectMapsToken_
edm::InputTag tagTriggerEvent_
PATTriggerProducer(const edm::ParameterSet &iConfig)
bool setStatus(int status)
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
enum start value shifted to 81 so as to avoid clashes with PDG codes
bool autoProcessNameL1ExtraTauJet_
edm::InputTag tagTriggerResults_
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
static const unsigned int NumberTechnicalTriggers
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
const Keys & filterKeys(trigger::size_type index) const
The single EDProduct containing the HLT Prescale Table.
void setGtlResult(bool gtlResult)
Set L1 algorithm GTL result.
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
unsigned short nObjectsPerCombination() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
edm::InputTag tagL1ExtraETM_
std::string const & processName() const
void addTriggerObjectType(trigger::TriggerObjectType triggerObjectType)
Add a new trigger object type identifier.
std::string hltPrescaleLabel_
Strings::size_type size() const
void consistencyCheck() const
void addObjectKey(unsigned objectKey)
Add a new trigger object collection index.
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const std::map< std::string, std::vector< unsigned int > > & prescaleTable() const
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableLumiGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraForJetGetter_
bool hasCollection(const std::string &collName) const override
Checks, if a certain label of original collection is assigned (method overrides)
const std::string names[nVars_]
bool autoProcessNameL1ExtraMu_
void addFilterLabel(const std::string &filterLabel)
Adds a new HLT filter label.
bool autoProcessNameL1ExtraCenJet_
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
bool algorithmExists(int algorithmBitNumber) const
Returns true if there is an entry for this algorithm bit number.
const Keys & collectionKeys() const
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
Single trigger physics object (e.g., an isolated muon)
bool getConfigurationForProcess(std::string const &name, ProcessConfiguration &config) const
void addPathName(const std::string &pathName, bool pathLastFilterAccepted=true, bool pathL3FilterAccepted=true)
Adds a new HLT path name.
bool addPathModuleLabels_
Analysis-level HLTrigger filter class.
std::vector< std::string > exludeCollections_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraNoIsoEGGetter_
const Vids & filterIds(trigger::size_type index) const
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableEventGetter_
Produces the full or stand-alone PAT trigger information collections.
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
ParameterSetID const & parameterSetID() const
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
#define DEFINE_FWK_MODULE(type)
edm::ParameterSetID const & namesParameterSetID() const
edm::InputTag tagL1ExtraIsoEG_
void setCollection(const std::string &collName)
Methods.
Analysis-level L1 trigger condition class.
Analysis-level HLTrigger path class.
static const unsigned int NumberPhysTriggersExtended
const TriggerObjectCollection & getObjects() const
const std::vector< std::string > & labels() const
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraHTMGetter_
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
trigger::HLTPrescaleTable hltPrescaleTableLumi_
ProcessHistory const & processHistory() const override
const std::string & name() const
Get L1 algorithm name.
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraTauJetGetter_
std::string filterLabel(trigger::size_type index) const
bool error() const
Has any path encountered an error (exception)
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraCenJetGetter_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraETMGetter_
ProcessHistory const & processHistory() const
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
static const unsigned int NumberPhysTriggers
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraIsoEGGetter_
void setSaveTags(bool saveTags)
Set the L3 status.
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
void setLogicalExpression(const std::string &expression)
Set L1 algorithm logical expression.
edm::GetterOfProducts< trigger::TriggerEvent > triggerEventGetter_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
unsigned nConditions() const
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > l1ExtraMuGetter_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
edm::InputTag tagL1GlobalTriggerObjectMaps_
edm::InputTag tagL1ExtraMu_
const edm::InputTag filterTag(trigger::size_type index) const
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
L1GtUtils const & l1GtUtils() const
void setCategory(L1GtConditionCategory category)
Set the condition category.
CombinationsInCondition getCombinationsInCondition(int algorithmBitNumber, unsigned conditionNumber) const
unsigned nCombinations() const
void init(const HLTConfigProvider &)
trigger::size_type sizeObjects() const
std::string const & triggerName(unsigned int index) const
std::vector< size_type > Keys
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
bool autoProcessNameL1ExtraForJet_
trigger::size_type sizeCollections() const
other
const std::vector< std::string > & prescaleLabels() const
low-level data member access
HLTConfigProvider const & hltConfigProvider() const
void addConditionKey(unsigned conditionKey)
Add a new trigger condition collection index.
void setType(const std::string &type)
Set the filter module type.
edm::InputTag tagL1ExtraTauJet_
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
unsigned int prescaleSize() const
trigger::HLTPrescaleTable hltPrescaleTableRun_
bool getConditionResult(unsigned condition) const
ConditionsInAlgorithm getConditionsInAlgorithm(int algorithmBitNumber) const
bool autoProcessNameL1ExtraETM_
bool autoProcessNameL1ExtraNoIsoEG_
void addTriggerObjectType(trigger::TriggerObjectType triggerObjectType)
Add a new trigger object type identifier.
bool algorithmResult(int algorithmBitNumber) const
Returns whether an algorithm trigger passed or failed.
static std::string const triggerPaths
const std::map< std::string, std::vector< unsigned int > > & table() const
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
edm::InputTag tagL1ExtraNoIsoEG_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
edm::InputTag tagL1ExtraCenJet_
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
HLTPrescaleProvider hltPrescaleProvider_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableRunGetter_
Analysis-level trigger object class (stand-alone)
edm::InputTag tagL1ExtraHTM_
edm::ParameterSet * l1PSet_
std::string labelHltPrescaleTable_