Пример #1
0
def setupOverlayLegacyDetectorFlags(detectors):
    """Setup Overlay legacy detector flags"""
    from AthenaCommon.DetFlags import DetFlags
    if not detectors:
        DetFlags.all_setOn()
        DetFlags.bpipe_setOff()
        DetFlags.FTK_setOff()
        return DetFlags

    # Truth is always on
    DetFlags.Truth_setOn()

    # Other subdetectors
    if not detectors or 'BCM' in detectors or 'ID' in detectors:
        DetFlags.BCM_setOn()
    if not detectors or 'DBM' in detectors or 'ID' in detectors:
        DetFlags.DBM_setOn()
    if not detectors or 'Pixel' in detectors or 'ID' in detectors:
        DetFlags.pixel_setOn()
    if not detectors or 'SCT' in detectors or 'ID' in detectors:
        DetFlags.SCT_setOn()
    if not detectors or 'TRT' in detectors or 'ID' in detectors:
        DetFlags.TRT_setOn()
    if not detectors or 'LAr' in detectors or 'Calo' in detectors or 'L1Calo' in detectors:
        DetFlags.LAr_setOn()
    if not detectors or 'Tile' in detectors or 'Calo' in detectors or 'L1Calo' in detectors:
        DetFlags.Tile_setOn()
    if not detectors or 'L1Calo' in detectors:
        DetFlags.LVL1_setOn()
    if not detectors or 'CSC' in detectors or 'Muon' in detectors:
        DetFlags.CSC_setOn()
    if not detectors or 'MDT' in detectors or 'Muon' in detectors:
        DetFlags.MDT_setOn()
    if not detectors or 'RPC' in detectors or 'Muon' in detectors:
        DetFlags.RPC_setOn()
    if not detectors or 'TGC' in detectors or 'Muon' in detectors:
        DetFlags.TGC_setOn()
    if not detectors or 'sTGC' in detectors or 'Muon' in detectors:
        DetFlags.sTGC_setOn()
    if not detectors or 'MM' in detectors or 'Muon' in detectors:
        DetFlags.Micromegas_setOn()

    return DetFlags
Пример #2
0
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
Пример #3
0
from AthenaCommon.Resilience import treatException, protectedInclude

athenaCommonFlags.AllowIgnoreConfigError = True

# for Paolo/Weiming: doing the imports below at this time eventually leaks to problem with PixelCalibSvc!! We had a similar problem in the past...
#from AtlasGeoModel import SetGeometryVersion
#from AtlasGeoModel import GeoModelInit

#select detectors
from AthenaCommon.DetFlags import DetFlags

DetFlags.all_setOff()
#DetFlags.pixel_setOn()
DetFlags.BCM_setOn()
DetFlags.TGC_setOn()
DetFlags.Truth_setOn()

#print job configuration
DetFlags.Print()

include("Digitization/Digitization.py")

#--------------------------------------------------------------
#test the IPileUpTool call back mechanism
#--------------------------------------------------------------
#this only works in XingByXing mode
if digitizationFlags.doXingByXingPileUp():
    job = AlgSequence()
    puAlg = job.StandardPileUpToolsAlg
    #puAlg = job.StandardInTimeOnlyTruthPileUpToolsAlg
    puAlg.OutputLevel = DEBUG