DetFlags.simulate.Truth_setOn() #--- AthenaCommon flags --------------------------------------- from AthenaCommon.AthenaCommonFlags import athenaCommonFlags #athenaCommonFlags.PoolEvgenInput=['rfio:/castor/cern.ch/atlas/project/dc2/.../dc2.002930.mu_pt30_eta320.evgen805._0001.pool.root'] #athenaCommonFlags.PoolHitsOutput='atlas_MyOutputFile.pool.root' athenaCommonFlags.PoolHitsOutput.set_Off() athenaCommonFlags.EvtMax = 1000 #--- Simulation flags ----------------------------------------- from G4AtlasApps.SimFlags import SimFlags # Look into SimFlags.SimLayout for other possible values SimFlags.SimLayout = 'ATLAS-CSC-02-00-00' # specific value #SimFlags.SimLayout.set_On() # uses the default value from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.TileVersionOverride = 'TileCal-CSC-03' #log.info( "GeoModelSvc.TileVersionOverride = %s" % (GeoModelSvc.TileVersionOverride) ) # sets the EtaPhi, VertexSpread and VertexRange checks on SimFlags.EventFilter.set_On() # sets LArParametrization #SimFlags.LArParameterization=2 # No magnetic field SimFlags.MagneticField.set_Off() # - uses single particle generator SimFlags.KinematicsMode = 'SingleParticle' SimFlags.ParticlePDG = '999' # set energy constant to 10 GeV #SimFlags.Energy=100
DetFlags.makeRIO.TRT_setOff() DetFlags.Calo_setOn() DetFlags.Muon_setOn() DetFlags.Truth_setOn() from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.SLHC_Geometry = True TrkDetFlags.MagneticFieldCallbackEnforced = False TrkDetFlags.TRT_BuildStrawLayers = False TrkDetFlags.MaterialSource = 'None' if vp1Muon and vp1MuonLayout != "": print( "*** DumpGeo NOTE *** You specified custom vp1MuonLayout, using %s as muon geometry" % vp1MuonLayout) from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.MuonVersionOverride = vp1MuonLayout # --- GeoModel from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from AthenaCommon.AppMgr import ServiceMgr as svcMgr if vp1GeoModelStats: print "printing GeoModel stats to file (Svc.StatisticsToFile=TRUE)..." svcMgr.GeoModelSvc.StatisticsToFile = True if vp1Cavern: print "vp1.py - Initializing the visualization of the Cavern Infrastructure..." from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool
conddb.setGlobalTag(ConddbTag) logTileDig.info('ConddbTag = %s' % (ConddbTag)) from AthenaCommon.GlobalFlags import jobproperties jobproperties.Global.DetDescrVersion = DetDescrVersion logTileDig.info('DetDescrVersion = %s' % (jobproperties.Global.DetDescrVersion())) from AtlasGeoModel import SetGeometryVersion jobproperties.Global.DetGeo = DetGeo from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.IgnoreTagDifference = True logTileDig.info('GeoModelSvc.AtlasVersion = %s' % (GeoModelSvc.AtlasVersion)) if 'TileVersionOverride' in dir(): GeoModelSvc.TileVersionOverride = TileVersionOverride logTileDig.info('GeoModelSvc.TileVersionOverride = %s' % (GeoModelSvc.TileVersionOverride)) #-------------------------------------------------------------- # Digitiziation and Pileup configuration #-------------------------------------------------------------- from Digitization.DigitizationFlags import jobproperties # jobproperties.Digitization.doInDetNoise=True jobproperties.Digitization.doCaloNoise = doCaloNoise # This tag must be specified for dowstream jobs jobproperties.Digitization.IOVDbGlobalTag = ConddbTag
ROOT.StatusCode from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.LAr_setOn() DetFlags.detdescr.Tile_setOn() import sys import string from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SetupRecoGeometry include("CaloConditions/CaloConditions_jobOptions.py") include("TileIdCnv/TileIdCnv_jobOptions.py") from GeoModelSvc.GeoModelSvcConf import GeoModelSvc ServiceMgr += GeoModelSvc() theApp.CreateSvc += ["GeoModelSvc"] from AtlasGeoModel import LArGM from AtlasGeoModel import TileGM from IOVDbSvc.IOVDbSvcConf import IOVDbSvc IOVDbSvc().GlobalTag = 'OFLCOND-SDR-BS14T-IBL-06' from AthenaPython import PyAthena from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() TILE = PyAthena.CaloCell_ID.TILE LARFCAL = PyAthena.CaloCell_ID.LARFCAL
from AthenaCommon.BeamFlags import jobproperties jobproperties.Beam.beamType.set_Value_and_Lock('collisions') #from IOVDbSvc.CondDB import conddb #conddb.setGlobalTag(ConddbTag); #log.info( "ConddbTag = %s" % (ConddbTag) ) from AthenaCommon.GlobalFlags import jobproperties jobproperties.Global.DetDescrVersion = DetDescrVersion log.info("DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion())) TileCablingType = 4 from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() # GeoModelSvc.IgnoreTagDifference = True log.info("GeoModelSvc.AtlasVersion = %s" % (GeoModelSvc.AtlasVersion)) GeoModelSvc.TileVersionOverride = "TileCal-GEO-08" log.info("GeoModelSvc.TileVersionOverride = %s" % (GeoModelSvc.TileVersionOverride)) GeoModelSvc.DetectorTools["TileDetectorTool"].GeometryConfig = "FULL" GeoModelSvc.DetectorTools["TileDetectorTool"].OutputLevel = 1 #-------------------------------------------------------------- # Digitiziation and Pileup configuration #-------------------------------------------------------------- from Digitization.DigitizationFlags import jobproperties # jobproperties.Digitization.doInDetNoise=True jobproperties.Digitization.doCaloNoise = True
DetFlags.detdescr.ID_setOn() DetFlags.detdescr.TRT_setOff() RunNumber = 284500 import sys import string import ROOT import math from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SetupRecoGeometry from GeoModelSvc.GeoModelSvcConf import GeoModelSvc ServiceMgr += GeoModelSvc() theApp.CreateSvc += ["GeoModelSvc"] from AtlasGeoModel import InDetGM from IOVDbSvc.IOVDbSvcConf import IOVDbSvc IOVDbSvc().GlobalTag = 'OFLCOND-RUN12-SDR-35' import MagFieldServices.SetupField from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence()
# I5 = 0/1 zerofy or not the z rotation # I6 = 0/1 zerofy or not the t rotation GeneralControlAlines = 111111 # Set output level threshold #(0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) MessageSvc.OutputLevel = INFO MessageSvc.defaultLimit = 99999999 MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" #MessageSvc.Format = "% F%30W%S%7W%R%T %0W%M" #MessageSvc.useColors = True #***************************************************** HERE override MuonSpectrometer tag from AtlasGeoModel import SetGeometryVersion from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.07.00" print GeoModelSvc #***************************************************** HERE define alignment data from cond. tags if useAlign: from IOVDbSvc.CondDB import conddb conddb.dbname = "COMP200" conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/MDT/BARREL', '/MUONALIGN/MDT/BARREL') conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/MDT/ENDCAP/SIDEA', '/MUONALIGN/MDT/ENDCAP/SIDEA') conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/MDT/ENDCAP/SIDEC', '/MUONALIGN/MDT/ENDCAP/SIDEC') conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/TGC/SIDEA',
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool GeoModelSvc.DetectorTools += [ MuonDetectorTool(HasSTgc=False, HasMM=False) ] GeoModelSvc.SupportedGeometry=21 GeoModelSvc.AtlasVersion='ATLAS-R2-2016-01-00-01' try: if database_layout: GeoModelSvc.MuonVersionOverride=database_layout except NameError: pass theApp.CreateSvc += ["GeoModelSvc"] ServiceMgr += GeoModelSvc
# Run on CSC data or not muonRecFlags.doCSCs = False # Switch on the alignment corrections muonRecFlags.useAlignmentCorrections = True muonRecFlags.doCalib = False recFlags.doTruth = False #rec.doCBNT = True recFlags.doESD.set_Value_and_Lock(False) recFlags.doWriteESD.set_Value_and_Lock(False) recFlags.Commissioning = True from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.03.02.Initial.Light.BML.S13.Patch" # the following two lines are needed to remove annoying file ESD.pool.root include("RecExCommission/RecExCommissionFlags_jobOptions.py") ATLASCosmicFlags.doFilteredESD = False recFlags.lock_JobProperties() muonRecFlags.lock_JobProperties() # The main jobOption file include("RecExCommission/RecExCommission.py") include("RecExCommon/RecExCommon_topOptions.py") # Tune RPC clusterization
print "in NtupleFragment" from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() #GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.08.01" GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.08.01-BIS78v2" from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon import CfgGetter from AthenaCommon.CfgGetter import getPublicTool, getPrivateTool, getService, getAlgorithm RPC_DigitizationTool = getPublicTool("RpcDigitizationTool") #RPC_DigitizationTool.OutputLevel = DEBUG RPC_DigitizationTool.Force_BOG_BOF_DoubletR2_OFF = False RPC_DigitizationTool.ValidationSetup = 1 RPC_DigitizationTool.turnON_efficiency = False # gaps and panels always efficient RPC_DigitizationTool.Efficiency_fromCOOL = False # irrelevant since the above RPC_DigitizationTool.turnON_clustersize = True # defauls CS RPC_DigitizationTool.ClusterSize_fromCOOL = False # irrelevant since the above RPC_DigitizationTool.KillDeadStrips = False RPC_DigitizationTool.IgnoreRunDependentConfig = True from AthenaCommon.AppMgr import ServiceMgr import MuonRPC_Cabling.MuonRPC_CablingConfig ####################### # CHOICE OF CABLING # ####################### ## CABLING FROM FILES #ServiceMgr.MuonRPC_CablingSvc.RPCMapfromCool=False #ServiceMgr.MuonRPC_CablingSvc.ConfFileName="LVL1confAtlasRUN2_ver104.data" # default is "ConfFileName.txt"
# #============================================================== if not 'TILEGEOMODEL_TILEGEOMODEL_HAS_BEEN_INCLUDED' in dir(): TILEGEOMODEL_TILEGEOMODEL_HAS_BEEN_INCLUDED = 1 from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc DetDescrCnvSvc = DetDescrCnvSvc() DetDescrCnvSvc.IdDictFromRDB = True # Conditions DB setup and TagInfo from IOVDbSvc.CondDB import conddb import EventInfoMgt.EventInfoMgtInit from AthenaCommon.AppMgr import ServiceMgr from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() ServiceMgr += GeoModelSvc theApp.CreateSvc += ["GeoModelSvc"] #load all identifiers #include( "TileIdCnv/TileIdCnv_jobOptions.py" ) #include( "CaloIdCnv/CaloIdCnv_joboptions.py" ) from TileGeoModel.TileGeoModelConf import TileDetectorTool GeoModelSvc.DetectorTools += [TileDetectorTool()] from AthenaCommon.GlobalFlags import jobproperties detDescrVersion = jobproperties.Global.DetDescrVersion() # Setup geometry version GeoModelSvc.AtlasVersion = detDescrVersion
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.JobProperties import jobproperties from AthenaCommon.DetFlags import DetFlags DDversion = jobproperties.Global.DetDescrVersion() from GeoModelSvc.GeoModelSvcConf import GeoModelSvc from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc GeoModelSvc = GeoModelSvc() DetDescrCnvSvc = DetDescrCnvSvc() DataSrc = jobproperties.Global.DataSource() DGeo = jobproperties.Global.DetGeo() if (DGeo == "ctbh8"): DDversion = "CTB" elif (DDversion == "CTB"): GeoModelSvc.AtlasVersion = "ATLAS-CTB-01" if (DetFlags.Tile_on()): GeoModelSvc.TileVersionOverride = "TileTB-3B-00" DetDescrCnvSvc.InDetIDFileName = "IdDictParser/IdDictInnerDetector_CTB2004.xml" DetDescrCnvSvc.MuonIDFileName = "IdDictMuonSpectrometer_H8_2004.xml" elif (DDversion == "ATLAS-H6-2004-00"): GeoModelSvc.AtlasVersion = "ATLAS-H6-2004-00" DetFlags.ID_setOff() DetFlags.Muon_setOff()
# ------------------------------------------------ # This is the real DetDescr part : # The identifier dictionary is choosen by using the # tag LAr-H8-00 # ---------------------------------------------- # Very very temporary hack : setup GeoModel for standalone clients ! from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit # end of the hack ---- # as long as not done centrally by AtlasGeoModel ( CTB case ) include("AtlasGeoModel/LArGeoModel.py") from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.LAr_VersionOverride = "LAr-H8-00" # ------------------------------------------------ # FIXME : setup online identifier & mapping # ( should be done somewhere else ) # ------------------------------------------------ include("CaloConditions/CaloConditions_jobOptions.py") include("LArConditionsCommon/LArIdMap_H8_jobOptions.py") from AthenaCommon.AppMgr import ToolSvc from LArCabling.LArCablingConf import LArCablingService LArCablingService = LArCablingService("LArCablingService") LArCablingService.LArFebRodMapKey = "LArFebRodMapH8" LArCablingService.LArOnOffIdMapKey = "LArOnOffIdMapH8" ToolSvc += LArCablingService
include( "AthenaPoolCnvSvc/AthenaPool_jobOptions.py" ) EventPersistencySvc = svcMgr.EventPersistencySvc EventPersistencySvc.CnvServices += [ "AthenaPoolCnvSvc" ] # Explicitly specify the output file catalog, # to avoid races when running tests in parallel. PoolSvc = Service( "PoolSvc" ) PoolSvc.WriteCatalog = "file:Catalog2.xml" #ProxyProviderSvc = Service( "ProxyProviderSvc" ) #ProxyProviderSvc.ProviderNames += [ "CondProxyProvider" ] #CondProxyProvider = Service( "CondProxyProvider" ) #CondProxyProvider.InputCollections = ["LarCondTestNoReg.root"] #CondProxyProvider.InputCollections = ["LArRawCond_dc2.pool.root"] #CondProxyProvider.InputCollections = ["LArRawCond_dc2_a.pool.root"] from AthenaCommon.ConfigurableDb import getConfigurable from AthenaCommon.AppMgr import ServiceMgr ServiceMgr.ProxyProviderSvc.ProviderNames += [ "CondProxyProvider" ] ServiceMgr += getConfigurable( "CondProxyProvider" )() svcMgr.CondProxyProvider.InputCollections+=["LarCondTestNoReg.root"] conddb.setGlobalTag("OFLCOND-CSC-00-01-00") # Suppress useless GeoModelSvc messages. from AthenaCommon import Constants from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc().OutputLevel=Constants.WARNING
svcMgr += PartPropSvc() #--- Pool specific -------------------------------------------- # - General Pool converters include("AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py") # - Pool input (Change this to use a different file) svcMgr.EventSelector.InputCollections = ["Tile_MyOutputFile-Dig.root"] #--- GeoModel stuff ------------------------------------------- from AthenaCommon.GlobalFlags import globalflags globalflags.DataSource.set_Value_and_Lock('geant4') globalflags.DetGeo.set_Value_and_Lock('ctbh8') from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() if TileBarrelOnly: GeoModelSvc.TileVersionOverride = "TileTB-3B-00" else: GeoModelSvc.TileVersionOverride = "TileTB-2B2EB-00" #--- Tile Conditions ------------------------------------------ include("TileConditions/TileTBConditions_jobOptions.py") # Create various ntuples with hits or rawChannels amplitudes # inside CBNTAA or in standalone ntuples # CBNTAA is switched off by default # Hit energy is the energy which comes from Geant4 without sampling correction # and RawChannel amplitude is normally in pCb # check carefully which pCb/GeV factor is applied in digitization (1.05 or 1.0)
include("GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py") include("LArAthenaPool/LArAthenaPool_joboptions.py") include("TileEventAthenaPool/TileEventAthenaPool_joboptions.py") include("G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py") # # Pool input # from AthenaCommon.AppMgr import ServiceMgr as svcMgr svcMgr.EventSelector.InputCollections = ["ctb_CaloDigit.pool.root"] # the Tile, LAr and Calo detector description package from AtlasGeoModel import SetGeometryVersion from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.AtlasVersion = "ATLAS-CTB-01" CTBforTTCellMap = True from AtlasGeoModel import GeoModelInit #configure LAr to read from OFLP200 from LArConditionsCommon.LArCondFlags import larCondFlags larCondFlags.LArDBConnection = "<dbConnection>COOLONL_LAR/OFLP200</dbConnection>" include("LArDetDescr/LArDetDescr_H8_joboptions.py") from AthenaCommon.GlobalFlags import jobproperties jobproperties.Global.DetDescrVersion = 'CTB' DetDescrVersion = "CTB" # difference is in the IDET tag which is not defined from the jo above and which is found in the input file
# Full job is a list of algorithms from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() # build GeoModel if 'DetDescrVersion' not in dir(): DetDescrVersion = 'ATLAS-P2-ITK-01-00-00' from AthenaCommon.GlobalFlags import globalflags globalflags.DetDescrVersion = DetDescrVersion from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() ServiceMgr += GeoModelSvc GeoModelSvc.AtlasVersion = DetDescrVersion from IOVDbSvc.CondDB import conddb conddb.setGlobalTag("OFLCOND-MC12-ITK-26-80-25") # switch the material loading off from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialDatabaseLocal = True if TrkDetFlags.MaterialDatabaseLocal() is True: TrkDetFlags.MaterialSource = 'COOL' TrkDetFlags.MaterialVersion = 17 TrkDetFlags.MaterialSubVersion = "" # splitGeo = DetDescrVersion.split('-') # TrkDetFlags.MaterialMagicTag = splitGeo[0] + '-' + splitGeo[1] + '-' + splitGeo[2]
# Full job is a list of algorithms from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() # build GeoModel if 'DetDescrVersion' not in dir(): DetDescrVersion = 'ATLAS-P2-ITK-01-00-00' from AthenaCommon.GlobalFlags import globalflags globalflags.DetDescrVersion = DetDescrVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() ServiceMgr += GeoModelSvc GeoModelSvc.AtlasVersion = globalflags.DetDescrVersion() from AthenaCommon.AppMgr import ServiceMgr as svcMgr svcMgr += GeoModelSvc from IOVDbSvc.CondDB import conddb conddb.setGlobalTag("OFLCOND-MC12-ITK-21-80-25") # Tracking specifications #################################### from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialVersion = 17 TrkDetFlags.MaterialSource = 'None' TrkDetFlags.SLHC_Geometry = True
from AthenaCommon.GlobalFlags import jobproperties from AtlasGeoModel import SetGeometryVersion ## Forward Region Twiss files - needed before geometry setup! from G4AtlasApps.SimFlags import simFlags if simFlags.ForwardDetectors.statusOn: if DetFlags.geometry.FwdRegion_on(): from AthenaCommon.CfgGetter import getPublicTool from AthenaCommon.AppMgr import ToolSvc ToolSvc += getPublicTool("ForwardRegionProperties") from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SimEnvelopes from GeoModelSvc.GeoModelSvcConf import GeoModelSvc gms = GeoModelSvc() ## Cosmics GeoModel tweaks if jobproperties.Beam.beamType() == 'cosmics' or \ (simFlags.CavernBG.statusOn and not 'Signal' in simFlags.CavernBG.get_Value() ): from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool gms.DetectorTools += [CavernInfraDetectorTool()] ## Protects GeoModelSvc in the simulation from the AlignCallbacks gms.AlignCallbacks = False ## Muon GeoModel tweaks if DetFlags.Muon_on(): ## Turn off caching in the muon system from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool MuonDetectorTool = MuonDetectorTool() MuonDetectorTool.FillCacheInitTime = 0 # default is 1 if hasattr(simFlags, 'SimulateNewSmallWheel'): if simFlags.SimulateNewSmallWheel():
simFlags.RunNumber = 310000 ## Turns on calibration hits for Tile if 'CalibrationRun' in dir(): simFlags.CalibrationRun = 'Tile' ## Layout tags: see simFlags.SimLayout for allowed values ## Use the default layout: simFlags.SimLayout.set_On() ## Set a specific layout ATLAS-GEO tag: simFlags.SimLayout = DetDescrVersion ## Set a specific Tile-Geo tag: from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() if len(TileVersionOverride)>0: GeoModelSvc.TileVersionOverride = TileVersionOverride #---- Needed for the U-shape (any value of Ushape > 0- means that tile size equal to size of master plate, for Ushape <=0 - size of the tile is like in old geometry ) if 'TileUshape' in dir(): from AtlasGeoModel import TileGM GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Ushape = TileUshape #---- Special option to enable Cs tubes in simulation. Any value > 0 enables them if 'TileCsTube' in dir(): from AtlasGeoModel import TileGM GeoModelSvc.DetectorTools[ "TileDetectorTool" ].CsTube = TileCsTube ## Set the EtaPhi, VertexSpread and VertexRange checks on simFlags.EventFilter.set_On()
DetFlags.detdescr.ID_setOff() DetFlags.detdescr.Muon_setOff() DetFlags.detdescr.LAr_setOff() DetFlags.detdescr.Tile_setOn() DetFlags.readRDOBS.Tile_setOn() DetFlags.Print() from AthenaCommon.GlobalFlags import jobproperties jobproperties.Global.DetDescrVersion = 'ATLAS-CommNF-07-00-00' log.info("DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion())) from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() log.info("GeoModelSvc.AtlasVersion = %s" % (GeoModelSvc.AtlasVersion)) #GeoModelSvc.TileVersionOverride = "TileCal-Comm-01" #log.info( "GeoModelSvc.TileVersionOverride = %s" % (GeoModelSvc.TileVersionOverride) ) include("TileTBRec/TileTBDefaults_jobOptions.py") # Set Global tag for IOVDbSvc for commissioning from IOVDbSvc.CondDB import conddb conddb.setGlobalTag('COMCOND-ES1C-001-00') #============================================================= #=== setup all options for optimal filter #============================================================= from TileRecUtils.TileRecFlags import jobproperties
def _do_external(self): """Place to handle the external services: GeoModel, IOVDb, frozen showers, etc """ AtlasG4Eng.G4Eng.log.verbose( 'AtlasSimSkeleton._do_external :: starting') from AthenaCommon.AppMgr import ToolSvc, ServiceMgr from Geo2G4.Geo2G4Conf import Geo2G4Svc geo2G4Svc = Geo2G4Svc() theApp.CreateSvc += ["Geo2G4Svc"] ServiceMgr += geo2G4Svc ## Enable top transforms for the ATLAS geometry geo2G4Svc.GetTopTransform = True ## Configure access to the BeamCondSvc if necessary. Assuming ## it should be on always as BeamEffectTransformation is ## currently always switched on, else something like this will ## be required here. from G4AtlasApps.SimFlags import simFlags include("InDetBeamSpotService/BeamCondSvc.py") ## GeoModel stuff ## TODO: Tidy imports etc. from GeoModelSvc.GeoModelSvcConf import GeoModelSvc from AthenaCommon.GlobalFlags import jobproperties from AtlasGeoModel import SetGeometryVersion ## Forward Region Twiss files - needed before geometry setup! if simFlags.ForwardDetectors.statusOn: if DetFlags.geometry.FwdRegion_on(): from AthenaCommon.CfgGetter import getPublicTool from AthenaCommon.AppMgr import ToolSvc ToolSvc += getPublicTool("ForwardRegionProperties") from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SimEnvelopes from GeoModelSvc.GeoModelSvcConf import GeoModelSvc gms = GeoModelSvc() ## Cosmics GeoModel tweaks if jobproperties.Beam.beamType() == 'cosmics' or \ (simFlags.CavernBG.statusOn and not 'Signal' in simFlags.CavernBG.get_Value() ): from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool gms.DetectorTools += [CavernInfraDetectorTool()] ## Protects GeoModelSvc in the simulation from the AlignCallbacks gms.AlignCallbacks = False ## Muon GeoModel tweaks if DetFlags.Muon_on(): ## Turn off caching in the muon system from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool MuonDetectorTool = MuonDetectorTool() MuonDetectorTool.FillCacheInitTime = 0 # default is 1 ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() from AthenaCommon import CfgGetter if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if (MuonGeometryFlags.hasSTGC() and MuonGeometryFlags.hasMM()): if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] theApp.CreateSvc += ["AGDDtoGeoSvc"] ServiceMgr += AGDD2Geo ## Add configured GeoModelSvc to service manager ServiceMgr += gms ## Run the geometry envelope setup earlier than GeoSD self._do_GeoEnv() #TODO remove AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_external :: done')
DetFlags.detdescr.ID_setOff() DetFlags.detdescr.Muon_setOff() DetFlags.detdescr.LAr_setOff() DetFlags.detdescr.Tile_setOn() DetFlags.readRDOBS.Tile_setOn() DetFlags.Print() from AthenaCommon.GlobalFlags import jobproperties if RUN2: jobproperties.Global.DetDescrVersion = "ATLAS-R2-2016-01-00-01" else: jobproperties.Global.DetDescrVersion = "ATLAS-R1-2012-02-00-00" tbstat_log.info( "DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion()) ) from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.IgnoreTagDifference = True tbstat_log.info( "GeoModelSvc.AtlasVersion = %s" % (GeoModelSvc.AtlasVersion) ) from RecExConfig.RecFlags import rec if RUN2: rec.projectName = "data15_tilecomm" else: rec.projectName = "data12_tilecomm" from IOVDbSvc.CondDB import conddb if MC: conddb.setGlobalTag("OFLCOND-RUN12-SDR-35") elif RUN2: conddb.setGlobalTag("CONDBR2-BLKPA-2018-16") else: conddb.setGlobalTag("COMCOND-BLKPA-RUN1-06") #============================================================= #=== setup TileConditions #=============================================================
MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool") MuonAlignmentDbTool.ParlineFolders = [ "/MUONALIGN/MDT/BARREL", "/MUONALIGN/MDT/ENDCAP/SIDEA", "/MUONALIGN/MDT/ENDCAP/SIDEC", "/MUONALIGN/TGC/SIDEA", "/MUONALIGN/TGC/SIDEC" ] ToolSvc += MuonAlignmentDbTool MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool MGM_AlignmentDbTool.OutputLevel = DEBUG #***************************************************** HERE override MuonSpectrometer tag from AtlasGeoModel import SetGeometryVersion from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.07.00" GeoModelSvc.IgnoreTagDifference = True print GeoModelSvc #***************************************************** HERE setup MuonDetectorManager from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool MuonDetectorTool = MuonDetectorTool() MuonDetectorTool.StationSelection = 0 MuonDetectorTool.SelectedStations = ["EIL", "B"] MuonDetectorTool.OutputLevel = VERBOSE MuonDetectorTool.UseConditionDb = 0 print MuonDetectorTool