Skip to content
Snippets Groups Projects
Commit 08339b5b authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'master-23419-1' into 'master'

jet hypo - technical changes

See merge request atlas/athena!42169
parents 48d07c18 0c1662c1
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 32 deletions
...@@ -24,10 +24,6 @@ atlas_install_python_modules( python/*.py ...@@ -24,10 +24,6 @@ atlas_install_python_modules( python/*.py
POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL901) # 901: check for print() POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL901) # 901: check for print()
# Tests: # 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 atlas_add_test( TrigHLTJetHypoTool SCRIPT python -m TrigHLTJetHypo.TrigJetHypoToolConfig
POST_EXEC_SCRIPT nopost.sh ) POST_EXEC_SCRIPT nopost.sh )
......
...@@ -10,7 +10,7 @@ from TrigHLTJetHypo.scenario_dijet import scenario_dijet ...@@ -10,7 +10,7 @@ from TrigHLTJetHypo.scenario_dijet import scenario_dijet
from TrigHLTJetHypo.scenario_fbdjnoshared import scenario_fbdjnoshared from TrigHLTJetHypo.scenario_fbdjnoshared import scenario_fbdjnoshared
from TrigHLTJetHypo.scenario_fbdjshared import scenario_fbdjshared from TrigHLTJetHypo.scenario_fbdjshared import scenario_fbdjshared
from TrigHLTJetHypo.scenario_simple import scenario_simple from TrigHLTJetHypo.scenario_simple import scenario_simple
from TrigHLTJetHypo.prefilter_prefilter import prefilter_prefilter from TrigHLTJetHypo.prefilter_mask import prefilter_mask
toolfactory = FastReductionAlgToolFactory() toolfactory = FastReductionAlgToolFactory()
...@@ -101,13 +101,13 @@ def buildHypoHelperConfigTool(params): ...@@ -101,13 +101,13 @@ def buildHypoHelperConfigTool(params):
return toolclass(**vals) return toolclass(**vals)
def process_simple(chain_parts, startLabelIndex): def process_simple(chain_parts):
"""Obtain the paramters needed to build an AlgTool """Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool""" to initialise a jet hypo HelperAlgTool"""
# obtain a list of parameter objects that will be used # obtain a list of parameter objects that will be used
# to build a helper config AlgTools # to build a helper config AlgTools
helper_params = scenario_simple(chain_parts, startLabelIndex) helper_params = scenario_simple(chain_parts)
# build the helper config AlgTools # build the helper config AlgTools
helperconfigobjs = [buildHypoHelperConfigTool(params) for params in helperconfigobjs = [buildHypoHelperConfigTool(params) for params in
...@@ -194,7 +194,7 @@ def process_nonsimple(scenario, chainPartInd): ...@@ -194,7 +194,7 @@ def process_nonsimple(scenario, chainPartInd):
return router[key](scenario, chainPartInd) # list of HelperToolConfigTool 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 """Create HelperToolConfigTool instances. Each instance
configures a FastReduction tree. Chain parts with the 'simple' scenario configures a FastReduction tree. Chain parts with the 'simple' scenario
use used to form a single HelperToolConfigTool. The information use used to form a single HelperToolConfigTool. The information
...@@ -204,7 +204,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): ...@@ -204,7 +204,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex):
This may give rise to > 1 HelperToolConfigTool instance - as this This may give rise to > 1 HelperToolConfigTool instance - as this
is how jet sharing among Conditions is handled. 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 n HelperToolConfigTool instances, where n >=2: one for the simple
scenario chain parts, and n-1 for the non-simple scenario. scenario chain parts, and n-1 for the non-simple scenario.
""" """
...@@ -217,8 +217,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): ...@@ -217,8 +217,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex):
helperToolConfigTools = [] helperToolConfigTools = []
if simple_chainparts: if simple_chainparts:
helperToolConfigTools.extend(process_simple(simple_chainparts, helperToolConfigTools.extend(process_simple(simple_chainparts))
startLabelIndex))
scenario_chainparts =[ scenario_chainparts =[
cp for cp in chain_parts if cp['hypoScenario'] != 'simple'] cp for cp in chain_parts if cp['hypoScenario'] != 'simple']
...@@ -236,7 +235,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex): ...@@ -236,7 +235,7 @@ def make_fastreduction_configurers(chain_dict, startLabelIndex):
# there is at most one non-simple chainpart. # there is at most one non-simple chainpart.
# chainPartInd is needed to report passing jets to the # chainPartInd is needed to report passing jets to the
# trigger framework. # trigger framework.
chainPartInd = startLabelIndex + len(chain_parts) - 1 chainPartInd = scenario_chainpart['chainPartIndex']
helperToolConfigTools.extend(process_nonsimple(scenario, helperToolConfigTools.extend(process_nonsimple(scenario,
chainPartInd)) chainPartInd))
...@@ -252,13 +251,13 @@ def make_prefilter_configurers(chain_dict): ...@@ -252,13 +251,13 @@ def make_prefilter_configurers(chain_dict):
cp['signature'] == 'Jet' and 'prefilters' in cp] cp['signature'] == 'Jet' and 'prefilters' in cp]
[pf_strings.extend(cp['prefilters']) for cp in chain_parts] [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: if not pf_strings:
return [] return []
assert len(pf_strings) == 1 assert len(pf_strings) == 1
condargs = prefilter_prefilter(pf_strings[0]) condargs = prefilter_mask(pf_strings[0])
assert len(condargs) == 2 # eta, phi assert len(condargs) == 2 # eta, phi
...@@ -284,10 +283,8 @@ def getLabelIndices(chain_dict): ...@@ -284,10 +283,8 @@ def getLabelIndices(chain_dict):
def hypotool_from_chaindict(chain_dict, visit_debug=False): def hypotool_from_chaindict(chain_dict, visit_debug=False):
startLabelIndex, endLabelIndex = getLabelIndices(chain_dict)
helperToolConfigTools = make_fastreduction_configurers(chain_dict, helperToolConfigTools = make_fastreduction_configurers(chain_dict)
startLabelIndex)
prefilterConfigTools = make_prefilter_configurers(chain_dict) prefilterConfigTools = make_prefilter_configurers(chain_dict)
...@@ -301,6 +298,7 @@ def hypotool_from_chaindict(chain_dict, visit_debug=False): ...@@ -301,6 +298,7 @@ def hypotool_from_chaindict(chain_dict, visit_debug=False):
toolclass, name = toolfactory('hypo_tool') toolclass, name = toolfactory('hypo_tool')
startLabelIndex, endLabelIndex = getLabelIndices(chain_dict)
args = {'name': chain_dict['chainName'], args = {'name': chain_dict['chainName'],
# for reporting passing jets: # for reporting passing jets:
'visit_debug': visit_debug, 'visit_debug': visit_debug,
......
...@@ -182,7 +182,7 @@ class HypoToolStructure(unittest.TestCase): ...@@ -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), groups=SingleJetGroup),
......
...@@ -12,7 +12,7 @@ logger = logging.getLogger( __name__) ...@@ -12,7 +12,7 @@ logger = logging.getLogger( __name__)
logger.setLevel(DEBUG) logger.setLevel(DEBUG)
pattern = r'^prefilterSEP'\ pattern = r'^maskSEP'\
r'(?P<etalo>\d*)(?P<etatype>neta|ceta|peta>)(?P<etahi>\d*)SEP'\ 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*)$' r'(?P<philo>\d*)(?P<phitype>nphi|cphi|pphi>)(?P<phihi>\d*)$'
...@@ -51,17 +51,16 @@ def get_condargs(groupdict): ...@@ -51,17 +51,16 @@ def get_condargs(groupdict):
return condargs return condargs
def prefilter_prefilter(pf_string): def prefilter_mask(pf_string):
"""produce a list of obkects that carry the paramrters needed to """produce a list of obkects that carry the paramrters needed to
instantiate configurers for a elemental Conditions that describe instantiate configurers for a elemental Conditions that describe
an eta-phi region. The input is a prefilter string obtained from the an eta-phi region. The input is a prefilter string obtained from the
chain_dict.""" chain_dict."""
assert pf_string.startswith('prefilter'),\ assert pf_string.startswith('mask'),\
'routing error, module %s: bad prefilter string %s' % (__name__, 'routing error, module %s: bad prefilter string %s' % (__name__,
pf_string) pf_string)
m = rgx.match(pf_string) m = rgx.match(pf_string)
groupdict = m.groupdict() groupdict = m.groupdict()
return get_condargs(groupdict) return get_condargs(groupdict)
...@@ -95,7 +95,7 @@ def get_condition_args_from_chainpart(cp): ...@@ -95,7 +95,7 @@ def get_condition_args_from_chainpart(cp):
return condargs return condargs
def scenario_simple(chain_parts, startLabelIndex): def scenario_simple(chain_parts):
"""build two lists of RepeatedConditionConfig objects """build two lists of RepeatedConditionConfig objects
one list contains the Conditions to be used by FastReducer, one list contains the Conditions to be used by FastReducer,
and the other Contains the conditions used to filter the Condition. and the other Contains the conditions used to filter the Condition.
...@@ -151,7 +151,7 @@ def scenario_simple(chain_parts, startLabelIndex): ...@@ -151,7 +151,7 @@ def scenario_simple(chain_parts, startLabelIndex):
condargs = get_condition_args_from_chainpart(cp) condargs = get_condition_args_from_chainpart(cp)
multiplicity = int(cp['multiplicity']) multiplicity = int(cp['multiplicity'])
chainPartInd = startLabelIndex + ncp - 1 chainPartInd = cp['chainPartIndex']
repcondargs.append(RepeatedConditionParams(tree_id = ncp, repcondargs.append(RepeatedConditionParams(tree_id = ncp,
tree_pid=0, tree_pid=0,
chainPartInd=chainPartInd, chainPartInd=chainPartInd,
......
...@@ -48,7 +48,7 @@ chains = [ ...@@ -48,7 +48,7 @@ chains = [
ChainProp(name='HLT_j0_aggSEP1000ht_L1J20', groups=SingleJetGroup), 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, l1SeedThresholds=['FSNOSEED']*3,
groups=MultiJetGroup), groups=MultiJetGroup),
...@@ -65,12 +65,12 @@ chains = [ ...@@ -65,12 +65,12 @@ chains = [
ChainProp(name='HLT_j0_fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet_L1J20', ChainProp(name='HLT_j0_fbdjnosharedSEP10etSEP20etSEP34massSEP50fbet_L1J20',
groups=SingleJetGroup), groups=SingleJetGroup),
ChainProp(name='HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20', ChainProp(name='HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20',
groups=SingleJetGroup), groups=SingleJetGroup),
ChainProp(name='HLT_j45_pf_ftf_preselj20_L1J15', 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), groups=SingleJetGroup),
ChainProp(name='HLT_j0_dijetSEP80j12etSEP0j12eta240SEP700djmass_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_dijetSEP80j12etSEP0j12eta240SEP700djmass_L1J20', groups=SingleJetGroup),
......
dummy file
...@@ -3072,7 +3072,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20: ...@@ -3072,7 +3072,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20:
0: 7 0: 7
1: 12 1: 12
2: 2 2: 2
HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20: HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20:
eventCount: 10 eventCount: 10
stepCounts: stepCounts:
0: 19 0: 19
......
...@@ -1679,7 +1679,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20: ...@@ -1679,7 +1679,7 @@ HLT_j85_ftf_bmv2c1050_split_3j85_ftf_0eta320_L14J20:
0: 20 0: 20
stepFeatures: stepFeatures:
0: 20 0: 20
HLT_j85_ftf_prefilterSEP300ceta210SEP300nphi10_L1J20: HLT_j85_ftf_maskSEP300ceta210SEP300nphi10_L1J20:
eventCount: 3 eventCount: 3
stepCounts: stepCounts:
0: 5 0: 5
......
...@@ -338,7 +338,7 @@ def setupMenu(): ...@@ -338,7 +338,7 @@ def setupMenu():
ChainProp(name='HLT_j0_dijetSEP80j12etSEP700djmassSEPdjdphi260_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j0_dijetSEP80j12etSEP700djmassSEPdjdphi260_L1J20', groups=SingleJetGroup),
ChainProp(name='HLT_j0_dijetSEP70j12etSEP1000djmassSEPdjdphi200SEP400djdeta_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), groups=SingleJetGroup),
ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20', ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20',
......
...@@ -173,7 +173,7 @@ JetChainParts = { ...@@ -173,7 +173,7 @@ JetChainParts = {
'momCuts' : # Generic moment cut on single jets 'momCuts' : # Generic moment cut on single jets
['050momemfrac100','momhecfrac010','050momemfrac100SEPmomhecfrac010'], ['050momemfrac100','momhecfrac010','050momemfrac100SEPmomhecfrac010'],
'prefilters' : # Pre-hypo jet selectors (including cleaning) 'prefilters' : # Pre-hypo jet selectors (including cleaning)
['cleanLB', 'prefilterSEP300ceta210SEP300nphi10'], ['cleanLB', 'maskSEP300ceta210SEP300nphi10'],
'smc' : # "Single mass condition" -- rename? 'smc' : # "Single mass condition" -- rename?
['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'], ['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'],
# Setup for alternative data stream readout # Setup for alternative data stream readout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment