def CaloLumiBCIDToolDefault(name='CaloLumiBCIDToolDefault'): mlog = logging.getLogger('CaloLumiBCIDToolDefault') from CaloTools.CaloToolsConf import CaloLumiBCIDTool from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() == 'data': from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault theLumiTool = LuminosityToolDefault() from AthenaCommon.AppMgr import ToolSvc ToolSvc += theLumiTool from IOVDbSvc.CondDB import conddb #conddb.addFolder("","/LAR/ElecCalibOfl/LArPileupShape<db>sqlite://;schema=/afs/cern.ch/user/g/gunal/public/DB/bcid/shape.db;dbname=COMP200</db><key>LArShape32</key><tag>LARElecCalibOflLArPileupShape-mc</tag>") #conddb.addFolder("","/LAR/ElecCalibOfl/LArPileupAverage<db>sqlite://;schema=/afs/cern.ch/user/g/gunal/public/DB/bcid/LArPileupAverage-data.db;dbname=COMP200</db><tag>LARElecCalibOflLArPileupAverage-data11-00</tag>") if athenaCommonFlags.isOnline: conddb.addFolder( "LAR_ONL", "/LAR/LArPileup/LArPileupShape<key>LArShape32</key>") conddb.addFolder("LAR_ONL", "/LAR/LArPileup/LArPileupAverage") else: conddb.addFolder( "LAR_OFL", "/LAR/ElecCalibOfl/LArPileupShape<key>LArShape32</key>") conddb.addFolder("LAR_OFL", "/LAR/ElecCalibOfl/LArPileupAverage") theTool = CaloLumiBCIDTool(name, isMC=False, LumiTool=theLumiTool, keyShape="LArShape32") else: from LArRecUtils.LArOFCToolDefault import LArOFCToolDefault theOFCTool = LArOFCToolDefault() from AthenaCommon.AppMgr import ToolSvc ToolSvc += theOFCTool from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool theBunchCrossingTool = BunchCrossingTool() from IOVDbSvc.CondDB import conddb conddb.addFolder("LAR_OFL", "/LAR/ElecCalibMC/Shape") #conddb.addFolder("","/LAR/ElecCalibMC/LArPileupAverage<db>sqlite://;schema=/afs/cern.ch/user/g/gunal/public/DB/bcid/LArPileupAverage-mc.db;dbname=OFLP200</db><tag>LARElecCalibMCLArPileupAverage-mc11b-00</tag>") conddb.addFolder("LAR_OFL", "/LAR/ElecCalibMC/LArPileupAverage") theTool = CaloLumiBCIDTool(name, isMC=True, LArOFCTool=theOFCTool, BunchCrossingTool=theBunchCrossingTool) return theTool
def pileup_preInclude(self): """ This fixes the problem with the in-time pileup number in xAOD::EventInfo, as described in: https://its.cern.ch/jira/browse/ATLASRECTS-3204 Incremented version to r207v4. """ # Tell the user what's happening: logAODFix_r207.debug("Executing AODFix_r207_pileup_preInclude") # This fix is only needed for 20.7 data files made from data15, # without this fix. from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() != "data": return from RecExConfig.RecFlags import rec if rec.projectName() != "data15_13TeV": return # Access the main algorithm sequence: from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() # Make sure that the LuminosityTool is configured. This needs at # least LumiBlockComps-01-00-27 to work correctly. from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "LuminosityTool"): from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault ToolSvc += LuminosityToolDefault() pass # Set up the xAOD::EventInfo creator algorithm to overwrite the # existing object. This needs at least xAODEventInfoCnv-00-00-17-01, # or xAODEventInfoCnv-00-00-23. from AthenaCommon import CfgMgr topSequence += \ CfgMgr.xAODMaker__EventInfoCnvAlg( "AODFix_EventInfoCnvAlg", ForceOverwrite = True ) return
include("AthenaMonitoring/TrigDecTool_jobOptions.py") # don't set up lumi access if in MC or enableLumiAccess == False if globalflags.DataSource.get_Value( ) != 'geant4' and DQMonFlags.enableLumiAccess(): if not hasattr(ToolSvc, "LuminosityTool"): if athenaCommonFlags.isOnline: local_logger.debug( "luminosity tool not found, importing online version") from LumiBlockComps.LuminosityToolDefault import LuminosityToolOnline ToolSvc += LuminosityToolOnline() else: local_logger.debug( "luminosity tool not found, importing offline version") from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault ToolSvc += LuminosityToolDefault() if not hasattr(ToolSvc, "TrigLivefractionTool"): local_logger.debug("live fraction tool not found, importing") from LumiBlockComps.TrigLivefractionToolDefault import TrigLivefractionToolDefault ToolSvc += TrigLivefractionToolDefault() include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py") include("AthenaMonitoring/FilledBunchFilterTool_jobOptions.py") # Ugly hack to get list of tools in job at this point # We will compare the list at the end of the script to get the monitoring # tools monToolSet_before = set(ToolSvc.getChildren()) #---------------------------#
rec.doWriteAOD = False rec.doWriteTAG = False rec.doDPD = False rec.doAOD = True #rec.doDPD = True rec.doFileMetaData = True # Output log setting OutputLevel = INFO # main jobOption - must always be included include("RecExCommon/RecExCommon_topOptions.py") # Must do tool configuration here for DB access to be autoconfigured from RecExCommon from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault lumiTool = LuminosityToolDefault() lumiTool.OutputLevel = DEBUG ToolSvc += lumiTool from LumiBlockComps.TrigLivefractionToolDefault import TrigLivefractionToolDefault liveTool = TrigLivefractionToolDefault() liveTool.OutputLevel = DEBUG ToolSvc += liveTool from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() ## add an AthenaMonManager algorithm to the list of algorithms to be ran from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager topSequence += AthenaMonManager("AthMonTestMan")
""" Configuration for LumiBlockMuWriter to write mu from LumiDB into EventInfo """ # # __author__ = 'E.Torrrence' # # # Configure folder access from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault lumiTool = LuminosityToolDefault() # Also configures DB # lumiTool.OutputLevel = DEBUG from AthenaCommon.AppMgr import ToolSvc ToolSvc += lumiTool # Configure MuWriter algorithm from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuWriter muWriter = LumiBlockMuWriter("LumiBlockMuWriter") muWriter.LuminosityTool = lumiTool #muWriter.PileupLuminosityTag = "OflLumi-UPD2-005" # muWriter.OutputLevel = DEBUG # Add this to the top-level sequence from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += muWriter
rec.doWriteAOD = False rec.doWriteTAG = False rec.doDPD = False rec.doAOD = True #rec.doDPD = True rec.doFileMetaData = True # Output log setting OutputLevel = INFO # main jobOption - must always be included include ("RecExCommon/RecExCommon_topOptions.py") # Must do tool configuration here for DB access to be autoconfigured from RecExCommon from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault lumiTool = LuminosityToolDefault() lumiTool.OutputLevel = DEBUG ToolSvc += lumiTool from LumiBlockComps.TrigLivefractionToolDefault import TrigLivefractionToolDefault liveTool = TrigLivefractionToolDefault() liveTool.OutputLevel = DEBUG ToolSvc += liveTool from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() ## add an AthenaMonManager algorithm to the list of algorithms to be ran from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager topSequence += AthenaMonManager( "AthMonTestMan" )
rec.doWriteAOD = False rec.doWriteTAG = False rec.doDPD = False rec.doAOD = True #rec.doDPD = True rec.doFileMetaData = True # Output log setting OutputLevel = WARNING # main jobOption - must always be included include("RecExCommon/RecExCommon_topOptions.py") # Must do tool configuration here for DB access to be autoconfigured from RecExCommon from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault lumiTool = LuminosityToolDefault() lumiTool.OutputLevel = WARNING ToolSvc += lumiTool # from LumiBlockComps.TrigLivefractionToolDefault import TrigLivefractionToolDefault # liveTool = TrigLivefractionToolDefault() # liveTool.OutputLevel = DEBUG # ToolSvc += liveTool from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() ## add an AthenaMonManager algorithm to the list of algorithms to be ran from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager topSequence += AthenaMonManager("AthMonTestMan")
from TriggerJobOpts.Lvl1ResultBuilderGetter import Lvl1ResultBuilderGetter lvl1 = Lvl1ResultBuilderGetter() from TriggerJobOpts.HLTTriggerResultGetter import ByteStreamUnpackGetter bsu=ByteStreamUnpackGetter() # TDT from AthenaCommon.AppMgr import ToolSvc from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool tdt = Trig__TrigDecisionTool("TrigDecisionTool") ToolSvc += tdt from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault theLumiTool = LuminosityToolDefault() ToolSvc += theLumiTool from TrigDecisionMaker.TrigDecisionMakerConfig import WriteTrigDecision trigDecWriter = WriteTrigDecision() #This tool is apparently instanciated by TrkDetElementSurface/ DetElementSurfaceCnv_p1.h from TrkEventCnvTools import TrkEventCnvToolsConf EventCnvSuperTool = TrkEventCnvToolsConf.Trk__EventCnvSuperTool('EventCnvSuperTool') EventCnvSuperTool.DoMuons = False EventCnvSuperTool.DoID = False ToolSvc += EventCnvSuperTool