From 7f0bf5d033ff965598a0b7e04544865d0a2599a9 Mon Sep 17 00:00:00 2001 From: Tim Martin <tim.martin@cern.ch> Date: Fri, 8 Mar 2019 09:01:11 +0000 Subject: [PATCH] Revert "Merge branch 'master-jetchainconfig2' into 'master'" This reverts merge request !21470 --- .../TrigHLTJetHypoUtils/DijetMTCondition.h | 61 --- .../TrigHLTJetHypoUtils/conditionsFactory2.h | 8 - .../TrigHLTJetHypo/python/ChainLabelParser.py | 390 ----------------- .../TrigHLTJetHypo/python/ToolSetter.py | 134 ------ .../python/TrigJetHypoToolConfig.py | 102 +++-- .../python/chainDict2jetLabel.py | 106 ----- .../TrigHLTJetHypo/python/chainDictDumper.py | 22 - .../TrigHLTJetHypo/python/constants.py | 6 - .../TrigHLTJetHypo/python/node.py | 69 --- .../TrigHLTJetHypo/python/test_cases.py | 70 ---- .../TrigHLTJetHypo/python/treeVisitors.py | 392 ------------------ .../TrigHLTJetHypoUtils/DijetMTCondition.cxx | 101 ----- .../conditionsFactory2.cxx | 25 -- .../TrigHLTJetHypo/src/TrigJetAndToolMT.cxx | 62 --- .../TrigHLTJetHypo/src/TrigJetAndToolMT.h | 68 --- .../src/TrigJetHypoToolConfig_dijet.cxx | 94 ----- .../src/TrigJetHypoToolConfig_dijet.h | 76 ---- .../src/TrigJetHypoToolConfig_simple.cxx | 92 ---- .../src/TrigJetHypoToolConfig_simple.h | 71 ---- .../TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx | 10 +- .../TrigHLTJetHypo/src/TrigJetHypoToolMT.h | 5 +- .../TrigHLTJetHypo/src/TrigJetNotToolMT.cxx | 63 --- .../TrigHLTJetHypo/src/TrigJetNotToolMT.h | 66 --- .../TrigHLTJetHypo/src/TrigJetOrToolMT.cxx | 60 --- .../TrigHLTJetHypo/src/TrigJetOrToolMT.h | 68 --- .../src/components/TrigHLTJetHypo_entries.cxx | 12 +- .../TrigUpgradeTest/python/jetDefs.py | 2 + .../TrigUpgradeTest/share/fullMenu.py | 2 +- .../TrigUpgradeTest/share/fullMenu.ref | 23 +- .../TrigUpgradeTest/share/jet.menu.py | 2 +- .../TrigUpgradeTest/share/jetMenu.ref | 23 +- .../TrigUpgradeTest/share/simpleJetJob.py | 16 +- .../HLTMenuConfig/Menu/SignatureDicts.py | 6 +- 33 files changed, 98 insertions(+), 2209 deletions(-) delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/ToolSetter.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDictDumper.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/constants.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/DijetMTCondition.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.h delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.h delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.h delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.h delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.cxx delete mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.h diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h deleted file mode 100644 index 84aef0dc56a..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGHLTJETHYPO_DIJETMTCONDITION_H -#define TRIGHLTJETHYPO_DIJETMTCONDITION_H - -/******************************************************************** - * - * NAME: DijetMTCondition.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * Cuts on paris of jets makling up a dijet - * - * AUTHOR: P. Sherwood - * CREATED: February 21, 2019 - * - *********************************************************************/ - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICondition.h" - - -class DijetMTCondition: public ICondition{ - public: - DijetMTCondition( - double massMin, - double massMax, - double detaMin, - double detaMax, - double dphiMin, - double dphiMax - ); - - ~DijetMTCondition() override {} - - bool isSatisfied(const HypoJetVector&) const override; - - double orderingParameter() const noexcept override; - - std::string toString() const noexcept override; - - private: - - bool passJetCuts(pHypoJet, pHypoJet) const; - bool passDijetCuts(pHypoJet, pHypoJet) const; - - // cuts on sum of jets - double m_massMin; - double m_massMax; - - // cuts on the two jets - double m_detaMin; - double m_detaMax; - - double m_dphiMin; - double m_dphiMax; - -}; - -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h index 03492681722..92078f82269 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h @@ -44,14 +44,6 @@ Conditions conditionsFactoryDijet(const std::vector<double>& etThresholds1, const std::vector<double>& dphiMins, const std::vector<double>& dphiMaxs); -Conditions conditionsFactoryDijetMT(const std::vector<double>& massMins, - const std::vector<double>& massMaxs, - const std::vector<double>& detaMins, - const std::vector<double>& detaMaxs, - const std::vector<double>& dphiMins, - const std::vector<double>& dphiMaxs); - - // for conditionsFactory2 Conditions conditionsFactoryDijetEtaMass(const std::vector<double>& etasMin, diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py deleted file mode 100644 index 46230e0139d..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py +++ /dev/null @@ -1,390 +0,0 @@ -from node import Node -from constants import (lchars, - digits, - delims) - - - -def get_char(s): - """character generator""" - - while s: - c = s[0] - s = s[1:] - yield c - -def _check_parens(s, pars): - pl = pars[0] - pr = pars[1] - np = 0 - for c in s: - if c == pl: np += 1 - if c == pr: np -= 1 - if np < 0: - raise RuntimeError('Paren mismatch for parens %s, %s' % (pars, s)) - -def check_parens(s): - _check_parens(s, '()') - _check_parens(s, '[]') - - - -def preprocess(s): - llines = s.split('\n') - - lines = [l.split('#')[0].strip() for l in llines] - s = ''.join(lines) - ss = '' - reject = ' \n' - for c in s: - # keep white space whn within square brackets, reject otherwise - if c not in reject: - ss += c - s = ss - - check_parens(s) - print s - from constants import alphabet - for c in s: - if not c in alphabet: - raise RuntimeError('bad character %s in string %s' % (c, s)) - print 'end of preprocess: ', s - return s - - -class ChainLabelParser(object): - def __init__(self, label, debug=False): - self.label = label - self.state = 'start' - pp = preprocess(label) - print 'preprocessd string', pp, 'length', len(pp) - self.gc = get_char(pp) - self.state_history = [] - self.states = { - 'start': self.start, - 'scenario': self.scen, - 'start_params_0': self.start_params_0, - 'start_params_1': self.start_params_1, - 'params': self.params, - 'end_params_0': self.end_params_0, - 'end_params': self.end_params, - 'end_scenario': self.end_scenario, - 'error': self.error, - } - self.debug = debug - - def paramAppend(self, c): - self.parameters += c - if self.debug: - print 'parameters', self.parameters - - def scenAppend(self, c): - self.scenario += c - if self.debug: - print 'scenario', self.scenario - - def start(self): - "initialise" - - self.state = 'scenario' - self.scenario = '' - self.parameters = '' - self.tree = [Node('dummy')] - self.msg = '' - - - def scen(self): - """accumulate scenario name string into self.scenario""" - - c = self.gc.next() - - if c in lchars: - self.scenAppend(c) - return - - if c == '(': - self.state = 'start_params_0' - - return - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - def start_params_0(self): - """accumulate parameter string into self.parameter""" - - self.tree.append(Node(self.scenario)) - self.scenario = '' - - c = self.gc.next() - - if c == '[': - self.state = 'start_params_1' - return - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - def start_params_1(self): - """accumulate parameter string into self.parameter""" - - c = self.gc.next() - - if c == '(': - self.paramAppend(c) - self.state = 'params' - return - - if c == ']': - self.state = 'end_params' - return - - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - def params(self): - """accumulate parameter string into self.parameter""" - - c = self.gc.next() - - if c in lchars or c in digits or c ==',': - self.paramAppend(c) - return - - if c == ')': - self.paramAppend(c) - self.state = 'end_params_0' - return - - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - - def end_params_0(self): - """Check whether there are more prameters to accumulate""" - - c = self.gc.next() - - # more parameters - if c == '(': - self.paramAppend(c) - self.state = 'params' - return - - # end of paramter lists - if c == ']': - self.tree[-1].parameters = self.parameters.strip() - self.parameters = '' - self.state = 'end_params' - return - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - - def end_params(self): - """after accumulating params, drop white space, then add node to tree - or process next scenario""" - - c = self.gc.next() - - if c == ')': - self.state = 'end_scenario' - return - - if c in lchars: - self.scenAppend(c) - self.state = 'scenario' - return - - self.msg = 'state %s, bad character %s in string %s' % (self.state, - c, - self.label) - self.state = 'error' - - def end_scenario(self): - """Add current node to its parent""" - - n = self.tree.pop() - self.tree[-1].add_child(n) - - while True: - c = self.gc.next() - if c == ')': - n = self.tree.pop() - self.tree[-1].add_child(n) - else: - - # more input means a new scenario is starting - self.scenario = c - self.parameters = '' - self.msg = '' - self.state = 'scenario' - - return - - - def error(self): - """From error state, dump error report and raise exception""" - - print '---error state report ---' - print ' state', self.state - print ' scenario', self.scenario - print ' parameters', self.parameters - print ' msg', self.msg - print 'state history', self.state_history - print ' tree dump:' - print self.tree[0].dump() - print '--end error state report---' - raise RuntimeError('error state') - - def get_state(self): - self.state_history.append(self.state) - return self.states[self.state] - - - - def parse(self): - "parse a chain label" - - error = False - terminated = False - - self.start() # re-initialise - - try: # parsing ends with an exception - while True: # continue until exception - - # print 'current state', self.state - # print 'current scenario', self.scenario - # print 'current parameters', self.parameters - - # self.states[self.state]() # process the current state - self.get_state()() - - except StopIteration: # generator has reached the end of the string - print 'parse terminated' - terminated = True - except AssertionError, e: - print 'assertion err' - print e - error = True - except RuntimeError, e: - print e - error = True - - - if not terminated: - s = '' - try: - while True: - s += self.gc.next() - except StopIteration: - if s: - print 'error: remaining characters:', s - - if len(self.tree) != 1: - error = True - print 'error, stack size', len(self.tree), 'expected 2' - print self.state_history - - if len(self.tree[0].children) != 1: - error = True - print 'error, top node has %d cdildren, expected 1' % ( - len(self.tree[0].children)) - - final_state = 'end_scenario' - if self.state != final_state: - error = True - print 'error: final state is %s, expected %s' % (self.state, - final_state) - # print 'tree dump:' - # print self.tree[0].dump() - print 'parse', - if not error: - print 'succeeded' - else: - print 'state: %s scenario: %s parameters: %s stack len %d' % ( - self.state, self.scenario, self.parameters, len(self.tree)) - print 'failed' - - # Kludge: mark the tops of the trees. The visitor which - # creates Tool instances with give the Tool for this node - # the name of the chain - - for c in self.tree[0].children: - c.tree_top = True - - # for now (02/01/2019), no reco. First tree is only tree is hypo - return self.tree[0].children[0] - -def _test(s): - from ChainLabelParser import ChainLabelParser - parser = ChainLabelParser(s, debug=True) - tree = parser.parse() - print tree.dump() - - -def test(index): - from test_cases import test_strings - c = sys.argv[1] - index = -1 - try: - index = int(c) - except: - print 'expected int in [1,%d] ]on comand line, got %s' % ( - len(test_strins), c) - sys.exit() - - print 'index', index - print '========== Test %d ==============' % index - s = test_strings[index] - print s - _test(s) - - -def usage(options): - print 'usage: ChainLabelPaers -[%s]' % options - - -if __name__ == '__main__': - - import getopt, sys - from test_cases import test_strings - ncases = len(test_strings) - try: - options = "1234567" - opts, args = getopt.getopt(sys.argv[1:], options, []) - except getopt.GetoptError as err: - # print help information and exit: - print str(err) # will print something like "option -a not recognized" - usage(options) - sys.exit(2) - - assert len(args) == 1 - o = args[0] - try: - index = int(o) - except: - print 'Supply an test case integer index on the command line ' - sys.exit(0) - - if index < 0 or index >= ncases: - print 'no such test case ind %d, expect val in [0, %d]' %(index, - ncases-1) - sys.exit(0) - - test(int(o)) - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ToolSetter.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ToolSetter.py deleted file mode 100644 index 87c1114df9c..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ToolSetter.py +++ /dev/null @@ -1,134 +0,0 @@ -from TrigHLTJetHypo.TrigHLTJetHypoConf import (TrigJetHypoToolConfig_simple, - TrigJetHypoToolConfig_dijet, - TrigJetNotToolMT, - TrigJetAndToolMT, - TrigJetOrToolMT, - TrigJetHypoToolMT) - - -class ToolSetter(object): - """Visitor to set instantiated AlgTools to a jet hypo tree""" - - def __init__(self, name, dump_jets=True): - - self.chain_name = name - self.dump_jets = dump_jets - - self.tool_factories = { - 'simple': [TrigJetHypoToolConfig_simple, 0], - 'not': [TrigJetNotToolMT, 0], - 'and': [TrigJetAndToolMT, 0], - 'or': [TrigJetOrToolMT, 0], - 'dijet': [TrigJetHypoToolConfig_dijet, 0], - } - - self.mod_router = { - 'not': self.mod_logical_unary, - 'and': self.mod_logical_binary, - 'or': self.mod_logical_binary, - # 'not': self.mod_logical_unary, - } - - def mod_logical_binary(self, node): - """Set the HypoConfigTool instance the 'and' and 'or' scenarios - these take two predicates""" - - scen = node.scenario - klass = self.tool_factories[scen][0] - sn = self.tool_factories[scen][1] - name = '%s_%d' % (scen, sn) - self.tool_factories[scen][1] += 1 - - # kludgy. The name of the tool seen by the trigger must be - # the trigger name, so have to figure out if this is the top - # level node (actually first daughter, as the start node is the top) - # note that the name can only be set once so have to know - # if we are the top of the tree while traversing it. kludgy... - # also - will break when using a forest... - - print 'Toolsetter, node.tree_top', node.tree_top - if node.tree_top: - tool = klass(name=self.chain_name) - else: - tool = klass(name=name) - - print 'ToolSetter, setting lhs ', node.children[0].tool - tool.lhs = node.children[0].tool - tool.rhs = node.children[1].tool - node.tool = tool - - - def mod_logical_unary(self, node): - """Set the HypoConfigTool instance for the 'not' scenario - this takes a single predicate""" - - scen = node.scenario - klass = self.tool_factories[scen][0] - sn = self.tool_factories[scen][1] - name = '%s_%d' % (scen, sn) - self.tool_factories[scen][1] += 1 - - # kludgy. The name of the tool seen by the trigger must be - # the trigger name, so have to figure out if this is the top - # level node (actually first daughter, as the start node is the top) - # note that the name can only be set once so have to know - # if we are the top of the tree while traversing it. kludgy... - # also - will break when using a forest... - - print 'Toolsetter, node.tree_top', node.tree_top - if node.tree_top: - tool = klass(name=self.chain_name) - else: - tool = klass(name=name) - - print 'ToolSetter, setting lhs ', node.children[0].tool - tool.hypoTool = node.children[0].tool - node.tool = tool - - - - def mod_simple(self, node): - """Set the HypoConfigTool instance in a hypo tree node""" - - scen = node.scenario - klass = self.tool_factories[scen][0] - sn = self.tool_factories[scen][1] - name = '%s_%d' % (scen, sn) - - self.tool_factories[scen][1] += 1 - - config_tool = klass(name=name+'_config') - [setattr(config_tool, k, v) for k, v in node.conf_attrs.items()] - - # kludgy. The name of the tool seen by the trigger must be - # the trigger name, so have to figure out if this is the top - # level node (actually first daughter, as the start node is the top) - # note that the name can only be set once so have to know - # if we are the top of the tree while traversing it. kludgy... - # also - will break when using a forest... - print 'Toolsetter, node.tree_top', node.tree_top - if node.tree_top: - tool = TrigJetHypoToolMT(name=self.chain_name) - else: - tool = TrigJetHypoToolMT(name=name) - - tool.HypoConfigurer = config_tool - tool.dumpJets = self.dump_jets - node.tool = tool - - def mod(self, node): - """Set the HypoConfigTool instance according to the scenario. - Note: node.accept must perform depth first navigation to ensure - child tools are set.""" - - self.mod_router.get(node.scenario, self.mod_simple)(node) - - def report(self): - wid = max(len(k) for k in self.tool_factories.keys()) - rep = '\n%s: ' % self.__class__.__name__ - - rep += '\n'.join( - ['%s: %d' % (k.ljust(wid), v[1]) - for k, v in self.tool_factories.items()]) - - return rep diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py index 908fcb0454a..538ed52e796 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py @@ -1,73 +1,67 @@ -from TrigHLTJetHypo.TrigHLTJetHypoConf import (TrigJetHypoToolMT, - TrigJetHypoToolConfig_EtaEt) +from TrigHLTJetHypo.TrigHLTJetHypoConf import TrigJetHypoToolMT, TrigJetHypoToolConfig_EtaEt +import re -from TrigHLTJetHypo.ToolSetter import ToolSetter -from TrigHLTJetHypo.treeVisitors import TreeParameterExpander -from TrigHLTJetHypo.chainDict2jetLabel import (make_simple_label, - make_vbenf_label) -from TrigHLTJetHypo.ChainLabelParser import ChainLabelParser +re_EtEta0 = re.compile( + r'^HLT_j(?P<thresh>\d+)(_(?P<etalo>\d{3})eta(?P<etahi>\d{3}))?$') +# re_EtEta1 = re.compile(r'^HLT_j\d+(_\d{1-3}eta\d{3})?_L1') +# re_EtEta2 = re.compile(r'^HLT_j\d+(_\d{3}eta\d{3})?_(jes|nojcalib|lcw)*$') -from GaudiKernel.Constants import (VERBOSE, - DEBUG, - INFO, - WARNING, - ERROR, - FATAL,) +def decodeEtEta(match, chain): + """Create a hypo tool for the Et - Eta scenario""" + default = {'etalo': '0', 'etahi': '320'} + conf_dict = match.groupdict() + for k, v in default.items(): + if k not in conf_dict: conf_dict[k] = v + if conf_dict[k] is None: conf_dict[k] = v -def trigJetHypoToolFromDict(chain_dict): - """Produce a jet trigger hypo tool from a chainDict""" + conf_tool = TrigJetHypoToolConfig_EtaEt(name=chain+"config") + conf_tool.EtThresholds = [float(conf_dict['thresh'])] + conf_tool.eta_mins = [float(conf_dict['etalo'])] + conf_tool.eta_maxs = [float(conf_dict['etahi'])] + conf_tool.asymmetricEtas = [0] + conf_tool.OutputLevel = 0 + return conf_tool - print 'trigJetHypoToolFromDict starts' - chain_label = '' - if 'vbenf' in chain_dict['chainParts'][0]['hypoScenario']: - assert len(chain_dict['chainParts']) == 1 - chain_label = make_vbenf_label(chain_dict) - else: - chain_label = make_simple_label(chain_dict) - parser = ChainLabelParser(chain_label) - tree = parser.parse() - #expand strings of cuts to a cut dictionary - visitor = TreeParameterExpander() - tree.accept(visitor) - visitor.report() +def trigJetHypoToolFromDict(chainDict): + return trigJetHypoToolFromName( chainDict['chainName'], chainDict['chainName']) - # create - possibly nested - tools +def trigJetHypoToolFromName(name, jetconfig): + """Configure a jet hypo tool from chain name. - # chain name in run 2 dicts were missing the 'HLT_' prefix - # but it seems it is necessary to run the hypos in AthenaMT ?...? - - chain_name = chain_dict['chainName'] - if not chain_name.startswith('HLT_'): - chain_name = 'HLT_' + chain_name + Delegate to functions according to the hypo scenartio.""" + scenario_dict = {re_EtEta0: decodeEtEta} - print 'trigJetHypoToolFromDict chain_name', chain_name - visitor = ToolSetter(chain_name) - tree.accept(visitor) - visitor.report() + chain = jetconfig + for k, v in scenario_dict.items(): + match = k.match(chain) + if match: + hypo_tool = TrigJetHypoToolMT(chain) + hypo_tool.HypoConfigurer = v(match, chain) + return hypo_tool - print 'Dumping jet config for', chain_name - print tree.dump() - tool = tree.tool - tool.OutputLevel = DEBUG - return tool + msg = 'trigJetHypoToolFromName(%s) - decode error' % chain + raise NotImplementedError(msg) import unittest class TestStringMethods(unittest.TestCase): def testValidConfigs(self): - from TriggerMenuMT.HLTMenuConfig.Menu import DictFromChainName + # EtaEt hypos + # from MC_pp_v7 import TriggerFlags.JetSlice.signatures + # exception or any other issue will make the ctest for this package fail + chains = ('HLT_j85', 'HLT_j35_320eta490') + wid = max(len(c) for c in chains) + for c in chains: + tool = trigJetHypoToolFromName(c, c) + self.assertIsNotNone( tool ) + print '%s' % c.rjust(wid), tool + + def testInvalidConfig(self): + with self.assertRaises(NotImplementedError): + tool = trigJetHypoToolFromName('HLT_nonsense', 'HLT_nonsense') - chainNameDecoder = DictFromChainName.DictFromChainName() - # chain_names = ('HLT_j85', 'HLT_j35_0eta320') - chain_names = ('HLT_j0hs_vbenf',) - wid = max(len(c) for c in chain_names) - for chain_name in chain_names: - chain_dict = chainNameDecoder.getChainDict(chain_name) - tool = trigJetHypoToolFromDict(chain_dict) - self.assertIsNotNone(tool) - print '%s' % chain_name.rjust(wid), tool if __name__ == '__main__': unittest.main() diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py deleted file mode 100644 index 89047bbe9e7..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py +++ /dev/null @@ -1,106 +0,0 @@ -import re - -# substrings that cannot occur in any chainPartName for simple chains. -reject_substr = ( - 'gsc', - 'ion', - 'dphi', - 'deta', - 'invm', - '0i1', - '1i2', - 'dphi', - 'ht\d',) - -reject_substr_res = re.compile(r'%s' % '|'.join(reject_substr)) - - -def select_simple_chains(cd): - """Select chains for which to make an simple chain label. - - Chains selected by reuiring that the signature os 'Jet'. Chains are - vetoed if specific substrings occur in any of the chainPartNames""" - - - # print cd - # assert False - chain_parts = [c for c in cd['chainParts'] if c['signature'] == 'Jet'] - chain_name = cd['chainName'] - - for cp in chain_parts: - if reject_substr_res.search(cp['chainPartName']): - return [] - - return chain_parts - - -def make_simple_label(chain_dict): - """Marshal information deom the selected chainParts to create a - 'simple' label. - """ - - cps = select_simple_chains(chain_dict) - if not cps: - raise NotImplementedError( - 'chain fails substring selection: not "simple": %s' % ( - chain_dict['chainName'])) - - label = 'simple([' - for cp in cps: - smcstr = str(cp['smc']) - if smcstr == 'nosmc': - smcstr = '' - for i in range(int(cp['multiplicity'])): - # condition_str = '(%set,%s,%s)' % (str(cp['threshold']), - # str(cp['etaRange']), - # smcstr,) - condition_str = '(%set,%s' % (str(cp['threshold']), - str(cp['etaRange']),) - if smcstr: - condition_str += ',%s)' - else: - condition_str += ')' - label += condition_str - label += '])' - return label - - -def select_vbenf_chains(cd): - """Select chains for which to make a vbenf chain label. - Chains selected by reuiring that the signature os 'Jet'. Chains are - vetoed if specific substrings occur in any of the chainPartNames""" - - - # print cd - # assert False - chain_parts = [c for c in cd['chainParts'] if c['signature'] == 'Jet'] - return any(['vbenf' in cp['chainPartName'] for cp in chain_parts]) - -def make_vbenf_label(chain_dict): - """Marshal information from the selected chainParts to create a - vbenf label. - """ - - # toy label for developement: run simple and dijet independently. - # simple makes Et cuts on two jets. Independently (sharing possible) - # of jets choosean by simple, the dijet - # scenario requires a dijet of mass > 900, and opening angle in phi > 2.6 - - return 'and([] simple([(50et)(70et)])dijet([(900mass, 26dphi)]))' - -if __name__ == '__main__': - """Read chainDicts from files, cread simple label if possible""" - from chainDictSource import chainDictSource - - for cd in chainDictSource(): - f = cd['chainName'] - print '\n---------' - print f - try: - label = make_simple_label(cd) - except Exception, e: - print e - continue - - print 'chain label', label - print '-----------\n' diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDictDumper.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDictDumper.py deleted file mode 100644 index 608d8b49228..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDictDumper.py +++ /dev/null @@ -1,22 +0,0 @@ -from TriggerMenuMT.HLTMenuConfig.Menu import DictFromChainName -from TriggerMenuMT.HLTMenuConfig.Menu.SignatureDicts import JetChainParts -import sys - -from pprint import PrettyPrinter - -pp = PrettyPrinter(indent=4) -pp.pprint(JetChainParts) - -decodeChainName = DictFromChainName.DictFromChainName() - -def do_it(): - print '\n------------------\n' - chain_dict = decodeChainName.getChainDict(chain_name) - pp.pprint(chain_dict) - -if __name__ == '__main__': - chain_name = sys.argv[1] - do_it() - # chain_names = ('HLT_j85', 'j85', 'HLT_j55_0eta320_2j20_0eta320',) - # for chain_name in chain_names: - # do_it() diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/constants.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/constants.py deleted file mode 100644 index 33afe422d31..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/constants.py +++ /dev/null @@ -1,6 +0,0 @@ -lchars = 'abcdefghijklmnopqrstuvwxyz' -digits = '0123456789' -delims = '()[],' -logicals = ('and', 'or', 'not') -alphabet = lchars + digits + delims - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py deleted file mode 100644 index 7ce56d947df..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py +++ /dev/null @@ -1,69 +0,0 @@ -from constants import logicals - -class Node(object): - - def __init__(self, scenario): - self.scenario = scenario - self.parameters = '' - self.children = [] - self.conf_attrs = {} - self.tool = None - - # self.tree_top kludge carensure top level tools get chain name - # as Tool name - self.tree_top = False - - def add_child(self, c): - self.children.append(c) - - def accept(self, modifier): - "call self before children" - - modifier.mod(self) - for c in self.children: - c.accept(modifier) - - def accept_cf(self, modifier): - "call children before self" - - for c in self.children: - c.accept_cf(modifier) - modifier.mod(self) - - def makeTool(self): - if self.scenario not in logicals: - self.tool = DummyTool(self.toolName) - - def buildTree(self, treeVisitor): - if self.children: - if self.scenario in logicals: - treeVisitor.add(self.scenario + '(') - else: - treeVisitor.add(self.tool.name() + '(') - - for c in self.children: - c.buildTree(treeVisitor) - treeVisitor.add(') ') - - else: - treeVisitor.add(self.tool.name() + ' ') - - - - return s - - def dump(self, n_in=0): - indent = ' '*n_in - s = '\n' - s = indent + 'Node. scenario: %s \n' % self.scenario - s += indent + 'is tree top? %s \n' % self.tree_top - s += indent + 'parameters: %s\n' % str(self.parameters) - s += indent + 'conf_attrs: %s\n' % str(self.conf_attrs) - s += indent + 'AlgTool: %s\n' % str(self.tool) - # s += indent + 'AlgTool dict: %s\n' % str(self.tool.__dict__) - s += indent + 'No of children: %d\n\n' % len(self.children) - for c in self.children: - s += c.dump(n_in+5) - - return s - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py deleted file mode 100644 index 549dc54109a..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py +++ /dev/null @@ -1,70 +0,0 @@ -test_strings = [ - 'ijet([(10et, 0eta320)])', - 'ijet([(10et, 0eta320)(20et, 0eta320)])', - # 'or([] ijet([10et]) and([] ijet([20et]) ijet([30et])))', - 'or([] ijet([(10et)]) ijet([(20et)(40et)]))', - 'and([] ijet([(10et)]) ijet([(20et)]))', - 'not([] ijet([(10et)]) )', - 'not([] and([] ijet([(40et, 0eta320)]) ijet([(100et, 0eta320)])))', - 'or([] not([] ijet([(40et, 0eta320)])) not([] ijet([(100et, 0eta320)])))', - 'or([] and([] ijet([(40et, 0eta320)]) ijet([(40et, 0eta320)])) not([] ijet([(100et, 0eta320)])))', - - - -""" -partition -( - [(4,2)] # partition 6 input jets to 4, 2 - splitter # send the 4s to first 2 children, 2 to third. - assert len(o) == 1 - ( - [(1,1)(2)] - sum # mass cut on sum of input jets (ord.=4) - ( - [(800m900)] - ) - partition # partition 4 jets into non-overlapping - # sets ord 2, 2 - ( - [(2,2)] - pair # sum inputs, apply deta cut to the 2 sums - ( - [(40deta)] - sum # child gets two lists, applys mass cuts - ( - [(75m85)(80m90)] - partition # passes on 2 sum to regroup to single jets - ( - [() (1)] - ijet # apply aoverlapping mod, et cuts - ( - [(30width50, 30et) (35width45, 40et)] - ) - ) - ) - ) - ) - ) - - ijet([(p320etap500, 100et) (n500etan320)]), -)""", - - -# """cascade( -# [800m900] # conditions for cascade (only one here) -# dijet( # first daughter scenario -# [ 80m90] # condition(s) for first daughter scenario -# ijet([10et]) # grandaughter scenario 1 for first daugh scen. -# ijet([20et]) # grandaughter scenario 2 for first daugh scen. -# ) # end of first dijet scenario -# dijet( # second daughter scenario -# [85m95] -# ijet([30et]) -# ijet([40et]) -# ) # end of second dijet scenario -# ) # end of cascade scenario -# """ - - 'and([] ijet([(50et)(70et)]) dijet([(900mass, 26dphi)]))', - 'and([]simple([(50et)(70et)])dijet([(900m,26dphi)]))', -] diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py deleted file mode 100644 index 5dcc580ce23..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py +++ /dev/null @@ -1,392 +0,0 @@ -from constants import lchars - -import re -import math - -from ToolSetter import ToolSetter -class Checker(object): - def __init__(self): - self.known = { - 'simple': ('Et'), - 'cascade': ('m') - } - - self.msgs = [] - self.nchecked = 0 - - def mod(self, node): - self.nchecked += 1 - if node.scenario not in self.known: - self.msgs.append('unknown scenario %s' % node.scenario) - - def report(self): - s = ['Checker: %d nodes checked' % self.nchecked] - s.extend(self.msgs) - return '\n'.join(s) - - -class TreeBuilder(object): - def __init__(self): - self.tree = '(' - - def add(self, s): - self.tree += s - - def report(self): - return self.tree - - -class TreeToBooleanExpression(object): - """visit a hypo tree. If boolean scenarios are present, build a - boolean expression string.""" - - def __init__(self): - self.stack = [] - - def mod(self, node): - if node.scenario == 'not': - self.stack.append(' ! ') - return - - if node.scenario == 'and': - self.stack.append(' x ') - return - - if node.scenario == 'or': - self.stack.append(' + ') - return - - self.stack.append(' %s ' %node.tool.name()) - - def report(self): - s = '%s: ' % self.__class__.__name__ - while self.stack: s += self.stack.pop() - return s.strip() - - -class TreeParameterExpander_simple(object): - """Convert parameter string into duction holding low, high window - cut vals. Specialistaion for the 'simple' scenario - - parameter strings look like '40et, 0eta320, nosmc' - """ - - window_re = re.compile( - r'^(?P<lo>\d*)(?P<attr>[%s]+)(?P<hi>\d*)' % lchars) - - defaults = {'etalo': 0.0, - 'etahi': 3.2, - } - - scale_factors = {'eta': 0.01, - 'et': 1000., - 'smc': 1000., - } - - def __init__(self): - self.msgs = [] - - def mod(self, node): - - def get_conditions(params): - """Split conditions string into list of condition strings - Condition string looks like - '(10et,0eta320)(20et,0eta320)(40et,0eta320)' - returned is ['10et,0eta320', '20et,0eta320', '40et,0eta320'] - """ - - alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789,' - pat = re.compile(r'(^\([%s]+\))'% alphabet ) - s = params - m = True - conditions = [] - while m: - m = pat.match(s) - if m is not None: - conditions.append(m.group(0)) - s = s[len(conditions[-1]):] - assert params == ''.join(conditions) - conditions = [c[1:-1] for c in conditions] # strip parens - return conditions - - - conditions = get_conditions(node.parameters) - - - node.conf_attrs['EtThresholds'] = [] - node.conf_attrs['eta_mins'] = [] - node.conf_attrs['eta_maxs'] = [] - node.conf_attrs['asymmetricEtas'] = [] - - for c in conditions: - toks = c.split(',') - toks = [t.strip() for t in toks] - - - for t in toks: - m = self.window_re.match(t) - if m is None: - self.msgs.append('match failed for parameter %s' % t) - return - group_dict = m.groupdict() - attr = group_dict['attr'] - lo = group_dict['lo'] - hi = group_dict['hi'] - if lo == '': - lo = self.defaults.get(attr+'lo', '') - if hi == '': - hi = self.defaults.get(attr+'hi', '') - - sf = self.scale_factors[attr] - if lo: - if attr == 'eta': - node.conf_attrs['eta_mins'].append(sf * float(lo)) - elif attr == 'et': - node.conf_attrs['EtThresholds'].append(sf * float(lo)) - if hi: - if attr == 'eta': - node.conf_attrs['eta_maxs'].append(sf * float(hi)) - - #01/01/2019 PS KLUDGE !! FIX ME!!! asymmetric eta hardwired to 0. - - [node.conf_attrs['asymmetricEtas'].append(0) for i in range( - len(conditions))] - self.msgs = ['All OK'] - - - def report(self): - return '%s: ' % self.__class__.__name__ + '\n'.join(self.msgs) - - - - -class TreeParameterExpander_dijet(object): - """Convert parameter string into duction holding low, high window - cut vals. Specialistaion for the dijet scenario - - parameter strings look like '40m,100deta200, 50dphi300' - """ - - window_re = re.compile( - r'^(?P<lo>\d*)(?P<attr>[%s]+)(?P<hi>\d*)' % lchars) - - defaults = {'mass_mins': 0.0, - 'mass_maxs': 100000., - 'deta_mins': 0., - 'deta_maxs': 20., - 'dphi_mins': 0., - 'dphi_maxs': math.pi, - } - - scale_factors = {'deta': 0.01, - 'mass': 1000., - 'dphi': 0.01, - } - - def __init__(self): - self.msgs = [] - - def mod(self, node): - - def get_conditions(params): - """Split conditions string into list of condition strings - Condition string looks like - '(75m85,100dEta200, 50dphi200)(80m90, 110dEta210)' - returned is ['10et,0eta320', '20et,0eta320', '40et,0eta320'] - """ - - alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789,' - pat = re.compile(r'(^\([%s]+\))'% alphabet ) - s = params - m = True - conditions = [] - while m: - m = pat.match(s) - if m is not None: - conditions.append(m.group(0)) - s = s[len(conditions[-1]):] - assert params == ''.join(conditions) - conditions = [c[1:-1] for c in conditions] # strip parens - return conditions - - ok = True # status flag - conditions = get_conditions(node.parameters) - - bare_attrs = ['mass', 'deta', 'dphi'] - all_attrs = [] - for attr in bare_attrs: - all_attrs.extend([attr+'_mins', attr+'_maxs']) - - for attr in all_attrs: - node.conf_attrs[attr] = [] - - for c in conditions: - toks = c.split(',') - toks = [t.strip() for t in toks] - - - processed_attrs = [] - for t in toks: - m = self.window_re.match(t) - if m is None: - self.msgs.append('match failed for parameter %s' % t) - return - group_dict = m.groupdict() - attr = group_dict['attr'] - lo = group_dict['lo'] - hi = group_dict['hi'] - if lo == '': - lo = self.defaults.get(attr+'_min', '') - if hi == '': - hi = self.defaults.get(attr+'_max', '') - - sf = self.scale_factors[attr] - if lo: - if attr == 'mass': - node.conf_attrs['mass_mins'].append(sf * float(lo)) - elif attr == 'deta': - node.conf_attrs['deta_mins'].append(sf * float(lo)) - elif attr == 'dphi': - node.conf_attrs['dphi_mins'].append(sf * float(lo)) - - processed_attrs.append(attr+'_mins') - if hi: - if attr == 'mass': - node.conf_attrs['mass_maxs'].append(sf * float(lo)) - elif attr == 'deta': - node.conf_attrs['deta_maxs'].append(sf * float(lo)) - elif attr == 'dphi': - node.conf_attrs['dphi_maxs'].append(sf * float(lo)) - - processed_attrs.append(attr+'_maxs') - - - - for a in all_attrs: - if a not in processed_attrs: - node.conf_attrs[a].append(self.defaults[a]) - - for a in processed_attrs: - if a not in all_attrs: - self.msgs.append('Unknown attribute: %s' % a) - ok = False - - if ok: - self.msgs = ['All OK'] - else: - self.msgs.append('Error') - - - def report(self): - return '%s: ' % self.__class__.__name__ + '\n'.join(self.msgs) - - -class TreeParameterExpander_null(object): - """Does nothing except check the parameter string is empty""" - - def __init__(self): - self.msgs = ['Do nothing paramter expander'] - - def mod(self, node): - assert node.parameters == '' - - def report(self): - return '%s: ' % self.__class__.__name__ + '\n'.join(self.msgs) - - - -class TreeParameterExpander(object): - """Class to exapnder node.paramters string. Delegates to - specialised exanders.""" - - router = { - 'simple': TreeParameterExpander_simple, - 'dijet': TreeParameterExpander_dijet, - 'not': TreeParameterExpander_null, - 'and': TreeParameterExpander_null, - 'or': TreeParameterExpander_null, - } - - def __init__(self): - self.expander = None - - def mod(self, node): - self.expander = self.router[node.scenario]() - self.expander.mod(node) - print self.expander.report() - def report(self): - return self.expander.report() - - - -class TreeToCascade(object): - def __init__(self): - self.stack = [] - - def mod(self, node): - - self.stack.append( - '(%s < (%s))' %(node.tool.name(), - ' '.join([c.tool.name for c in node.children]))) - - def report(self): - s = '' - while self.stack: - s += self.stack.pop() - return s.strip() - - -def _test(s): - - from ChainLabelParser import ChainLabelParser - parser = ChainLabelParser(s) - tree = parser.parse() - print tree.dump() - # exapnd the window cuts (strings) obtained from the chain label - # to attributes and floating point numbers, set defaults - # for unspecified vallues - visitor = TreeParameterExpander() - tree.accept(visitor) - print visitor.report() - print tree.dump() - - - # set the node attribute node.tool to be the hypo Al\gTool. - print 'sending in the ToolSetter visitor' - ts_visitor = ToolSetter(s) - tree.accept_cf(ts_visitor) - print ts_visitor.report() - - - print tree.dump() - - -def test(index): - from test_cases import test_strings - import sys - c = sys.argv[1] - index = -1 - try: - index = int(c) - except: - print 'expected int in [1,%d] ]on comand line, got %s' % ( - len(test_strings), c) - sys.exit() - - print 'index', index - print '========== Test %d ==============' % index - s = test_strings[index] - print s - _test(s) - - -if __name__ == '__main__': - import sys - c = sys.argv[1] - ic = -1 - try: - ic = int(c) - except: - print 'expected int on command line, got ',c - sys.exit() - test(ic) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/DijetMTCondition.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/DijetMTCondition.cxx deleted file mode 100644 index 8e1c5d29314..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/DijetMTCondition.cxx +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h" -#include <sstream> -#include <stdexcept> -#include <TLorentzVector.h> -#include <limits> -// #include <iostream> -DijetMTCondition::DijetMTCondition(double massMin, - double massMax, - double detaMin, - double detaMax, - double dphiMin, - double dphiMax - ){ - m_massMin = massMin; - m_massMax = massMax; - m_detaMin = detaMin; - m_detaMax = detaMax; - m_dphiMin = dphiMin; - m_dphiMax = dphiMax; -} - - -bool DijetMTCondition::isSatisfied(const HypoJetVector& ips) const{ - if(ips.size() != 2){ - std::stringstream ss; - ss << "DijetMT::isSatisfied must see exactly 2 particles, but received " - << ips.size() - << '\n'; - - throw std::runtime_error(ss.str()); - } - - auto j0 = ips[0]; - auto j1 = ips[1]; - - auto rj0 = 0.001 * (j0 -> p4()); - auto rj1 = 0.001 * (j1 -> p4()); - - auto mass = (rj0 + rj1).M(); - if (m_massMin > mass or mass >= m_massMax){return false;} - - - auto eta0 = j0->eta(); - auto eta1 = j1->eta(); - auto adeta = std::abs(eta0 -eta1); - if (m_detaMin > adeta or adeta >= m_detaMax){return false;} - - - auto dphi = std::abs(rj0.DeltaPhi(rj1)); - if (m_dphiMin > dphi or dphi >= m_dphiMax){return false;} - - return true; - - /* - auto result = test(et0, et1, absEta0, absEta1, dEta, mass); - std::cout << "DijetMTCondition : " << std::boolalpha << result << '\n' - << std::setprecision(3) << std::scientific - << "jet 0 et " << m_etThreshold0 << " " << et0 << '\n' - << "jet 1 et " << m_etThreshold1 << " " << et1 << '\n' - << "jet 0 eta " << m_etaMin0 << " " << eta0 << " " << m_etaMax0 << '\n' - << "jet 1 eta " << m_etaMin1 << " " << eta1 << " " << m_etaMax1 << '\n' - << "dEta " << m_dEtaMin << " " << dEta << " " << m_dEtaMax << '\n' - << "mass " << m_massMin << " " << mass << " " <<m_massMax << '\n'; - - return result; - */ - -} - -std::string DijetMTCondition::toString() const noexcept { - std::stringstream ss; - ss << "DijetMTCondition: " - - << " mass min: " - << m_massMin - << " mass max: " - << m_massMax - - << " dEta min: " - << m_detaMin - << " dEta max: " - << m_detaMax - - << " dPhi min: " - << m_dphiMin - << " dPhi max: " - << m_dphiMax - - <<'\n'; - - return ss.str(); -} - - -double DijetMTCondition::orderingParameter() const noexcept { - return m_massMin; -} diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx index ce9babaa9a7..20299f147ee 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx @@ -19,7 +19,6 @@ #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetDEtaMassCondition.h" #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetDPhiCondition.h" #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetCondition.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetMTCondition.h" #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HTCondition.h" #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TLACondition.h" #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h" @@ -105,30 +104,6 @@ Conditions conditionsFactoryDijet(const std::vector<double>& etThresholds1, return conditions; } - -Conditions conditionsFactoryDijetMT(const std::vector<double>& massMins, - const std::vector<double>& massMaxs, - const std::vector<double>& detaMins, - const std::vector<double>& detaMaxs, - const std::vector<double>& dphiMins, - const std::vector<double>& dphiMaxs){ - Conditions conditions; - - for(std::size_t i = 0; i < massMins.size(); ++i){ - std::shared_ptr<ICondition> - pCondition(new DijetMTCondition(massMins[i], - massMaxs[i], - detaMins[i], - detaMaxs[i], - dphiMins[i], - dphiMaxs[i])); - - conditions.push_back(ConditionBridge(pCondition)); - } - return conditions; -} - - Conditions conditionsFactoryDijetEtaMass(const std::vector<double>& etaMins, const std::vector<double>& etaMaxs, const std::vector<double>& etMins, diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.cxx deleted file mode 100644 index 4b169a56a5f..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.cxx +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigJetAndToolMT.cxx -// PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo -// -// -// ******************************************************************** - -#include "TrigJetAndToolMT.h" - -#include "GaudiKernel/StatusCode.h" - -#include "DecisionHandling/HLTIdentifier.h" -#include "DecisionHandling/TrigCompositeUtils.h" - -using TrigCompositeUtils::DecisionID; -using TrigCompositeUtils::Decision; -using TrigCompositeUtils::DecisionContainer; - -TrigJetAndToolMT::TrigJetAndToolMT(const std::string& type, - const std::string& name, - const IInterface* parent) : - base_class(type, name, parent), - m_decisionId(HLT::Identifier::fromToolName(name)) { -} - - -TrigJetAndToolMT::~TrigJetAndToolMT(){ -} - -StatusCode TrigJetAndToolMT::initialize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetAndToolMT::finalize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetAndToolMT::decide(const xAOD::JetContainer* jets, - bool& pass) const { - - m_lhs->decide(jets, pass); - if (pass){ - ATH_MSG_DEBUG("LHS passed"); - m_rhs->decide(jets, pass); - ATH_MSG_DEBUG("RHS " <<std::boolalpha << pass); - } else { - ATH_MSG_DEBUG("LHS failed"); - } - - - return StatusCode::SUCCESS; -} - - -const HLT::Identifier& TrigJetAndToolMT::getId() const{ - return m_decisionId; -} diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.h deleted file mode 100644 index f2140fc2a75..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetAndToolMT.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGJETANDTOOLMT_H -#define TRIGJETANDTOOLMT_H -/******************************************************************** - * - * NAME: TrigJetAndToolMT.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * - *********************************************************************/ - - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "AthenaMonitoring/GenericMonitoringTool.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" - -#include "ITrigJetHypoToolMT.h" -#include "ITrigJetHypoToolConfig.h" - -class TrigJetAndToolMT: public extends<AthAlgTool, ITrigJetHypoToolMT> { - - public: - - TrigJetAndToolMT(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrigJetAndToolMT(); - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - // ITrigJetHypoToolMT interface - virtual StatusCode - decide(const xAOD::JetContainer*, bool& pass) const override; - virtual const HLT::Identifier& getId() const override; - private: - - // Identifier is used to keep track of which tool made which decision. - // The information is stored in the event store. - HLT::Identifier m_decisionId; - - ToolHandle<ITrigJetHypoToolMT> m_lhs { - this, "lhs", {}, "LHS boolean binary expression"}; - ToolHandle<ITrigJetHypoToolMT> m_rhs { - this, "rhs", {}, "RHS boolean binary expression"}; - - - // Monitored variables... - /* - declareMonitoredVariable("NJet", m_njet); - declareMonitoredVariable("Et", m_et); - declareMonitoredVariable("Eta", m_eta); - declareMonitoredVariable("Phi", m_phi); -*/ - - -}; -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.cxx deleted file mode 100644 index c079a5328ca..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/* - Instatniation of JetHypo components for the DiMass scenario - */ -#include "TrigJetHypoToolConfig_dijet.h" - -#include "GaudiKernel/StatusCode.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJetFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/groupsMatcherFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h" - -#include "DecisionHandling/TrigCompositeUtils.h" - -using TrigCompositeUtils::DecisionID; -using TrigCompositeUtils::Decision; -using TrigCompositeUtils::DecisionContainer; - -TrigJetHypoToolConfig_dijet::TrigJetHypoToolConfig_dijet(const std::string& type, - const std::string& name, - const IInterface* parent) : - base_class(type, name, parent){ - -} - - -TrigJetHypoToolConfig_dijet::~TrigJetHypoToolConfig_dijet(){ -} - -StatusCode TrigJetHypoToolConfig_dijet::initialize() { - CHECK(checkVals()); - return StatusCode::SUCCESS; -} - - - - -Conditions TrigJetHypoToolConfig_dijet::getConditions() const { - auto conditions = conditionsFactoryDijetMT(m_massMins, - m_massMaxs, - m_dEtaMins, - m_dEtaMaxs, - m_dPhiMins, - m_dPhiMaxs); - - std::sort(conditions.begin(), conditions.end(), ConditionsSorter()); - - return conditions; -} - - -std::unique_ptr<IJetGrouper> TrigJetHypoToolConfig_dijet::getJetGrouper() const { - return std::make_unique<CombinationsGrouper>(2); -} - -StatusCode TrigJetHypoToolConfig_dijet::checkVals() const { - // check cionsistent sizes - - auto sz = m_massMins.size(); - if (sz != m_massMaxs.size() or - sz != m_dEtaMins.size() or - sz != m_dEtaMaxs.size() or - sz != m_dPhiMins.size() or - sz != m_dPhiMaxs.size()){ - ATH_MSG_ERROR(name() - << ": mismatch between number of thresholds " - << "and min, max fro mass, dEta, dPhi " - << m_massMins.size() << " " - << m_massMaxs.size() << " " - << m_dEtaMins.size() << " " - << m_dEtaMaxs.size() << " " - << m_dPhiMins.size() << " " - << m_dPhiMaxs.size() << " "); - - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; -} - -std::vector<std::shared_ptr<ICleaner>> -TrigJetHypoToolConfig_dijet::getCleaners() const { - std::vector<std::shared_ptr<ICleaner>> v; - return v; -} - - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.h deleted file mode 100644 index 0f47ee6b7ca..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_dijet.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGJETHYPOTOOLConfig_DIJET_H -#define TRIGJETHYPOTOOLConfig_DIJET_H -/******************************************************************** - * - * NAME: TrigJetHypoToolConfig_dijetTool.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * - *********************************************************************/ - - -#include "ITrigJetHypoToolConfig.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "AthenaMonitoring/GenericMonitoringTool.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" - -class TrigJetHypoToolConfig_dijet: -public extends<AthAlgTool, ITrigJetHypoToolConfig> { - - public: - - TrigJetHypoToolConfig_dijet(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrigJetHypoToolConfig_dijet(); - - virtual StatusCode initialize() override; - virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const override; - virtual std::unique_ptr<IJetGrouper> getJetGrouper() const override; - virtual Conditions getConditions() const override; - - private: - - Gaudi::Property<std::vector<double>> - m_massMins{this, "mass_mins", {}, "min mass for each dijet"}; - - Gaudi::Property<std::vector<double>> - m_massMaxs{this, "mass_maxs", {}, "max mass for each dijet"}; - - Gaudi::Property<std::vector<double>> - m_dEtaMins{this, "deta_mins", {}, "min dEta for jets in each dijet"}; - - Gaudi::Property<std::vector<double>> - m_dEtaMaxs{this, "deta_maxs", {}, "max dEta for jets in each dijet"}; - - Gaudi::Property<std::vector<double>> - m_dPhiMins{this, "dphi_mins", {}, "min dPhi for jets in each dijet"}; - - Gaudi::Property<std::vector<double>> - m_dPhiMaxs{this, "dphi_maxs", {}, "max dPhi for jets in each dijet"}; - - virtual StatusCode checkVals() const override; - - // Monitored variables... - /* - declareMonitoredVariable("NJet", m_njet); - declareMonitoredVariable("Et", m_et); - declareMonitoredVariable("Eta", m_eta); - declareMonitoredVariable("Phi", m_phi); -*/ - - -}; -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.cxx deleted file mode 100644 index 9eaa545f00f..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.cxx +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigJetHypoToolMT_simple.cxx -// PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo -// -// -// ******************************************************************** - -#include "TrigJetHypoToolConfig_simple.h" - -#include "GaudiKernel/StatusCode.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJetFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/groupsMatcherFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h" - -#include "DecisionHandling/TrigCompositeUtils.h" - -using TrigCompositeUtils::DecisionID; -using TrigCompositeUtils::Decision; -using TrigCompositeUtils::DecisionContainer; - -TrigJetHypoToolConfig_simple::TrigJetHypoToolConfig_simple(const std::string& type, - const std::string& name, - const IInterface* parent) : - base_class(type, name, parent){ - -} - - -TrigJetHypoToolConfig_simple::~TrigJetHypoToolConfig_simple(){ -} - -StatusCode TrigJetHypoToolConfig_simple::initialize() { - CHECK(checkVals()); - return StatusCode::SUCCESS; -} - - - - -Conditions TrigJetHypoToolConfig_simple::getConditions() const { - auto conditions = conditionsFactoryEtaEt(m_etaMins, - m_etaMaxs, - m_EtThresholds, - m_asymmetricEtas); - std::sort(conditions.begin(), conditions.end(), ConditionsSorter()); - - return conditions; -} - - -std::unique_ptr<IJetGrouper> -TrigJetHypoToolConfig_simple::getJetGrouper() const { - return std::make_unique<SingleJetGrouper>(); -} - -StatusCode TrigJetHypoToolConfig_simple::checkVals() const { - if (m_EtThresholds.size() != m_etaMins.size() or - m_EtThresholds.size() != m_etaMaxs.size() or - m_asymmetricEtas.size() != m_etaMaxs.size()){ - - ATH_MSG_ERROR(name() - << ": mismatch between number of thresholds " - << "and eta min, max boundaries or asymmetric eta flags: " - << m_EtThresholds.size() << " " - << m_etaMins.size() << " " - << m_etaMaxs.size() << " " - << m_asymmetricEtas.size() << " " - ); - - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; -} - -std::vector<std::shared_ptr<ICleaner>> -TrigJetHypoToolConfig_simple::getCleaners() const { - std::vector<std::shared_ptr<ICleaner>> v; - return v; -} - - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.h deleted file mode 100644 index 6f8b04e489d..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_simple.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGJETHYPOTOOLConfig_SIMPLE_H -#define TRIGJETHYPOTOOLConfig_SIMPLE_H -/******************************************************************** - * - * NAME: TrigJetHypoToolConfig_simple.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * - *********************************************************************/ - - -#include "ITrigJetHypoToolConfig.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "AthenaMonitoring/GenericMonitoringTool.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" - -class TrigJetHypoToolConfig_simple: -public extends<AthAlgTool, ITrigJetHypoToolConfig> { - - public: - - TrigJetHypoToolConfig_simple(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrigJetHypoToolConfig_simple(); - - virtual StatusCode initialize() override; - virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const override; - virtual std::unique_ptr<IJetGrouper> getJetGrouper() const override; - virtual Conditions getConditions() const override; - - private: - - Gaudi::Property<std::vector<double>> - m_EtThresholds{this, "EtThresholds", {}, "Etthresholds by eta region"}; - - Gaudi::Property<std::vector<double>> - m_etaMins{this, "eta_mins", {}, "Eta min for eta regions"}; - - Gaudi::Property<std::vector<double>> - m_etaMaxs{this, "eta_maxs", {}, "Eta max for eta regions"}; - - Gaudi::Property<std::vector<int>> - m_asymmetricEtas{this, "asymmetricEtas", {}, "Apply asym. eta cuts"}; - - - virtual StatusCode checkVals() const override; - - // Monitored variables... - /* - declareMonitoredVariable("NJet", m_njet); - declareMonitoredVariable("Et", m_et); - declareMonitoredVariable("Eta", m_eta); - declareMonitoredVariable("Phi", m_phi); -*/ - - -}; -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx index 90fcef39694..4faa51b87fb 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx @@ -71,7 +71,7 @@ StatusCode TrigJetHypoToolMT::decide(const xAOD::JetContainer* jets, std::move(matcher)); /* apply cleaning and hypothesis alg */ - ATH_MSG_DEBUG("hypo helper start... " + ATH_MSG_DEBUG("hypo helper start... " << m_chainName << " no of jets ... " << jets->size() << "..."); @@ -88,7 +88,7 @@ StatusCode TrigJetHypoToolMT::decide(const xAOD::JetContainer* jets, // accumulateTime(steady_clock::now() - t); - ATH_MSG_DEBUG("hypo testing done chain " + ATH_MSG_DEBUG("hypo testing done chain " << m_chainName << " no of input jets " << jets->size() << " pass " << pass ); @@ -144,12 +144,12 @@ void TrigJetHypoToolMT::writeDebug(bool pass, const HypoJetVector& passedJets, const HypoJetVector& failedJets ) const{ - ATH_MSG_INFO("Writing debug start..."); + ATH_MSG_INFO("Writing debug start" << m_chainName << "..."); if(pass){ - ATH_MSG_DEBUG(" event passed"); + ATH_MSG_DEBUG(m_chainName<< " event passed"); } else { - ATH_MSG_DEBUG(" event failed"); + ATH_MSG_DEBUG(m_chainName<< " event failed"); } for (auto j : passedJets) { diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.h index 0e3744f582b..0b9fac33e1e 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.h +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.h @@ -53,7 +53,7 @@ class TrigJetHypoToolMT: public extends<AthAlgTool, ITrigJetHypoToolMT> { // Paraphanalia needed for the Jet Hypo Helper class: Conditions m_conditions; - Gaudi::Property<bool> m_dumpJets{this, "dumpJets", {}, "verbose jet dump flag"}; + bool m_dumpJets{false}; void setCleaners(); @@ -152,6 +152,9 @@ class TrigJetHypoToolMT: public extends<AthAlgTool, ITrigJetHypoToolMT> { Gaudi::Property<float> m_avLarQFLlpThreshold{this, "AverageLArQFLlpThreshold", 0.8*65535, ""}; + Gaudi::Property<std::string> + m_chainName{this, "chain_name", {}, "chain name (dbg)"}; + Gaudi::Property<bool> m_acceptAll{this, "AcceptAll", false, "flag to turn of hypo"}; diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.cxx deleted file mode 100644 index 2ec75ba2f8c..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.cxx +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigJetNotToolMT.cxx -// PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo -// -// -// ******************************************************************** - -#include "TrigJetNotToolMT.h" - -#include "GaudiKernel/StatusCode.h" - -#include "DecisionHandling/HLTIdentifier.h" -#include "DecisionHandling/TrigCompositeUtils.h" - -using TrigCompositeUtils::DecisionID; -using TrigCompositeUtils::Decision; -using TrigCompositeUtils::DecisionContainer; - -TrigJetNotToolMT::TrigJetNotToolMT(const std::string& type, - const std::string& name, - const IInterface* parent) : - base_class(type, name, parent), - m_decisionId(HLT::Identifier::fromToolName(name)) { -} - - -TrigJetNotToolMT::~TrigJetNotToolMT(){ -} - -StatusCode TrigJetNotToolMT::initialize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetNotToolMT::finalize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetNotToolMT::decide(const xAOD::JetContainer* jets, - bool& pass) const { - - m_hypoTool->decide(jets, pass); - - if(pass){ - ATH_MSG_DEBUG("hypoTool passed"); - } else { - ATH_MSG_DEBUG("hypoTool failed"); - } - - pass = !pass; - - return StatusCode::SUCCESS; -} - - -const HLT::Identifier& TrigJetNotToolMT::getId() const{ - return m_decisionId; -} - diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.h deleted file mode 100644 index 05504bb5184..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetNotToolMT.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collabnotation -*/ - -#ifndef TRIGJETNOTTOOLMT_H -#define TRIGJETNOTTOOLMT_H -/******************************************************************** - * - * NAME: TrigJetNotToolMT.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * - *********************************************************************/ - - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "AthenaMonitoring/GenericMonitoringTool.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" - -#include "ITrigJetHypoToolMT.h" -#include "ITrigJetHypoToolConfig.h" - -class TrigJetNotToolMT: public extends<AthAlgTool, ITrigJetHypoToolMT> { - - public: - - TrigJetNotToolMT(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrigJetNotToolMT(); - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - // ITrigJetHypoToolMT interface - virtual StatusCode - decide(const xAOD::JetContainer*, bool& pass) const override; - virtual const HLT::Identifier& getId() const override; - private: - - // Identifier is used to keep track of which tool made which decision. - // The information is stored in the event store. - HLT::Identifier m_decisionId; - - ToolHandle<ITrigJetHypoToolMT> m_hypoTool { - this, "hypoTool", {}, "predicate to be inverted"}; - - - // Monitored variables... - /* - declareMonitoredVariable("NJet", m_njet); - declareMonitoredVariable("Et", m_et); - declareMonitoredVariable("Eta", m_eta); - declareMonitoredVariable("Phi", m_phi); -*/ - - -}; -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.cxx deleted file mode 100644 index 80846e55aea..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.cxx +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigJetOrToolMT.cxx -// PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo -// -// -// ******************************************************************** - -#include "TrigJetOrToolMT.h" - -#include "GaudiKernel/StatusCode.h" - -#include "DecisionHandling/HLTIdentifier.h" -#include "DecisionHandling/TrigCompositeUtils.h" - -using TrigCompositeUtils::DecisionID; -using TrigCompositeUtils::Decision; -using TrigCompositeUtils::DecisionContainer; - -TrigJetOrToolMT::TrigJetOrToolMT(const std::string& type, - const std::string& name, - const IInterface* parent) : - base_class(type, name, parent), - m_decisionId(HLT::Identifier::fromToolName(name)) { -} - - -TrigJetOrToolMT::~TrigJetOrToolMT(){ -} - -StatusCode TrigJetOrToolMT::initialize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetOrToolMT::finalize(){ - return StatusCode::SUCCESS; -} - -StatusCode TrigJetOrToolMT::decide(const xAOD::JetContainer* jets, - bool& pass) const { - - m_lhs->decide(jets, pass); - if (not pass){ - m_rhs->decide(jets, pass); - ATH_MSG_DEBUG("LHS failed " << " RHS " <<std::boolalpha << pass); - } else { - ATH_MSG_DEBUG("LHS passed"); - } - - return StatusCode::SUCCESS; -} - - -const HLT::Identifier& TrigJetOrToolMT::getId() const{ - return m_decisionId; -} diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.h deleted file mode 100644 index 3af3941dc69..00000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetOrToolMT.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGJETORTOOLMT_H -#define TRIGJETORTOOLMT_H -/******************************************************************** - * - * NAME: TrigJetOrToolMT.h - * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo - * - * - *********************************************************************/ - - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "AthenaMonitoring/GenericMonitoringTool.h" - -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h" -#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h" - -#include "ITrigJetHypoToolMT.h" -#include "ITrigJetHypoToolConfig.h" - -class TrigJetOrToolMT: public extends<AthAlgTool, ITrigJetHypoToolMT> { - - public: - - TrigJetOrToolMT(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrigJetOrToolMT(); - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - // ITrigJetOrToolMT interface - virtual StatusCode - decide(const xAOD::JetContainer*, bool& pass) const override; - virtual const HLT::Identifier& getId() const override; - private: - - // Identifier is used to keep track of which tool made which decision. - // The information is stored in the event store. - HLT::Identifier m_decisionId; - - ToolHandle<ITrigJetHypoToolMT> m_lhs { - this, "lhs", {}, "LHS boolean binary expression"}; - ToolHandle<ITrigJetHypoToolMT> m_rhs { - this, "rhs", {}, "RHS boolean binary expression"}; - - - // Monitored variables... - /* - declareMonitoredVariable("NJet", m_njet); - declareMonitoredVariable("Et", m_et); - declareMonitoredVariable("Eta", m_eta); - declareMonitoredVariable("Phi", m_phi); -*/ - - -}; -#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx index 014d7bb1b88..6b4ad114a9a 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx @@ -10,11 +10,6 @@ #include "TrigHLTJetHypo/TrigHLTJetHypo_SMC.h" #include "../TrigJetHypoAlgMT.h" #include "../TrigJetHypoToolConfig_EtaEt.h" -#include "../TrigJetHypoToolConfig_simple.h" -#include "../TrigJetHypoToolConfig_dijet.h" -#include "../TrigJetNotToolMT.h" -#include "../TrigJetAndToolMT.h" -#include "../TrigJetOrToolMT.h" #include "../TrigJetHypoToolMT.h" DECLARE_COMPONENT( TrigHLTJetHypo2 ) @@ -24,12 +19,7 @@ DECLARE_COMPONENT( TrigEFDPhiMetJetAllTE ) DECLARE_COMPONENT( TrigHLTJetHypo_Dijet ) DECLARE_COMPONENT( TrigHLTJetHypo_DijetMassDEta ) DECLARE_COMPONENT( TrigHLTJetHypo_DijetMassDEtaDPhi ) -DECLARE_COMPONENT( TrigJetHypoToolConfig_EtaEt ) -DECLARE_COMPONENT( TrigJetHypoToolConfig_simple ) -DECLARE_COMPONENT( TrigJetHypoToolConfig_dijet ) -DECLARE_COMPONENT( TrigJetNotToolMT) -DECLARE_COMPONENT( TrigJetAndToolMT) -DECLARE_COMPONENT( TrigJetOrToolMT) +DECLARE_COMPONENT( TrigHLTJetHypo_EtaEt ) DECLARE_COMPONENT( TrigHLTJetHypo_SMC ) DECLARE_COMPONENT( TrigHLTJetHypo_HT ) DECLARE_COMPONENT( TrigHLTJetHypo_TLA ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/jetDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/jetDefs.py index 934c2ca704f..9393ed844a8 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/jetDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/jetDefs.py @@ -7,6 +7,8 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Constants import VERBOSE,DEBUG,INFO from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq + + ## def jetFSInputMaker( ): ## """ Creates the jet inputMaker for FS""" ## RoIs = jetCollections.L1RoIs diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py index 00344d62048..9e36ab4f49b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py @@ -119,7 +119,7 @@ if (doJet): jetChains = [ Chain(name='HLT_j85', Seed="L1_J20", ChainSteps=[jetstep1] ), - Chain(name='HLT_j45', Seed="L1_J20", ChainSteps=[jetstep1] ) + Chain(name='HLT_j100', Seed="L1_J20", ChainSteps=[jetstep1] ) ] testChains += jetChains diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref index c3ef3fd3315..f235b86abb8 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref @@ -1,20 +1,23 @@ TriggerSummaryStep1 0 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 0 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 0 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 0 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 0 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 0 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 0 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 0 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 0 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 0 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep1 1 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 1 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 1 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 1 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 1 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 1 0 DEBUG +++ HLT_e3_etcut ID#2711808158 -TriggerSummaryStep1 1 0 DEBUG +++ HLT_j45 ID#3664574289 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 1 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 1 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 1 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -30,10 +33,12 @@ TriggerSummaryStep2 2 0 DEBUG +++ HLT_e7_etcut ID#243 TriggerSummaryStep2 2 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep1 3 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 3 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 3 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 3 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 3 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 3 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 3 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 3 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 3 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -95,11 +100,12 @@ TriggerSummaryStep2 8 0 DEBUG +++ HLT_e7_etcut ID#243 TriggerSummaryStep2 8 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep1 9 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 10 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 10 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 10 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 10 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 10 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 10 0 DEBUG +++ HLT_e3_etcut ID#2711808158 -TriggerSummaryStep1 10 0 DEBUG +++ HLT_j45 ID#3664574289 +TriggerSummaryStep1 10 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 10 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 10 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 10 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -123,10 +129,12 @@ TriggerSummaryStep2 12 0 DEBUG +++ HLT_g5_etcut ID#140 TriggerSummaryStep2 12 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 12 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep1 13 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 13 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 13 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 13 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 13 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 13 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 13 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 13 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 13 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 13 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -165,11 +173,12 @@ TriggerSummaryStep1 18 0 DEBUG +++ HLT_e3_etcut ID#271 TriggerSummaryStep2 18 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 19 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 19 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 19 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 19 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 19 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 19 0 DEBUG +++ HLT_e3_etcut ID#2711808158 -TriggerSummaryStep1 19 0 DEBUG +++ HLT_j45 ID#3664574289 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep2 19 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 19 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 19 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -190,10 +199,10 @@ TrigSignatureMoniMT INFO HLT_e7_etcut TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 205 TrigSignatureMoniMT INFO HLT_g5_etcut 20 20 17 17 17 TrigSignatureMoniMT INFO HLT_g5_etcut decisions 50 50 -TrigSignatureMoniMT INFO HLT_j45 20 20 3 0 3 -TrigSignatureMoniMT INFO HLT_j45 decisions 3 0 -TrigSignatureMoniMT INFO HLT_j85 20 20 0 0 0 -TrigSignatureMoniMT INFO HLT_j85 decisions 0 0 +TrigSignatureMoniMT INFO HLT_j100 20 20 6 0 6 +TrigSignatureMoniMT INFO HLT_j100 decisions 6 0 +TrigSignatureMoniMT INFO HLT_j85 20 20 6 0 6 +TrigSignatureMoniMT INFO HLT_j85 decisions 6 0 TrigSignatureMoniMT INFO HLT_mu6 20 20 3 0 3 TrigSignatureMoniMT INFO HLT_mu6 decisions 3 0 TrigSignatureMoniMT INFO HLT_mu6Comb 20 20 3 2 2 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/jet.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/jet.menu.py index 668f87183b7..936f01378a6 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/jet.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/jet.menu.py @@ -16,7 +16,7 @@ step1=ChainStep("Step1_jet", [jetSeq1]) testChains = [ Chain(name='HLT_j85', Seed="L1_J20", ChainSteps=[step1] ), - Chain(name='HLT_j45', Seed="L1_J20", ChainSteps=[step1] ) + Chain(name='HLT_j100', Seed="L1_J20", ChainSteps=[step1] ) ] diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref index f9072a28f11..ce932a38433 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref @@ -1,7 +1,16 @@ -TriggerSummaryStep1 1 0 DEBUG +++ HLT_j45 ID#3664574289 -TriggerSummaryStep1 10 0 DEBUG +++ HLT_j45 ID#3664574289 -TriggerSummaryStep1 19 0 DEBUG +++ HLT_j45 ID#3664574289 -TrigSignatureMoniMT INFO HLT_j45 20 20 3 3 -TrigSignatureMoniMT INFO HLT_j45 decisions 3 -TrigSignatureMoniMT INFO HLT_j85 20 20 0 0 -TrigSignatureMoniMT INFO HLT_j85 decisions 0 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 10 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 10 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 13 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 13 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j85 ID#3478728990 +TrigSignatureMoniMT INFO HLT_j100 20 20 6 6 +TrigSignatureMoniMT INFO HLT_j100 decisions 6 +TrigSignatureMoniMT INFO HLT_j85 20 20 6 6 +TrigSignatureMoniMT INFO HLT_j85 decisions 6 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py index b4702163378..e5fb55effd1 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py @@ -27,10 +27,7 @@ if TriggerFlags.doCalo: # menu items - CTPToChainMapping = { - "HLT_j85": "L1_J20" , - "HLT_j45" : "L1_J20" - } + CTPToChainMapping = {"HLT_j85": "L1_J20" , "HLT_j100" : "L1_J20" } testChains =[x for x, y in CTPToChainMapping.items()] topSequence.L1DecoderTest.ChainToCTPMapping = CTPToChainMapping print testChains @@ -70,20 +67,13 @@ if TriggerFlags.doCalo: (recoSequence, sequenceOut) = jetRecoSequence(inputRoIs) from TrigHLTJetHypo.TrigHLTJetHypoConf import TrigJetHypoAlgMT - from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetHypoToolFromDict + from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetHypoToolFromName hypo = TrigJetHypoAlgMT("jethypo") hypo.OutputLevel = DEBUG hypo.Jets = sequenceOut hypo.HypoInputDecisions = hypoDecisions hypo.HypoOutputDecisions = "jetDecisions" - - def make_dict(chain_name): - from TriggerMenuMT.HLTMenuConfig.Menu import DictFromChainName - chainNameDecoder = DictFromChainName.DictFromChainName() - return chainNameDecoder.getChainDict(chain_name) - - hypo.HypoTools = [trigJetHypoToolFromDict(make_dict(c)) - for c in testChains] + hypo.HypoTools = [ trigJetHypoToolFromName( c, c ) for c in testChains ] print hypo for tool in hypo.HypoTools: print tool diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 249691380e5..1637d01b074 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -126,9 +126,7 @@ JetChainParts = { 'bTracking' : [], 'bConfig' : ['split',], 'bMatching' : ['antimatchdr05mu'], - 'trkopt' : [], - 'hypoScenario' : ['simple', 'vbenf'], - 'smc' : ['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'], + 'trkopt' : [] } # ---- Jet Dictinary of default Values ---- @@ -155,8 +153,6 @@ JetChainParts_Default = { 'bMatching' : [], 'dataScouting' : '', 'trkopt' : 'notrk', - 'hypoScenario' : 'simple', - 'smc' : 'nosmc', } #========================================================== -- GitLab