fast_chain_log.warning( 'Could not add TimingAlg, no timing info will be written out.') from ISF_Config.ISF_jobProperties import ISF_Flags if hasattr(runArgs, 'simulator'): ISF_Flags.Simulator = runArgs.simulator else: ISF_Flags.Simulator = 'MC12G4' #### *********** import ISF_Example code here **************** #### include("ISF_Config/ISF_ConfigJobInclude.py") ## check to see if pileup emulation is being used, if so do post-ISF-config ## actions to enable simulation of pileup collection if 'AthSequencer/EvgenGenSeq' in topSeq.getSequence(): fast_chain_log.info("Pileup emulation enabled - setup GenEventStackFiller") include("FastChainPileup/FastPileupSimConfig.py") ## Add AMITag MetaData to TagInfoMgr if hasattr(runArgs, 'AMITag'): if runArgs.AMITag != "NONE": from AthenaCommon.AppMgr import ServiceMgr as svcMgr svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"AMITag": runArgs.AMITag}) ### Changing to post-sim include/exec ## Post-include if hasattr(runArgs, "postSimInclude"): for fragment in runArgs.postSimInclude: include(fragment)
def configure(self): from AthenaCommon.Logging import logging mlog = logging.getLogger('CaloCellGetter::configure:') mlog.info('entering') doStandardCellReconstruction = True from CaloRec.CaloCellFlags import jobproperties if not jobproperties.CaloCellFlags.doFastCaloSim.statusOn: doFastCaloSim = False mlog.info("doFastCaloSim not set, so not using it") else: doFastCaloSim = jobproperties.CaloCellFlags.doFastCaloSim() if doFastCaloSim: mlog.info("doFastCaloSim requested") doStandardCellReconstruction = False if jobproperties.CaloCellFlags.doFastCaloSimAddCells(): doStandardCellReconstruction = True mlog.info( "doFastCaloSimAddCells requested: FastCaloSim is added to fullsim calorimeter" ) else: mlog.info( "doFastCaloSimAddCells not requested: Stand alone FastCaloSim is running" ) else: mlog.info("doFastCaloSim explicitly not requested") # now configure the algorithm, part of this could be done in a separate class # cannot have same name try: from CaloRec.CaloRecConf import CaloCellMaker except: mlog.error("could not import CaloRec.CaloCellMaker") print traceback.format_exc() return False theCaloCellMaker = CaloCellMaker("FastCaloCellMaker") self._CaloCellMakerHandle = theCaloCellMaker from AthenaCommon.AppMgr import ToolSvc if doFastCaloSim: mlog.info('configuring FastCaloSim here') try: from FastCaloSim.FastCaloSimConf import EmptyCellBuilderTool theEmptyCellBuilderTool = EmptyCellBuilderTool() ToolSvc += theEmptyCellBuilderTool theCaloCellMaker.CaloCellMakerToolNames += [ theEmptyCellBuilderTool ] print theEmptyCellBuilderTool mlog.info("configure EmptyCellBuilderTool worked") except: mlog.error("could not get handle to EmptyCellBuilderTool Quit") print traceback.format_exc() return False try: #if True : from FastCaloSim.FastCaloSimFactory import FastCaloSimFactory theFastShowerCellBuilderTool = FastCaloSimFactory() ToolSvc += theFastShowerCellBuilderTool theCaloCellMaker.CaloCellMakerToolNames += [ theFastShowerCellBuilderTool ] mlog.info("configure FastShowerCellBuilderTool worked") except: mlog.error( "could not get handle to FastShowerCellBuilderTool Quit") print traceback.format_exc() return False # # CaloCellContainerFinalizerTool : closng conainer and seting up iterators # from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool theCaloCellContainerFinalizerTool = CaloCellContainerFinalizerTool() ToolSvc += theCaloCellContainerFinalizerTool theCaloCellMaker.CaloCellMakerToolNames += [ theCaloCellContainerFinalizerTool ] # make lots of checks (should not be necessary eventually) # to print the check add: from CaloRec.CaloRecConf import CaloCellContainerCheckerTool theCaloCellContainerCheckerTool = CaloCellContainerCheckerTool() # FIXME # theCaloCellContainerCheckerTool.OutputLevel=DEBUG ToolSvc += theCaloCellContainerCheckerTool theCaloCellMaker.CaloCellMakerToolNames += [ theCaloCellContainerCheckerTool ] # # sets output key theCaloCellMaker.CaloCellsOutputName = self.outputKey() # # register output in objKeyStore # from RecExConfig.ObjKeyStore import objKeyStore # # objKeyStore.addStreamESD(self.outputType(),self.outputKey()) # now add algorithm to topSequence # should go just before FastHitConv in topSequence mlog.info(" now adding CaloCellMaker to topSequence") from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() list = topSequence.getSequence() print list print "FastHitConv position = " + str( list.index('FastHitConv/theFastHitConv')) topSequence.insert(list.index('FastHitConv/theFastHitConv'), theCaloCellMaker) return True
from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.AppMgr import ServiceMgr # Add top algorithms to be run from FastCaloSimHit.FastCaloSimHitConf import FastHitConv theFastHitConv = FastHitConv("theFastHitConv") from AthenaCommon.DetFlags import DetFlags list = topSequence.getSequence() topSequence.insert(list.index('LArDigitMaker/digitmaker1'), theFastHitConv) # put FastHitConv right before # CaloDigi in topSequence job.theFastHitConv.OutputLevel = ALL job.OutputLevel = INFO from AthenaCommon.DetFlags import DetFlags if DetFlags.pileup.LAr_on() or DetFlags.pileup.Tile_on(): job.theFastHitConv.doPileup = True else: job.theFastHitConv.doPileup = False print topSequence