diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt index 20546f13b4ec1ce1f71946efd1718ac13de7cf68..2f4c214a8395435d4f93ec52c9fcc30fab73e4fb 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt @@ -24,10 +24,6 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL901) # 901: check for print() # Tests: -atlas_add_test( flake8_share - SCRIPT ${ATLAS_FLAKE8} ${CMAKE_CURRENT_SOURCE_DIR}/share - POST_EXEC_SCRIPT nopost.sh ) - atlas_add_test( TrigHLTJetHypoTool SCRIPT python -m TrigHLTJetHypo.TrigJetHypoToolConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoConfigBuilder.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoConfigBuilder.py index 16a6e14af490184305b163d39a6be4c9885d675e..cf6cc4304a03d264239a0f1073a7c6ba1f53aa8f 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoConfigBuilder.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoConfigBuilder.py @@ -10,7 +10,7 @@ from TrigHLTJetHypo.scenario_dijet import scenario_dijet from TrigHLTJetHypo.scenario_fbdjnoshared import scenario_fbdjnoshared from TrigHLTJetHypo.scenario_fbdjshared import scenario_fbdjshared from TrigHLTJetHypo.scenario_simple import scenario_simple -from TrigHLTJetHypo.prefilter_prefilter import prefilter_prefilter +from TrigHLTJetHypo.prefilter_mask import prefilter_mask toolfactory = FastReductionAlgToolFactory() @@ -101,13 +101,13 @@ def buildHypoHelperConfigTool(params): return toolclass(**vals) -def process_simple(chain_parts, startLabelIndex): +def process_simple(chain_parts): """Obtain the paramters needed to build an AlgTool to initialise a jet hypo HelperAlgTool""" # obtain a list of parameter objects that will be used # to build a helper config AlgTools - helper_params = scenario_simple(chain_parts, startLabelIndex) + helper_params = scenario_simple(chain_parts) # build the helper config AlgTools helperconfigobjs = [buildHypoHelperConfigTool(params) for params in @@ -194,7 +194,7 @@ def process_nonsimple(scenario, chainPartInd): return router[key](scenario, chainPartInd) # list of HelperToolConfigTool -def make_fastreduction_configurers(chain_dict, startLabelIndex): +def make_fastreduction_configurers(chain_dict): """Create HelperToolConfigTool instances. Each instance configures a FastReduction tree. Chain parts with the 'simple' scenario use used to form a single HelperToolConfigTool. The information @@ -204,7 +204,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): This may give rise to > 1 HelperToolConfigTool instance - as this is how jet sharing among Conditions is handled. - If there are bith simple and non-simple scenarios, there will be + If there are both simple and non-simple scenarios, there will be n HelperToolConfigTool instances, where n >=2: one for the simple scenario chain parts, and n-1 for the non-simple scenario. """ @@ -217,8 +217,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): helperToolConfigTools = [] if simple_chainparts: - helperToolConfigTools.extend(process_simple(simple_chainparts, - startLabelIndex)) + helperToolConfigTools.extend(process_simple(simple_chainparts)) scenario_chainparts =[ cp for cp in chain_parts if cp['hypoScenario'] != 'simple'] @@ -236,7 +235,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): # there is at most one non-simple chainpart. # chainPartInd is needed to report passing jets to the # trigger framework. - chainPartInd = startLabelIndex + len(chain_parts) - 1 + chainPartInd = scenario_chainpart['chainPartIndex'] helperToolConfigTools.extend(process_nonsimple(scenario, chainPartInd)) @@ -252,13 +251,13 @@ def make_prefilter_configurers(chain_dict): cp['signature'] == 'Jet' and 'prefilters' in cp] [pf_strings.extend(cp['prefilters']) for cp in chain_parts] - pf_strings = [s for s in pf_strings if s.startswith('prefilter')] + pf_strings = [s for s in pf_strings if s.startswith('mask')] if not pf_strings: return [] assert len(pf_strings) == 1 - condargs = prefilter_prefilter(pf_strings[0]) + condargs = prefilter_mask(pf_strings[0]) assert len(condargs) == 2 # eta, phi @@ -284,10 +283,8 @@ def getLabelIndices(chain_dict): def hypotool_from_chaindict(chain_dict, visit_debug=False): - startLabelIndex, endLabelIndex = getLabelIndices(chain_dict) - helperToolConfigTools = make_fastreduction_configurers(chain_dict, - startLabelIndex) + helperToolConfigTools = make_fastreduction_configurers(chain_dict) prefilterConfigTools = make_prefilter_configurers(chain_dict) @@ -301,6 +298,7 @@ def hypotool_from_chaindict(chain_dict, visit_debug=False): toolclass, name = toolfactory('hypo_tool') + startLabelIndex, endLabelIndex = getLabelIndices(chain_dict) args = {'name': chain_dict['chainName'], # for reporting passing jets: 'visit_debug': visit_debug, diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoToolTests.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoToolTests.py index 121547f29347b31dd8d533e3a0a1248d366c9730..38008270ba66f2d84d2ca8d3a7a948ee6cad7d79 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoToolTests.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoToolTests.py @@ -182,7 +182,7 @@ class HypoToolStructure(unittest.TestCase): }, { - 'prop': ChainProp(name='HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20', + 'prop': ChainProp(name='HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20', groups=SingleJetGroup), diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_prefilter.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_mask.py similarity index 94% rename from Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_prefilter.py rename to Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_mask.py index 29dee7c9f127eaba34638124c80a078adfc4da06..9a3d663d23db65214e6bdc867a522a25c88e5edd 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_prefilter.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/prefilter_mask.py @@ -12,7 +12,7 @@ logger = logging.getLogger( __name__) logger.setLevel(DEBUG) -pattern = r'^prefilterSEP'\ +pattern = r'^maskSEP'\ r'(?P<etalo>\d*)(?P<etatype>neta|ceta|peta>)(?P<etahi>\d*)SEP'\ r'(?P<philo>\d*)(?P<phitype>nphi|cphi|pphi>)(?P<phihi>\d*)$' @@ -51,17 +51,16 @@ def get_condargs(groupdict): return condargs -def prefilter_prefilter(pf_string): +def prefilter_mask(pf_string): """produce a list of obkects that carry the paramrters needed to instantiate configurers for a elemental Conditions that describe an eta-phi region. The input is a prefilter string obtained from the chain_dict.""" - assert pf_string.startswith('prefilter'),\ + assert pf_string.startswith('mask'),\ 'routing error, module %s: bad prefilter string %s' % (__name__, pf_string) m = rgx.match(pf_string) groupdict = m.groupdict() - return get_condargs(groupdict) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py index 28bdbf2c8cada7dfa9c0b55cf756484f2793cb31..dbc2897b40c439d3cf3b2eeb8aea461791d1d32e 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py @@ -95,7 +95,7 @@ def get_condition_args_from_chainpart(cp): return condargs -def scenario_simple(chain_parts, startLabelIndex): +def scenario_simple(chain_parts): """build two lists of RepeatedConditionConfig objects one list contains the Conditions to be used by FastReducer, and the other Contains the conditions used to filter the Condition. @@ -151,7 +151,7 @@ def scenario_simple(chain_parts, startLabelIndex): condargs = get_condition_args_from_chainpart(cp) multiplicity = int(cp['multiplicity']) - chainPartInd = startLabelIndex + ncp - 1 + chainPartInd = cp['chainPartIndex'] repcondargs.append(RepeatedConditionParams(tree_id = ncp, tree_pid=0, chainPartInd=chainPartInd, diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py index 4d0242513a96183b024d730d9c82bbe8829fe082..569c3eb81269169351d1357a6c44d4c30255a02b 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py @@ -48,7 +48,7 @@ chains = [ ChainProp(name='HLT_j0_aggSEP1000ht_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j70_j50_0eta490_j0_dijetSEP70j12etSEP1000djmassSEPdjdphi200SEP400djdeta__L1MJJ-500-NFF', + ChainProp(name='HLT_j70_0eta320_j50_0eta490_j0_dijetSEP70j12etSEP1000djmassSEPdjdphi200SEP400djdeta__L1MJJ-500-NFF', l1SeedThresholds=['FSNOSEED']*3, groups=MultiJetGroup), @@ -65,12 +65,12 @@ chains = [ ChainProp(name='HLT_j0_fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20', + ChainProp(name='HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_pf_ftf_preselj20_L1J15', groups=SingleJetGroup), - ChainProp(name='HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20', + ChainProp(name='HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_dijetSEP80j12etSEP0j12eta240SEP700djmass_L1J20', groups=SingleJetGroup), diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/share/dummy.txt b/Trigger/TrigHypothesis/TrigHLTJetHypo/share/dummy.txt deleted file mode 100644 index 5c3118dc95557d08d4c9a8f448f4be74371affc3..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/share/dummy.txt +++ /dev/null @@ -1 +0,0 @@ -dummy file diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 13215236d2d9ae63ef0bf5113cdd9a38ff36c28f..9b8c831673fbcaee41041b272aca4d160e854d43 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -3072,7 +3072,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20: 0: 7 1: 12 2: 2 -HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20: +HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20: eventCount: 10 stepCounts: 0: 19 diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index f5fb4dc545e2418020c6c123f85ac0d4cae85f2d..c91ec43741a2e2d8af7495d413964396231b8eb7 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -1679,7 +1679,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20: 0: 20 stepFeatures: 0: 20 -HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20: +HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20: eventCount: 3 stepCounts: 0: 5 diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 57b7cd012e0a8f767323b49e557108bbe661e1a2..deb46053506454cbd67089bddb771ba49b7ab1ea 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -338,7 +338,7 @@ def setupMenu(): ChainProp(name='HLT_j0_dijetSEP80j12etSEP700djmassSEPdjdphi260_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_dijetSEP70j12etSEP1000djmassSEPdjdphi200SEP400djdeta_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20', + ChainProp(name='HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20', diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index be29949d59631639f732320463330c02a27d7878..9a1ce6c937954ca1c9123997820a1e9af3348ebf 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -173,7 +173,7 @@ JetChainParts = { 'momCuts' : # Generic moment cut on single jets ['050momemfrac100','momhecfrac010','050momemfrac100SEPmomhecfrac010'], 'prefilters' : # Pre-hypo jet selectors (including cleaning) - ['cleanLB', 'prefilterSEP300ceta210SEP300nphi10'], + ['cleanLB', 'maskSEP300ceta210SEP300nphi10'], 'smc' : # "Single mass condition" -- rename? ['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'], # Setup for alternative data stream readout