9def scenario_fbdjshared(scenario, chainPartInd):
10 """produce a list with two HelperToolConfigTool instances
11 This list will initialise a Gaudi ToolArray
12
13 This scenario has no arguments - it is illustrative only
14
15 The tree vector 0 is [0, 0, 0]
16 pos 0: root; pos 1 backward jet; pos 2 forward jet;
17
18 The tree vector 0 is [0, 0, 1, 1]
19 pos 0: root; pos 1 dijet; pos 2 dijet j0; pos 3 dijet j1;
20
21 There is a Repeated Condition configurer for each position
22
23 No conditions are filtered"""
24
25 assert scenario.startswith('FBDJSHARED'),\
26 'routing error, module %s: bad scenario %s' % (__name__, scenario)
27
28
29
30 repcondargs = []
31
32
33 condargs = []
34
35
37 condargs.append(('et', vals))
38
40 condargs.append(('neta', vals))
41
42 repcondargs.append(RepeatedConditionParams(tree_id = 1,
43 tree_pid=0,
44 chainPartInd=chainPartInd,
45 condargs=condargs))
46
47
48 condargs = []
49
51 condargs.append(('et', vals))
52
54 condargs.append(('peta', vals))
55
56 repcondargs.append(RepeatedConditionParams(tree_id = 2,
57 tree_pid=0,
58 chainPartInd=chainPartInd,
59 condargs=condargs))
60
61
62
63 nconds = len(repcondargs)
64 filterparams = []
65 filterparam_inds = [-1 for i in range(nconds)]
66
67
68
69 treevec = make_treevec(repcondargs)
70 assert treevec == [0, 0, 0]
71
72 helperparams = HelperConfigToolParams(treevec=treevec,
73 repcondargs=repcondargs,
74 filterparams=filterparams,
75 filterparam_inds=filterparam_inds)
76 helperparamslist = [helperparams]
77
78
80
81
82 repcondargs = []
83 condargs = []
85 condargs.append(('djmass', vals))
86
88 condargs.append(('djdphi', vals))
89
90
91 repcondargs.append(RepeatedConditionParams(tree_id = 1,
92 tree_pid=0,
93 chainPartInd=-1,
94 condargs=condargs))
95
96
97
98
99 condargs = []
101 condargs.append(('et', vals))
102
103 vals =
defaults(
'eta', lo=
'0', hi=
'490')
104 condargs.append(('eta', vals))
105
106 repcondargs.append(RepeatedConditionParams(tree_id = 2,
107 tree_pid=1,
108 chainPartInd=chainPartInd,
109 condargs=condargs))
110
111
112
113 condargs = []
115 condargs.append(('et', vals))
116
117 vals =
defaults(
'eta', lo=
'0', hi=
'490')
118 condargs.append(('eta', vals))
119
120 repcondargs.append(RepeatedConditionParams(tree_id = 3,
121 tree_pid=1,
122 chainPartInd=chainPartInd,
123 condargs=condargs))
124
125
126
127 nconds = len(repcondargs)
128 filterparams = []
129 filterparam_inds = [-1 for i in range(nconds)]
130
131
132
133
134
135 treevec = make_treevec(repcondargs)
136 assert treevec == [0, 0, 1, 1]
137
138 helperparams = HelperConfigToolParams(treevec=treevec,
139 repcondargs=repcondargs,
140 filterparams=filterparams,
141 filterparam_inds=filterparam_inds)
142
143
144
145 assert len(repcondargs) == len(filterparam_inds)
146
147 helperparamslist.append(helperparams)
148 return helperparamslist