|
ATLAS Offline Software
|
◆ buildHypoHelperConfigTool()
def python.hypoConfigBuilder.buildHypoHelperConfigTool |
( |
|
params | ) |
|
the parameter object passed in is built in the modules handling
scenarios. It contains the information needed to build the
configuration AlgTool that intialiases a hypo helper AlgTool
Definition at line 88 of file hypoConfigBuilder.py.
89 """the parameter object passed in is built in the modules handling
90 scenarios. It contains the information needed to build the
91 configuration AlgTool that intialiases a hypo helper AlgTool"""
95 assert len(params.repcondargs) == len(params.filterparam_inds)
96 assert len(params.filterparam_inds) >= len(params.filterparams)
100 for ra
in params.repcondargs:
105 filtConditionMakers = []
106 filtConditionMakerInds = [-1]
108 for ra_ind
in params.filterparam_inds:
110 ra = params.filterparams[ra_ind]
112 filtConditionMakerInds.append(len(filtConditionMakers)-1)
114 filtConditionMakerInds.append(-1)
116 toolclass, name =
toolfactory(
'HelperToolConfigTool')
118 vals = {
'name': name,
119 'conditionMakers': repcondobjs,
120 'filterMakers': filtConditionMakers,
121 'filterMakerInds': filtConditionMakerInds,
122 'treeVector': params.treevec,
123 'leafVector': params.leafvec,
126 return toolclass(**vals)
◆ getLabelIndices()
def python.hypoConfigBuilder.getLabelIndices |
( |
|
chain_dict | ) |
|
Definition at line 384 of file hypoConfigBuilder.py.
387 if isLegId(chain_dict[
'chainName']):
390 end_index = start_index + len(chain_dict[
'chainParts'])
392 return start_index, end_index
◆ hypotool_from_chaindict()
def python.hypoConfigBuilder.hypotool_from_chaindict |
( |
|
chain_dict, |
|
|
|
visit_debug = False |
|
) |
| |
Definition at line 395 of file hypoConfigBuilder.py.
400 fn = chain_dict[
'chainName'] +
'_chaindict.log'
401 from pprint
import pprint
402 with open(fn,
'w')
as fh:
403 pprint(chain_dict, fh)
411 args = {
'name': name,
412 'HypoConfigurers': helperToolConfigTools,
413 'prefilterMakers': prefilterMakers
416 helper_tool = toolclass(**args)
422 args = {
'name': chain_dict[
'chainName'],
424 'visit_debug': visit_debug,
425 'helper_tool': helper_tool,
426 'chain_name': chain_dict[
'chainName'],
427 'startLabelIndex': startLabelIndex,
428 'endLabelIndex': endLabelIndex,
431 hypo_tool = toolclass(**args)
432 hypo_tool.visit_debug = visit_debug
◆ make_fastreduction_configurers()
def python.hypoConfigBuilder.make_fastreduction_configurers |
( |
|
chain_dict | ) |
|
Create HelperToolConfigTool instances. Each instance
configures a FastReduction tree. Chain parts with the 'simple' scenario
are used to form a single HelperToolConfigTool. The information
may be spread over a number of chain parts.
There is at most one chain part with a non-simple scenario.
This may give rise to > 1 HelperToolConfigTool instance - as this
is how jet sharing among Conditions is handled.
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.
Definition at line 276 of file hypoConfigBuilder.py.
277 """Create HelperToolConfigTool instances. Each instance
278 configures a FastReduction tree. Chain parts with the 'simple' scenario
279 are used to form a single HelperToolConfigTool. The information
280 may be spread over a number of chain parts.
282 There is at most one chain part with a non-simple scenario.
283 This may give rise to > 1 HelperToolConfigTool instance - as this
284 is how jet sharing among Conditions is handled.
286 If there are both simple and non-simple scenarios, there will be
287 n HelperToolConfigTool instances, where n >=2: one for the simple
288 scenario chain parts, and n-1 for the non-simple scenario.
291 chain_parts = chain_dict[
'chainParts']
293 simple_chainparts = [
294 cp
for cp
in chain_parts
if cp[
'hypoScenario'] ==
'simple']
295 simple_cpis = [cp[
'chainPartIndex']
for cp
in simple_chainparts]
300 assert simple_cpis ==
sorted(simple_cpis),
"disordered chain parts"
301 assert simple_cpis[-1] - simple_cpis[0] == len(simple_cpis) - 1,
"nonsequential chainParts"
302 helperToolConfigTools = []
307 if simple_chainparts:
309 assert simple_chainparts[-1][
'tboundary'] ==
''
312 for cp
in simple_chainparts:
314 if cp[
'tboundary'] ==
'SHARED':
322 scenario_chainparts =[
323 cp
for cp
in chain_parts
if cp[
'hypoScenario'] !=
'simple']
325 if scenario_chainparts:
326 for scenario_chainpart
in scenario_chainparts:
330 assert scenario_chainpart[
'threshold'] ==
'0'
332 scenario = scenario_chainpart[
'hypoScenario']
338 chainPartInd = scenario_chainpart[
'chainPartIndex']
343 return helperToolConfigTools
◆ make_prefilter_configurers()
def python.hypoConfigBuilder.make_prefilter_configurers |
( |
|
chain_dict | ) |
|
Set up the prefilters fo the chain.
Definition at line 346 of file hypoConfigBuilder.py.
347 """Set up the prefilters fo the chain."""
350 chain_parts = [cp
for cp
in chain_dict[
'chainParts']
if
351 cp[
'signature'] ==
'Jet' and 'prefilters' in cp]
353 [pf_strings.extend(cp[
'prefilters'])
for cp
in chain_parts]
363 'MASK': prefilter_mask,
364 'PTRANGE': prefilter_ptrange,
365 'MAXMULT': prefilter_maxmult,
366 'CLEAN': prefilter_clean,
369 pattern =
r'(?P<stub>[A-Z]*)'
370 rgx = re.compile(pattern)
373 for pf_string
in pf_strings:
375 m = rgx.match(pf_string)
376 assert m
is not None,
'No prefilter stub was found'
377 groupdict = m.groupdict()
378 assert groupdict[
'stub']
in prefilter_router,
'prefilter stub ({}) not recognized'.
format(groupdict[
'stub'])
379 filters.append(prefilter_router[groupdict[
'stub']](pf_string))
◆ make_root_repcondconfig()
def python.hypoConfigBuilder.make_root_repcondconfig |
( |
| ) |
|
make a repeated condition configurer for the fast reduction
root node. This will will have a single accapt all internal node.
Definition at line 73 of file hypoConfigBuilder.py.
74 """make a repeated condition configurer for the fast reduction
75 root node. This will will have a single accapt all internal node."""
79 conditionMakers = [toolclass(**args)]
84 conditionMakers=conditionMakers)
◆ process_dijet()
def python.hypoConfigBuilder.process_dijet |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 202 of file hypoConfigBuilder.py.
203 """Obtain the paramters needed to build an AlgTool
204 to initialise a jet hypo HelperAlgTool"""
214 return helperconfigobjs
◆ process_dipz()
def python.hypoConfigBuilder.process_dipz |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 144 of file hypoConfigBuilder.py.
145 """Obtain the paramters needed to build an AlgTool
146 to initialise a jet hypo HelperAlgTool"""
156 return helperconfigobjs
◆ process_fbdjnoshared()
def python.hypoConfigBuilder.process_fbdjnoshared |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 232 of file hypoConfigBuilder.py.
233 """Obtain the paramters needed to build an AlgTool
234 to initialise a jet hypo HelperAlgTool"""
244 return helperconfigobjs
◆ process_fbdjshared()
def python.hypoConfigBuilder.process_fbdjshared |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 217 of file hypoConfigBuilder.py.
218 """Obtain the paramters needed to build an AlgTool
219 to initialise a jet hypo HelperAlgTool"""
229 return helperconfigobjs
◆ process_ht()
def python.hypoConfigBuilder.process_ht |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 158 of file hypoConfigBuilder.py.
159 """Obtain the paramters needed to build an AlgTool
160 to initialise a jet hypo HelperAlgTool"""
164 helper_params =
scenario_ht(scenario, chainPartInd)
170 return helperconfigobjs
◆ process_htdipz()
def python.hypoConfigBuilder.process_htdipz |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 172 of file hypoConfigBuilder.py.
173 """Obtain the paramters needed to build an AlgTool
174 to initialise a jet hypo HelperAlgTool"""
184 return helperconfigobjs
◆ process_mult()
def python.hypoConfigBuilder.process_mult |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 187 of file hypoConfigBuilder.py.
188 """Obtain the paramters needed to build an AlgTool
189 to initialise a jet hypo HelperAlgTool"""
199 return helperconfigobjs
◆ process_nonsimple()
def python.hypoConfigBuilder.process_nonsimple |
( |
|
scenario, |
|
|
|
chainPartInd |
|
) |
| |
Maker a list of helper tool config tool for a non-simple scenario.
Note: a non-simple scenario will produce more than HelperToolConfigTool
if jet sharing among Conditions is required.
Definition at line 247 of file hypoConfigBuilder.py.
248 """Maker a list of helper tool config tool for a non-simple scenario.
249 Note: a non-simple scenario will produce more than HelperToolConfigTool
250 if jet sharing among Conditions is required."""
253 if scenario
in aliasesDict.keys(): scenario = aliasesDict[scenario]
257 'HTZ': process_htdipz,
259 'MULT': process_mult,
260 'DIJET': process_dijet,
261 'FBDJSHARED': process_fbdjshared,
262 'FBDJNOSHARED': process_fbdjnoshared,
266 pattern =
r'^(?P<stub>[A-Z]+)'
267 rgx = re.compile(pattern)
268 m = rgx.match(scenario)
269 assert m
is not None,
'No scenario stub was found'
270 groupdict = m.groupdict()
271 assert groupdict[
'stub']
in router,
'scenario stub ({}) not recognized'.
format(groupdict[
'stub'])
273 return router[groupdict[
'stub']](scenario, chainPartInd)
◆ process_simple()
def python.hypoConfigBuilder.process_simple |
( |
|
chain_parts | ) |
|
Obtain the paramters needed to build an AlgTool
to initialise a jet hypo HelperAlgTool
Definition at line 129 of file hypoConfigBuilder.py.
130 """Obtain the paramters needed to build an AlgTool
131 to initialise a jet hypo HelperAlgTool"""
141 return helperconfigobjs
◆ aliasesDict
python.hypoConfigBuilder.aliasesDict |
◆ cd
python.hypoConfigBuilder.cd |
◆ logger
python.hypoConfigBuilder.logger |
def getLabelIndices(chain_dict)
def process_dipz(scenario, chainPartInd)
def scenario_fbdjshared(scenario, chainPartInd)
def scenario_htdipz(scenario, chainPartInd)
def scenario_ht(scenario, chainPartInd)
def scenario_dipz(scenario, chainPartInd)
def process_ht(scenario, chainPartInd)
def process_fbdjshared(scenario, chainPartInd)
def scenario_dijet(scenario, chainPartInd)
def process_nonsimple(scenario, chainPartInd)
def process_htdipz(scenario, chainPartInd)
def process_dijet(scenario, chainPartInd)
def buildHypoHelperConfigTool(params)
def hypotool_from_chaindict(chain_dict, visit_debug=False)
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
def scenario_mult(scenario, chainPartInd)
def scenario_fbdjnoshared(scenario, chainPartInd)
def getLegIndexInt(chainName)
def make_fastreduction_configurers(chain_dict)
def process_simple(chain_parts)
def process_mult(scenario, chainPartInd)
def scenario_simple(chain_parts)
def make_prefilter_configurers(chain_dict)
def process_fbdjnoshared(scenario, chainPartInd)
def make_root_repcondconfig()