473 def getTriggerType(self, legs, l1seed):
474 mtype = TriggerType.UNDEFINED
477 if mtype & TriggerType.el
and l.legtype & TriggerType.el:
478 mtype |= TriggerType.el_multi
479 mtype &= ~TriggerType.el_single
480 elif mtype & TriggerType.mu
and l.legtype & TriggerType.mu:
481 mtype |= TriggerType.mu_multi
482 mtype &= ~TriggerType.mu_single
483 elif mtype & TriggerType.tau
and l.legtype & TriggerType.tau:
484 mtype |= TriggerType.tau_multi
485 mtype &= ~TriggerType.tau_single
486 elif mtype & TriggerType.j
and l.legtype & TriggerType.j:
487 mtype |= TriggerType.j_multi
488 mtype &= ~TriggerType.j_single
489 elif mtype & TriggerType.bj
and l.legtype & TriggerType.bj:
490 mtype |= TriggerType.bj_multi
491 mtype &= ~TriggerType.bj_single
492 elif mtype & TriggerType.g
and l.legtype & TriggerType.g:
493 mtype |= TriggerType.g_multi
494 mtype &= ~TriggerType.g_single
495 elif l.legtype & TriggerType.mu_bphys:
496 mtype |= TriggerType.mu_bphys
497 mtype &= ~(TriggerType.mu_single | TriggerType.mu_multi)
498 elif l.legtype & TriggerType.exotics:
499 mtype |= TriggerType.exotics
500 elif l.legtype & TriggerType.afp:
501 mtype = TriggerType.afp
505 l1seed= l1seed.replace(
"L1_",
"")
506 if mtype & TriggerType.exotics
or mtype & TriggerType.afp:
508 for token
in l1seed.split(
"_"):
509 m = self.l1pattern.
match(token)
511 count,legtype,thr = m.groups()
512 count =
int(count)
if count
else 1
513 if 'EM' in legtype
or 'TAU' in legtype:
515 elif 'MU' in legtype:
516 if not mtype & TriggerType.mu_bphys:
517 if count > 1: mtype |= TriggerType.mu_multi
518 elif not mtype & TriggerType.mu_multi: mtype |= TriggerType.mu_single
520 if not mtype & TriggerType.bj
and not mtype & TriggerType.j
and not mtype & TriggerType.tau
and not mtype & TriggerType.ht:
521 if count > 1: mtype |= TriggerType.j_multi
522 elif not mtype & TriggerType.j_multi: mtype |= TriggerType.j_single
523 elif 'XE' in legtype
or 'XS' in legtype:
524 mtype |= TriggerType.xe
525 elif 'HT' in legtype:
526 mtype |= TriggerType.ht
528 log.info(
"Unknown trigger type:",(legtype, mtype, token, self.name))