ATLAS Offline Software
Loading...
Searching...
No Matches
python.scenario_dipz Namespace Reference

Functions

 get_kin_args_from_matchdict (groupdict)
 get_mult_args_from_matchdict (groupdict)
 get_dipz_mlpl_from_matchdict (groupdict, njets)
 scenario_dipz (scenario, chainPartInd)

Variables

str pattern_dipz = r'^Z(?P<WP>\d+)XX(?P<N>\d+)c(?P<ptlo>\d*)'
 rgx_pattern = re.compile(pattern_dipz)

Function Documentation

◆ get_dipz_mlpl_from_matchdict()

python.scenario_dipz.get_dipz_mlpl_from_matchdict ( groupdict,
njets )
Get DIPz WP, capacity (njets) and decorator names

Definition at line 47 of file scenario_dipz.py.

47def get_dipz_mlpl_from_matchdict(groupdict, njets):
48 """Get DIPz WP, capacity (njets) and decorator names"""
49
50 if not groupdict['WP'] :
51 raise ValueError('DIPZ scenario requires a pre-defined working point cut on MLPL.')
52
53 condargs = []
54
55 vals = defaults('dipz_mlpl', lo = groupdict['WP']) # Note: scale factor of -0.1 applied by default
56 vals['decName_z']='dipz20231122_z'
57 vals['decName_sigma']='dipz20231122_negLogSigma2'
58 vals['capacity']=njets
59
60 condargs.append(('dipz_mlpl', vals))
61
62 return condargs
63
64

◆ get_kin_args_from_matchdict()

python.scenario_dipz.get_kin_args_from_matchdict ( groupdict)
Get kinematic cuts on jets for DIPZ MLPL hypo 

Definition at line 14 of file scenario_dipz.py.

14def get_kin_args_from_matchdict(groupdict):
15 """ Get kinematic cuts on jets for DIPZ MLPL hypo """
16
17 if not groupdict['ptlo']: # then default filtering for pt
18 groupdict['ptlo'] = '20'
19 groupdict['pthi'] = ''
20
21 condargs = []
22 vals = defaults('pt',
23 groupdict['ptlo'],
24 '') # will be assigned default value
25 condargs.append(('pt', vals))
26
27 vals = defaults('eta',
28 '', # will be assigned default value
29 '240')
30 condargs.append(('eta', vals))
31
32 return condargs
33

◆ get_mult_args_from_matchdict()

python.scenario_dipz.get_mult_args_from_matchdict ( groupdict)
Get jet multiplicity for DIPZ MLPL hypo 

Definition at line 34 of file scenario_dipz.py.

34def get_mult_args_from_matchdict(groupdict):
35 """Get jet multiplicity for DIPZ MLPL hypo """
36
37 if not groupdict['N']:
38 raise ValueError('DIPZ scenario requires a pre-defined jet multiplicity.')
39
40 condargs = []
41
42 vals = defaults('dipz_njet', lo = groupdict['N'], hi = groupdict['N'])
43 condargs.append(('dipz_njet', vals))
44
45 return condargs
46

◆ scenario_dipz()

python.scenario_dipz.scenario_dipz ( scenario,
chainPartInd )
calculate the parameters needed to generate a hypo helper config AlgTool
starting from a the hypoScenario which appears in the chainname for
a DIPZ mlpl condition. 

Definition at line 65 of file scenario_dipz.py.

65def scenario_dipz(scenario, chainPartInd):
66 """calculate the parameters needed to generate a hypo helper config AlgTool
67 starting from a the hypoScenario which appears in the chainname for
68 a DIPZ mlpl condition. """
69
70 assert scenario.startswith('Z'),\
71 'routing error, module %s: bad scenario %s' % (__name__, scenario)
72
73 m = rgx_pattern.match(scenario)
74
75 assert m is not None, \
76 'scenario_dipz.py - regex part %s does not match scenario %s' % (
77 pattern_dipz, scenario)
78
79 groupdict = m.groupdict()
80
81 # list for the repeatedCondition parameters, FilterParams and their indices
82 # needed for the HelperConfigToolParams
83 repcondargs = []
84 filterparams = []
85 filterparam_inds = []
86
87 # treeVec is [0, 0, 1] handle non-root nodes here
88
89
90 condargs_kin = get_kin_args_from_matchdict(groupdict)
91 chooseN = float(get_mult_args_from_matchdict(groupdict)[0][1]['min'])
92 condargs = get_dipz_mlpl_from_matchdict(groupdict, str(chooseN))
93
94
95 repcondargs.append(RepeatedConditionParams(tree_id=2,
96 tree_pid=1,
97 multiplicity=1,
98 chainPartInd=chainPartInd,
99 condargs=condargs))
100 filterparam_inds.append(-1) # no filter
101
102 # N jet: single jet condition with multiplicity N
103 repcondargs.append(RepeatedConditionParams(tree_id=1,
104 tree_pid=0,
105 multiplicity=int(chooseN),
106 chainPartInd=chainPartInd,
107 condargs=condargs_kin))
108 filterparam_inds.append(-1)
109
110 # treevec[i] gives the tree_id of the parent of the
111 # node with tree_id = i
112 treevec = make_treevec(repcondargs)
113 assert treevec == [0, 0, 1]
114
115 assert len(repcondargs) == len(filterparam_inds)
116
117
118 helper_params = HelperConfigToolParams(treevec=treevec,
119 repcondargs=repcondargs,
120 filterparams=filterparams,
121 filterparam_inds=filterparam_inds)
122
123 return [helper_params] # a list with one entry per FastReduction tree
124

Variable Documentation

◆ pattern_dipz

str python.scenario_dipz.pattern_dipz = r'^Z(?P<WP>\d+)XX(?P<N>\d+)c(?P<ptlo>\d*)'

Definition at line 10 of file scenario_dipz.py.

◆ rgx_pattern

python.scenario_dipz.rgx_pattern = re.compile(pattern_dipz)

Definition at line 11 of file scenario_dipz.py.