2 """Make chain dicts for testing jet hypo config modules"""
4 from TriggerMenuMT.HLT.Menu.Physics_pp_run3_v1
import (
11 DevGroup = [
'Development']
14 from TriggerMenuMT.HLT.Config.Utility.ChainDefInMenu
import ChainProp
15 from TriggerMenuMT.HLT.Config.Utility.DictFromChainName
import dictFromChainName
17 from TrigHLTJetHypo.hypoToolDisplay
import hypoToolDisplay
21 from pprint
import pprint
24 from TrigHLTJetHypo.hypoConfigBuilder
import hypotool_from_chaindict
26 from AthenaCommon.Logging
import logging
28 logger = logging.getLogger( __name__)
30 logger.setLevel(DEBUG)
32 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
34 flags.Input.Files = []
41 ChainProp(name=
'HLT_j45a_pf_ftf_preselj20_L1J15', l1SeedThresholds=[
'FSNOSEED'], stream=[PhysicsStream,
'express'], groups=SingleJetGroup+SupportLegGroup+[
'RATE:CPS_J15'], monGroups=[
'jetMon:t0',
'jetMon:online',
'idMon:shifter',
'caloMon:t0']),
43 ChainProp(name=
'HLT_j0_DIPZ50XX4j20_roiftf_preselj20_L13J35p0ETA23', l1SeedThresholds=[
'FSNOSEED'], stream=[PhysicsStream,
'express'], groups=MultiJetGroup+SupportLegGroup, monGroups=[
'jetMon:t0',
'jetMon:online']),
44 ChainProp(name=
'HLT_j0_DIPZ50XX4j20_MAXMULT20_roiftf_preselj20_L13J35p0ETA23', l1SeedThresholds=[
'FSNOSEED'], stream=[PhysicsStream,
'express'], groups=MultiJetGroup+SupportLegGroup, monGroups=[
'jetMon:t0',
'jetMon:online']),
45 ChainProp(name=
'HLT_4j110_pf_ftf_presel4jDIPZ50X20pt_L13J50', l1SeedThresholds=[
'FSNOSEED'], stream=[PhysicsStream,
'express'], groups=MultiJetGroup+SupportLegGroup, monGroups=[
'jetMon:t0',
'jetMon:online']),
47 ChainProp(name=
'HLT_j0_HT400XX15ptXX0eta490_j45a_pf_ftf_preselj20_L1J15', l1SeedThresholds=[
'FSNOSEED']*2, stream=[PhysicsStream,
'express'], groups=SingleJetGroup+SupportLegGroup+[
'RATE:CPS_J15'], monGroups=[
'jetMon:t0',
'jetMon:online',
'idMon:shifter',
'caloMon:t0']),
50 ChainProp(name=
'HLT_j0_HT400XX15ptXX0eta490XXveto_j45a_pf_ftf_preselj20_L1J15', l1SeedThresholds=[
'FSNOSEED']*2, stream=[PhysicsStream,
'express'], groups=SingleJetGroup+SupportLegGroup+[
'RATE:CPS_J15'], monGroups=[
'jetMon:t0',
'jetMon:online',
'idMon:shifter',
'caloMon:t0']),
52 ChainProp(name=
'HLT_j0_MULT0mult11XX15ptXX0eta490_j45a_pf_ftf_preselj20_L1J15', l1SeedThresholds=[
'FSNOSEED']*2, stream=[PhysicsStream,
'express'], groups=SingleJetGroup+SupportLegGroup+[
'RATE:CPS_J15'], monGroups=[
'jetMon:t0',
'jetMon:online',
'idMon:shifter',
'caloMon:t0']),
58 chain_props = [chains[idict]]
63 for cp
in chain_props:
66 result.append((cp.name, chain_dict))
72 for i, c
in enumerate(chains):
73 logger.debug(
'%2d ' + c.name, i)
76 if __name__ ==
'__main__':
80 parser = argparse.ArgumentParser()
85 help=
'index of chainProp to run, -1: do all',
88 parser.add_argument(
'-d',
'--dot', help=
'write out a dot file',
93 help=
'specify directory to which dot file is to be written [$HOME]',
94 default=os.environ[
'HOME'])
97 args = parser.parse_args()
99 if args.iprop
is None:
111 chain_part_inds = [cp[
'chainPartIndex']
for cp
in cdict[
'chainParts']]
112 fix = chain_part_inds ==
sorted(chain_part_inds)
114 fix = chain_part_inds[-1] - chain_part_inds[0] == len(chain_part_inds)
119 for cp
in cdict[
'chainParts']:
120 cp[
'chainPartIndex'] = cpi