139 def __init__(self,legname, chainseed, chainname=None):
140 self.legname = legname
143 chainseed= chainseed.replace(
"L1_",
"")
144 blocks = legname.split(
"_L1")
146 for token
in blocks[0].
split(
"_"):
147 m = self.legpattern.
match(token)
149 count,legtype,thr,noL1 = m.groups()
150 self.count =
int(count)
if count
else 1
153 if self.count > 1: self.legtype = TriggerType.el_multi
154 else: self.legtype = TriggerType.el_single
155 elif legtype ==
'mu':
156 if self.count > 1: self.legtype = TriggerType.mu_multi
157 else: self.legtype = TriggerType.mu_single
159 if self.count > 1: self.legtype = TriggerType.j_multi
160 else: self.legtype = TriggerType.j_single
161 elif legtype ==
'tau':
162 if self.count > 1: self.legtype = TriggerType.tau_multi
163 else: self.legtype = TriggerType.tau_single
165 if self.count > 1: self.legtype = TriggerType.g_multi
166 else: self.legtype = TriggerType.g_single
167 elif legtype ==
'xe':
168 self.legtype = TriggerType.xe
169 elif legtype ==
'ht':
170 self.legtype = TriggerType.ht
171 elif legtype
in self.uctTypes:
172 self.legtype = TriggerType.exotics
174 details.append(legtype)
176 log.info(
"Unknown trigger type: %s",legtype)
177 if noL1: details.append(noL1)
179 if self.bjetpattern.
match(token):
180 if self.legtype == TriggerType.j_single: self.legtype = TriggerType.bj_single
181 if self.legtype == TriggerType.j_multi: self.legtype = TriggerType.bj_multi
182 if self.bphyspattern.
match(token):
183 self.legtype = TriggerType.mu_bphys
184 if self.exoticspattern.
search(token):
185 self.legtype = TriggerType.exotics
186 if self.afppattern.
search(token):
187 self.legtype = TriggerType.afp
188 details.append(token)
190 for l1seed
in blocks[1:]:
191 if self.exoticspattern.
search(l1seed):
192 self.legtype = TriggerType.exotics
193 if self.afppattern.
search(l1seed):
194 self.legtype = TriggerType.afp
195 if l1seed == chainseed:
continue
197 assert self.l1seed==
"", (self.l1seed, chainseed, chainname, blocks[1:])
199 if not self.l1seed: self.l1seed = chainseed
200 self.details = tuple(details)