def __init__(self, name, tistos, inputs, nickname = None, shared = False, **kwargs): specsOrKeys = makeList(tistos) self.__specs = set() self.__keys = set() re_spec = re.compile('.*%T[OUI]S$') for sk in specsOrKeys: if re_spec.match(sk): self.__specs.add(sk) else: self.__keys.add(sk) if bool(self.__keys) == bool(self.__specs): raise AttributeError("Either only specs or only cut keys must be specified") self.__kwargs = kwargs self.__cache = {} from HltLine.HltDecodeRaw import (DecodeL0MUON, DecodeL0CALO, DecodeL0FullCALO, DecodeL0DU) from Configurables import L0DecReportsMaker, L0SelReportsMaker from HltLine.HltDecodeRaw import DecodeHlt1SelRep from HltLine.HltLine import bindMembers args = dict(nickname = nickname, shared = shared, dependencies = [DecodeL0DU, DecodeL0MUON, DecodeL0CALO, DecodeL0FullCALO, L0DecReportsMaker(), L0SelReportsMaker(), DecodeHlt1SelRep]) super(Hlt2TisTosParticleTagger, self).__init__(name, inputs, **args)
def __init__(self, specsOrKeys): ## Fix extraInfo entry number specsOrKeys = makeList(specsOrKeys) self.__specs = set() self.__keys = set() re_spec = re.compile('.*%T[OUI]S$') for sk in specsOrKeys: if re_spec.match(sk): self.__specs.add(sk) else: self.__keys.add(sk) if bool(self.__keys) == bool(self.__specs): raise AttributeError("Either only specs or only cut keys must be specified") if self.__specs and not all(map(lambda s: s in _globalSpecs, self.__specs)): raise AttributeError("All specs must be globally taggable.") self.__cache = None from HltLine.HltDecodeRaw import DecodeHlt1SelRep from HltTracking.Hlt2TrackingConfigurations import Hlt2BiKalmanFittedForwardTracking as Hlt2LongTracking tracks = Hlt2LongTracking().hlt2PrepareTracks() super(Hlt2TisTosGlobalTagger, self).__init__('Hlt2TisTosGlobalTagger', [tracks], dependencies = [DecodeHlt1SelRep], shared = True)
def infoKeys(self, specs): specs = makeList(specs) self.__checkSpecs(specs) return [self.__specs[k] for k in specs]
def combinationCut(self, keys): keys = makeList(keys) return ' & '.join(("(AMAXCHILD(MAXTREE(HASTRACK, TINFO({0}, -1))) > 0.5)".format(k) for k in keys))
def particleCut(self, keys): keys = makeList(keys) return ' & '.join(('(MAXTREE(HASTRACK, TINFO({0}, -1)) > 0.5)'.format(k) for k in keys))
def __init__(self, name, inputs, dependencies = [], tistos = [], nickname = None, shared = False): self.__tistos = makeList(tistos) super(Hlt2TisTosStage, self).__init__(name, inputs, dependencies, nickname, shared)