![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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 87 of file hypoConfigBuilder.py.
88 """the parameter object passed in is built in the modules handling
89 scenarios. It contains the information needed to build the
90 configuration AlgTool that intialiases a hypo helper AlgTool"""
94 assert len(params.repcondargs) == len(params.filterparam_inds)
95 assert len(params.filterparam_inds) >= len(params.filterparams)
99 for ra
in params.repcondargs:
104 filtConditionMakers = []
105 filtConditionMakerInds = [-1]
107 for ra_ind
in params.filterparam_inds:
109 ra = params.filterparams[ra_ind]
111 filtConditionMakerInds.append(len(filtConditionMakers)-1)
113 filtConditionMakerInds.append(-1)
115 toolclass, name =
toolfactory(
'HelperToolConfigTool')
117 vals = {
'name': name,
118 'conditionMakers': repcondobjs,
119 'filterMakers': filtConditionMakers,
120 'filterMakerInds': filtConditionMakerInds,
121 'treeVector': params.treevec,
122 'leafVector': params.leafvec,
125 return toolclass(**vals)
◆ getLabelIndices()
def python.hypoConfigBuilder.getLabelIndices |
( |
|
chain_dict | ) |
|
Definition at line 366 of file hypoConfigBuilder.py.
369 if isLegId(chain_dict[
'chainName']):
372 end_index = start_index + len(chain_dict[
'chainParts'])
374 return start_index, end_index
◆ hypotool_from_chaindict()
def python.hypoConfigBuilder.hypotool_from_chaindict |
( |
|
chain_dict, |
|
|
|
visit_debug = False |
|
) |
| |
Definition at line 377 of file hypoConfigBuilder.py.
382 fn = chain_dict[
'chainName'] +
'_chaindict.log'
383 from pprint
import pprint
384 with open(fn,
'w')
as fh:
385 pprint(chain_dict, fh)
393 args = {
'name': name,
394 'HypoConfigurers': helperToolConfigTools,
395 'prefilterMakers': prefilterMakers
398 helper_tool = toolclass(**args)
404 args = {
'name': chain_dict[
'chainName'],
406 'visit_debug': visit_debug,
407 'helper_tool': helper_tool,
408 'chain_name': chain_dict[
'chainName'],
409 'startLabelIndex': startLabelIndex,
410 'endLabelIndex': endLabelIndex,
413 hypo_tool = toolclass(**args)
414 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 258 of file hypoConfigBuilder.py.
259 """Create HelperToolConfigTool instances. Each instance
260 configures a FastReduction tree. Chain parts with the 'simple' scenario
261 are used to form a single HelperToolConfigTool. The information
262 may be spread over a number of chain parts.
264 There is at most one chain part with a non-simple scenario.
265 This may give rise to > 1 HelperToolConfigTool instance - as this
266 is how jet sharing among Conditions is handled.
268 If there are both simple and non-simple scenarios, there will be
269 n HelperToolConfigTool instances, where n >=2: one for the simple
270 scenario chain parts, and n-1 for the non-simple scenario.
273 chain_parts = chain_dict[
'chainParts']
275 simple_chainparts = [
276 cp
for cp
in chain_parts
if cp[
'hypoScenario'] ==
'simple']
277 simple_cpis = [cp[
'chainPartIndex']
for cp
in simple_chainparts]
282 assert simple_cpis ==
sorted(simple_cpis),
"disordered chain parts"
283 assert simple_cpis[-1] - simple_cpis[0] == len(simple_cpis) - 1,
"nonsequential chainParts"
284 helperToolConfigTools = []
289 if simple_chainparts:
291 assert simple_chainparts[-1][
'tboundary'] ==
''
294 for cp
in simple_chainparts:
296 if cp[
'tboundary'] ==
'SHARED':
304 scenario_chainparts =[
305 cp
for cp
in chain_parts
if cp[
'hypoScenario'] !=
'simple']
307 if scenario_chainparts:
308 for scenario_chainpart
in scenario_chainparts:
312 assert scenario_chainpart[
'threshold'] ==
'0'
314 scenario = scenario_chainpart[
'hypoScenario']
320 chainPartInd = scenario_chainpart[
'chainPartIndex']
325 return helperToolConfigTools
◆ make_prefilter_configurers()
def python.hypoConfigBuilder.make_prefilter_configurers |
( |
|
chain_dict | ) |
|
Set up the prefilters fo the chain.
Definition at line 328 of file hypoConfigBuilder.py.
329 """Set up the prefilters fo the chain."""
332 chain_parts = [cp
for cp
in chain_dict[
'chainParts']
if
333 cp[
'signature'] ==
'Jet' and 'prefilters' in cp]
335 [pf_strings.extend(cp[
'prefilters'])
for cp
in chain_parts]
345 'MASK': prefilter_mask,
346 'PTRANGE': prefilter_ptrange,
347 'MAXMULT': prefilter_maxmult,
348 'CLEAN': prefilter_clean,
351 pattern =
r'(?P<stub>[A-Z]*)'
352 rgx = re.compile(pattern)
355 for pf_string
in pf_strings:
357 m = rgx.match(pf_string)
358 assert m
is not None,
'No prefilter stub was found'
359 groupdict = m.groupdict()
360 assert groupdict[
'stub']
in prefilter_router,
'prefilter stub ({}) not recognized'.
format(groupdict[
'stub'])
361 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 72 of file hypoConfigBuilder.py.
73 """make a repeated condition configurer for the fast reduction
74 root node. This will will have a single accapt all internal node."""
78 conditionMakers = [toolclass(**args)]
83 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 185 of file hypoConfigBuilder.py.
186 """Obtain the paramters needed to build an AlgTool
187 to initialise a jet hypo HelperAlgTool"""
197 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 143 of file hypoConfigBuilder.py.
144 """Obtain the paramters needed to build an AlgTool
145 to initialise a jet hypo HelperAlgTool"""
155 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 215 of file hypoConfigBuilder.py.
216 """Obtain the paramters needed to build an AlgTool
217 to initialise a jet hypo HelperAlgTool"""
227 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 200 of file hypoConfigBuilder.py.
201 """Obtain the paramters needed to build an AlgTool
202 to initialise a jet hypo HelperAlgTool"""
212 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 157 of file hypoConfigBuilder.py.
158 """Obtain the paramters needed to build an AlgTool
159 to initialise a jet hypo HelperAlgTool"""
163 helper_params =
scenario_ht(scenario, chainPartInd)
169 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 171 of file hypoConfigBuilder.py.
172 """Obtain the paramters needed to build an AlgTool
173 to initialise a jet hypo HelperAlgTool"""
183 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 230 of file hypoConfigBuilder.py.
231 """Maker a list of helper tool config tool for a non-simple scenario.
232 Note: a non-simple scenario will produce more than HelperToolConfigTool
233 if jet sharing among Conditions is required."""
236 if scenario
in aliasesDict.keys(): scenario = aliasesDict[scenario]
240 'HTZ': process_htdipz,
242 'DIJET': process_dijet,
243 'FBDJSHARED': process_fbdjshared,
244 'FBDJNOSHARED': process_fbdjnoshared,
248 pattern =
r'^(?P<stub>[A-Z]+)'
249 rgx = re.compile(pattern)
250 m = rgx.match(scenario)
251 assert m
is not None,
'No scenario stub was found'
252 groupdict = m.groupdict()
253 assert groupdict[
'stub']
in router,
'scenario stub ({}) not recognized'.
format(groupdict[
'stub'])
255 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 128 of file hypoConfigBuilder.py.
129 """Obtain the paramters needed to build an AlgTool
130 to initialise a jet hypo HelperAlgTool"""
140 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_fbdjnoshared(scenario, chainPartInd)
def getLegIndexInt(chainName)
def make_fastreduction_configurers(chain_dict)
def process_simple(chain_parts)
def scenario_simple(chain_parts)
def make_prefilter_configurers(chain_dict)
def process_fbdjnoshared(scenario, chainPartInd)
def make_root_repcondconfig()