26 elemental_keys = [k
for k
in all_elemental_keys
if k
in cp]
27 cp_elemental_args = {k : cp[k]
for k
in elemental_keys
if cp[k]}
31 for k, v
in cp_elemental_args.items():
32 if v ==
'nosmc': todelete.append(k)
34 for k
in todelete: del cp_elemental_args[k]
40 for k, v
in cp_elemental_args.items():
44 condargs.append((key, vals))
50 condargs.append((key, vals))
56 condargs.append((key, vals))
61 assert values[1] ==
'',
'jvt condition takes only one argument, two were given'
64 condargs.append((key, vals))
71 condargs.append((key, vals))
78 condargs.append((key, vals))
85 condargs.append((key, vals))
90 assert values[1] ==
'',
'bgn1 condition takes only one argument, two were given'
104 assert (values[0]
in gn1_WPs.keys()),f
"The efficiency of the specified GN1 cut \'{v}\' can not be found in the WP dictionary. Please add or remove the WP from the GN1 WP dictionary."
106 lo = gn1_WPs[values[0]]
112 'namePb':
'fastGN120230331_pb',
113 'namePc':
'fastGN120230331_pc',
114 'namePu':
'fastGN120230331_pu',
115 'nameValid':
'TracksForMinimalJetTag_isValid'
118 condargs.append((k, vals))
122 values = v.split(key)
123 assert values[1] ==
'',
'bgntwox condition takes only one argument, two were given'
134 assert (values[0]
in gn2x_WPs.keys()),f
"The efficiency of the specified gn2x cut \'{v}\' can not be found in the WP dictionary. Please add or remove the WP from the dips WP dictionary."
136 lo = gn2x_WPs[values[0]]
141 'namePb':
'GN2Xv01_phbb',
142 'namePc':
'GN2Xv01_ptop',
143 'namePu':
'GN2Xv01_pqcd',
144 'nameValid':
'TracksForMinimalJetTag_isValid'
146 condargs.append((k, vals))
150 values = v.split(key)
151 assert values[1] ==
'',
'bgn2 condition takes only one argument, two were given'
165 assert (values[0]
in gn2_WPs.keys()),f
"The efficiency of the specified GN2 cut \'{v}\' can not be found in the WP dictionary. Please add or remove the WP from the GN2 WP dictionary."
167 lo = gn2_WPs[values[0]]
173 'namePb':
'fastGN220240122_pb',
174 'namePc':
'fastGN220240122_pc',
175 'namePu':
'fastGN220240122_pu',
176 'nameValid':
'TracksForMinimalJetTag_isValid'
179 condargs.append((k, vals))
182 values = v.split(key)
183 assert values[1] ==
'',
'bdips condition takes only one argument, two were given'
198 assert (values[0]
in dips_WPs.keys()),f
"The efficiency of the specified dips cut \'{v}\' can not be found in the WP dictionary. Please add or remove the WP from the dips WP dictionary."
200 lo = dips_WPs[values[0]]
205 'namePb':
'fastDips_pb',
206 'namePc':
'fastDips_pc',
207 'namePu':
'fastDips_pu',
208 'nameValid':
'TracksForMinimalJetTag_isValid'
210 condargs.append((k, vals))
213 raise ValueError(f
'btagger {v.split("b")[1]} not supportted')
217 values = v.split(key)
218 assert values[1] ==
'' ,
'gntau condition takes only one argument, two were given'
228 assert (values[0]
in gntau_WPs.keys()),f
"The efficiency of the specified gntau cut \'{v}\' can not be found in the WP dictionary. Please add or remove the WP from the gntau WP dictionary."
230 lo = gntau_WPs[values[0]]
234 'namePtau':
'fastGNTau20240216_ptau',
235 'namePu':
'fastGNTau20240216_pu',
236 'nameValid':
'TracksForMinimalJetTag_isValid'
238 condargs.append((k, vals))
242 from TrigHLTJetHypo.FastReductionAlgToolFactory
import jetMoments
247 for moment
in jetMoments:
249 key=
'mom{}'.
format(moment)
250 lo, hi = cutstr.split(key)
252 vals[
"moment"] = jetMoments[moment]
253 condargs.append((key, vals))
255 for moment
in jetMoments:
257 key=
'mom{}'.
format(moment)
258 lo, hi = v.split(key)
260 vals[
"moment"] = jetMoments[moment]
261 condargs.append((key, vals))
264 values = v.split(key)
266 lo=values[0].
replace(
"n",
"-",1)
268 hi=values[1].
replace(
"n",
"-",1)
270 condargs.append((key, vals))