def __init__(self, instance, name): super( DvHypoSplit, self ).__init__( name ) mlog = logging.getLogger('DvHypoConfig.py') AllowedInstances = ["EF"] if instance not in AllowedInstances : mlog.error("Instance "+instance+" is not supported!") return None if instance=="EF" : self.AcceptAll = False self.Instance = "EF" self.UseBeamSpotFlag = False self.JetKey = "SplitJet" from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("TimeHistogramForTrigDvHypo") time.TimerHistLimits = [0,0.4] self.AthenaMonTools = [ time ] if instance=="EF" : from TrigBjetHypo.TrigDvHypoMonitoring import TrigEFDvHypoValidationMonitoring, TrigEFDvHypoOnlineMonitoring validation = TrigEFDvHypoValidationMonitoring() online = TrigEFDvHypoOnlineMonitoring() self.AthenaMonTools += [ validation, online ]
def __init__(self, name=None, **kw): if name is None: name = kw.get('name', self.__class__.__name__) ## init base class super(Aud, self).__init__(name, **kw) from AthenaCommon.Logging import logging self.__dict__['msg'] = logging.getLogger( self.getJobOptName() ) return
def __init__(self, name=None, parent=None, **kw): if name is None: name = kw.get('name', self.__class__.__name__) if not (parent is None): if isinstance(parent, str): name = "%s.%s" % (parent,name) else: name = "%s.%s" % (parent.name(),name) ## init base class super(AlgTool, self).__init__(name, **kw) self.__dict__['msg'] = logging.getLogger( self.getJobOptName() ) self._pyath_evtstore = None # handle to the evt store self._pyath_detstore = None # handle to the det store return
def __init__(self, name = "ZeeDAnalysisSvc"): super( TestZeeDAnalysisSvc, self ).__init__( name ) from AthenaCommon.Logging import logging log = logging.getLogger( 'ZeeDAnalysisSvc' ) from AthenaCommon.Constants import DEBUG self.OutputLevel = DEBUG # create service in a standalone job from AthenaCommon.AppMgr import theApp theApp.CreateSvc += [ "ZeeDAnalysisSvc" ]
def __eq__(self, arg): if type(arg)==list or type(arg)==tuple or type(arg)==set: notContained = [a for a in arg if not a in self] if len(notContained)==0: return True from AthenaCommon.Logging import logging log = logging.getLogger( 'AllowedList' ) log.error("the element %s is not in the list of allowed values: %s" % (notContained, self) ) return False return True
def __init__ (self, fname=None, cb_fct=None): """log Dso loading by calling-back into `cb_fct` if `cb_fct` is None we use a default callback function which logs the dVmem on stdout. """ import ctypes self.lib = ctypes.cdll.LoadLibrary ("libAthDSoCallBacks.so") ## self.lib.fetch_vmem.argtypes = None ## self.lib.fetch_vmem.restype = ctypes.c_float self._cb_fct_type = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.POINTER(DsoEvent), ctypes.c_void_p) fct = self.lib.ath_dso_cbk_register fct.argtypes = [self._cb_fct_type, ctypes.c_void_p] fct.restype = ctypes.c_int fct = self.lib.ath_dso_cbk_unregister fct.argtypes = [self._cb_fct_type] fct.restype = ctypes.c_int from collections import defaultdict self._data = defaultdict(dict) from AthenaCommon.Logging import logging self.msg = logging.getLogger ("AthDsoLogger") self.msg.setLevel (logging.INFO) if cb_fct is None: cb_fct = self.default_cb_fct # create the C-callback function wrapper self.msg.info ("creating the C-callback function") self.cb_fct = self._cb_fct_type(cb_fct) # create a CSV file holding the monitoring data import csv if fname is None: fname = 'vmem-dso.csv' if os.path.exists (fname): os.remove (fname) self._fd = open (fname, 'w') self.out = csv.writer (self._fd, delimiter=';') map (self.out.writerow, [ ['master-pid', os.getpid()], ['pid', 'libname', 'vmem-start (kb)', 'vmem-stop (kb)', 'dvmem (kb)'], ]) # start logging... self.msg.info ("initializing the C-dlopen-logger") self.lib.ath_dso_cbk_register(self.cb_fct, None)
def __init__(self, chainDict): mlog = logging.getLogger( 'CosmicDef.py:L2EFChain_CosmicTemplate' ) self.L2sequenceList = [] self.EFsequenceList = [] self.L2signatureList = [] self.EFsignatureList = [] self.TErenamingDict = [] self.chainPart = chainDict['chainParts'] self.chainL1Item = chainDict['L1item'] self.chainPartL1Item = self.chainPart['L1item'] self.chainCounter = chainDict['chainCounter'] self.L2Name = 'L2_'+self.chainPart['chainPartName'] self.EFName = 'EF_'+self.chainPart['chainPartName'] self.mult = int(self.chainPart['multiplicity']) self.chainName = chainDict['chainName'] self.chainPartName = self.chainPart['chainPartName'] self.L2InputL1Item = self.chainPartL1Item or self.chainL1Item if self.L2InputL1Item: self.L2InputTE = getInputTEfromL1Item(self.L2InputL1Item) else: self.L2InputTE = '' self.Flag='TriggerFlags.CosmicSlice.do%s()' % self.chainName mlog.verbose('in L2EFChain_CosmicTemplate constructor for %s' % self.chainName) #--------------------------------- # CHAIN DEFINITION SPECIFICATIONS #--------------------------------- if ('tilecalib' in self.chainPart['purpose']) \ & ('laser' in self.chainPart['addInfo']): self.setupCosmicTileCalibration() elif 'larps' in self.chainPart['purpose']: self.setupCosmicLArPreSNoise() elif ('pixel' in self.chainPart['purpose']) \ | ('sct' in self.chainPart['purpose']): self.setupCosmicIDNoiseCalibration() elif ('id' in self.chainPart['purpose']): self.setupCosmicAllTeChains() else: log.error('Chain %s could not be assembled' % (self.chainPartName)) return False L2EFChainDef.__init__(self, self.chainName, self.L2Name, self.chainCounter, self.chainL1Item, self.EFName, self.chainCounter, self.L2InputTE)
def ZeeDAnalysisSvcInit(): from AthenaCommon.Logging import logging log = logging.getLogger( 'ZeeDAnalysisSvcInit' ) # get service manager from AthenaCommon.AppMgr import ServiceMgr # add elec if not hasattr(ServiceMgr, 'ZeeDAnalysisSvc' ): log.info("Adding ZeeDAnalysisSvc to ServiceMgr") from ZeeDAnalysisSvc.ZeeDAnalysisSvcConfig import ZeeDAnalysisSvc ServiceMgr += ZeeDAnalysisSvc()
def main(): from optparse import OptionParser parser = OptionParser (usage="usage: %prog [options] jobo.py") p = parser.add_option p("-o", "--output", dest = "output", default = None, help = "path to a file where to store log's content") p("-s", "--save", dest = "pickle", default = "my.cfg.pkl", help = "path to a file where to save the generated cfg-pickle") (options, args) = parser.parse_args() if len (args) > 0: jobo_name = [arg for arg in args if arg[0] != "-"] pass else: parser.print_help() print "you need to give a joboption name to execute !" sys.exit (1) pass from AthenaCommon.Logging import logging msg = logging.getLogger ('pickling-cfg-test') msg.setLevel (logging.INFO) jobo = """\ for jobo_name in %s: include (jobo_name) from AthenaCommon.ConfigurationShelve import saveToPickle saveToPickle (fileName='%s') theApp.exit(0) """ % (jobo_name, options.pickle) msg.info ("creating pickle file from jobo '%s'...", jobo_name) msg.info ("storing configuration into [%s]...", options.pickle) wout = _run_jobo (jobo, msg, logfile_name=None) jobo = """\ from AthenaCommon.ConfigurationShelve import loadFromPickle loadFromPickle (fileName='my.cfg.pkl') """ msg.info ("trying to load back pickle...") msg.info ("logging process into [%s]...", options.output) rout = _run_jobo (jobo, msg, logfile_name=options.output) msg.info ("bye.") return
def _configure(): """Install the Athena-based TTree event selector and correctly configure a few other services. """ from AthenaCommon import CfgMgr from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Logging import logging msg = logging.getLogger( 'ReadAthenaRoot' ) msg.debug("Configuring Athena for reading ROOT files (via TChain)...") if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() if hasattr(svcMgr, 'EventSelector'): err = "svcMgr already configured with another EventSelector: [%s]"%\ svcMgr.EventSelector.getFullJobOptName() msg.error( err ) raise RuntimeError( err ) # Load ProxyProviderSvc if not hasattr (svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() pass from Configurables import TTreeEventSelector evtsel = TTreeEventSelector( "EventSelector" ) svcMgr += evtsel theApp.ExtSvc += [ evtsel.getFullName() ] theApp.EvtSel = "EventSelector" svcMgr.ProxyProviderSvc.ProviderNames += [evtsel.getFullName()] del evtsel # add a helper service whose sole purpose is to be initialized early # to populate early on the THistSvc w/ TTrees/TChains svc = CfgMgr.TTreeEventSelectorHelperSvc() # we add the helper svc to the list of children of the event selector # so configurable.setup() ordering is good svcMgr.EventSelector += svc theApp.CreateSvc += [ svc.getFullName() ] # configure the cnvsvc svcMgr += CfgMgr.Athena__NtupleCnvSvc() if not hasattr(svcMgr, 'EventPersistencySvc'): svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) svcMgr.EventPersistencySvc.CnvServices += [ "Athena::NtupleCnvSvc" ] msg.debug("Configuring Athena for reading ROOT files (via TChain)... [OK]") return
def writeXML(self): """ Writes L1 XML file""" log = logging.getLogger("TriggerConfigLVL1") if self.outputFile is None: log.warning("Can't write xml file since no name was provided") return from l1.Lvl1MenuUtil import idgen idgen.reset() FH = open( self.outputFile, mode="wt" ) FH.write( self.menu.xml() ) FH.close() from l1.Lvl1MenuUtil import oldStyle log.info("Wrote %s in %s" % (self.outputFile, "run 1 style" if oldStyle() else "run 2 style"))
def __init__(self, instance, algo, name): super( DvFex, self ).__init__( name ) mlog = logging.getLogger('BjetHypoConfig.py') ## SURE?? AllowedInstances = ["EF"] AllowedAlgos = ["EFID"] # Pre-configuring if instance not in AllowedInstances : mlog.error("Instance "+instance+" is not supported!") return None self.JetKey = "SplitJet" self.AlgoId = -1 if instance == "EF" and algo == "EFID" : self.AlgoId = 1 if self.AlgoId == -1: mlog.error("AlgoId is wrongly set!") return None self.UseEtaPhiTrackSel = False if algo=="EFID" : self.TrkSel_Chi2 = 0.0 self.TrkSel_BLayer = 0 #1 self.TrkSel_PixHits = 0 self.TrkSel_SiHits = 0 #7 self.TrkSel_D0 = 1.0*mm #300.0*mm self.TrkSel_Z0 = 1500.0*mm self.TrkSel_Pt = 1000.0*MeV #500.0*MeV from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("TimeHistogramForTrigBjetHypo") time.TimerHistLimits = [0,2] self.AthenaMonTools = [ time ] #self.validation = False #self.onlinemon = False if instance=="EF" : from TrigBjetHypo.TrigDvFexMonitoring import TrigEFDvFexValidationMonitoring, TrigEFDvFexOnlineMonitoring validation = TrigEFDvFexValidationMonitoring() online = TrigEFDvFexOnlineMonitoring() self.AthenaMonTools+=[validation,online]
def defineMenu(menuName = None ): """ Defines the list if item and threshold names that will be in the menu Calls defineMenu() of the correct module 'Menu_<menuname>.py' Menu.defineMenu() defines the menu via Lvl1Flags """ if not menuName: menuName = TriggerFlags.triggerMenuSetup() from TriggerJobOpts.TriggerFlags import TriggerFlags menumodule = __import__('l1menu.Menu_%s' % menuName.replace("_tight_mc_prescale","").replace("_loose_mc_prescale","").replace("_no_prescale",""), globals(), locals(), ['defineMenu'], -1) menumodule.defineMenu() log = logging.getLogger('TriggerConfigLVL1.defineMenu') log.info("menu %s contains %i items and %i thresholds" % ( menuName, len(Lvl1Flags.items()), len(Lvl1Flags.thresholds()) ) )
def BunchCrossingConfProvider( type = "" ): # Get ourselves a logger: from AthenaCommon.Logging import logging __logger = logging.getLogger( "BunchCrossingConfProvider" ) # If the user requested some instance directly: if type != "": if type == "TrigConf": __logger.info( "Forcing the usage of TrigConfBunchCrossingTool" ) from TrigBunchCrossingTool.BunchCrossingTool import TrigConfBunchCrossingTool return TrigConfBunchCrossingTool() elif type == "LHC": __logger.info( "Forcing the usage of LHCBunchCrossingTool" ) from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool return LHCBunchCrossingTool() elif type == "MC": from TrigBunchCrossingTool.BunchCrossingTool import MCBunchCrossingTool __logger.info( "Forcing the usage of MCBunchCrossingTool" ) return MCBunchCrossingTool() else: __logger.warning( "Type = " + type + " not recognized" ) __logger.warning( "Will select tool type based on global flags" ) # Decide which tool to use based on the global flags: from AthenaCommon.GlobalFlags import globalflags if globalflags.isOverlay(): __logger.info( "Selecting LHCBunchCrossingTool for overlay job" ) from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool return LHCBunchCrossingTool() if globalflags.DataSource() == "data": from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs from TriggerJobOpts.TriggerFlags import TriggerFlags if rec.doTrigger() or TriggerFlags.doTriggerConfigOnly() or recAlgs.doTrigger(): from TrigBunchCrossingTool.BunchCrossingTool import TrigConfBunchCrossingTool __logger.info( "Selecting TrigConfBunchCrossingTool for this job" ) return TrigConfBunchCrossingTool() else: __logger.info( "Trigger turned off, selecting LHCBunchCrossingTool for this job" ) from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool return LHCBunchCrossingTool() else: __logger.info( "Selecting MCBunchCrossingTool for this job" ) from TrigBunchCrossingTool.BunchCrossingTool import MCBunchCrossingTool return MCBunchCrossingTool()
def generateL1TopoMenu(menu): from AthenaCommon.Logging import logging log = logging.getLogger("TriggerConfigL1Topo") log.setLevel(logging.INFO) # what menu to build TF.triggerMenuSetup = menu # TPC for L1Topo tpcl1 = TriggerConfigL1Topo( outputFile = TF.outputL1TopoConfigFile(), menuName = TF.triggerMenuSetup() ) # build the menu structure tpcl1.generateMenu() # write xml file tpcl1.writeXML()
def py_alg(algName, iface='IAlgorithm'): """ Helper function to retrieve an IAlgorithm (managed by the IAlgManager_) by name, using Gaudi python bindings. @param algName: the name of the algorithm's instance one wants to retrieve ex: 'McAodBuilder' @param iface: type one wants to cast the tool to (can be a string or the PyCintex type) Ex: ## retrieve default interface (ie: GaudiKernel/IAlgorithm) alg = py_alg('McAodBuilder') assert(type(alg) == PyCintex.gbl.IAlgorithm) ## retrieve with specified interface alg = py_alg('McAodBuilder', iface='Algorithm') assert(type(alg) == PyCintex.gbl.Algorithm) """ algmgr = py_svc('ApplicationMgr',iface='IAlgManager') if not algmgr: msg = logging.getLogger('PyAthena.py_alg') error = 'could not retrieve IAlgManager/ApplicationMgr' msg.error (error) raise RuntimeError (error) # handle pycomponents... from .Configurables import PyComponents import cppyy alg = cppyy.libPyROOT.MakeNullPointer(iface) if not algmgr.getAlgorithm(algName, alg).isSuccess(): return # if the component is actually a py-component, # retrieve the python object from the registry if algName in PyComponents.instances: alg = PyComponents.instances[algName] if alg: import PyAthena setattr(PyAthena.algs, algName, alg) return alg
def registerMenu(self): """ Registers the list if items and thresholds that could be used in the menu of Run1 Calls registerItem() of the correct module 'ItemDef.py' or 'ItemDefRun1.py' Has to run AFTER defineMenu """ from l1.Lvl1Flags import Lvl1Flags run1 = Lvl1Flags.CTPVersion()<=3 itemdefmodule = __import__('l1menu.ItemDef%s' % ('Run1' if run1 else ''), globals(), locals(), ['ItemDef'], -1) #if (self.menuName == 'DC14'): # itemdefmodule = __import__('l1menu.ItemDefDC14', globals(), locals(), ['ItemDef'], -1) #else: # itemdefmodule = __import__('l1menu.ItemDef%s' % ('Run1' if run1 else ''), globals(), locals(), ['ItemDef'], -1) log = logging.getLogger('TriggerConfigLVL1.registerMenu') itemdefmodule.ItemDef.registerItems(self) log.info("registered %i items and %i thresholds (%s)" % ( len(self.registeredItems), len(self.registeredThresholds), ('Run 1' if run1 else 'Run 2') ) )
# or, with online THistSvc # athenaHLT -M -l DEBUG -c testPhysicsV6=True -n 25 TriggerJobOpts/runHLT_standalone.py # # run with athena: # BS input: athena.py -c "testPhysicsV6=True;BSRDOInput=['raw.data']" TriggerJobOpts/runHLT_standalone.py # RDO input: athena.py -c "testPhysicsV6=True;PoolRDOInput=['file.pool.root']" TriggerJobOpts/runHLT_standalone.py # # Select slice(s) to test: # set one or more of the following flags to True in the jo: # testEgamma, testMuon, testTau, testJet, testBjet, testMET, testBphysics # e.g.: # athenaHLT -f input.data -l DEBUG -n 25 -c "testTau=True;testPhysicsV6=True" TriggerJobOpts/runHLT_standalone.py # #=========================================================================================== from AthenaCommon.Logging import logging log = logging.getLogger('runHLT_standalone.py') #predefined menu setups accessible using 'test<NAME>[MC]=True' commandline menuMap={ #Run-3 preparation menu 'LS2V1': ('LS2_v1', 'TriggerMenuXML/LVL1config_LS2_v1.xml'), #2018 menus: menu name L1 xml file 'HIV5': ('Physics_HI_v5', 'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'), 'MCHIV5': ('MC_HI_v5', 'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'), #2017 menus: menu name L1 xml file 'PhysicsV7': ('Physics_pp_v7', 'TriggerMenuXML/LVL1config_Physics_pp_v7.xml'), 'MCV7': ('MC_pp_v7', 'TriggerMenuXML/LVL1config_MC_pp_v7.xml'), #2016 menus: menu name L1 xml file
__doc__ = "Lock containers in ESD/AOD ItemList using the definitions from CaloRingerKeys" import traceback from AthenaCommon.Logging import logging from AthenaCommon.Resilience import treatException mlog = logging.getLogger('CaloRingerLock_joboptions') mlog.info("Entering") from RecExConfig.RecFlags import rec from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from CaloRingerAlgs.CaloRingerFlags import caloRingerFlags from CaloRingerAlgs.CaloRingerKeys import CaloRingerKeysDict # Get CaloRinger algorithm handles from CaloRingerAlgs.CaloRingerAlgorithmBuilder import CaloRingerAlgorithmBuilder CRAlgBuilder = CaloRingerAlgorithmBuilder() from CaloRingerAlgs.CaloRingerMetaDataBuilder import CaloRingerMetaDataBuilder CRMetaDataBuilder = CaloRingerMetaDataBuilder() if rec.doESD() and caloRingerFlags.buildCaloRingsOn() and CRAlgBuilder.usable( ): LastCRWriter = CRMetaDataBuilder.getLastWriterHandle() CRMainAlg = CRAlgBuilder.getCaloRingerAlgHandle() CRMetaDataWriterAlg = CRMetaDataBuilder.getMetaDataWriterHandle() try: # FIXME: It seems that the python implementation takes a lot of memory
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration ########################################################################### # SliceDef file for Combined Chains, used to implement TOPOS ########################################################################### __author__ = 'E. Pianori' __doc__ = "Definition of topological cuts for combined chains" from AthenaCommon.Logging import logging logging.getLogger().info("Importing %s", __name__) log = logging.getLogger(__name__) import re from copy import deepcopy ########################################################################### ########################################################################### def _addTopoInfo(theChainDef, chainDicts, listOfChainDefs, doAtL2AndEF=True): maxL2SignatureIndex = -1 for signatureIndex, signature in enumerate(theChainDef.signatureList): if signature['listOfTriggerElements'][0][0:2] == "L2": maxL2SignatureIndex = max(maxL2SignatureIndex, signatureIndex) topoAlgs = chainDicts[0]["topo"] if any("Heg" in alg for alg in topoAlgs):
def configure(self): from AthenaCommon.Logging import logging mlog = logging.getLogger( 'METGoodnessGetter::configure:' ) mlog.info ('entering') import traceback try: from MissingETGoodness.MissingETGoodnessConf import \ EtmissGoodnessManagerAlg, \ JetGoodiesFiller, \ MetGoodiesFiller, \ MuonGoodiesFiller,\ METCollisionFilter # MET goodness - this can be used to configure and lock(!) # the MET goodness criteria. # also needed to reset the MET::goodies map for each event. manager = EtmissGoodnessManagerAlg (SetAndLockQuality = 0, # loose SetAndLockVersion = 20100415) self.seq += manager from MissingETGoodness.JetVarToolConfig import JetVarToolConfig JetVarToolConfig (self.seq) # Execute met and jet goodies fillers if cfgKeyStore.isInInput ('JetCollection', 'AntiKt4TopoJets'): primary_jet_alg = 'AntiKt4TopoJets' secondary_jet_alg = 'AntiKt4TopoJets' elif cfgKeyStore.isInInput ('JetCollection', 'Cone4H1TopoJets'): primary_jet_alg = 'AntiKt4TopoJets' secondary_jet_alg = 'AntiKt4TopoJets' else: primary_jet_alg = 'AntiKt4TopoEMJets' secondary_jet_alg = 'AntiKt4TopoEMJets' self.seq += JetGoodiesFiller(NamePrimaryJetAlg = primary_jet_alg, NameSecondaryJetAlg = secondary_jet_alg) self.seq += MetGoodiesFiller() muon_key = 'StacoMuonCollection' if not cfgKeyStore.isInInput ('Analysis::MuonContainer', muon_key): muon_key = 'Muons' self.seq += MuonGoodiesFiller(MuonContainerKey = muon_key) # collision filter, calo timing do_calo_time = False if cfgKeyStore.isInInput ('CaloCellContainer', 'AllCalo'): from LArCellRec.LArCollisionTimeGetter \ import LArCollisionTimeGetter LArCollisionTimeGetter (self.seq) do_calo_time = True self.seq += METCollisionFilter (DoCaloTimeFilter = do_calo_time) self._handle = manager except: mlog.error ("Error configuring METGoodness.") traceback.print_exc() return True
############################################################### # # Skeleton top job options for SkimNTUP_trf # #============================================================== from AthenaCommon.Logging import logging recoLog = logging.getLogger('ntup_to_ntup') recoLog.info('****************** STARTING NTUP->NTUP MAKING *****************') ## max/skip events from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if hasattr(runArgs, "skipEvents"): athenaCommonFlags.SkipEvents.set_Value_and_Lock(runArgs.skipEvents) else: athenaCommonFlags.SkipEvents = 0 if hasattr(runArgs, "maxEvents"): athenaCommonFlags.EvtMax.set_Value_and_Lock(runArgs.maxEvents) else: athenaCommonFlags.EvtMax = -1 ## TreeName from NTUPtoNTUPCore.SkimNTUP_ProdFlags import prodFlags if hasattr(runArgs, "tree_name"): prodFlags.TreeName.set_Value_and_Lock(runArgs.tree_name) else: raise TransformArgumentError(message='tree_name is not defined!') ## Input from PATJobTransforms.Configuration import ConfigDic from PyJobTransformsCore.trferr import TransformArgumentError
########################################################################### # SliceDef file for Combined Chains, used to implement TOPOS ########################################################################### __author__ = 'E. Pianori' __doc__="Definition of topological cuts for combined chains" from AthenaCommon.Logging import logging logging.getLogger().info("Importing %s",__name__) logCombined = logging.getLogger("TriggerMenu.combined.CombinedChainsDef") from copy import deepcopy ########################################################################### ########################################################################### def _addTopoInfo(theChainDef,chainDicts,listOfChainDefs,doAtL2AndEF=True): maxL2SignatureIndex = -1 for signatureIndex,signature in enumerate(theChainDef.signatureList): if signature['listOfTriggerElements'][0][0:2] == "L2": maxL2SignatureIndex = max(maxL2SignatureIndex,signatureIndex) topoAlgs = chainDicts[0]["topo"] if any("dphi" in alg for alg in topoAlgs): ##Check that we only have a MET and JET chain inputChains=[] for ChainPart in chainDicts: if 'MET' in ChainPart['signature'] or 'Jet' in ChainPart['signature']: inputChains.append(ChainPart['signature']) if len(inputChains)<2:
# Only include this file once include.block("AODSelect/AODSelect_setupOptions.py") # ============================================================================= # Common job preparation # ============================================================================= from AthenaCommon.Logging import logging logAODSelect_setupOptions = logging.getLogger('AODSelect_setupOptions') #logAODSelect_setupOptions.setLevel(DEBUG) # Import the AODSelectFlags to steer the job from AODSelect.AODSelectFlags import AODSelectFlags # Get the helper methods import AODSelect.AODSelectHelpers as ash # Import all other needed things from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ToolSvc from AthenaCommon import CfgMgr # ==================================================================== # Check if we have Monte Carlo or real data, based on the MetaReader # ==================================================================== from AthenaCommon.GlobalFlags import globalflags if not globalflags.DataSource() == 'data': logAODSelect_setupOptions.debug( "Detected that the input file is a simulated dataset") AODSelectFlags.isSim = True pass
def __init__(self, name="RegSelSvcDefault"): # call base class constructor RegSelSvc.__init__(self, name="RegSelSvc") from AthenaCommon.Logging import logging mlog = logging.getLogger('RegSelSvc::__init__ ') mlog.info('entering') # z vertex range for old style methods and now propogation # even for ne style methods # old value - 168 # self.DeltaZ = 168 * mm # new value as of 03-08-2011 for the width LHC beam spot of 75mm self.DeltaZ = 225 * mm # Configure LUT creator tools pixTable = None sctTable = None trtTable = None larTable = None tileTable = None rpcTable = None mdtTable = None tgcTable = None cscTable = None mmTable = None stgcTable = None from AthenaCommon.DetFlags import DetFlags if DetFlags.detdescr.ID_on(): if DetFlags.detdescr.pixel_on(): from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable pixTable = SiRegionSelectorTable( name="PixelRegionSelectorTable", ManagerName="Pixel", OutputFile="RoITablePixel.txt", PrintHashId=True, PrintTable=False) mlog.debug(pixTable) if DetFlags.detdescr.SCT_on(): from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable sctTable = SiRegionSelectorTable( name="SCT_RegionSelectorTable", ManagerName="SCT", OutputFile="RoITableSCT.txt", PrintHashId=True, PrintTable=False) mlog.debug(sctTable) if DetFlags.detdescr.TRT_on(): from InDetRegionSelector.InDetRegionSelectorConf import TRT_RegionSelectorTable trtTable = TRT_RegionSelectorTable( name="TRT_RegionSelectorTable", ManagerName="TRT", OutputFile="RoITableTRT.txt", PrintHashId=True, PrintTable=False) mlog.debug(trtTable) if DetFlags.detdescr.Calo_on(): from LArRegionSelector.LArRegionSelectorConf import LArRegionSelectorTable larTable = LArRegionSelectorTable(name="LArRegionSelectorTable") mlog.debug(larTable) from TileRawUtils.TileRawUtilsConf import TileRegionSelectorTable tileTable = TileRegionSelectorTable(name="TileRegionSelectorTable") mlog.debug(tileTable) if DetFlags.detdescr.Muon_on(): if DetFlags.detdescr.RPC_on(): from MuonRegionSelector.MuonRegionSelectorConf import RPC_RegionSelectorTable rpcTable = RPC_RegionSelectorTable( name="RPC_RegionSelectorTable") mlog.debug(rpcTable) if DetFlags.detdescr.MDT_on(): from MuonRegionSelector.MuonRegionSelectorConf import MDT_RegionSelectorTable mdtTable = MDT_RegionSelectorTable( name="MDT_RegionSelectorTable") mlog.debug(mdtTable) if DetFlags.detdescr.TGC_on(): from MuonRegionSelector.MuonRegionSelectorConf import TGC_RegionSelectorTable tgcTable = TGC_RegionSelectorTable( name="TGC_RegionSelectorTable") mlog.debug(tgcTable) # could avoid first check in case DetFlags.detdescr.CSC_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasCSC() and DetFlags.detdescr.CSC_on(): from MuonRegionSelector.MuonRegionSelectorConf import CSC_RegionSelectorTable cscTable = CSC_RegionSelectorTable( name="CSC_RegionSelectorTable") mlog.debug(cscTable) # could avoid first check in case DetFlags.detdescr.Micromegas_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasMM() and DetFlags.detdescr.Micromegas_on(): from MuonRegionSelector.MuonRegionSelectorConf import MM_RegionSelectorTable mmTable = MM_RegionSelectorTable(name="MM_RegionSelectorTable") mlog.debug(mmTable) # could avoid first check in case DetFlags.detdescr.sTGC_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasSTGC() and DetFlags.detdescr.sTGC_on(): from MuonRegionSelector.MuonRegionSelectorConf import sTGC_RegionSelectorTable stgcTable = sTGC_RegionSelectorTable( name="sTGC_RegionSelectorTable") mlog.debug(stgcTable) self.PixelRegionLUT_CreatorTool = pixTable self.SCT_RegionLUT_CreatorTool = sctTable self.TRT_RegionLUT_CreatorTool = trtTable self.LArRegionSelectorTable = larTable self.TileRegionSelectorTable = tileTable self.RPCRegionSelectorTable = rpcTable self.MDTRegionSelectorTable = mdtTable self.TGCRegionSelectorTable = tgcTable self.CSCRegionSelectorTable = cscTable self.MMRegionSelectorTable = mmTable self.sTGCRegionSelectorTable = stgcTable # have some job options to *disable* robs and modules # but also have an *enable* list from OKS, so, first, # - OKS can *enable* robs, then # - it *disables* any robs from the rob list, then # - it *disables* any modules from the module lists. # so be careful !!! self.readSiROBListFromOKS = False self.DeleteSiRobList = [] self.DeletePixelHashList = [] self.DeleteSCTHashList = [] self.DeleteTRTHashList = [] # set geometry and detector flags based on global properties # now obtained by default from GeoModelSvc at C++ init. #from AthenaCommon.GlobalFlags import globalflags #self.GeometryLayout = globalflags.DetDescrVersion() if DetFlags.detdescr.ID_on(): self.enableID = True if DetFlags.detdescr.SCT_on(): self.enableSCT = True else: self.enableSCT = False if DetFlags.detdescr.pixel_on(): self.enablePixel = True else: self.enablePixel = False if DetFlags.detdescr.TRT_on(): self.enableTRT = True else: self.enableTRT = False else: self.enableID = False if DetFlags.detdescr.Calo_on(): self.enableCalo = True else: self.enableCalo = False if DetFlags.detdescr.Muon_on(): self.enableMuon = True if DetFlags.detdescr.RPC_on(): self.enableRPC = True else: self.enableRPC = False if DetFlags.detdescr.MDT_on(): self.enableMDT = True else: self.enableMDT = False if DetFlags.detdescr.TGC_on(): self.enableTGC = True else: self.enableTGC = False # could avoid first check in case DetFlags.detdescr.CSC_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasCSC() and DetFlags.detdescr.CSC_on(): self.enableCSC = True else: self.enableCSC = False # could avoid first check in case DetFlags.detdescr.sTGC_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasSTGC() and DetFlags.detdescr.sTGC_on(): self.enablesTGC = True else: self.enablesTGC = False # could avoid first check in case DetFlags.detdescr.Micromegas_on() would take into account MuonGeometryFlags already if MuonGeometryFlags.hasMM() and DetFlags.detdescr.Micromegas_on(): self.enableMM = True else: self.enableMM = False else: self.enableMuon = False # now check if the trigger is actually enabled and if not, disable eveything anyway. # so any non-trigger algorithm has to turn it on itself, and *also* has to check that # the relevant detector is actually enabled from RecExConfig.RecAlgsFlags import recAlgs if not recAlgs.doTrigger(): self.enableID = True self.enablePixel = False self.enableSCT = False self.enableTRT = False self.enableCalo = False self.enableMuon = False
# # Joboptions for loading the AthenaSealSvc # # Block multiple includes include.block( "AthenaSealSvc/AthenaSealSvc_joboptions.py" ) # general application configuration options ## get a handle to the Service Manager from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon import CfgMgr if not hasattr (svcMgr, 'AthenaSealSvc'): svcMgr += CfgMgr.AthenaSealSvc() ## put here additional configuration ## from AthenaCommon.Logging import logging msg = logging.getLogger( 'AthenaSealSvc' ) msg.info( "DictNames: %r", svcMgr.AthenaSealSvc.DictNames ) ## backward compat AthenaSealSvc = svcMgr.AthenaSealSvc
# Common import(s): from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName #Trigger information definition from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags D3PDMakerFlags.MuonEFTrigPattern = 'EF_mu36_tight|EF_mu50_MSonly_barrel_tight|EF_mu40_tight' # Set up a logger: from AthenaCommon.Logging import logging WPrimeMND3PDStream_msg = logging.getLogger('WPrimeMND3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteWPrimeMND3PD.isVirtual: WPrimeMND3PDStream_msg.error( "The WPrimeMN D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("WPrimeMN D3PD set to be a virtual stream") pass # Construct the stream and file names for the WPrimeMN D3PD: streamName = prodFlags.WriteWPrimeMND3PD.StreamName fileName = buildFileName(prodFlags.WriteWPrimeMND3PD) WPrimeMND3PDStream_msg.info( "Configuring WPrimeMND3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) )
__doc__ = """Flags to steer Muon Combined Reconstruction.""" from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties from AthenaCommon.Logging import logging from AthenaCommon import BeamFlags from AthenaCommon import BFieldFlags beamFlags = jobproperties.Beam from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs from MuonRecExample.MuonRecFlags import muonRecFlags, muonStandaloneFlags from MuonRecExample.MuonRecUtils import logMuon, fillJobPropertyContainer, override_lock_and_set_Value, SummaryJobProperty from InDetRecExample.InDetJobProperties import InDetFlags logMuonComb = logging.getLogger("MuonCombinedRec") # # Flags for general use # class printConfigurables(JobProperty): """if this is on the all the print ThisTool lines are activated""" statusOn = True allowedTypes = ['bool'] StoredValue = False # # Switch on/off algorithms for pre-processing
############################################################### # # Job options file to test DCS conditions tool # #============================================================== #-------------------------------------------------------------- # Standard includes #-------------------------------------------------------------- import AthenaCommon.AtlasUnixStandardJob # Setup logger from AthenaCommon.Logging import logging msg = logging.getLogger("testTdaqEnabled") msg.setLevel(logging.INFO) #-------------------------------------------------------------- # Thread-specific setup #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties numThreads = jobproperties.ConcurrencyFlags.NumThreads() if numThreads > 0: from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.CheckDependencies(True) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) #-------------------------------------------------------------- # use auditors #-------------------------------------------------------------- from AthenaCommon.AppMgr import ServiceMgr
def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3PDFlags): ## first check if the blocks are already added to the JetD3PDObject ## the weight block is always added so check for it from AthenaCommon.Logging import logging addBTagInfoLogger = logging.getLogger("addBTagInfoToJetObject") if JetD3PDObject.allBlocknames().has_key( JetTagD3PDKeys.BTagWeightsBlockName()): addBTagInfoLogger.warning( "btag blocks already added to JetD3PDObject - ignore") return addBTagInfoLogger.info("Adding btag blocks to JetD3PDObject") # ## now add the block fillers ## basic info weights and truth if available ## specify a list of taggers via LocalFlags.Taggers() # JetD3PDObject.defineBlock(btagLevelOffset + 0, JetTagD3PDKeys.BTagWeightsBlockName(), JetTagD3PDMaker.JetTagBTagWeightsFillerTool, prefix=JetTagD3PDKeys.BTagWeightsPrefix(), TaggerNames=LocalFlags.Taggers()) if rec.doTruth: JetD3PDObject.defineBlock(btagLevelOffset + 0, JetTagD3PDKeys.TruthInfoBlockName(), JetTagD3PDMaker.JetTagTruthInfoFillerTool, prefix=JetTagD3PDKeys.TruthInfoPrefix(), InfoType="TruthInfo") if LocalFlags.QGInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.QGPartonTruthInfoBlockName(), JetTagD3PDMaker.JetTagQGPartonTruthInfoFillerTool, prefix=JetTagD3PDKeys.QGPartonTruthInfoPrefix(), InfoType="QGPartonTruthInfo") if LocalFlags.PileupLabeling(): JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.PUTruthInfoBlockName(), JetTagD3PDMaker.JetTagTruthInfoFillerTool, prefix=JetTagD3PDKeys.PUTruthInfoPrefix(), InfoType="TruthInfoPU") if LocalFlags.QGInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.PUQGPartonTruthInfoBlockName(), JetTagD3PDMaker.JetTagQGPartonTruthInfoFillerTool, prefix=JetTagD3PDKeys.PUQGPartonTruthInfoPrefix(), InfoType="QGPartonTruthInfoPU") # ##association to tracks, electron, muons, and photons ##if the getter labels are not specified no association is done ##can add contained information if needed # if LocalFlags.JetTrackAssoc(): JetTrackAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetTrackAssociationTool, '', ## set target when calling the JetD3PDObject level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetTrackAssocPrefix(), blockname=JetTagD3PDKeys.JetTrackAssocBlockName(), FillVariables=False) JetTagD3PDTrackToVertexIPEstimator = None from AthenaCommon.AppMgr import ToolSvc if hasattr(ToolSvc, 'BTagTrackToVertexIPEstimator'): JetTagD3PDTrackToVertexIPEstimator = ToolSvc.BTagTrackToVertexIPEstimator print "JetTagD3PD Info: found BTagTrackToVertexIPEstimator" elif hasattr(ToolSvc, 'JetTagD3PDTrackToVertexIPEstimator'): print "JetTagD3PD Info: found JetTagD3PDTrackToVertexIPEstimator" JetTagD3PDTrackToVertexIPEstimator = ToolSvc.JetTagD3PDTrackToVertexIPEstimator else: print "JetTagD3PD Info: configure TrackToVertexIPEstimator" from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__FullLinearizedTrackFactory extrap = AtlasExtrapolator() ToolSvc += extrap JetTagD3PDLinTrkFactory = Trk__FullLinearizedTrackFactory( name="JetTagD3PDFullLinearizedTrackFactory", Extrapolator=extrap) ToolSvc += JetTagD3PDLinTrkFactory from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__TrackToVertexIPEstimator JetTagD3PDTrackToVertexIPEstimator = Trk__TrackToVertexIPEstimator(\ name="JetTagD3PDTrackToVertexIPEstimator", Extrapolator=extrap, LinearizedTrackFactory=JetTagD3PDLinTrkFactory) ToolSvc += JetTagD3PDTrackToVertexIPEstimator JetTrack = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetTrackAssociationTool, level=btagLevelOffset + 4, prefix=JetTagD3PDKeys.JetTrackAssocPrefix(), blockname=JetTagD3PDKeys.JetTrackBlockName(), nrowName='', TrackToVertexIPEstimator=JetTagD3PDTrackToVertexIPEstimator, PrimaryVertexCollection=JetTagD3PDFlags.PrimaryVertexSGKey()) if LocalFlags.JetTrackGhostAssoc(): JetTrackAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetTrackAssociationTool, '', ## set target when calling the JetD3PDObject level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetTrackGhostAssocPrefix(), blockname=JetTagD3PDKeys.JetTrackGhostAssocBlockName(), FillVariables=False, TrackAssocName=LocalFlags.JetTrackGhostAssocName()) if LocalFlags.JetBHadronGhostAssoc(): JetBHadronAssoc = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetNavigable4MomentumAssociationTool, JetTagD3PDKeys.JetBHadronGhostAssocPrefix(), level = 900, blockname=JetTagD3PDKeys.JetBHadronGhostAssocBlockName()+"tmp", Navigable4MomentumAssocName=LocalFlags.JetBHadronGhostAssocName()) IndexAssociation( JetBHadronAssoc, TruthD3PDMaker.TruthParticleGenParticleAssociationTool, '', level=_jetTagAssocLevel, blockname=JetTagD3PDKeys.JetBHadronGhostAssocBlockName(), prefix="") if LocalFlags.JetTruthGhostAssoc(): JetTruthAssoc = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetNavigable4MomentumAssociationTool, JetTagD3PDKeys.JetTruthGhostAssocPrefix(), level=900, blockname=JetTagD3PDKeys.JetTruthGhostAssocBlockName() + "tmp", Navigable4MomentumAssocName=LocalFlags.JetTruthGhostAssocName()) IndexAssociation( JetTruthAssoc, TruthD3PDMaker.TruthParticleGenParticleAssociationTool, '', level=_jetTagAssocLevel, blockname=JetTagD3PDKeys.JetTruthGhostAssocBlockName(), prefix="") if LocalFlags.JetConstituantTruthAssoc(): ConstitAssoc = ContainedVectorMultiAssociation \ (JetD3PDObject, EventCommonD3PDMaker.NavigableConstituentAssociationTool, 'constit_', nrowName = '', TypeName = 'TruthParticle', blockname= JetTagD3PDKeys.JetConstituantTruthAssocBlockName()+"tmp", level = 900 ) IndexAssociation( ConstitAssoc, TruthD3PDMaker.TruthParticleGenParticleAssociationTool, '', level=_jetTagAssocLevel, blockname=JetTagD3PDKeys.JetConstituantTruthAssocBlockName(), prefix="mcpart_") if LocalFlags.JetMuonAssoc(): JetMuonAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetMuonAssociationTool, '', ## set target when calling the JetD3PDObject level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetMuonAssocPrefix(), blockname=JetTagD3PDKeys.JetMuonAssocBlockName()) if LocalFlags.AddSecondMuonCollection(): JetMuon2Assoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetMuonAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetMuon2AssocPrefix(), blockname=JetTagD3PDKeys.JetMuon2AssocBlockName(), MuonsName="SecondMuons") if LocalFlags.JetElectronAssoc(): JetElectronAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetElectronAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetElectronAssocPrefix(), blockname=JetTagD3PDKeys.JetElectronAssocBlockName()) if LocalFlags.JetPhotonAssoc(): JetPhotonAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetPhotonAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.JetPhotonAssocPrefix(), blockname=JetTagD3PDKeys.JetPhotonAssocBlockName()) if rec.doTruth and LocalFlags.JetGenSoftLeptonAssoc(): JetGenSoftLeptonAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool, '', level = _jetTagAssocLevel, prefix=JetTagD3PDKeys.JetGenSoftLeptonAssocPrefix(), blockname=JetTagD3PDKeys.JetGenSoftLeptonAssocBlockName(), MCCollections = D3PDMakerFlags.TruthSGKey(), FillVariables=False) JetGenSoftLepton = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool, level = btagLevelOffset+4, prefix=JetTagD3PDKeys.JetGenSoftLeptonAssocPrefix(), blockname=JetTagD3PDKeys.JetGenSoftLeptonBlockName(), nrowName = '', MCCollections = D3PDMakerFlags.TruthSGKey()) JetGenSoftLepton.defineBlock( btagLevelOffset + 20, JetTagD3PDKeys.JetGenSoftLeptonPropBlockName(), EventCommonD3PDMaker.GenParticleFillerTool) # ## info base for each tagger: basicaly B/U/C probabilities # if LocalFlags.InfoBase(): JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.IP2DInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.IP2DInfoBasePrefix(), InfoType="IP2D", AddPC=True) JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.IP2DIPInfoBaseBlockName(), JetTagD3PDMaker.JetTagIPInfoBaseFillerTool, prefix=JetTagD3PDKeys.IP2DInfoBasePrefix(), InfoType="IP2D") JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.IP3DInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.IP3DInfoBasePrefix(), InfoType="IP3D", AddPC=True) JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.IP3DIPInfoBaseBlockName(), JetTagD3PDMaker.JetTagIPInfoBaseFillerTool, prefix=JetTagD3PDKeys.IP3DInfoBasePrefix(), InfoType="IP3D") JetD3PDObject.defineBlock( btagLevelOffset + 1, JetTagD3PDKeys.JetProbInfoBaseBlockName(), JetTagD3PDMaker.JetTagJetProbInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetProbInfoBasePrefix(), InfoType="JetProb", # This may be missing in 17.2 samples. AllowMissing=at_least_version('17.2.0')) JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.SV1InfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.SV1InfoBasePrefix(), InfoType="SV1", AddPC=True) JetD3PDObject.defineBlock(btagLevelOffset + 1, JetTagD3PDKeys.SV2InfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.SV2InfoBasePrefix(), InfoType="SV2") JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.JetFitterInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterTagInfoPrefix(), InfoType="JetFitterTagNN,JetFitterTag", AddPC=True) JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.JetFitterCombInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterCombInfoBasePrefix(), InfoType="JetFitterCOMBNN,JetFitterCOMB", AddPC=True) if LocalFlags.GbbNNInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 1, JetTagD3PDKeys.GbbNNInfoBlockName(), JetTagD3PDMaker.JetTagGbbNNInfoFillerTool, prefix=JetTagD3PDKeys.GbbNNInfoPrefix(), InfoType="GbbNN") if LocalFlags.NewGbbNNInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 1, JetTagD3PDKeys.NewGbbNNInfoBlockName(), JetTagD3PDMaker.JetTagHadFlavorTagInfoFillerTool, prefix=JetTagD3PDKeys.NewGbbNNInfoPrefix(), InfoType="NewGbbNN") if LocalFlags.QGInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 1, JetTagD3PDKeys.QGInfoBlockName(), JetTagD3PDMaker.JetTagHadFlavorTagInfoFillerTool, prefix=JetTagD3PDKeys.QGInfoPrefix(), InfoType="QG") if LocalFlags.InfoBaseCalib(): JetD3PDObject.defineBlock( btagLevelOffset + 3, JetTagD3PDKeys.JetFitterFlipInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterTagFlipInfoPrefix(), InfoType="JetFitterTagNNFlip,JetFitterTagFlip", AddPC=True) JetD3PDObject.defineBlock( btagLevelOffset + 3, JetTagD3PDKeys.JetFitterCombIP3DPosInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterCombIP3DPosInfoBasePrefix(), InfoType="JetFitterCOMBNNIP3DPos,JetFitterCOMBIP3DPos", AddPC=True) JetD3PDObject.defineBlock( btagLevelOffset + 3, JetTagD3PDKeys.JetFitterCombIP3DNegInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterCombIP3DNegInfoBasePrefix(), InfoType="JetFitterCOMBNNIP3DNeg,JetFitterCOMBIP3DNeg", AddPC=True) # if LocalFlags.InfoBaseGaia(): # JetD3PDObject.defineBlock( # btagLevelOffset+1, "JetTag_Gaia", # JetTagD3PDMaker.JetTagInfoBaseFillerTool, # prefix="flavor_component_gaia_", # InfoType="Gaia", # AddPC=True, # AddPTau=False) # JetD3PDObject.defineBlock( # btagLevelOffset+1, "JetTag_GaiaNeg", # JetTagD3PDMaker.JetTagInfoBaseFillerTool, # prefix="flavor_component_gaianeg_", # InfoType="GaiaNeg", # AddPC=True, # AddPTau=False) # # TODO: this should get its own block # JetD3PDObject.defineBlock( # btagLevelOffset+1, "JetTag_IPFordG", # also needs a rename # JetTagD3PDMaker.JetTagInfoBaseFillerTool, # prefix="flavor_component_ip3dloose_", # InfoType="IPFordG", # also needs to be changed in JetTagTools # AddPC=True) ## some additional info for jet fitter # if LocalFlags.JetFitterTagInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 2, JetTagD3PDKeys.JetFitterTagInfoBlockName(), JetTagD3PDMaker.JetTagJetFitterTagInfoFillerTool, prefix=JetTagD3PDKeys.JetFitterTagInfoPrefix(), InfoType="JetFitterTagNN,JetFitterTag") if LocalFlags.JetFitterTagFlipInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 2, JetTagD3PDKeys.JetFitterTagFlipInfoBlockName(), JetTagD3PDMaker.JetTagJetFitterTagInfoFillerTool, prefix=JetTagD3PDKeys.JetFitterTagFlipInfoPrefix(), InfoType="JetFitterTagNNFlip,JetFitterTagFlip") if LocalFlags.JetFitterCharmTagInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 2, JetTagD3PDKeys.JetFitterCharmTagInfoBlockName(), JetTagD3PDMaker.JetTagJetFitterGenericTagInfoFillerTool, prefix=JetTagD3PDKeys.JetFitterCharmTagInfoPrefix(), InfoType="JetFitterCharm") JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.JetFitterCharmInfoBaseBlockName(), JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix=JetTagD3PDKeys.JetFitterCharmTagInfoPrefix(), InfoType="JetFitterCharm", AddPC=True) if LocalFlags.InfoBaseCalib(): JetD3PDObject.defineBlock( btagLevelOffset + 0, JetTagD3PDKeys.JetFitterCharmInfoBaseBlockName() + "NEG", JetTagD3PDMaker.JetTagInfoBaseFillerTool, prefix="flavor_component_jfitcneg_", InfoType="JetFitterCharmNeg", AddPC=True) # ## track information used for IP taggers # if LocalFlags.IPInfoPlus(): IPInfoPlusTrackAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagIPInfoPlusTrackAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.IPInfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName(), FillVariables=False, AllowMissing=True) IPInfoPlusTrack = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagIPInfoPlusTrackAssociationTool, level=btagLevelOffset + 2, prefix=JetTagD3PDKeys.IPInfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.IPInfoPlusTrackBlockName(), nrowName='', AllowMissing=True) IPInfoPlusTrack.defineBlock(btagLevelOffset + 20, JetTagD3PDKeys.IPInfoPlusTrkP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix="", WriteM=False) # ## vertex information used for SV1/SV2 taggers # if LocalFlags.SVInfoPlus(): JetD3PDObject.defineBlock(btagLevelOffset + 2, JetTagD3PDKeys.SVInfoPlusBlockName(), JetTagD3PDMaker.JetTagSVInfoPlusFillerTool, prefix=JetTagD3PDKeys.SVInfoPlusPrefix(), InfoType="SVInfoPlus", AllowMissing=True, AddNormDist=True) SVInfoPlusTrackAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.SVInfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.SVInfoPlusTrackAssocBlockName(), AllowMissing=True) SVInfoPlusTrack = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, level=btagLevelOffset + 20, prefix=JetTagD3PDKeys.SVInfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.SVInfoPlusTrackBlockName(), nrowName='', AllowMissing=True) SVInfoPlusTrack.defineBlock(btagLevelOffset + 20, JetTagD3PDKeys.SVInfoPlusTrkP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) # ## vertex information used for the SV0 tagger # if LocalFlags.SV0InfoPlus(): JetD3PDObject.defineBlock(btagLevelOffset + 2, JetTagD3PDKeys.SV0InfoPlusBlockName(), JetTagD3PDMaker.JetTagSVInfoPlusFillerTool, prefix=JetTagD3PDKeys.SV0InfoPlusPrefix(), InfoType="SV0InfoPlus", AllowMissing=True) SV0InfoPlusTrackAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.SV0InfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.SV0InfoPlusTrackAssocBlockName(), InfoType="SV0InfoPlus", AllowMissing=True) SV0InfoPlusTrack = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, level=btagLevelOffset + 20, prefix=JetTagD3PDKeys.SV0InfoPlusTrackAssocPrefix(), blockname=JetTagD3PDKeys.SV0InfoPlusTrackBlockName(), nrowName='', InfoType="SV0InfoPlus", AllowMissing=True) SV0InfoPlusTrack.defineBlock( btagLevelOffset + 20, JetTagD3PDKeys.SV0InfoPlusTrkP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) # ## muon information used for the soft muon tagger # if LocalFlags.SoftMuonInfo(): SoftMuonInfoMuonAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.SoftMuonInfoMuonAssocPrefix(), blockname=JetTagD3PDKeys.SoftMuonInfoMuonAssocBlockName(), FillVariables=False, AllowMissing=True) SoftMuonInfoMuon = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, level=btagLevelOffset + 2, prefix=JetTagD3PDKeys.SoftMuonInfoMuonAssocPrefix(), blockname=JetTagD3PDKeys.SoftMuonInfoMuonBlockName(), nrowName='', AllowMissing=True) leveloffset = 20 if LocalFlags.AddInlineSoftMuonProperties(): leveloffset = -btagLevelOffset SoftMuonInfoMuon.defineBlock(btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False, WriteE=True) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoChargeBlockName(), EventCommonD3PDMaker.ChargeFillerTool) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoAuthorBlockName(), MuonD3PDMaker.MuonAuthorFillerTool) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfomatchChi2BlockName(), MuonD3PDMaker.MuonMatchQualityFillerTool) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoAcceptBlockName(), MuonD3PDMaker.MuonAcceptMethodFillerTool) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoELossBlockName(), MuonD3PDMaker.MuonELossFillerTool) SoftMuonInfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonInfoHitsBlockName(), MuonD3PDMaker.MuonTrkHitFillerTool, SaveIDMuonHitSummary=False) if LocalFlags.AddSecondMuonCollection(): SoftMuon2InfoMuon2Assoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, '', level = _jetTagAssocLevel, prefix=JetTagD3PDKeys.SoftMuon2InfoMuon2AssocPrefix(), blockname=JetTagD3PDKeys.SoftMuon2InfoMuon2AssocBlockName(), InfoType="SecondSoftMuonTag", FillVariables=False, AllowMissing = True) SoftMuon2InfoMuon2 = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, level = btagLevelOffset+3, prefix=JetTagD3PDKeys.SoftMuon2InfoMuon2AssocPrefix(), blockname=JetTagD3PDKeys.SoftMuon2InfoMuon2BlockName(), nrowName = '', InfoType="SecondSoftMuonTag", AllowMissing = True) SoftMuon2InfoMuon2.defineBlock( btagLevelOffset + 20, JetTagD3PDKeys.SoftMuon2InfoP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) # ## muon information used for soft muon chi2 tagger # if LocalFlags.SoftMuonChi2Info(): SoftMuonChi2InfoMuonAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, '', level=_jetTagAssocLevel, prefix=JetTagD3PDKeys.SoftMuonChi2InfoMuonAssocPrefix(), blockname=JetTagD3PDKeys.SoftMuonChi2InfoMuonAssocBlockName(), InfoType="SoftMuonTagChi2", FillVariables=False, AllowMissing=True) SoftMuonChi2InfoMuon = ContainedVectorMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, level=btagLevelOffset + 2, prefix=JetTagD3PDKeys.SoftMuonChi2InfoMuonAssocPrefix(), blockname=JetTagD3PDKeys.SoftMuonChi2InfoMuonBlockName(), InfoType="SoftMuonTagChi2", nrowName='', AllowMissing=True) leveloffset = 20 if LocalFlags.AddInlineSoftMuonChi2Properties(): leveloffset = -btagLevelOffset SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False, WriteE=True) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoChargeBlockName(), EventCommonD3PDMaker.ChargeFillerTool) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoAuthorBlockName(), MuonD3PDMaker.MuonAuthorFillerTool) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfomatchChi2BlockName(), MuonD3PDMaker.MuonMatchQualityFillerTool) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoAcceptBlockName(), MuonD3PDMaker.MuonAcceptMethodFillerTool) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoELossBlockName(), MuonD3PDMaker.MuonELossFillerTool) SoftMuonChi2InfoMuon.defineBlock( btagLevelOffset + leveloffset, JetTagD3PDKeys.SoftMuonChi2InfoHitsBlockName(), MuonD3PDMaker.MuonTrkHitFillerTool, SaveIDMuonHitSummary=False) if LocalFlags.AddSecondMuonCollection(): SoftMuon2Chi2InfoMuon2Assoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, '', level = _jetTagAssocLevel, prefix=JetTagD3PDKeys.SoftMuon2Chi2InfoMuon2AssocPrefix(), blockname=JetTagD3PDKeys.SoftMuon2Chi2InfoMuon2AssocBlockName(), InfoType="SecondSoftMuonTagChi2", FillVariables=False, AllowMissing = True) SoftMuon2Chi2InfoMuon2 = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, level = btagLevelOffset+3, prefix=JetTagD3PDKeys.SoftMuon2Chi2InfoMuon2AssocPrefix(), blockname=JetTagD3PDKeys.SoftMuon2Chi2InfoMuon2BlockName(), nrowName = '', InfoType="SecondSoftMuonTagChi2", AllowMissing = True) SoftMuon2Chi2InfoMuon2.defineBlock( btagLevelOffset + 20, JetTagD3PDKeys.SoftMuon2Chi2InfoP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) # ## electron information used for the soft electron tagger # if LocalFlags.SoftElectronInfo(): SoftElectronInfoElectronAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftElecInfoegammaAssociationTool, '', level = _jetTagAssocLevel, prefix=JetTagD3PDKeys.SoftElectronInfoElectronAssocPrefix(), blockname=JetTagD3PDKeys.SoftElectronInfoElectronAssocBlockName(), FillVariables=False, AllowMissing = True) SoftElectronInfoElectron = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagSoftElecInfoegammaAssociationTool, level = btagLevelOffset+2, prefix=JetTagD3PDKeys.SoftElectronInfoElectronAssocPrefix(), blockname=JetTagD3PDKeys.SoftElectronInfoElectronBlockName(), nrowName = '', AllowMissing = True) SoftElectronInfoElectron.defineBlock(\ btagLevelOffset+20, JetTagD3PDKeys.SoftElectronInfoP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) if LocalFlags.MultiSVInfoPlus(): JetD3PDObject.defineBlock( btagLevelOffset + 3, JetTagD3PDKeys.MultiSVInfoPlusBlockName(), JetTagD3PDMaker.JetTagMultiSVInfoPlusFillerTool, prefix=JetTagD3PDKeys.MultiSVInfoPlusPrefix(), InfoType="MultiSVInfoPlus", AllowMissing=True) MultiSVInfoPlusTrackAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagMultiSVInfoMSVVtxInfoAssociationTool, '', level = _jetTagAssocLevel, prefix=JetTagD3PDKeys.MultiSVInfoPlusMSVVtxAssocPrefix(), blockname=JetTagD3PDKeys.MultiSVInfoPlusMSVVtxAssocBlockName(), AllowMissing = True) #### from here keep the ifs for association labels. These are used only by btag. # ## additional information about the VKal secondary vertex finder used for SV tagger # if LocalFlags.JetVKalVxBadTrack(): if LocalFlags.TrackAssocLabel() != "": JetVKalVxBadTrackAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagVKalVxInJetBadTrackAssociationTool, LocalFlags.TrackAssocLabel(), level = btagLevelOffset+5, prefix=JetTagD3PDKeys.JetVKalVxBadTrackAssocPrefix(), blockname=JetTagD3PDKeys.JetVKalVxBadTrackAssocBlockName()) if LocalFlags.AddContainedTrackP4(): JetVKalVxBadTrackAssoc.defineBlock( btagLevelOffset + 10, JetTagD3PDKeys.SV0InfoPlusTrkP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) else: JetVKalVxBadTrackAssoc = ContainedVectorMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagVKalVxInJetBadTrackAssociationTool, level = btagLevelOffset+6, prefix=JetTagD3PDKeys.JetVKalVxBadTrackAssocPrefix(), blockname=JetTagD3PDKeys.JetVKalVxBadTrackAssocBlockName()) JetVKalVxBadTrackAssoc.defineBlock( btagLevelOffset + 6, JetTagD3PDKeys.SV0InfoPlusTrkP4BlockName(), EventCommonD3PDMaker.FourMomFillerTool, prefix='', WriteM=False) # ## additional information about the vertex finding for JetFitter* ## need to be associated with three additional D3PD objects defined in: ## JetTagVxOnJetAxisD3PDObject.py ## JetTagTwoTrackVertexD3PDObject.py # if LocalFlags.JetFitterVertexFinderInfo(): JetD3PDObject.defineBlock( btagLevelOffset + 5, JetTagD3PDKeys.JetFitterVxAssocBlockName(), JetTagD3PDMaker.JetTagJetFitterVxFillerTool, prefix=JetTagD3PDKeys.JetFitterVxAssocPrefix()) if LocalFlags.JFVxOnJetAxisAssocLabel() != "": JetVxOnJetAxisAssoc = IndexMultiAssociation( JetD3PDObject, JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool, LocalFlags.JFVxOnJetAxisAssocLabel(), level=btagLevelOffset + 5, prefix=JetTagD3PDKeys.JetJFVxOnJetAxisAssocPrefix(), blockname=JetTagD3PDKeys.JetJFVxOnJetAxisAssocBlockName(), VxOnJetHolderName=LocalFlags.JetJFVxOnJetAxisAssocSGKey(), InfoName="NewJetFitterVxFinder") if LocalFlags.JetFitterFlipVxOnJetAxisAssoc(): JFFlipJetVxOnJetAxisAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool, LocalFlags.JFVxOnJetAxisAssocLabel(), level = btagLevelOffset+6, prefix=JetTagD3PDKeys.JetJFFlipVxOnJetAxisAssocPrefix(), blockname=JetTagD3PDKeys.JetJFFlipVxOnJetAxisAssocBlockName(), VxOnJetHolderName=LocalFlags.JetJFVxOnJetAxisAssocSGKey(), InfoName="NewJetFitterVxFinderFlip") if LocalFlags.JFTwoTrackVertexAssocLabel() != "": JetJFTwoTrackVertexAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool, LocalFlags.JFTwoTrackVertexAssocLabel(), level = btagLevelOffset+5, prefix=JetTagD3PDKeys.JetJFTwoTrackVertexAssocPrefix(), blockname=JetTagD3PDKeys.JetJFTwoTrackVertexAssocBlockName(), TwoTrackVertexName=LocalFlags.JetJFTwoTrackVertexAssocSGKey(), InfoName="NewJetFitterVxFinder") if LocalFlags.JetFitterFlipTwoTrackVertexAssoc(): JetJFFlipTwoTrackVertexAssoc = IndexMultiAssociation(\ JetD3PDObject, JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool, LocalFlags.JFTwoTrackVertexAssocLabel(), level = btagLevelOffset+6, prefix=JetTagD3PDKeys.JetJFFlipTwoTrackVertexAssocPrefix(), blockname=JetTagD3PDKeys.JetJFFlipTwoTrackVertexAssocBlockName(), TwoTrackVertexName=LocalFlags.JetJFTwoTrackVertexAssocSGKey(), InfoName="NewJetFitterVxFinderFlip")
include("HSG2DPDUtils/hsg2_dpd_utils_fragment.py") from PrimaryDPDMaker.LogicalFilterCombiner import LogicalFilterCombiner import HSG2DPDUtils.HSG2DPDFlags # shortcuts from AthenaCommon.AlgSequence import AlgSequence theJob = AlgSequence() ptCut_daod_2l=jobproperties.HSG2.diLeptonPtCut() massCut_daod_2l=jobproperties.HSG2.diLeptonMassCut() from AthenaCommon.Logging import logging msg = logging.getLogger( "HSG2DAODFilters" ) algsList=[] theJob += H4lDPDMaker.H4lElectronFilter("HSG2_DAOD_2ElectronFilter",nElec=2,\ eTCuts=jobproperties.HSG2.diLeptonEPtCuts(),\ qualityCuts=jobproperties.HSG2.diLeptonEQual(),\ mass=massCut_daod_2l, collectionName=eCollToUse,\ acceptFrwdE=jobproperties.HSG2.diLeptonAcceptFrwdE(),\ checkLArError=jobproperties.HSG2.diLeptonCheckLArError()) algsList.append(theJob.HSG2_DAOD_2ElectronFilter.name()) msg.info("Added 2e filter") theJob += H4lDPDMaker.H4lMuonFilter("HSG2_DAOD_2StacoMuonFilter",nMu=2,\ pTCuts=jobproperties.HSG2.diLeptonMuPtCuts(),\
from AthenaCommon.Logging import logging overlaylog = logging.getLogger('overlay') overlaylog.info( '****************** STARTING OVERLAY *****************' ) import AthenaCommon.AtlasUnixStandardJob for cf in runArgs.jobConfig: include(cf) #============================================================== # Job definition parameters: #============================================================== from AthenaCommon.GlobalFlags import GlobalFlags from AthenaCommon.GlobalFlags import globalflags globalflags.isOverlay.set_Value_and_Lock(True) from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from AthenaCommon.AthenaCommonFlags import jobproperties jobproperties.AthenaCommonFlags.EvtMax = runArgs.maxEvents jobproperties.AthenaCommonFlags.SkipEvents= runArgs.skipEvents jobproperties.AthenaCommonFlags.PoolHitsInput=runArgs.inputHitsFile jobproperties.AthenaCommonFlags.PoolRDOOutput=runArgs.outputRDOFile from AthenaCommon.GlobalFlags import jobproperties jobproperties.Global.DetDescrVersion=runArgs.geometryVersion from Digitization.DigitizationFlags import jobproperties jobproperties.Digitization.rndmSeedOffset1=int(runArgs.digiSeedOffset1) jobproperties.Digitization.rndmSeedOffset2=int(runArgs.digiSeedOffset2)
from AthenaCommon.Logging import logging from copy import deepcopy log = logging.getLogger("TopoAlgo") class TopoAlgo(object): _availableVars = [] #__slots__ = ['_name', '_selection', '_value', '_generic'] def __init__(self, classtype, name, algoId=0): self.classtype = classtype self.name = name self.algoId = int(algoId) self.generics = [] self.variables = [] def __str__(self): return self.name def addvariable(self, name, value, selection = -1): if name in self._availableVars: self.variables += [ Variable(name, selection, value) ] else: raise RuntimeError("Variable parameter '%s' does not exist for algorithm %s of type %s,\navailable parameters are %r" % (name,self.name, self.classtype, self._availableVars)) return self def addgeneric(self, name, value): if name in self._availableVars: self.generics += [ Generic(name, value) ] else:
def setVarCut(obj, var, val): logging.getLogger("TrigTauHypoConfig").debug(obj.name) for i in range(len(var)): logging.getLogger("TrigTauHypoConfig").debug( 'Update variable cut: %s = %f' % (var[i], val[i])) obj.__setattr__(var[i], val[i])
""" from JetRec.JetAlgConfiguration import checkAndUpdateOptions, standardJetOption from RecExConfig.RecFlags import rec from AthenaCommon.SystemOfUnits import GeV from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon.Logging import logging from AthenaCommon.JobProperties import jobproperties from JetRec.JetRecFlags import jetFlags from JetRec.JetFinderConfig import setupAreaCalculation from JetMomentTools.SetupJetMomentTools import * ## A dedicated logger _momlog = logging.getLogger( 'JetMomentConfig' ) # We try to schedule cpu intensive moment calculation only once. This requires to keep track of # moments already scheduled for a given collection. Use this dictionnary. _specialMomentAlgDict = {} # Some moments request can translate in modification of option to already scheduled moment tool. # so we keep only one main algorithm (JetAlgorithm or JetMomentCalculator) per jet collection, in order to be able to # retrieve & modify the relevant moment tool. # However this can cause dependency issue : # for example, truth ghostAssoc requires JetTruthParticleFilter to run before. If a 1st call doesn't require truth ghost assoc, then later a 2nd call does, then JetTruthParticleFilter will be scheduled *after* the moment calculator alg... # workaround : move by jand JetTruthParticleFilter at a proper place in the topSequence or the PreD3PDSequence. def moveAlgInSequence(alg, seq, newpos): l = seq.getChildren() delattr(seq, alg.getName())
if (not 'REO_doAutoConfiguration' in dir()): REO_doAutoConfiguration = False ### harmonize conditions tag and geometry for all monitoring jobs; 26 May 2017 DetDescrVersion = 'ATLAS-R2-2016-01-00-01' # for new ID alignment 26 May 2017 if isOnline: ### ConditionsTag = 'CONDBR2-HLTP-2017-03' # for new ID alignment 26 May 2017 ConditionsTag = 'CONDBR2-HLTP-2018-01' # Aug 21st 2018 ## ------------------------------------------------------------------- ## configuration from pickle file import os, pickle from AthenaCommon.Logging import logging logRecExOnline_globalconfig = logging.getLogger('RecExOnline_globalconfig') if usePickleConfig and os.path.exists(pickleconfigfile): f = open(pickleconfigfile, 'r') onlinegoodies = pickle.load(f) f.close() if onlinegoodies.has_key('DataSource'): DataSource = onlinegoodies['DataSource'] if onlinegoodies.has_key('ConditionsTag'): ConditionsTag = onlinegoodies['ConditionsTag'] if onlinegoodies.has_key('beamType'): beamType = onlinegoodies['beamType'] if onlinegoodies.has_key('DetDescrVersion'): DetDescrVersion = onlinegoodies['DetDescrVersion']
#import glob, os, re import traceback from AthenaCommon.Logging import logging merHitLog = logging.getLogger('MergeHITS') merHitLog.info( '****************** STARTING HIT MERGING *****************' ) merHitLog.info( '**** Transformation run arguments' ) merHitLog.info( str(runArgs) ) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() #============================================================== # Job definition parameters: #============================================================== from AthenaCommon.AthenaCommonFlags import athenaCommonFlags #Jobs should stop if an include fails. if hasattr(runArgs,"IgnoreConfigError"): athenaCommonFlags.AllowIgnoreConfigError=runArgs.IgnoreConfigError else: athenaCommonFlags.AllowIgnoreConfigError=False from AthenaCommon.AppMgr import theApp EvtMax=-1 if hasattr(runArgs,"maxEvents"): EvtMax = runArgs.maxEvents theApp.EvtMax = EvtMax #--------------------------------------------------------------
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging from AthenaCommon.SystemOfUnits import * from AthenaCommon.Constants import * from AthenaCommon.BeamFlags import jobproperties import traceback import EventKernel.ParticleDataType from RecExConfig.Configured import Configured from InDetRecExample.InDetKeys import InDetKeys from AthenaCommon.DetFlags import DetFlags import AthenaCommon.CfgMgr as CfgMgr mlog = logging.getLogger ('MCTruthClassifierBase.py::configure:') mlog.info('entering') from AthenaCommon.AppMgr import ToolSvc # Configure the extrapolator from TrkExTools.AtlasExtrapolator import AtlasExtrapolator theAtlasExtrapolator=AtlasExtrapolator(name = 'MCTruthClassifieExtrapolator') theAtlasExtrapolator.DoCaloDynamic = False # this turns off dynamic calculation of eloss in calorimeters # all left to MaterialEffects/EnergyLossUpdators from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator AtlasMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'AtlasMaterialEffectsUpdator') ToolSvc += AtlasMaterialEffectsUpdator #default material effects updator NoElossMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'NoElossMaterialEffectsUpdator') NoElossMaterialEffectsUpdator.EnergyLoss = False ToolSvc += NoElossMaterialEffectsUpdator
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from TrigInDetRecoTools.TrigInDetRecoToolsConf import TrigL2PattRecoStrategyB from TrigInDetRecoTools.ConfiguredSettings import SettingsForStrategyB from AthenaCommon.Logging import logging log = logging.getLogger("FactoryForStrategyB") class FactoryForStrategyB(): __slots__ = [] def __init__(self, name='FactoryForStrategyB'): self.strategy = None self.settings = SettingsForStrategyB() def createStrategy(self, instName): if instName in self.settings.allowedInstanceNames: self.strategy = TrigL2PattRecoStrategyB("StrategyB_" + instName) ## Layer properties ## self.strategy.Map_LayerOneMultiplicity = self.settings[( 'Map_LayerOneMultiplicity', instName)] self.strategy.Map_LayerTwoMultiplicity = self.settings[( 'Map_LayerTwoMultiplicity', instName)] self.strategy.Map_MaxLayerFailureFraction = 0.001 self.strategy.Map_MaxTotalFailureFraction = 0.00001 ## New cut properties ## self.strategy.Reco_NewCuts = False
def configure(self): mlog = logging.getLogger('TileTTL1FromHitsGetter::configure:') mlog.info('entering') # get handle to upstream object try: from TileSimAlgs.TileTTL1FromHitsGetter import TileTTL1FromHitsGetter theTileTTL1FromHitsGetter = TileTTL1FromHitsGetter() except Exception: mlog.error("could not get handle to TileTTL1FromHitsGetter Quit") traceback.print_exc() return False if not theTileTTL1FromHitsGetter.usable(): if not self.ignoreConfigError(): mlog.error("TileTTL1FromHitsGetter unusable. Quit.") return False else: mlog.error( "TileTTL1FromHitsGetter unusable. Continue nevertheless") # Instantiation of the C++ algorithm try: from TileSimAlgs.TileSimAlgsConf import TileHitToTTL1 except Exception: mlog.error("could not import TileSimAlgs.TileHitToTTL1") traceback.print_exc() return False theTileHitToTTL1 = TileHitToTTL1() self._TileHitToTTL1 = theTileHitToTTL1 # Configure TileHitToTTL1 here # Check TileTTL1_jobOptions.py for full configurability theTileHitToTTL1.TileHitContainer = "TileHitCnt" theTileHitToTTL1.TileInfoName = "TileInfo" # sets output key from Digitization.DigitizationFlags import digitizationFlags if digitizationFlags.PileUpPremixing and 'OverlayMT' in digitizationFlags.experimentalDigi( ): from OverlayCommonAlgs.OverlayFlags import overlayFlags theTileHitToTTL1.TileTTL1Container = overlayFlags.bkgPrefix( ) + self.outputKey() theTileHitToTTL1.TileMBTSTTL1Container = overlayFlags.bkgPrefix( ) + "TileTTL1MBTS" else: theTileHitToTTL1.TileTTL1Container = self.outputKey() theTileHitToTTL1.TileMBTSTTL1Container = "TileTTL1MBTS" # register output in objKeyStore from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamESD(self.outputType(), self.outputKey()) # now add algorithm to topSequence # this should always come at the end mlog.info(" now adding to topSequence") # get a handle on topalg from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += theTileHitToTTL1 return True
def configure(self): mlog = logging.getLogger('CaloClusterTopoGetter::configure :') mlog.info('scheduled to output %s', self.output()) # get handle to upstream object from CaloRec.CaloRecFlags import jobproperties theCaloCellGetter = self.getInputGetter\ (jobproperties.CaloRecFlags.clusterCellGetterName()) # configure cell weight calibration if jobproperties.CaloTopoClusterFlags.doCellWeightCalib(): from CaloClusterCorrection.StandardCellWeightCalib import getCellWeightTool CellWeights = CaloClusterCellWeightCalib("CellWeights") # -- configure weight tool finder = jobproperties.CaloTopoClusterFlags.cellWeightRefFinder.get_Value( ) size = jobproperties.CaloTopoClusterFlags.cellWeightRefSize.get_Value( ) signal = jobproperties.CaloTopoClusterFlags.cellWeightRefSignal.get_Value( ) WeightTool = getCellWeightTool(finder, size, signal) # -- connect weight tool CellWeights.CellSignalWeightTool = WeightTool CellWeights += WeightTool #-- default properties CellWeights.Direction = "AbsSignal" #-- use absolute cell energies for eta/phi calculation CellWeights.BelowThresholdLikeAll = True #-- treat clusters below thresholds the same as all others CellWeights.BelowThresholdDirection = "AbsSignal" #-- alternative direction calculation for below threshold clusters, # ignored if BelowThresholdLikeAll = True CellWeights.EnergyThreshold = 0.0 * MeV #-- threshold for possible change of direction calculation CellWeights.IgnoreGeoWeights = False #-- ignore geometrical cell signal weights if True # now configure local hadronic calibration if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib(): # tools used by tools # EMFrac = EMFracClusterClassificationTool("EMFrac") # EMFrac.ClassificationKey = "EMFracClassify" # EMFrac.UseEMFractionSpread = False # EMFrac.MaxEMFraction = 0.5 # # H1Weight = H1ClusterCellWeightTool("H1Weight") # H1Weight.CorrectionKey = "H1ClusterCellWeights" # H1Weight.SignalOverNoiseCut = 2.0 # # OOCC = OutOfClusterCorrectionTool("OOCC") # OOCC.CorrectionKey = "OOCCorrection" # # OOCCPi0 = OutOfClusterCorrectionTool("OOCCPi0") # OOCCPi0.CorrectionKey = "OOCPi0Correction" # tools used by tools LCClassify = CaloLCClassificationTool("LCClassify") LCClassify.ClassificationKey = "EMFracClassify" LCClassify.UseSpread = False LCClassify.MaxProbability = 0.5 # add the moments EM_PROBABILITY, HAD_WEIGHT, OOC_WEIGHT, DM_WEIGHT to the AOD: LCClassify.StoreClassificationProbabilityInAOD = True LCClassify.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) LCWeight = CaloLCWeightTool("LCWeight") LCWeight.CorrectionKey = "H1ClusterCellWeights" LCWeight.SignalOverNoiseCut = 2.0 LCWeight.UseHadProbability = True LCOut = CaloLCOutOfClusterTool("LCOut") LCOut.CorrectionKey = "OOCCorrection" LCOut.UseEmProbability = False LCOut.UseHadProbability = True LCOutPi0 = CaloLCOutOfClusterTool("LCOutPi0") LCOutPi0.CorrectionKey = "OOCPi0Correction" LCOutPi0.UseEmProbability = True LCOutPi0.UseHadProbability = False #DMTool = DeadMaterialCorrectionTool2("DMTool") #DMTool.HadDMCoeffKey = "HadDMCoeff2" #DMTool.SignalOverNoiseCut = 1.0 #DMTool.ClusterRecoStatus = 0 #DMTool.WeightModeDM = 2 LCDeadMaterial = CaloLCDeadMaterialTool("LCDeadMaterial") LCDeadMaterial.HadDMCoeffKey = "HadDMCoeff2" LCDeadMaterial.ClusterRecoStatus = 0 LCDeadMaterial.WeightModeDM = 2 LCDeadMaterial.UseHadProbability = True LCDeadMaterial.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) # correction tools using tools LocalCalib = CaloClusterLocalCalib("LocalCalib") LocalCalib.ClusterClassificationTool = [LCClassify] #LocalCalib.ClusterRecoStatus = [2] LocalCalib.ClusterRecoStatus = [1, 2] LocalCalib.LocalCalibTools = [LCWeight] LocalCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) LocalCalib += LCClassify LocalCalib += LCWeight OOCCalib = CaloClusterLocalCalib("OOCCalib") #OOCCalib.ClusterRecoStatus = [2] OOCCalib.ClusterRecoStatus = [1, 2] OOCCalib.LocalCalibTools = [LCOut] OOCCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) OOCCalib += LCOut OOCPi0Calib = CaloClusterLocalCalib("OOCPi0Calib") #OOCPi0Calib.ClusterRecoStatus = [1] OOCPi0Calib.ClusterRecoStatus = [1, 2] OOCPi0Calib.LocalCalibTools = [LCOutPi0] OOCPi0Calib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) OOCPi0Calib += LCOutPi0 DMCalib = CaloClusterLocalCalib("DMCalib") DMCalib.ClusterRecoStatus = [1, 2] #DMCalib.LocalCalibToolNames = [DMTool.getFullName()] #DMCalib += DMTool DMCalib.LocalCalibTools = [LCDeadMaterial] DMCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) DMCalib += LCDeadMaterial # correction tools not using tools TopoMoments = CaloClusterMomentsMaker("TopoMoments") TopoMoments.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) TopoMoments.MaxAxisAngle = 20 * deg TopoMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise( ) TopoMoments.MinBadLArQuality = 4000 TopoMoments.MomentsNames = [ "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI", "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z", "CENTER_MAG", "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL", "FIRST_ENG_DENS", "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_FRAC_CORE", "FIRST_ENG_DENS", "SECOND_ENG_DENS", "ISOLATION", "ENG_BAD_CELLS", "N_BAD_CELLS", "N_BAD_CELLS_CORR", "BAD_CELLS_CORR_E", "BADLARQ_FRAC", "ENG_POS", "SIGNIFICANCE", "CELL_SIGNIFICANCE", "CELL_SIG_SAMPLING", "AVG_LAR_Q", "AVG_TILE_Q", "PTD", "MASS", "EM_PROBABILITY" ] doDigiTruthFlag = False try: from Digitization.DigitizationFlags import digitizationFlags doDigiTruthFlag = digitizationFlags.doDigiTruth() except Exception: log = logging.getLogger('CaloClusterTopoGetter') log.info( 'Unable to import DigitizationFlags in CaloClusterTopoGetter. Expected in AthenaP1' ) if doDigiTruthFlag: TopoMoments_Truth = CaloClusterMomentsMaker_DigiHSTruth( "TopoMoments_Truth") TopoMoments_Truth.LArHVFraction = LArHVFraction( HVScaleCorrKey="LArHVScaleCorr") TopoMoments_Truth.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) TopoMoments_Truth.MaxAxisAngle = 20 * deg TopoMoments_Truth.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise( ) TopoMoments_Truth.MinBadLArQuality = 4000 TopoMoments_Truth.MomentsNames = [ "FIRST_PHI_DigiHSTruth", "FIRST_ETA_DigiHSTruth", "SECOND_R_DigiHSTruth", "SECOND_LAMBDA_DigiHSTruth", "DELTA_PHI_DigiHSTruth", "DELTA_THETA_DigiHSTruth", "DELTA_ALPHA_DigiHSTruth", "CENTER_X_DigiHSTruth", "CENTER_Y_DigiHSTruth", "CENTER_Z_DigiHSTruth", "CENTER_MAG_DigiHSTruth", "CENTER_LAMBDA_DigiHSTruth", "LATERAL_DigiHSTruth", "LONGITUDINAL_DigiHSTruth", "ENG_FRAC_CORE_DigiHSTruth", "FIRST_ENG_DENS_DigiHSTruth", "SECOND_ENG_DENS_DigiHSTruth", "ISOLATION_DigiHSTruth", "BAD_CELLS_CORR_E_DigiHSTruth", "ENG_POS_DigiHSTruth", "SIGNIFICANCE_DigiHSTruth", "CELL_SIGNIFICANCE_DigiHSTruth", "CELL_SIG_SAMPLING_DigiHSTruth", "AVG_LAR_Q_DigiHSTruth", "AVG_TILE_Q_DigiHSTruth", "ENERGY_DigiHSTruth", "PHI_DigiHSTruth", "ETA_DigiHSTruth" ] # only add HV related moments if it is offline. from IOVDbSvc.CondDB import conddb if not conddb.isOnline: if globalflags.DataSource == "data": TopoMoments.LArHVFraction = LArHVFraction( HVScaleCorrKey="LArHVScaleCorrRecomputed") else: TopoMoments.LArHVFraction = LArHVFraction( HVScaleCorrKey="LArHVScaleCorr") TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS", "N_BAD_HV_CELLS"] # TopoMoments.AODMomentsNames = ["LATERAL" # ,"LONGITUDINAL" # ,"SECOND_R" # ,"SECOND_LAMBDA" # ,"CENTER_MAG" # ,"CENTER_LAMBDA" # ,"FIRST_ENG_DENS" # ,"ENG_FRAC_MAX" # ,"ISOLATION" # ,"ENG_BAD_CELLS" # ,"N_BAD_CELLS" # ,"BADLARQ_FRAC" # ,"ENG_POS" # ,"SIGNIFICANCE" # ,"CELL_SIGNIFICANCE" # ,"CELL_SIG_SAMPLING" # ,"AVG_LAR_Q" # ,"AVG_TILE_Q" # ] #if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables(): # LockVariables = CaloClusterLockVars("LockVariables") # LockVariables.FixBasicEnergy = True # LockVariables.LockedSamplingVariables = [] # if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies(): # LockVariables.LockedSamplingVariables += [ # "Energy", "Max_Energy"] # if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables(): # LockVariables.LockedSamplingVariables += [ # "Eta", "Phi", "Delta_Eta", # "Delta_Phi", "Max_Eta", "Max_Phi" # ] #if jobproperties.CaloTopoClusterFlags.printTopoClusters(): # PrintCaloCluster = CaloClusterPrinter("PrintCaloCluster") # PrintCaloCluster.PrintFirstOnly = True # PrintCaloCluster.PrintFrequency = 1 # PrintCaloCluster.EnergyUnit = 1.0*GeV theCaloClusterSnapshot = CaloClusterSnapshot( OutputName="CaloTopoCluster", SetCrossLinks=True) # maker tools TopoMaker = CaloTopoClusterMaker("TopoMaker") TopoMaker.CellsName = theCaloCellGetter.outputKey() TopoMaker.CalorimeterNames = ["LAREM", "LARHEC", "LARFCAL", "TILE"] # cells from the following samplings will be able to form # seeds. By default no sampling is excluded TopoMaker.SeedSamplingNames = [ "PreSamplerB", "EMB1", "EMB2", "EMB3", "PreSamplerE", "EME1", "EME2", "EME3", "HEC0", "HEC1", "HEC2", "HEC3", "TileBar0", "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2", "TileGap1", "TileGap2", "TileGap3", "FCAL0", "FCAL1", "FCAL2" ] TopoMaker.NeighborOption = "super3D" TopoMaker.RestrictHECIWandFCalNeighbors = False TopoMaker.RestrictPSNeighbors = True TopoMaker.CellThresholdOnEorAbsEinSigma = 0.0 TopoMaker.NeighborThresholdOnEorAbsEinSigma = 2.0 TopoMaker.SeedThresholdOnEorAbsEinSigma = 4.0 #timing TopoMaker.SeedCutsInT = jobproperties.CaloTopoClusterFlags.doTimeCut() # note E or AbsE # # the following property must be set to TRUE in order to make double # sided cuts on the seed and the cluster level # TopoMaker.SeedCutsInAbsE = True TopoMaker.ClusterEtorAbsEtCut = 0.0 * MeV # # note E or AbsE # # by default neighbor and cell thresholds are on AbsE. Set the following # properties to FALSE in order to switch to cuts on E # #TopoMaker.NeighborCutsInAbsE = False #TopoMaker.CellCutsInAbsE = False # the following Et thresholds are ignored in case UsePileUpNoise # is TRUE # # # CellThresholdOnAbsEt = 0.0*MeV # NeighborThresholdOnAbsEt = 100.0*MeV # SeedThresholdOnEtorAbsEt = 200.0*MeV # note Et or AbsEt # use 2-gaussian or single gaussian noise for TileCal TopoMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise( ) TopoSplitter = CaloTopoClusterSplitter("TopoSplitter") # cells from the following samplings will be able to form local # maxima. The excluded samplings are PreSamplerB, EMB1, # PreSamplerE, EME1, all Tile samplings, all HEC samplings and the # two rear FCal samplings. # TopoSplitter.SamplingNames = ["EMB2", "EMB3", "EME2", "EME3", "FCAL0"] # cells from the following samplings will also be able to form # local maxima but only if they are not overlapping in eta and phi # with local maxima in previous samplings from the primary list. # TopoSplitter.SecondarySamplingNames = [ "EMB1", "EME1", "TileBar0", "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2", "HEC0", "HEC1", "HEC2", "HEC3", "FCAL1", "FCAL2" ] TopoSplitter.ShareBorderCells = True TopoSplitter.RestrictHECIWandFCalNeighbors = False TopoSplitter.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute( ) # # the following options are not set, since these are the default # values # # NeighborOption = "super3D", # NumberOfCellsCut = 4, # EnergyCut = 500*MeV, # cluster maker CaloTopoCluster = CaloClusterMaker("CaloTopoCluster") if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib(): CaloTopoCluster.ClustersOutputName = "CaloCalTopoClusters" else: CaloTopoCluster.ClustersOutputName = "CaloTopoCluster" CaloTopoCluster.ClusterMakerTools = [TopoMaker, TopoSplitter] from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr BadChannelListCorr = CaloClusterBadChannelListCorr() CaloTopoCluster.ClusterCorrectionTools += [BadChannelListCorr] CaloTopoCluster.ClusterCorrectionTools += [TopoMoments] if doDigiTruthFlag: CaloTopoCluster.ClusterCorrectionTools += [TopoMoments_Truth] CaloTopoCluster += TopoMaker CaloTopoCluster += TopoSplitter CaloTopoCluster += BadChannelListCorr CaloTopoCluster += TopoMoments if doDigiTruthFlag: CaloTopoCluster += TopoMoments_Truth if jobproperties.CaloTopoClusterFlags.doClusterVertexFraction(): from CaloTrackUtils.CaloTrackUtilsConf import CaloClusterVertexFractionMaker MyCaloClusterVertexFractionMaker = CaloClusterVertexFractionMaker( name="CaloClusterVertexFractionMaker", VxContainerName="VxPrimaryCandidate", dRMatchMax=0.17) CaloTopoCluster.ClusterCorrectionTools += [ MyCaloClusterVertexFractionMaker ] CaloTopoCluster += MyCaloClusterVertexFractionMaker if jobproperties.CaloTopoClusterFlags.doCalibHitMoments( ) and rec.doTruth(): from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterMomentsMaker2 TopoCalibMoments = CaloCalibClusterMomentsMaker2( "TopoCalibMoments") TopoCalibMoments.MomentsNames = [ "ENG_CALIB_TOT", "ENG_CALIB_OUT_L" #,"ENG_CALIB_OUT_M" # ,"ENG_CALIB_OUT_T" # ,"ENG_CALIB_DEAD_L" # ,"ENG_CALIB_DEAD_M" # ,"ENG_CALIB_DEAD_T" , "ENG_CALIB_EMB0", "ENG_CALIB_EME0", "ENG_CALIB_TILEG3", "ENG_CALIB_DEAD_TOT", "ENG_CALIB_DEAD_EMB0", "ENG_CALIB_DEAD_TILE0", "ENG_CALIB_DEAD_TILEG3", "ENG_CALIB_DEAD_EME0", "ENG_CALIB_DEAD_HEC0", "ENG_CALIB_DEAD_FCAL", "ENG_CALIB_DEAD_LEAKAGE", "ENG_CALIB_DEAD_UNCLASS", "ENG_CALIB_FRAC_EM", "ENG_CALIB_FRAC_HAD", "ENG_CALIB_FRAC_REST" ] # TopoCalibMoments.AODMomentsNames = ["ENG_CALIB_TOT" # ,"ENG_CALIB_OUT_L" # #,"ENG_CALIB_OUT_M" # # ,"ENG_CALIB_OUT_T" # # ,"ENG_CALIB_DEAD_L" # # ,"ENG_CALIB_DEAD_M" # # ,"ENG_CALIB_DEAD_T" # ,"ENG_CALIB_EMB0" # ,"ENG_CALIB_EME0" # ,"ENG_CALIB_TILEG3" # ,"ENG_CALIB_DEAD_TOT" # ,"ENG_CALIB_DEAD_EMB0" # ,"ENG_CALIB_DEAD_TILE0" # ,"ENG_CALIB_DEAD_TILEG3" # ,"ENG_CALIB_DEAD_EME0" # ,"ENG_CALIB_DEAD_HEC0" # ,"ENG_CALIB_DEAD_FCAL" # ,"ENG_CALIB_DEAD_LEAKAGE" # ,"ENG_CALIB_DEAD_UNCLASS" # ,"ENG_CALIB_FRAC_EM" # ,"ENG_CALIB_FRAC_HAD" # ,"ENG_CALIB_FRAC_REST"] TopoCalibMoments.CalibrationHitContainerNames = [ "LArCalibrationHitInactive", "LArCalibrationHitActive", "TileCalibHitActiveCell", "TileCalibHitInactiveCell" ] TopoCalibMoments.DMCalibrationHitContainerNames = [ "LArCalibrationHitDeadMaterial", "TileCalibHitDeadMaterial" ] CaloTopoCluster.ClusterCorrectionTools += [TopoCalibMoments] CaloTopoCluster += TopoCalibMoments #if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables(): # CaloTopoCluster.ClusterCorrectionTools += [ # LockVariables.getFullName()] # CaloTopoCluster += LockVariables CaloTopoCluster.ClusterCorrectionTools += [theCaloClusterSnapshot] CaloTopoCluster += theCaloClusterSnapshot if jobproperties.CaloTopoClusterFlags.doCellWeightCalib(): CaloTopoCluster.ClusterCorrectionTools += [ CellWeights.getFullName() ] CaloTopoCluster += CellWeights if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib(): CaloTopoCluster.ClusterCorrectionTools += [ LocalCalib, OOCCalib, OOCPi0Calib, DMCalib ] CaloTopoCluster += LocalCalib CaloTopoCluster += OOCCalib CaloTopoCluster += OOCPi0Calib CaloTopoCluster += DMCalib # # pool/cool part # if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib(): from CaloRec import CaloClusterTopoCoolFolder # noqa: F401 if globalflags.DetDescrVersion().startswith("Rome"): CaloTopoCluster.LocalCalib.LCClassify.MaxProbability = 0.85 CaloTopoCluster.LocalCalib.LCClassify.UseNormalizedEnergyDensity = False else: CaloTopoCluster.LocalCalib.LCClassify.MaxProbability = 0.50 CaloTopoCluster.LocalCalib.LCClassify.UseNormalizedEnergyDensity = True self._handle = CaloTopoCluster objKeyStore.addManyTypesTransient(self.output()) # only write main object in AOD # 2014-01-15 W.L. Remove objs from output streams b/c of xAOD migration #objKeyStore.addStreamESD(self.outputType(),self.outputKey()) #objKeyStore.addStreamESD("CaloShowerContainer",self.outputKey()+"_Data") #objKeyStore.addStreamESD("CaloCellLinkContainer",self.outputKey()+"_Link") #objKeyStore.addStreamAOD(self.outputType(),self.outputKey()) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += CaloTopoCluster return True
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Setup of precision tracking from __future__ import print_function from AthenaCommon.Include import include include.block("InDetTrigRecExample/EFInDetConfig.py") from AthenaCommon.Logging import logging log = logging.getLogger("InDetPT") #Global keys/names for collections from .InDetTrigCollectionKeys import TrigTRTKeys, TrigPixelKeys # Start using already decided naming conventions # NB: this is only needed at the moment since the signature menu code is # inconcistent in what flags they pass the ID Trigger configuration # for the FTF And precision tracking. Once that is tidied up, this # should be removed def remapSuffix(signature): suffix_map = { 'electron': 'Electron', 'muon': 'Muon', 'muonFS': 'MuonFS', 'muonLate': 'MuonLate', 'muonIso': 'MuonIso', 'bjet': 'Bjet', 'tau': 'Tau',
from __future__ import print_function ############################################################### # # Skeleton top job options for NTUP->NTUP # # #============================================================== from AthenaCommon.Logging import logging msg = logging.getLogger('NTUP Reduction') msg.info('****************** STARTING NTUP Reduction *****************') include("RecJobTransforms/CommonRecoSkeletonJobOptions.py") ## Automatically turn ON/OFF and set output file name of each possible DPD listOfFlags = [] try: from PrimaryDPDMaker.PrimaryDPDFlags import primDPD listOfFlags.append(primDPD) except ImportError: print( "WARNING PrimaryDPDFlags not available. Only OK if you're using job transforms without the AtlasAnalysis project." ) try: from D2PDMaker.D2PDFlags import D2PDFlags listOfFlags.append(D2PDFlags) except ImportError: print( "WARNING D2PDFlags not available. Requires D2PDMaker-00-00-50 in AtlasAnalysis." )
############################################################### # Simple job options for bytestream merging # David Cote (DESY), November 2008 #============================================================== from AthenaCommon.Logging import logging recoLog = logging.getLogger('bs_to_bs') recoLog.info( '****************** STARTING BYTESTREAM MERGING *****************' ) include ("RecExCommon/RecoUsefulFlags.py") include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" ) svcMgr = theApp.serviceMgr() ByteStreamInputSvc = svcMgr.ByteStreamInputSvc ## max events theApp.EvtMax=-1 if hasattr(runArgs,"maxEvents"): theApp.EvtMax = runArgs.maxEvents ## Input if hasattr(runArgs,"inputBSFile"): ByteStreamInputSvc.FullFileName += runArgs.inputBSFile ## Pre-include if hasattr(runArgs,"preInclude"): for fragment in runArgs.preInclude: include(fragment) ## Pre-exec if hasattr(runArgs,"preExec"): recoLog.info("transform pre-exec")
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging log = logging.getLogger(__name__) from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, RecoFragmentsPool from DecisionHandling.DecisionHandlingConfig import ComboHypoCfg #---------------------------------------------------------------- # Base class to configure chain #---------------------------------------------------------------- class ChainConfigurationBase(object): def __init__(self, chainDict): # Consider using translation from dict["chainName"] to dict.chainName (less typing), # though need to be able to access list of dictionaries as value of chainPart as well # dict = type("dict", (object,), dict) self.dict = {} self.dict.update(chainDict) self.chainName = self.dict['chainName'] self.chainL1Item = self.dict['L1item'] # check dictionary contains only one chain part if len(self.dict['chainParts']) != 1: raise RuntimeError( "Passed chain dictionary with %i chainParts to ChainConfigurationBase, but this constructor only supports chains with a single part" % len(self.dict['chainParts']))
def setupMenu(): from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig from TriggerJobOpts.TriggerFlags import TriggerFlags from AthenaCommon.Logging import logging log = logging.getLogger( 'TriggerMenu.menu.LS1_v1.py' ) from TriggerMenu.TriggerConfigLVL1 import TriggerConfigLVL1 as tcl1 if tcl1.current: log.info("L1 items: %s" % tcl1.current.menu.items.itemNames()) else: log.info("ERROR L1 menu has not yet been defined") # INPUT FORMAT FOR CHAINS: # ['chainName', chainCounter, 'L1itemforchain', [L1 items for chainParts], [stream], [groups], EBstep] TriggerFlags.Slices_all_setOff() TriggerFlags.MuonSlice.signatures = [ ['mu4_cosmic_L1MU4_EMPTY', 743, 'L1_MU4_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_cosmic_L1MU11_EMPTY', 744, 'L1_MU11_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_msonly_cosmic_L1MU11_EMPTY', 724, 'L1_MU11_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_cosmicEF_L1MU4_EMPTY', 745, 'L1_MU4_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_cosmicEF_L1MU11_EMPTY', 746, 'L1_MU11_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_msonly_cosmicEF_L1MU11_EMPTY', 747, 'L1_MU11_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['mu4_msonly_cosmicEF_L1MU4_EMPTY', 748, 'L1_MU4_EMPTY', [], ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU4', 725, 'L1_MU4', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU10', 726, 'L1_MU10', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU11', 727, 'L1_MU11', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU4_EMPTY', 728, 'L1_MU4_EMPTY', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU10_EMPTY', 729, 'L1_MU10_EMPTY', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], #['mu4_cosmic_ds_L1MU11_EMPTY', 730, 'L1_MU11_EMPTY', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], ['mu4_cosmicEF_ds1_L1MU4', 725, 'L1_MU4', [], ['DataScouting_01_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], ['mu4_cosmicEF_ds2_L1MU4', 726, 'L1_MU4', [], ['DataScouting_01_CosmicMuons','DataScouting_02_CosmicMuons'], ["RATE:Cosmic_Muon_DS", "BW:Muon"], -1], ['mu0_muoncalib',727, 'L1_MU4',[],['Muon_Calibration'],["RATE:SingleMuon","BW:Muon"],-1], ] TriggerFlags.JetSlice.signatures = [ # Performance chains ['j0_perf_L1RD0_EMPTY', 116, 'L1_RD0_EMPTY',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['j0_perf_L1MU10', 117, 'L1_MU10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['j0_perf_L1J10', 118, 'L1_J10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['ht0_perf_L1J10', 119, 'L1_J10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], #['j_perf_lcw_L1RD0_EMPTY', 118,'L1_RD0_EMPTY',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], #['j_perf_lcw_L1MU10', 119, 'L1_MU10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['j0_perf_ds1_L1MU4', 998, 'L1_MU4', [], ['DataScouting_01_Jets'], ["RATE:Cosmic_Jets_DS", "BW:Jets"], -1], ['j0_perf_ds2_L1MU4', 999, 'L1_MU4', [], ['DataScouting_02_Jets'], ["RATE:Cosmic_Jets_DS", "BW:Jets"], -1], ] TriggerFlags.BjetSlice.signatures = [ ['j0_perf_bperf_L1RD0_EMPTY', 113, 'L1_RD0_EMPTY',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['j0_perf_bperf_L1MU10', 114, 'L1_MU10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ['j0_perf_bperf_L1J10', 115, 'L1_J10',[], ['Main'], ['RATE:SingleJet', 'BW:Jets'], -1], ] TriggerFlags.METSlice.signatures = [ ['xe20', 350, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe20_cell', 351, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe20_L2FS', 352, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], 1], ['xe20_tc_em', 353, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe20_pueta', 355, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe20_l2fsperf_wEFMuFEB_wEFMu', 356, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe25', 357, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe25_cell', 358, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe25_L2FS', 359, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], 1], ['xe25_tc_em', 360, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe25_pueta', 361, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe25_l2fsperf_wEFMuFEB_wEFMu', 362, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L1XE20', 363, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_cell_L1XE20', 364, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L2FS_L1XE20', 365, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], 1], ['xe0_tc_em_L1XE20', 366, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_pueta_L1XE20', 367, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_l2fsperf_wEFMuFEB_wEFMu_L1XE20', 368, 'L1_XE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L1XE25', 369, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_cell_L1XE25', 370, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L2FS_L1XE25', 371, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], 1], ['xe0_tc_em_L1XE25', 372, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_pueta_L1XE25', 373, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_l2fsperf_wEFMuFEB_wEFMu_L1XE25', 374, 'L1_XE25',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L1All', 375, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_cell_L1All', 376, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_L2FS_L1All', 377, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], 1], ['xe0_tc_em_L1All', 378, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_pueta_L1All', 379, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xe0_l2fsperf_wEFMuFEB_wEFMu_L1All', 380, 'L1_All',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xs30', 381, 'L1_XS30',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], #['xs35', 382, 'L1_XS35',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['xs30_cell', 383, 'L1_XS30',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], #['xs35_cell', 384, 'L1_XS35',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['te20', 385, 'L1_TE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['te300', 386, 'L1_TE300',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['te20_cell', 387, 'L1_TE20',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ['te300_cell', 388, 'L1_TE300',[], ['Main'], ['Rate:MET', 'BW:MET'], -1], ] TriggerFlags.TauSlice.signatures = [ ['tau8_cosmic_track', 620, 'L1_TAU8_EMPTY', [], ['Main'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau8_cosmic_ptonly', 621, 'L1_TAU8_EMPTY', [], ['Main'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau1_cosmic_track_L1MU4_EMPTY', 622, 'L1_MU4_EMPTY', [], ['Main'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau1_cosmic_ptonly_L1MU4_EMPTY', 623, 'L1_MU4_EMPTY', [], ['Main'], ['RATE:SingleTau', 'BW:Tau'], -1], ] TriggerFlags.EgammaSlice.signatures = [ ['e5_loose1', 130, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], -1], ['e5_lhloose', 300, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], 1], ['e5_etcut', 120, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], -1], ['e5_etcut_L1EM3_EMPTY', 121, 'L1_EM3_EMPTY', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], -1], ['g5_etcut', 122, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], -1], ['g5_etcut_L1EM3_EMPTY', 123, 'L1_EM3_EMPTY', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], -1], ['e0_perf_L1EM3', 124, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], 1], ['e0_L2Star_perf_L1EM3', 125, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], 1], ['g0_perf_L1EM3', 126, 'L1_EM3', [], ['Main'], ['RATE:SingleElectron', 'BW:Egamma'], 1], ] TriggerFlags.BphysicsSlice.signatures = [ ['2mu4_bDimu', 338, 'L1_2MU4', [], ['Main'], ['RATE:Bphysics_MultiMuon','BW:Bphys'], -1], ['2mu4_bDimu_novtx_noos', 339, 'L1_2MU4', [], ['Main'], ['RATE:Bphysics_MultiMuon','BW:Bphys'], -1], ['2mu6_bDimu', 340, 'L1_2MU6', [], ['Main'], ['RATE:Bphysics_MultiMuon','BW:Bphys'], -1], ['2mu6_bDimu_novtx_noos', 341, 'L1_2MU6', [], ['Main'], ['RATE:Bphysics_MultiMuon','BW:Bphys'], -1], ] TriggerFlags.CombinedSlice.signatures = [] TriggerFlags.MinBiasSlice.signatures = [ # LS1 chains ['mb_sptrk', 806, 'L1_RD0_FILLED', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_sptrk_noisesup', 807, 'L1_RD0_FILLED', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_sptrk_L1RD0_UNPAIRED_ISO', 808, 'L1_RD0_UNPAIRED_ISO', [], ['MinBias'], ["BW:MinBias", "RATE:SeededStreamers"], -1], ['mb_sptrk_L1RD0_EMPTY', 809, 'L1_RD0_EMPTY', [], ['MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ##['mb_sp2000_trk70_hmt', 810, 'L1_TE20', [], ['MinBias'], ["BW:MinBias", "RATE:HMT"], -1], #disabled for M4 see https://savannah.cern.ch/bugs/?104744 ['mb_perf_L1LUCID_UNPAIRED_ISO', 800, 'L1_LUCID_UNPAIRED_ISO', [], ['MinBias'], ["BW:MinBias", "RATE:SeededStreamers"], -1], ['mb_perf_L1LUCID_EMPTY', 801, 'L1_LUCID_EMPTY', [], ['MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['mb_perf_L1LUCID', 802, 'L1_LUCID', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_sptrk_costr', 836, 'L1_RD0_FILLED', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_sptrk_costr_L1RD0_EMPTY', 838, 'L1_RD0_EMPTY', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_perf_L1MBTS_2', 799, 'L1_MBTS_2', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['mb_mbts_L1MBTS_2', 803, 'L1_MBTS_2', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ] allL1TAUseeds = ",".join([ x for x in tcl1.current.menu.items.itemNames() if "TAU" in x ]) TriggerFlags.CalibSlice.signatures = [ ['l1calocalib', 6416, 'L1_RD0_FILLED', [], ['L1CaloCalib'], ["RATE:Calibration", "RATE:L1CaloCalib", "BW:Detector"], -1], ['l1calocalib_L1BGRP7', 6417, 'L1_BGRP7', [], ['L1CaloCalib'], ["RATE:Calibration", "RATE:L1CaloCalib", "BW:Detector"], -1], ['larcalib_L1EM3_EMPTY', 6418, 'L1_EM3_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['larcalib_L1TAU8_EMPTY', 6419, 'L1_TAU8_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['larcalib_L1J10_EMPTY', 6420, 'L1_J10_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['larcalib_L1FJ30_EMPTY', 6421, 'L1_FJ30_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], # DCM level monitoring chain for CSC (#104895, ATR-8082) ['larcalib_L1MU10', 6422, 'L1_MU10', [], ['CSC'], ["RATE:Monitoring", "BW:Detector"], -1], ['larcalib_L1EM3', 6423, 'L1_EM3', [], ['CSC'], ["RATE:Monitoring", "BW:Detector"], -1], ['larcalib_L1J10', 6424, 'L1_J10', [], ['CSC'], ["RATE:Monitoring", "BW:Detector"], -1], ['tilelarcalib_L1EM3_EMPTY', 6430, 'L1_EM3_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['tilelarcalib_L1TAU8_EMPTY', 6431, 'L1_TAU8_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['tilelarcalib_L1J10_EMPTY', 6432, 'L1_J10_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], ['tilelarcalib_L1FJ30_EMPTY', 6433, 'L1_FJ30_EMPTY', [], ['LArCellsEmpty'], ["RATE:Calibration", "BW:Detector"], -1], #ALFA ['alfa_alfacalib', 6685, 'L1_ALFA_EMPTY', [], ['ALFACalib'], [ 'RATE:ALFACalibration','BW:Detector'], -1], ] TriggerFlags.CosmicSlice.signatures = [ ['tilecalib_laser', 6500, 'L1_CALREQ2', [], ['Tile'], ["RATE:Calibration", "RATE:Cosmic_TileCalibration", "BW:Detector"], -1], ['pixel_noise', 6501, 'L1_RD0_EMPTY', [], ['PixelNoise'], ["RATE:Calibration", "RATE:PixelCalibration", "BW:Detector"], -1], ['pixel_beam', 6502, 'L1_RD0_FILLED', [], ['PixelBeam'], ["RATE:Calibration", "RATE:PixelBeamCalibration", "BW:Detector"], -1], ['sct_noise', 6503, 'L1_RD0_EMPTY', [], ['SCTNoise'], ["RATE:Calibration", "RATE:SCTCalibration", "BW:Detector"], -1], # CosmicCalo ['larps_L1EM3_EMPTY', 5060, 'L1_EM3_EMPTY', [], ['CosmicCalo'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1EM6_EMPTY', 5061, 'L1_EM6_EMPTY', [], ['CosmicCalo'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1J10_EMPTY', 5062, 'L1_J10_EMPTY', [], ['CosmicCalo'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1J30_EMPTY', 5063, 'L1_J30_EMPTY', [], ['CosmicCalo'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1TAU8_EMPTY', 5064, 'L1_TAU8_EMPTY', [], ['CosmicCalo'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1J10_FIRSTEMPTY', 5065, 'L1_J10_FIRSTEMPTY', [], ['LArCellsEmpty'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], ['larps_L1J30_FIRSTEMPTY', 5066, 'L1_J30_FIRSTEMPTY', [], ['LArCellsEmpty'], ['RATE:CosmicSlice', 'RATE:Cosmic_LArCalibration', 'BW:Detector'], -1], #CosmicID ['id_cosmic_L1MU4', 5041, 'L1_MU4', [], ['HLT_IDCosmic', 'express'], ['RATE:CosmicSlice', 'RATE:Cosmic_Tracking', 'BW:Detector'], -1], ['id_cosmic_L1MU11', 5040, 'L1_MU11', [],['HLT_IDCosmic', 'express'], ['RATE:CosmicSlice', 'RATE:Cosmic_Tracking', 'BW:Detector'], -1], ['id_cosmic', 5042, '', [], ['HLT_IDCosmic', 'express'], ['RATE:CosmicSlice', 'RATE:Cosmic_Tracking', 'BW:Detector'], -1], ['id_cosmic_trtxk', 5043, '', [], ['HLT_IDCosmic'], ['RATE:CosmicSlice', 'BW:Detector'], -1], ['id_cosmic_trtxk_central', 5044, '', [], ['HLT_IDCosmic'], ['RATE:CosmicSlice', 'BW:Detector'], -1], ['id_cosmic_ds', 5045, '', [], ['DataScouting_02_IDCosmic'], ['RATE:CosmicSlice_DS', 'RATE:Cosmic_Tracking_DS', 'BW:Detector'], -1], ] TriggerFlags.StreamingSlice.signatures = [ #DCM level monitoring test chain ['noalg_dcmmon_L1RD0_EMPTY', 6666, 'L1_RD0_EMPTY', [], ['express','monitoring_random'], [""], -1], #background streamers ['noalg_bkg_L1Bkg', 6550, 'L1_Bkg', [], ['Background'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_bkg_L1RD0_UNPAIRED_ISO', 6551, 'L1_RD0_UNPAIRED_ISO', [], ['Background'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_bkg_L1RD0_EMPTY', 6552, 'L1_RD0_EMPTY', [], ['express','Background'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_bkg_L1RD1_FILLED', 6549, 'L1_RD1_FILLED', [], ['Background'], ["RATE:SeededStreamers", "BW:Other"], -1], # standby streamer ['noalg_L1Standby', 6553, 'L1_Standby', [], ['Standby'], ["RATE:SeededStreamers", "BW:Other"], -1], # L1 streamers #disabled see #104204 ['noalg_L1Muon', 6554, 'L1_Muon', [], ['L1Muon'], ["RATE:SeededStreamers", "BW:Other"], -1], #disabled see #104204 ['noalg_L1Muon_EMPTY', 6557, 'L1_Muon_EMPTY', [], ['L1Muon'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_L1Calo', 6555, 'L1_Calo', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_L1MinBias', 6556, 'L1_MinBias', [], ['L1MinBias'], ["RATE:SeededStreamers", "BW:Other"], -1], ['noalg_L1Calo_EMPTY', 6558, 'L1_Calo_EMPTY', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1], # #['noalg_L1MinBias_EMPTY', 9559, 'L1_MinBias_EMPTY', [], ['L1MinBias'], [], -1], # #minbias streamer ['noalg_mb_L1MBTS_2', 804, 'L1_MBTS_2', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1], ['noalg_mb_L1MBTS_2_UNPAIRED_ISO', 805, 'L1_MBTS_2_UNPAIRED_ISO', [], ['MinBias'], ["BW:MinBias", "RATE:SeededStreamers"], -1], ['noalg_mb_L1RD0_EMPTY', 824, 'L1_RD0_EMPTY', [], ['express','MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['noalg_mb_L1RD0_FILLED', 825, 'L1_RD0_FILLED', [], ['MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['noalg_mb_L1RD0_UNPAIRED_ISO', 837, 'L1_RD0_UNPAIRED_ISO', [], ['MinBias'], ["BW:Unpaired_Minbias", "RATE:Cosmic_Minbias"], -1], ['noalg_mb_L1RD1_EMPTY', 829, 'L1_RD1_EMPTY', [], ['MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['noalg_mb_L1RD1_FILLED', 830, 'L1_RD1_FILLED', [], ['MinBias'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], # L1 seed doesn't exits ['noalg_mb_L1RD1_UNPAIRED_ISO', 831, 'L1_RD1_UNPAIRED_ISO', [], ['MinBias'], ["BW:Unpaired_Minbias", "RATE:Cosmic_Minbias"], -1], # id cosmic streamer ['noalg_idcosmic_L1TRT', 828, 'L1_TRT', [], ['IDCosmic'], ["BW:MinBias", "RATE:Minbias"], -1], # Cosmic calo streamer ['noalg_cosmiccalo_L1EM3_EMPTY', 1826, 'L1_EM3_EMPTY', [], ['CosmicCalo'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['noalg_cosmiccalo_L1RD1_EMPTY', 826, 'L1_RD1_EMPTY', [], ['CosmicCalo'], ["BW:MinBias", "RATE:Cosmic_Minbias"], -1], ['noalg_cosmiccalo_L1FJ30_EMPTY', 841, 'L1_FJ30_EMPTY', [], ['CosmicCalo'], ["BW:Jets", "RATE:SingleJet"], -1], ['noalg_cosmiccalo_L1J10_EMPTY', 842, 'L1_J10_EMPTY', [], ['CosmicCalo', 'express'], ["BW:Jets", "RATE:SingleJet"], -1], ['noalg_cosmiccalo_L1J30_EMPTY', 843, 'L1_J30_EMPTY', [], ['CosmicCalo', 'express'], ["BW:Jets", "RATE:SingleJet"], -1], ['noalg_cosmiccalo_L1J10_FIRSTEMPTY', 844, 'L1_J10_FIRSTEMPTY', [], ['CosmicCalo', 'express'], ["BW:Jets", "RATE:SingleJet"], -1], ['noalg_cosmiccalo_L1J30_FIRSTEMPTY', 845, 'L1_J30_FIRSTEMPTY', [], ['CosmicCalo', 'express'], ["BW:Jets", "RATE:SingleJet"], -1], #HLT pass through ['noalg_L1All', 834, 'L1_All', [], ['HLTPassthrough'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_L1J10', 835, 'L1_J10', [], ['HLTPassthrough'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_L1TAU8', 868, 'L1_TAU8', [], ['HLTPassthrough'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_L1EM3', 6559,'L1_EM3', [], ['HLTPassthrough'], ["Supporting", "Calibration", "BW:Detector"], -1], # jettauetmiss streamer ['noalg_jettauetmiss_L1RD0_FIRSTEMPTY', 840, 'L1_RD0_FIRSTEMPTY', [], ['Main'], ["Supporting", "Calibration", "BW:Detector"], -1], # Enhanced bias item ['noalg_eb_L1BGRP7', 846, 'L1_BGRP7', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_eb_L1RD1_FILLED', 7000, 'L1_RD1_FILLED', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_eb_L1RD0_EMPTY', 7001, 'L1_RD0_EMPTY', [], ['EnhancedBias', 'express'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_eb_L1RD0_FIRSTEMPTY', 7002, 'L1_RD0_FIRSTEMPTY', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_eb_L1RD0_UNPAIRED_ISO', 7003, 'L1_RD0_UNPAIRED_ISO', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['noalg_eb_L1Physics_noPS' , 7004, 'L1_Physics_noPS', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], #idmon streamer ['noalg_idmon_L1RD0_EMPTY', 777, 'L1_RD0_EMPTY', [], ['express','IDMonitoring'], ["RATE:DISCARD","BW:DISCARD"], -1], ['noalg_idmon_L1RD0_FILLED', 778, 'L1_RD0_FILLED', [], ['IDMonitoring'], ["RATE:DISCARD","BW:DISCARD"], -1], ['noalg_idmon_L1RD0_UNPAIRED_ISO', 779, 'L1_RD0_UNPAIRED_ISO', [], ['IDMonitoring'], ["RATE:DISCARD","BW:DISCARD"], -1], #cosmicmuon streamer ['noalg_cosmicmuons_L1MU4_EMPTY', 128, 'L1_MU4_EMPTY', [], ['express','CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ['noalg_cosmicmuons_L1MU11_EMPTY', 129, 'L1_MU11_EMPTY', [], ['express','CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1], ] TriggerFlags.MonitorSlice.signatures = [ # # enhancedbias ['timeburner', 6010, '', [], ['DISCARD'], ["RATE:DISCARD","BW:DISCARD"], -1], ['robrequest', 6011, '', [], ['DISCARD'], ["RATE:DISCARD","BW:DISCARD"], -1], ['robrequest_L1RD0_EMPTY', 6012, 'L1_RD0_EMPTY', [], ['DISCARD'], ["RATE:DISCARD","BW:DISCARD"], -1], ['costmonitor', 6013, '', [], ['CostMonitoring'], ['Supporting','Calibration','BW:Other'],1], #['idmon_trkFS_L14J15', 5514, 'L1_4J15', [], ['Main'], ['RATE:InDetTracking', 'BW:Detector'], -1], ] #TriggerFlags.GenericSlice.signatures = [] TriggerFlags.BeamspotSlice.signatures = [ ##['beamspot_vtx_trkFS_L2StarB', 7000, 'L1_4J15', [], ['beamspot'], ["BW:Detector"], -1], ##['beamspot_vtx_activeTE_L2StarB_peb', 7001, 'L1_4J15', [], ['beamspot'], ["BW:Detector"], -1], ##['beamspot_vtx_allTE_L2StarB_peb', 7002, 'L1_4J15', [], ['beamspot'], ["BW:Detector"], -1], ] TriggerFlags.EnhancedBiasSlice.signatures = [ #['eb_physics_L1RD1_FILLED', 7002, 'L1_RD1_FILLED', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['eb_low_L1RD0_FILLED', 7010, 'L1_RD0_FILLED', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['eb_high_L1RD0_FILLED', 7014, 'L1_RD0_FILLED', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['eb_empty_L1RD0_EMPTY', 7011, 'L1_RD0_EMPTY', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['eb_firstempty_L1RD0_FIRSTEMPTY', 7012, 'L1_RD0_FIRSTEMPTY', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ['eb_unpairediso_L1RD0_UNPAIRED_ISO', 7013, 'L1_RD0_UNPAIRED_ISO', [], ['EnhancedBias'], ["Supporting", "Calibration", "BW:Detector"], -1], ]
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import CAMenuSequence, ChainStep, Chain, getChainStepName, createStepView from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from TrigL2MuonSA.TrigL2MuonSAConfig_newJO import l2MuFastAlgCfg, l2MuFastHypoCfg from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMufastHypoToolFromDict, TrigMuonEFMSonlyHypoToolFromDict from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDict from AthenaConfiguration.ComponentFactory import CompFactory import pprint from AthenaCommon.Logging import logging log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Muon.generateMuon' ) def fakeHypoAlgCfg(flags, name="FakeHypoForMuon"): HLTTest__TestHypoAlg=CompFactory.HLTTest.TestHypoAlg return HLTTest__TestHypoAlg( name, Input="" ) def EFMuonViewDataVerifierCfg(): EFMuonViewDataVerifier = CompFactory.AthViews.ViewDataVerifier("VDVEFMuon") EFMuonViewDataVerifier.DataObjects = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ), ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ), ( 'Muon::TgcPrepDataContainer' , 'StoreGateSvc+TGC_Measurements' ), ( 'Muon::RpcPrepDataContainer' , 'StoreGateSvc+RPC_Measurements' ), ( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ), ( 'Muon::CscPrepDataContainer' , 'StoreGateSvc+CSC_Clusters' ), ( 'Trk::SolenoidParametrization' , 'ConditionStore+SolenoidParametrization' ) #TODO schedule the correct condAlg to produce this ] result = ComponentAccumulator()
mergedJet_ptCut = jobproperties.HSG2.llqqMergedJetPtCut() e_qual = jobproperties.HSG2.llqqElectronQual() mu_qual = jobproperties.HSG2.llqqMuonQual() calo_qual = jobproperties.HSG2.llqqCaloMuonQual() jet_qual = jobproperties.HSG2.llqqJetQual() mergedJet_qual = jobproperties.HSG2.llqqMergedJetQual() e_coll = jobproperties.HSG2.llqqElectronCollection() staco_coll = jobproperties.HSG2.llqqStacoMuonCollection() muons_coll = jobproperties.HSG2.llqqMuonsCollection() calo_coll = jobproperties.HSG2.llqqCaloMuonCollection() jet_coll = jobproperties.HSG2.llqqJetCollection() diLeptonMassCut = jobproperties.HSG2.llqqDiLeptonMassCut() electronJetDRCut = jobproperties.HSG2.llqqElectronJetDRCut() from AthenaCommon.Logging import logging msg = logging.getLogger( "NTUP_2L2QHSG2_Filter" ) # AthElectronLikelihoodTool with PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/data/ElectronLikelihoodPdfs.root # and LikeEnum::Loose by following https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/HiggsZZllllSummer2013#More_information import ROOT import PyCintex PyCintex.loadDict('libElectronPhotonSelectorToolsDict') from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "AthElectronLikelihoodTool_VeryLoose"): from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AthElectronLikelihoodTool ToolSvc += AthElectronLikelihoodTool( "AthElectronLikelihoodTool_VeryLoose", inputPDFFileName = "ElectronPhotonSelectorTools/ElectronLikelihoodPdfs.root", cutLikelihoodEnum = ROOT.LikeEnum.VeryLoose, useUserData = False , forceRecalculateImpactParameter = True) msg.info("AthElectronLikelihoodTool/AthElectronLikelihoodTool_VeryLoose is added")
## Created: February 2013 ##=================================== __doc__ = "Perform the HSG1 preselection." __author__ = "James Saxon" #if this file is already inlcuded, don't include it again include.block("DAOD_HSG1.py") from AthenaCommon.AlgSequence import AlgSequence import AthenaPython.PyAthena as PyAthena from AthenaPython.PyAthena import StatusCode ## for messaging from AthenaCommon.Logging import logging DAOD_EGammaStream_msg = logging.getLogger('DAOD_EGammaStream') ## Import the module that allows to use named units, e.g. GeV import AthenaCommon.SystemOfUnits as Units ## Include the job property flags for this package and from RecExCommon from PrimaryDPDMaker.PrimaryDPDFlags import primDPD from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName ## This handles multiple output streams from OutputStreamAthenaPool.MultipleStreamManager import MSMgr ##==================================================================== ## Define the skimming (event selection) for the ZEEPHO DAOD output stream ##==================================================================== from PrimaryDPDMaker.TriggerFilter import TriggerFilter
def __init__( self, name, seq = topSequence, tuplename = None, preD3PDAlgSeqName = D3PDMakerFlags.PreD3PDAlgSeqName(), orig_stream = None, **kwargs ): self.__orig_stream = orig_stream self.__logger = logging.getLogger( "A4DumpAlg" ) # Work around initialization order issue. seq.__iadd__( D3PDMakerCoreComps.DummyInitAlg( name + 'DummyInit' ), index = 0 ) # tuple name defaults to the algorithm name. if tuplename == None: tuplename = name # Create the algorithm Configurable. D3PD__A4DumpAlg.__init__ ( self, name, TupleName = tuplename, **kwargs ) # Add to the supplied sequence. if seq: # But first, add a sequence for algorithms that should run # before D3PD making, if it's not already there. preseq = AlgSequence( preD3PDAlgSeqName ) if not hasattr( seq, preD3PDAlgSeqName ): seq += [ preseq ] # We don't want to do filtering in the presequence. preseq.StopOverride = True # Now set up another sequence for filtering. # Unlike the presequence, there should be a unique one of these # per algorithm. We also need to break out an additional # sequence to which users can add, and to wrap the whole # thing in a sequence to prevent a failed filter # decision from stopping other algorithms. # Like this: # # ALG_FilterAlgorithmsWrap (StopOverride = True) # ALG_FilterAlgorithmsHolder # ALG_FilterAlgorithms # ALG # Dummy alg, to reset filter flag suffix = D3PDMakerFlags.FilterAlgSeqSuffix() wrap = AlgSequence( name + suffix + 'Wrap', StopOverride = True ) holder = AlgSequence( name + suffix + 'Holder' ) self.filterSeq = AlgSequence( name + suffix ) holder += self.filterSeq holder += self wrap += holder wrap += PyAthena.Alg( name + 'Dummy' ) seq += wrap # Create a unique collection getter registry tool for this tree. from AthenaCommon.AppMgr import ToolSvc self._registry = \ D3PDMakerCoreComps.CollectionGetterRegistryTool (self.name() + '_CollectionGetterRegistry') ToolSvc += self._registry return
# File: AthenaCommon/python/Help.py # Author: Wim Lavrijsen ([email protected]) """Basic end-user help.""" from __future__ import print_function import os from AthenaCommon.Logging import logging ### data --------------------------------------------------------------------- __version__ = '1.0.0' __author__ = 'Wim Lavrijsen ([email protected])' __all__ = ['help'] log = logging.getLogger("AthenaHelp") log.setLevel(logging.INFO) ### help text ---------------------------------------------------------------- class Topic: def __init__(self, id, title, text, web, action=None, super=None): self.id = id self.title = title self.text = text self.web = web self.action = action if not super and id: global book book.sub.append(self) self.super = book
from AthenaCommon.SystemOfUnits import * from AthenaCommon.Logging import logging from JetRec.JetRecConf import FastJetInterfaceTool _fastjetLog = logging.getLogger("FastJetInterfaceConfiguration") # set up some enumerator values def enums(name='Enum',**enums): return type( name, (), enums) # recognized keys fastjet_conf_tags = enums('FastJetConfTags', Strategy=[ 'default', 'Best', 'N2MinHeapTiled','N2Tiled', 'N2PoorTiled', 'N2Plain', 'N3Dumb', 'NlnN', 'NlnN3pi', 'NlnN4pi', 'NlnNCam4pi', 'NlnNCam2pi2R', 'NlNCam', 'plugin_strategy' ], RecombScheme = [ 'default', 'E', 'pt', 'pt2', 'Et', 'Et2', 'BIpt', 'BIpt2' ], Algorithm = [ 'default', 'kt', 'Kt', 'anti-kt', 'AntiKt', 'cambridge', 'CamKt', 'genkt', 'passive cambridge', 'passive genkt', 'CMSCone', 'SISCone'], JetAreaMethod = [ 'default', 'VoronoiArea', 'ActiveArea', 'ActiveAreaExplicitGhost', 'PassiveArea', '1GhostPassiveArea' ], SISSplitMergeScale = [ 'default', 'pttilde', 'PtTilde', 'Pt', 'Et', 'mt' ], ) # Ghosted area parameters fastjet_gas = enums('FastJetGhostAreaSettings', def_ghost_maxrap = 6.0, #fastjet::gas::def_ghost_maxrap
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from .l1topo.L1TopoMenu import L1TopoMenu from .l1topo.L1TopoFlags import L1TopoFlags from AthenaCommon.Logging import logging log = logging.getLogger("TriggerConfigL1Topo") class TriggerConfigL1Topo: def __init__(self, outputFile=None, inputFile=None, menuName=None): """ inputFile: if set the topo menu will be read from this xml file (not yet implemented) outputFile: if no input file is specified the topo menu will be generated and written to outputFile menuName: ignored now """ from TriggerJobOpts.TriggerFlags import TriggerFlags self.menuName = TriggerConfigL1Topo.getMenuBaseName( TriggerFlags.triggerMenuSetup()) self.inputFile = inputFile self.outputFile = outputFile # all registered algos self.registeredAlgos = {} self.runningid = 0
muonQualityCuts_tp=jobproperties.HSG2.tagAndProbeMuQual() mixMuonQualityCuts_tp=[jobproperties.HSG2.tagAndProbeMixQual()[1],jobproperties.HSG2.tagAndProbeMixQual()[1]] electronEtCuts_tp=jobproperties.HSG2.tagAndProbeEPtCuts() muonPtCuts_tp=jobproperties.HSG2.tagAndProbeMuPtCuts() mixMuonPtCuts_tp=[jobproperties.HSG2.tagAndProbeMixPtCuts()[0],jobproperties.HSG2.tagAndProbeMixPtCuts()[1]] mixMuonPtCuts_REVESE_tp=[jobproperties.HSG2.tagAndProbeMixPtCuts()[1],jobproperties.HSG2.tagAndProbeMixPtCuts()[0]] massCut_tp=jobproperties.HSG2.tagAndProbeMassCut() acceptFrwdE_tp=jobproperties.HSG2.tagAndProbeAcceptFrwdE() checkLArError=jobproperties.HSG2.tagAndProbeCheckLArError() from AthenaCommon.Logging import logging msg = logging.getLogger( "HSG2TPFilters" ) # Trigger filters include("PrimaryDPDMaker/SetupTrigDecisionTool.py") from PrimaryDPDMaker.TriggerFilter import TriggerFilter el_trigsList=[] for iTrigger in range(len(jobproperties.HSG2.tagAndProbeElectronTriggers())): triggerItem = jobproperties.HSG2.tagAndProbeElectronTriggers()[iTrigger] filterName = "TriggerFilter_"+triggerItem theJob += TriggerFilter(filterName, trigger = triggerItem) el_trigsList.append(filterName) mu_trigsList=[] for iTrigger in range(len(jobproperties.HSG2.tagAndProbeMuonTriggers())):
############################################################### # # Job options file : TileSamplingFraction # Choose sampling fraction according to physics list # #============================================================== from AthenaCommon.Logging import logging msg = logging.getLogger('TileSamplingFraction_jobOptions.py') from TileConditions.TileInfoConfigurator import TileInfoConfigurator tileInfoConfigurator = TileInfoConfigurator() try: from Digitization.DigitizationFlags import jobproperties physicsList = jobproperties.Digitization.physicsList() G4Ver = jobproperties.Digitization.SimG4VersionUsed() G4Ve = G4Ver.split(".") G4V = int(G4Ve[1]) + int(G4Ve[2]) / 100. #default value corresponds to new multiple scatering #EmScaleA = 34.3 #default value since May-2011 EmScaleA = 34.0 #default value for G4 9.6 since Nov-2013 (need to check G4 version as well) if physicsList == 'FTFP_BERT' or (physicsList == 'QGSP_BERT' and G4V > 9.05999): EmScaleA = 33.9
"keystore_diff" ] import weakref import os import copy import types import re _allowedTriggerKeys = re.compile( r"(?P<KlassName>.*?)#HLTAutoKey.*\*$" ) ### Configurable code we can recycle from Configurable import Configurable ### logging from AthenaCommon.Logging import logging msg = logging.getLogger( 'CfgItemList' ) class CfgItemList( object ): """ Python class to hold the so-called output ItemList of a given JobOption. This class allows to fine tune what will be written out in a POOL file, as it has a switch to prevent people from wildcarding containers (ie: no outStream.ItemList += [ 'SomeContainer#*' ] allowed). This check can however be disabled on a per CfgItemList instance basis: @code >>> mycfg = CfgItemList( allowWildcard = True ) @endcode A typical use would look like: @code esdList = CfgItemList( 'esd' ) # fetch an already existing list (using the singleton-ness of Configurables)
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging logAODFix_r210 = logging.getLogger( 'AODFix_r210' ) from AODFix_base import AODFix_base class AODFix_r210(AODFix_base): ''' This class just performs AODFix on 21.0.X releases Instance variables addMetadata (bool) (inherited): whether to add metaData doAODFix (bool) (inherited): whether to do AODFix prevAODFix (string): previous AODFix applied newAODFix (string): new AODFix to apply isMC (bool): is the input data MC? ''' @staticmethod def latestAODFixVersion(): """The latest version of the AODFix. Moving to new AODFix version scheme""" metadataList = [item.split("_")[0] for item in sorted(AODFix_r210.__dict__.keys()) if ("_" in item and "__" not in item)] return metadataList def postSystemRec(self):