3 from TrigHLTJetHypo.RepeatedConditionParams
import RepeatedConditionParams
4 from TrigHLTJetHypo.ConditionDefaults
import defaults
5 from TrigHLTJetHypo.make_repeatedCondConfigurer
import make_repeatedCondCfgFromParams
6 from TrigHLTJetHypo.FastReductionAlgToolFactory
import toolfactory
11 r'(?P<etalo>\d*)(?P<etatype>neta|ceta|peta>)(?P<etahi>\d*)XX'\
12 r'(?P<philo>\d*)(?P<phitype>nphi|cphi|pphi>)(?P<phihi>\d*)$'
14 rgx = re.compile(pattern)
18 """calculate the parameters needed to generate a ConditonFilter config
19 AlgTool starting from the prefilter substring if it appears in the
22 assert pf_string.startswith(
'MASK'),\
23 'routing error, module %s: bad prefilter %s' % (__name__, pf_string)
25 m = rgx.match(pf_string)
26 groupdict = m.groupdict()
28 etatype = groupdict[
'etatype']
29 etalo = groupdict[
'etalo']
30 etahi = groupdict[
'etahi']
31 if etatype
in (
'neta',
'ceta'):
37 phitype = groupdict[
'phitype']
38 philo = groupdict[
'philo']
39 phihi = groupdict[
'phihi']
40 if phitype
in (
'nphi',
'cphi'):
47 vals =
defaults(etatype, lo=etalo, hi=etahi)
48 condargs.append((etatype, vals))
50 vals =
defaults(phitype, lo=philo, hi=phihi)
51 condargs.append((phitype, vals))
53 repcondarg = RepeatedConditionParams(tree_id=0,
62 toolclass, name =
toolfactory(
'ConditionFilterConfigTool')
63 vals = {
'name' : name,
64 'conditionMakers': [repConditionMaker]}
66 return toolclass(**vals)