ATLAS Offline Software
Functions | Variables
python.scenario_ht Namespace Reference

Functions

def get_conditionfilter_args_from_matchdict (groupdict, threshold_var)
 
def scenario_ht (scenario, chainPartInd)
 

Variables

 pattern_pt_threshold
 
 pattern_et_threshold
 
 pattern_common
 
 pattern_ptfull
 
 rgx_pt
 
 pattern_etfull
 
 rgx_et
 

Function Documentation

◆ get_conditionfilter_args_from_matchdict()

def python.scenario_ht.get_conditionfilter_args_from_matchdict (   groupdict,
  threshold_var 
)
Extract the arguments used by the filter of the HT condition
from the dictionary created during the regex matching to the scenario
string. THESE CHAINS HAS DEFAULT CONDITION FILTERING

Definition at line 27 of file scenario_ht.py.

27 def get_conditionfilter_args_from_matchdict(groupdict, threshold_var):
28  """ Extract the arguments used by the filter of the HT condition
29  from the dictionary created during the regex matching to the scenario
30  string. THESE CHAINS HAS DEFAULT CONDITION FILTERING"""
31 
32  # care! if et no match, etlo and etahi are None.
33  # if et match, missing etlo, ethi = ''
34  # same for eta
35 
36  if groupdict[threshold_var+'lo'] is None: # then default filtering for threshold_var
37  groupdict[threshold_var+'lo'] = '30'
38  groupdict[threshold_var+'hi'] = '' # will be assigned default value
39 
40  if groupdict['etalo'] is None: # then default filtering for eta
41  groupdict['etalo'] = '' # will be assigned default value
42  groupdict['etahi'] = '320'
43 
44 
45  condargs = []
46  vals = defaults(threshold_var,
47  groupdict[threshold_var+'lo'],
48  groupdict[threshold_var+'hi'])
49  condargs.append((threshold_var, vals))
50 
51  vals = defaults('eta',
52  groupdict['etalo'],
53  groupdict['etahi'])
54  condargs.append(('eta', vals))
55 
56  # optional
57  if groupdict['jvtlo'] is not None:
58  vals = defaults('jvt', groupdict['jvtlo'])
59  condargs.append(('jvt', vals))
60 
61  return condargs
62 
63 

◆ scenario_ht()

def python.scenario_ht.scenario_ht (   scenario,
  chainPartInd 
)
calculate the parameters needed to generate a hypo helper config AlgTool
starting from a the hypoScenario which appears in the chainname for
an HT condition. The HT condition is filtered

Definition at line 64 of file scenario_ht.py.

64 def scenario_ht(scenario, chainPartInd):
65  """calculate the parameters needed to generate a hypo helper config AlgTool
66  starting from a the hypoScenario which appears in the chainname for
67  an HT condition. The HT condition is filtered"""
68 
69  assert scenario.startswith('HT'),\
70  'routing error, module %s: bad scenario %s' % (__name__, scenario)
71 
72  threshold_var = 'pt'
73  m = rgx_pt.match(scenario)
74  if m is None:
75  threshold_var = 'et'
76  m = rgx_et.match(scenario)
77  groupdict = m.groupdict()
78 
79  condargs = []
80  vals = defaults('ht',
81  groupdict['htlo'])
82 
83  # find the constructor arguments for each elemental condition
84  condargs.append(('ht', vals))
85 
86  # treeVec is [0, 0] handle non-root nodes here
87  repcondargs = [RepeatedConditionParams(tree_id = 1,
88  tree_pid=0,
89  chainPartInd=chainPartInd,
90  condargs=condargs,
91  invert='veto' in scenario)]
92 
93  # get the arguments needed for the HT condition filter
94  filterparams = None
95  condargs = get_conditionfilter_args_from_matchdict(groupdict,threshold_var)
96 
97  if condargs: # has default filterinf, so always True
98 
99  # make repeated conditions that filter the ht condition
100  repfiltargs = [RepeatedConditionParams(tree_id=1,
101  tree_pid=0,
102  condargs=condargs)]
103  filterparams = [FilterParams(typename='ConditionFilter',
104  args=repfiltargs)]
105  filterparam_inds = [0]
106 
107  else:
108  filterparams = []
109  filterparam_inds = [-1] # no condition filter
110 
111  # parameters to initalise the AlgTool that initialises the helper AlgTool
112 
113  # treevec[i] gives the tree_id of the parent of the
114  # node with tree_id = i
115  treevec = make_treevec(repcondargs)
116  assert treevec == [0, 0]
117 
118  assert len(repcondargs) == len(filterparam_inds)
119 
120 
121  helper_params = HelperConfigToolParams(treevec=treevec,
122  repcondargs=repcondargs,
123  filterparams=filterparams,
124  filterparam_inds=filterparam_inds)
125 
126  return [helper_params] # a list with one entry per FastReduction tree
127 

Variable Documentation

◆ pattern_common

python.scenario_ht.pattern_common

Definition at line 18 of file scenario_ht.py.

◆ pattern_et_threshold

python.scenario_ht.pattern_et_threshold

Definition at line 15 of file scenario_ht.py.

◆ pattern_etfull

python.scenario_ht.pattern_etfull

Definition at line 24 of file scenario_ht.py.

◆ pattern_pt_threshold

python.scenario_ht.pattern_pt_threshold

Definition at line 12 of file scenario_ht.py.

◆ pattern_ptfull

python.scenario_ht.pattern_ptfull

Definition at line 21 of file scenario_ht.py.

◆ rgx_et

python.scenario_ht.rgx_et

Definition at line 25 of file scenario_ht.py.

◆ rgx_pt

python.scenario_ht.rgx_pt

Definition at line 22 of file scenario_ht.py.

python.scenario_ht.scenario_ht
def scenario_ht(scenario, chainPartInd)
Definition: scenario_ht.py:64
python.scenario_ht.get_conditionfilter_args_from_matchdict
def get_conditionfilter_args_from_matchdict(groupdict, threshold_var)
Definition: scenario_ht.py:27
Base_Fragment.defaults
dictionary defaults
This includes now the top quark, the leptons and the bosons.
Definition: GeneratorFilters/share/common/Base_Fragment.py:79
python.make_treevec.make_treevec
def make_treevec(repcondargs)
Definition: make_treevec.py:3