From a729d1cb00471278f830bb2ed22f27f91eb5f0ef Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Mon, 17 Jan 2022 19:42:10 +0100 Subject: [PATCH] Support arbitrary path names in the TriggerResultsFilter in HLTPathStatus mode Other changes: - clean up and modernise the module - add a new unit test for the HLTPathStatus mode --- .../interface/TriggerExpressionConstant.h | 2 - .../HLTcore/interface/TriggerExpressionData.h | 4 +- .../interface/TriggerExpressionEvaluator.h | 15 +- .../interface/TriggerExpressionOperators.h | 12 + .../interface/TriggerExpressionPathReader.h | 2 + .../HLTcore/src/TriggerExpressionData.cc | 6 +- .../plugins/TriggerResultsFilter.cc | 45 ++-- .../HLTfilters/plugins/TriggerResultsFilter.h | 9 +- HLTrigger/HLTfilters/test/BuildFile.xml | 5 + .../triggerResultsFilter_by_PathStatus.py | 212 ++++++++++++++++++ ...triggerResultsFilter_by_TriggerResults.py} | 38 ++-- 11 files changed, 301 insertions(+), 49 deletions(-) create mode 100644 HLTrigger/HLTfilters/test/BuildFile.xml create mode 100644 HLTrigger/HLTfilters/test/triggerResultsFilter_by_PathStatus.py rename HLTrigger/HLTfilters/test/{triggerResultsFilter.py => triggerResultsFilter_by_TriggerResults.py} (80%) diff --git a/HLTrigger/HLTcore/interface/TriggerExpressionConstant.h b/HLTrigger/HLTcore/interface/TriggerExpressionConstant.h index b3cf1e280ef50..7636b96a1c17e 100644 --- a/HLTrigger/HLTcore/interface/TriggerExpressionConstant.h +++ b/HLTrigger/HLTcore/interface/TriggerExpressionConstant.h @@ -13,8 +13,6 @@ namespace triggerExpression { bool operator()(const Data& data) const override { return m_value; } - void init(const Data& data) override {} - void dump(std::ostream& out) const override { out << (m_value ? "TRUE" : "FALSE"); } private: diff --git a/HLTrigger/HLTcore/interface/TriggerExpressionData.h b/HLTrigger/HLTcore/interface/TriggerExpressionData.h index 30375caa5288d..918d4dc99a8d0 100644 --- a/HLTrigger/HLTcore/interface/TriggerExpressionData.h +++ b/HLTrigger/HLTcore/interface/TriggerExpressionData.h @@ -75,7 +75,7 @@ namespace triggerExpression { m_hltUpdated(false), // event values m_eventNumber() { - if (not m_hltResultsTag.label().empty() && not m_usePathStatus) + if (not m_hltResultsTag.label().empty() and not m_usePathStatus) m_hltResultsToken = iC.consumes(m_hltResultsTag); if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes(m_l1tResultsTag); @@ -112,7 +112,7 @@ namespace triggerExpression { m_hltUpdated(false), // event values m_eventNumber() { - if (not m_hltResultsTag.label().empty() && not m_usePathStatus) + if (not m_hltResultsTag.label().empty() and not m_usePathStatus) m_hltResultsToken = iC.consumes(m_hltResultsTag); if (not m_l1tResultsTag.label().empty()) m_l1tResultsToken = iC.consumes(m_l1tResultsTag); diff --git a/HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h b/HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h index 694d2479a9fb9..81e8e54d8e728 100644 --- a/HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h +++ b/HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h @@ -2,6 +2,8 @@ #define HLTrigger_HLTfilters_TriggerExpressionEvaluator_h #include +#include +#include namespace triggerExpression { @@ -9,19 +11,22 @@ namespace triggerExpression { class Evaluator { public: - Evaluator() {} + Evaluator() = default; - // pure virtual, need a concrete implementation + // check if the data satisfies the logical expression virtual bool operator()(const Data& data) const = 0; - // virtual function, do nothing unless overridden + // (re)initialise the logical expression virtual void init(const Data& data) {} - // pure virtual, need a concrete implementation + // list CMSSW path patterns associated to the logical expression + virtual std::vector patterns() const { return {}; } + + // dump the logical expression to the output stream virtual void dump(std::ostream& out) const = 0; // virtual destructor - virtual ~Evaluator() {} + virtual ~Evaluator() = default; }; inline std::ostream& operator<<(std::ostream& out, const Evaluator& eval) { diff --git a/HLTrigger/HLTcore/interface/TriggerExpressionOperators.h b/HLTrigger/HLTcore/interface/TriggerExpressionOperators.h index a47c07ccb69eb..b70d8853b4524 100644 --- a/HLTrigger/HLTcore/interface/TriggerExpressionOperators.h +++ b/HLTrigger/HLTcore/interface/TriggerExpressionOperators.h @@ -14,6 +14,9 @@ namespace triggerExpression { // initialize the depending modules void init(const Data& data) override { m_arg->init(data); } + // return the patterns from the depending modules + std::vector patterns() const override { return m_arg->patterns(); } + protected: std::unique_ptr m_arg; }; @@ -29,6 +32,15 @@ namespace triggerExpression { m_arg2->init(data); } + // return the patterns from the depending modules + std::vector patterns() const override { + std::vector patterns = m_arg1->patterns(); + auto patterns2 = m_arg2->patterns(); + patterns.insert( + patterns.end(), std::make_move_iterator(patterns2.begin()), std::make_move_iterator(patterns2.end())); + return patterns; + } + protected: std::unique_ptr m_arg1; std::unique_ptr m_arg2; diff --git a/HLTrigger/HLTcore/interface/TriggerExpressionPathReader.h b/HLTrigger/HLTcore/interface/TriggerExpressionPathReader.h index fc5e122bea410..ee4c975bc3ef5 100644 --- a/HLTrigger/HLTcore/interface/TriggerExpressionPathReader.h +++ b/HLTrigger/HLTcore/interface/TriggerExpressionPathReader.h @@ -16,6 +16,8 @@ namespace triggerExpression { void init(const Data& data) override; + std::vector patterns() const override { return std::vector{m_pattern}; } + void dump(std::ostream& out) const override; private: diff --git a/HLTrigger/HLTcore/src/TriggerExpressionData.cc b/HLTrigger/HLTcore/src/TriggerExpressionData.cc index 411b5db8ee00f..7311b22408a24 100644 --- a/HLTrigger/HLTcore/src/TriggerExpressionData.cc +++ b/HLTrigger/HLTcore/src/TriggerExpressionData.cc @@ -12,10 +12,8 @@ namespace triggerExpression { void Data::setPathStatusToken(edm::BranchDescription const& branch, edm::ConsumesCollector&& iC) { - if (branch.branchType() == edm::InEvent && branch.className() == "edm::HLTPathStatus" && - branch.moduleLabel().rfind("HLT_", 0) == 0) - m_pathStatusTokens[branch.moduleLabel()] = iC.consumes( - edm::InputTag(branch.moduleLabel(), branch.productInstanceName(), branch.processName())); + m_pathStatusTokens[branch.moduleLabel()] = iC.consumes( + edm::InputTag(branch.moduleLabel(), branch.productInstanceName(), branch.processName())); } bool Data::setEvent(const edm::Event& event, const edm::EventSetup& setup) { diff --git a/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.cc b/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.cc index 483eda1b82710..67bb975adc593 100644 --- a/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.cc +++ b/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.cc @@ -7,21 +7,23 @@ * */ -#include -#include -#include -#include #include +#include +#include +#include +#include +#include #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Common/interface/TriggerResults.h" #include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Utilities/interface/Exception.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" - +#include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/Utilities/interface/RegexMatch.h" #include "HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h" #include "HLTrigger/HLTcore/interface/TriggerExpressionParser.h" + #include "TriggerResultsFilter.h" // @@ -29,16 +31,33 @@ // TriggerResultsFilter::TriggerResultsFilter(const edm::ParameterSet& config) : m_expression(nullptr), m_eventCache(config, consumesCollector()) { - const std::vector& expressions = config.getParameter>("triggerConditions"); + std::vector const& expressions = config.getParameter>("triggerConditions"); parse(expressions); - if (m_eventCache.usePathStatus()) - callWhenNewProductsRegistered([this](const edm::BranchDescription& branch) { - this->m_eventCache.setPathStatusToken(branch, consumesCollector()); + if (m_expression and m_eventCache.usePathStatus()) { + // if the expression was succesfully parsed, join all the patterns corresponding + // to the CMSSW paths in the logical expression into a single regex + std::vector patterns = m_expression->patterns(); + if (patterns.empty()) { + return; + } + std::string str; + for (auto const& pattern : patterns) { + str += edm::glob2reg(pattern); + str += '|'; + } + str.pop_back(); + std::regex regex(str, std::regex::extended); + + // consume all matching paths + callWhenNewProductsRegistered([this, regex](edm::BranchDescription const& branch) { + if (branch.branchType() == edm::InEvent and branch.className() == "edm::HLTPathStatus" and + std::regex_match(branch.moduleLabel(), regex)) { + m_eventCache.setPathStatusToken(branch, consumesCollector()); + } }); + } } -TriggerResultsFilter::~TriggerResultsFilter() { delete m_expression; } - void TriggerResultsFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; // # use HLTPathStatus results @@ -85,7 +104,7 @@ void TriggerResultsFilter::parse(const std::vector& expressions) { void TriggerResultsFilter::parse(const std::string& expression) { // parse the logical expressions into functionals - m_expression = triggerExpression::parse(expression); + m_expression.reset(triggerExpression::parse(expression)); // check if the expressions were parsed correctly if (not m_expression) diff --git a/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.h b/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.h index c38525becf76b..2275ca79a3530 100644 --- a/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.h +++ b/HLTrigger/HLTfilters/plugins/TriggerResultsFilter.h @@ -14,11 +14,12 @@ * */ -#include +#include #include +#include -#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/InputTag.h" @@ -39,7 +40,7 @@ namespace triggerExpression { class TriggerResultsFilter : public edm::stream::EDFilter<> { public: explicit TriggerResultsFilter(const edm::ParameterSet &); - ~TriggerResultsFilter() override; + ~TriggerResultsFilter() override = default; static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); bool filter(edm::Event &, const edm::EventSetup &) override; @@ -49,7 +50,7 @@ class TriggerResultsFilter : public edm::stream::EDFilter<> { void parse(const std::vector &expressions); /// evaluator for the trigger condition - triggerExpression::Evaluator *m_expression; + std::unique_ptr m_expression; /// cache some data from the Event for faster access by the m_expression triggerExpression::Data m_eventCache; diff --git a/HLTrigger/HLTfilters/test/BuildFile.xml b/HLTrigger/HLTfilters/test/BuildFile.xml new file mode 100644 index 0000000000000..7767b61301617 --- /dev/null +++ b/HLTrigger/HLTfilters/test/BuildFile.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/HLTrigger/HLTfilters/test/triggerResultsFilter_by_PathStatus.py b/HLTrigger/HLTfilters/test/triggerResultsFilter_by_PathStatus.py new file mode 100644 index 0000000000000..16eb910497e6b --- /dev/null +++ b/HLTrigger/HLTfilters/test/triggerResultsFilter_by_PathStatus.py @@ -0,0 +1,212 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process('HLT') + +process.load('FWCore.MessageService.MessageLogger_cfi') + +# define the Prescaler service, and set the scale factors +process.PrescaleService = cms.Service('PrescaleService', + prescaleTable = cms.VPSet( + cms.PSet( + pathName = cms.string('Path_1'), + prescales = cms.vuint32( 2 ) + ), + cms.PSet( + pathName = cms.string('Path_2'), + prescales = cms.vuint32( 3 ) + ), + cms.PSet( + pathName = cms.string('Path_3'), + prescales = cms.vuint32( 5 ) + ) + ), + lvl1Labels = cms.vstring('any'), + lvl1DefaultLabel = cms.string('any') +) + +# load conditions from the global tag +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '') + +# define an empty source, and ask for 100 events +process.source = cms.Source('EmptySource') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1000) +) + +# define 3 prescalers, one per path +process.scale_1 = cms.EDFilter('HLTPrescaler') +process.scale_2 = cms.EDFilter('HLTPrescaler') +process.scale_3 = cms.EDFilter('HLTPrescaler') +process.fail = cms.EDFilter('HLTBool', result = cms.bool(False)) +process.success = cms.EDFilter('HLTBool', result = cms.bool(True)) + +process.Path_1 = cms.Path(process.scale_1) +process.Path_2 = cms.Path(process.scale_2) +process.Path_3 = cms.Path(process.scale_3) +process.AlwaysTrue = cms.Path(process.success) +process.AlwaysFalse = cms.Path(process.fail) +process.L1_Path = cms.Path(process.success) + +# define the TriggerResultsFilters based on the status of the previous paths +from HLTrigger.HLTfilters.triggerResultsFilter_cfi import triggerResultsFilter as _triggerResultsFilter +triggerResultsFilter = _triggerResultsFilter.clone( usePathStatus = True ) + +# accept if 'Path_1' succeeds +process.filter_1 = triggerResultsFilter.clone( + triggerConditions = ( 'Path_1', ), + l1tResults = '', + throw = False +) + +# accept if 'Path_2' succeeds +process.filter_2 = triggerResultsFilter.clone( + triggerConditions = ( 'Path_2', ), + l1tResults = '', + throw = False +) + +# accept if 'Path_3' succeeds +process.filter_3 = triggerResultsFilter.clone( + triggerConditions = ( 'Path_3', ), + l1tResults = '', + throw = False +) + +# accept if any path succeeds (explicit OR) +process.filter_any_or = triggerResultsFilter.clone( + triggerConditions = ( 'Path_1', 'Path_2', 'Path_3' ), + l1tResults = '', + throw = False +) + +# accept if 'Path_1' succeeds, prescaled by 2 +process.filter_1_pre = triggerResultsFilter.clone( + triggerConditions = ( '(Path_1) / 15', ), + l1tResults = '', + throw = False +) + +# accept if 'Path_2' succeeds, prescaled by 10 +process.filter_2_pre = triggerResultsFilter.clone( + triggerConditions = ( '(Path_2 / 10)', ), + l1tResults = '', + throw = False +) + +# accept if any path succeeds, with different prescales (explicit OR, prescaled) +process.filter_any_pre = triggerResultsFilter.clone( + triggerConditions = ( 'Path_1 / 15', 'Path_2 / 10', 'Path_3 / 6', ), + l1tResults = '', + throw = False +) + +# accept if any path succeeds (wildcard, '*') +process.filter_any_star = triggerResultsFilter.clone( + triggerConditions = ( 'Path_*', ), + l1tResults = '', + throw = False +) + +# accept if any path succeeds (wildcard, '?') +process.filter_any_question = triggerResultsFilter.clone( + triggerConditions = ( 'Path_?', ), + l1tResults = '', + throw = False +) + +# accept if any path succeeds (double wildcard, '*_?') +process.filter_any_starquestion = triggerResultsFilter.clone( + triggerConditions = ( '*_?', ), + l1tResults = '', + throw = False +) + +# accept if all path succeed (explicit AND) +process.filter_all_explicit = triggerResultsFilter.clone( + triggerConditions = ( 'Path_1 AND Path_2 AND Path_3', ), + l1tResults = '', + throw = False +) + +# wrong path name (explicit) +process.filter_wrong_name = triggerResultsFilter.clone( + triggerConditions = ( 'Wrong', ), + l1tResults = '', + throw = False +) + +# wrong path name (wildcard) +process.filter_wrong_pattern = triggerResultsFilter.clone( + triggerConditions = ( '*_Wrong', ), + l1tResults = '', + throw = False +) + +# empty path list +process.filter_empty_pattern = triggerResultsFilter.clone( + triggerConditions = ( ), + l1tResults = '', + throw = False +) + +# L1-like path name +process.filter_l1path_pattern = triggerResultsFilter.clone( + triggerConditions = ( 'L1_Path', ), + l1tResults = '', + throw = False +) + +# real L1 trigger +process.filter_l1singlemuopen_pattern = triggerResultsFilter.clone( + triggerConditions = ( 'L1_SingleMuOpen', ), + l1tResults = '', + throw = False +) + +# TRUE +process.filter_true_pattern = triggerResultsFilter.clone( + triggerConditions = ( 'TRUE', ), + l1tResults = '', + throw = False +) + +# FALSE +process.filter_false_pattern = triggerResultsFilter.clone( + triggerConditions = ( 'FALSE', ), + l1tResults = '', + throw = False +) + + +process.Check_1 = cms.Path( process.filter_1 ) +process.Check_2 = cms.Path( process.filter_2 ) +process.Check_3 = cms.Path( process.filter_3 ) + +process.Check_All_Explicit = cms.Path( process.filter_all_explicit ) + +process.Check_Any_Or = cms.Path( process.filter_any_or ) +process.Check_Any_Star = cms.Path( process.filter_any_star ) + +process.Check_1_Pre = cms.Path( process.filter_1_pre ) +process.Check_2_Pre = cms.Path( process.filter_2_pre ) +process.Check_Any_Pre = cms.Path( process.filter_any_pre ) + +process.Check_Any_Question = cms.Path( process.filter_any_question ) +process.Check_Any_StarQuestion = cms.Path( process.filter_any_starquestion ) +process.Check_Wrong_Name = cms.Path( process.filter_wrong_name ) +process.Check_Wrong_Pattern = cms.Path( process.filter_wrong_pattern ) +process.Check_Not_Wrong_Pattern = cms.Path( ~ process.filter_wrong_pattern ) +process.Check_Empty_Pattern = cms.Path( process.filter_empty_pattern ) +process.Check_L1Path_Pattern = cms.Path( process.filter_l1path_pattern ) +process.Check_L1Singlemuopen_Pattern = cms.Path( process.filter_l1singlemuopen_pattern ) +process.Check_True_Pattern = cms.Path( process.filter_true_pattern ) +process.Check_False_Pattern = cms.Path( process.filter_false_pattern ) + +# define an EndPath to analyze all other path results +process.hltTrigReport = cms.EDAnalyzer( 'HLTrigReport', + HLTriggerResults = cms.InputTag( 'TriggerResults', '', 'HLT' ) +) +process.HLTAnalyzerEndpath = cms.EndPath( process.hltTrigReport ) diff --git a/HLTrigger/HLTfilters/test/triggerResultsFilter.py b/HLTrigger/HLTfilters/test/triggerResultsFilter_by_TriggerResults.py similarity index 80% rename from HLTrigger/HLTfilters/test/triggerResultsFilter.py rename to HLTrigger/HLTfilters/test/triggerResultsFilter_by_TriggerResults.py index fa61b70a28453..adc073d42c10e 100644 --- a/HLTrigger/HLTfilters/test/triggerResultsFilter.py +++ b/HLTrigger/HLTfilters/test/triggerResultsFilter_by_TriggerResults.py @@ -23,66 +23,66 @@ fileNames = cms.untracked.vstring('file:trigger.root') ) -import HLTrigger.HLTfilters.triggerResultsFilter_cfi as hlt +from HLTrigger.HLTfilters.triggerResultsFilter_cfi import triggerResultsFilter # accept if 'Path_1' succeeds -process.filter_1 = hlt.triggerResultsFilter.clone( +process.filter_1 = triggerResultsFilter.clone( triggerConditions = ( 'Path_1', ), l1tResults = '', throw = False ) # accept if 'Path_2' succeeds -process.filter_2 = hlt.triggerResultsFilter.clone( +process.filter_2 = triggerResultsFilter.clone( triggerConditions = ( 'Path_2', ), l1tResults = '', throw = False ) # accept if 'Path_3' succeeds -process.filter_3 = hlt.triggerResultsFilter.clone( +process.filter_3 = triggerResultsFilter.clone( triggerConditions = ( 'Path_3', ), l1tResults = '', throw = False ) # accept if any path succeeds (explicit OR) -process.filter_any_or = hlt.triggerResultsFilter.clone( +process.filter_any_or = triggerResultsFilter.clone( triggerConditions = ( 'Path_1', 'Path_2', 'Path_3' ), l1tResults = '', throw = False ) # accept if 'Path_1' succeeds, prescaled by 2 -process.filter_1_pre = hlt.triggerResultsFilter.clone( +process.filter_1_pre = triggerResultsFilter.clone( triggerConditions = ( '(Path_1) / 15', ), l1tResults = '', throw = False ) # accept if 'Path_2' succeeds, prescaled by 10 -process.filter_2_pre = hlt.triggerResultsFilter.clone( +process.filter_2_pre = triggerResultsFilter.clone( triggerConditions = ( '(Path_2 / 10)', ), l1tResults = '', throw = False ) # accept if any path succeeds, with different prescales (explicit OR, prescaled) -process.filter_any_pre = hlt.triggerResultsFilter.clone( +process.filter_any_pre = triggerResultsFilter.clone( triggerConditions = ( 'Path_1 / 15', 'Path_2 / 10', 'Path_3 / 6', ), l1tResults = '', throw = False ) # accept if any path succeeds (wildcard, '*') -process.filter_any_star = hlt.triggerResultsFilter.clone( +process.filter_any_star = triggerResultsFilter.clone( triggerConditions = ( '*', ), l1tResults = '', throw = False ) # accept if any path succeeds (wildcard, twice '*') -process.filter_any_doublestar = hlt.triggerResultsFilter.clone( +process.filter_any_doublestar = triggerResultsFilter.clone( triggerConditions = ( '*_*', ), l1tResults = '', throw = False @@ -90,63 +90,63 @@ # accept if any path succeeds (wildcard, '?') -process.filter_any_question = hlt.triggerResultsFilter.clone( +process.filter_any_question = triggerResultsFilter.clone( triggerConditions = ( 'Path_?', ), l1tResults = '', throw = False ) # accept if all path succeed (explicit AND) -process.filter_all_explicit = hlt.triggerResultsFilter.clone( +process.filter_all_explicit = triggerResultsFilter.clone( triggerConditions = ( 'Path_1 AND Path_2 AND Path_3', ), l1tResults = '', throw = False ) # wrong path name (explicit) -process.filter_wrong_name = hlt.triggerResultsFilter.clone( +process.filter_wrong_name = triggerResultsFilter.clone( triggerConditions = ( 'Wrong', ), l1tResults = '', throw = False ) # wrong path name (wildcard) -process.filter_wrong_pattern = hlt.triggerResultsFilter.clone( +process.filter_wrong_pattern = triggerResultsFilter.clone( triggerConditions = ( '*_Wrong', ), l1tResults = '', throw = False ) # empty path list -process.filter_empty_pattern = hlt.triggerResultsFilter.clone( +process.filter_empty_pattern = triggerResultsFilter.clone( triggerConditions = ( ), l1tResults = '', throw = False ) # L1-like path name -process.filter_l1path_pattern = hlt.triggerResultsFilter.clone( +process.filter_l1path_pattern = triggerResultsFilter.clone( triggerConditions = ( 'L1_Path', ), l1tResults = '', throw = False ) # real L1 trigger -process.filter_l1singlemuopen_pattern = hlt.triggerResultsFilter.clone( +process.filter_l1singlemuopen_pattern = triggerResultsFilter.clone( triggerConditions = ( 'L1_SingleMuOpen', ), l1tResults = '', throw = False ) # TRUE -process.filter_true_pattern = hlt.triggerResultsFilter.clone( +process.filter_true_pattern = triggerResultsFilter.clone( triggerConditions = ( 'TRUE', ), l1tResults = '', throw = False ) # FALSE -process.filter_false_pattern = hlt.triggerResultsFilter.clone( +process.filter_false_pattern = triggerResultsFilter.clone( triggerConditions = ( 'FALSE', ), l1tResults = '', throw = False