diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py index 3baf21b31c73367fd37987b7191bd797d9c3596a..a5c07f07082bd7e6aade70ca2e2f2cfcd295a5a0 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py @@ -141,7 +141,7 @@ def trigJetTLAHypoToolFromDict(chain_dict): def trigJetHypoToolFromDict(chain_dict): - debug = False # SET TO FALSE WHEN COMMITTING + debug = True # SET TO FALSE WHEN COMMITTING tool = CompFactory.TrigJetHypoToolMT(name=chain_dict['chainName']) return trigJetHypoToolFromDict_(chain_dict, tool, debug) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py index f4e4451bbe9384ed8d24cf39c8658a31606a971c..c66b37e1b0064625a21cbe068e49bad25e79ef51 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py @@ -95,6 +95,81 @@ def _cuts_from_momCuts(momCuts): return '' +def _make_fbdjnoshared_label(chain_parts, leg_label): + """Marshal information from the selected chainParts to create a + fbdjnoshared (forward-backward and dijet, no jet sharing) label. + """ + + assert len(chain_parts) == 1 + + scenario = chain_parts[0]['hypoScenario'] + assert scenario.startswith('f') + args = _args_from_scenario(scenario) + + arg_res = [ + [re.compile(r'(?P<lo>\d*)(?P<key>fbet)(?P<hi>\d*)'), 0], + [re.compile(r'(?P<lo>\d*)(?P<key>mass)(?P<hi>\d*)'), 0], + [re.compile(r'(?P<lo>\d*)(?P<key>et)(?P<hi>\d*)'), 0], + ] + + defaults = { + 'et0': ('101', 'inf'), + 'et1': ('103', 'inf'), + 'mass0': ('800', 'inf'), + 'fbet0': ('501', 'inf'), + } + + # n_et: counter for the min et of the jets particpating in + # the dijet. There are two such et min values in the scenario + # string + + n_et = 0 + argvals = {} + assert len(args) == len(arg_res) + 1 # +1 because et occurs twice. + while args: + arg = args.pop() + for ar in arg_res: + regx = ar[0] + occurence=ar[1] # no iof time this argument is used eg et used 2x + m = regx.match(arg) + if m is not None: + gd = m.groupdict() + key = gd['key'] + str(occurence) + ar[1] += 1 # bump the occurrence cout + try: + lo = float(gd['lo']) + except ValueError: + lo = defaults[key][0] + argvals[key+'lo'] = lo + try: + hi = float(gd['hi']) + except ValueError: + hi = defaults[key][1] + argvals[key+'hi'] = hi + + assert len(args) == 0 + + argvals['leg_label'] = leg_label + + return """ + all + ( + [] + simple + ( + [(%(fbet0lo).0fet, 500neta, leg000)(%(fbet0lo).0fet, peta500, %(leg_label)s)] + ) + dijet + ( + [(%(mass0lo).0fdjmass, 26djdphi)] + simple + ( + [(%(et0lo).0fet, 0eta320, leg000)(%(et1lo).0fet, 0eta320, %(leg_label)s)] + ) + ) + )""" % argvals + + def _make_vbenf_label(chain_parts, leg_label): """Marshal information from the selected chainParts to create a vbenf label. Use a Reducer for elimination of unusable jets @@ -343,6 +418,7 @@ def chainDict2jetLabel(chain_dict): 'vbenf': _make_vbenf_label, 'dijet': _make_dijet_label, 'fbdjshared': _make_fbdjshared_label, + 'fbdjnoshared': _make_fbdjnoshared_label, } # chain_part - scenario association diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py index ac2837ade4f77a1f58474c5f5127216df2df723a..312b77e1c04964cadc5f55cfc71ab33a8f74c4f8 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py @@ -55,8 +55,9 @@ def testChainDictMaker(): groups=SingleJetGroup), ChainProp(name='HLT_j0_fbdjshared_L1J20', groups=SingleJetGroup), - + ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20',l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup), + ChainProp(name='HLT_j0_fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet_L1J20', groups=SingleJetGroup), ] result = [] diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py index 65ac32fc280af6f27d4170903559dd467554dde6..62066270c6c37ace09d8bcb37121ee6f1937a409 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py @@ -128,7 +128,8 @@ test_strings = [ combgen([] dijet([(71djmass91)]) simple([(12et)(13et)])))))""", - # forest + + # forest: forward backward jets + dijet sharing """simple ( [(50et, 500neta, leg000)(50et, peta500, leg000)] @@ -140,8 +141,24 @@ test_strings = [ ( [(10et, 0eta320, leg000)(20et, 0eta320, leg000)] ) - )""" - + )""", + + # single tree forward backward jets + dijet no sharing + """ all([] + simple + ( + [(50et, 500neta, leg000)(50et, peta500, leg000)] + ) + dijet + ( + [(34mass, 26djdphi, leg000)] + simple + ( + [(10et, 0eta320, leg000)(20et, 0eta320, leg000)] + ) + ) + )""", + ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 1243a7d10e4bd367ac6232560f792b50b3c3d935..549a14093c288b59387090ef767bd2d2cc577ff0 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -267,8 +267,7 @@ def setupMenu(): ChainProp(name='HLT_j460_a10sd_csskpf_jes_ftf_L1J100', groups=SingleJetGroup), ChainProp(name='HLT_j460_a10sd_csskpf_jes_ftf_35smcINF_L1J100', groups=SingleJetGroup), ChainProp(name='HLT_2j330_a10sd_csskpf_jes_ftf_35smcINF_L1J100', groups=SingleJetGroup), - - ChainProp(name='HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20', groups=SingleJetGroup), + ChainProp(name='HLT_j0_fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_fbdjshared_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_aggSEP1000htSEP30etSEP0eta320_L1J20', groups=SingleJetGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index ad097da08b9975ab722ee1c1f2bda5fbe4b3f4dd..4bb8ba5c49f1ea787b005cc134f6fd03495d46ca 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -132,9 +132,8 @@ JetChainParts = { # other dict contents. If it is not 'simple', then the configuration is 100% # from the hypoScenario specification, and all other hypo entries are ignored. 'hypoScenario' : ['simple', # Independent selections on individual jets, multiplicity+threshold cuts - 'vbenf', # Test VBF-like chain - 'fbdjshared', # Test VBF-like chain with dijet-fworward/backward sharing - 'vbenfSEP30etSEP34mass35SEP50fbet', # Test VBF-like chain with more info + 'fbdjshared', # Forward backward jets + dijet, default parameters, fb and dj can share + 'fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet', # f/b jets + dijet, expl. parameters, fb and dj do not share 'dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass', # Test dijet mass sel # 'agg' category is for single variable computed by aggregation over single jets 'aggSEP1000htSEP30etSEP0eta320', # HT selection with explicit jet et/eta cuts