def configureFlagsBase(): from AthenaCommon.DetFlags import DetFlags if not DetFlags.any_on(): # If you configure some of the DetFlags then you're # responsible for configuring all of them. DetFlags.all_setOn() DetFlags.Truth_setOn() # FIXME redundant? DetFlags.LVL1_setOff() # LVL1 is not part of G4 sim DetFlags.Forward_setOff() # Forward dets are off by default DetFlags.geometry.DBM_setOff() DetFlags.geometry.sTGC_setOff() DetFlags.geometry.Micromegas_setOff() ## Configure tasks DetFlags.digitize.all_setOff() DetFlags.makeRIO.all_setOff() from G4AtlasApps.SimFlags import simFlags if not (hasattr(simFlags, 'IsEventOverlayInputSim') and simFlags.IsEventOverlayInputSim()): # Unless this is an Overlay input simulation job switch off # the overlay DetFlags. DetFlags.overlay.all_setOff() DetFlags.pileup.all_setOff() DetFlags.readRDOBS.all_setOff() DetFlags.readRDOPool.all_setOff() DetFlags.readRIOBS.all_setOff() DetFlags.readRIOPool.all_setOff() DetFlags.simulateLVL1.all_setOff() DetFlags.writeBS.all_setOff() DetFlags.writeRDOPool.all_setOff() DetFlags.writeRIOPool.all_setOff() if "G4" in ISF_Flags.Simulator(): # Short-cut: if G4 is in the simulator name, then it's a pretty # safe assumption that the configuration uses Geant4. ISF_Flags.UsingGeant4 = True return
if MC: globalflags.DataSource.set_Value_and_Lock('geant4') else: globalflags.DataSource.set_Value_and_Lock('data') if RUN2: globalflags.DatabaseInstance="CONDBR2" else: globalflags.DatabaseInstance="COMP200" from AthenaCommon.BeamFlags import jobproperties jobproperties.Beam.beamType.set_Value_and_Lock('cosmics') from AthenaCommon.DetFlags import DetFlags DetFlags.Calo_setOff() #Switched off to avoid geometry DetFlags.ID_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.digitize.all_setOff() 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
if jobproperties.Beam.beamType.get_Value() != 'cosmics': # If it was already there, then we have a stopped particle file if hasattr(runArgs, "inputEVNT_TRFile") and\ not hasattr(topSeq,'TrackRecordGenerator'): include('SimulationJobOptions/preInclude.G4ReadCavern.py') # If there's a stopped particle file, don't do all the cavern stuff if hasattr(runArgs, "outputEVNT_TRFile") and\ not (hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn and simFlags.StoppedParticleFile.get_Value()!=''): include('SimulationJobOptions/preInclude.G4WriteCavern.py') ## Select detectors if 'DetFlags' not in dir(): ## If you configure one det flag, you're responsible for configuring them all! from AthenaCommon.DetFlags import DetFlags DetFlags.all_setOn() DetFlags.LVL1_setOff() # LVL1 is not part of G4 sim DetFlags.Truth_setOn() DetFlags.Forward_setOff() # Forward dets are off by default checkHGTDOff = getattr(DetFlags, 'HGTD_setOff', None) if checkHGTDOff is not None: checkHGTDOff() #Default for now if hasattr(runArgs, "AFPOn"): if runArgs.AFPOn: DetFlags.AFP_setOn() if hasattr(runArgs, "ALFAOn"): if runArgs.ALFAOn: DetFlags.ALFA_setOn() if hasattr(runArgs, "FwdRegionOn"): if runArgs.FwdRegionOn: DetFlags.FwdRegion_setOn()