示例#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
            checkfn = getattr(DetFlags, attrname, None)
            if checkfn is not None:
                checkfn()
except:
    ## Select detectors
    if 'DetFlags' not in dir():
        from AthenaCommon.DetFlags import DetFlags
        ## If you configure one det flag, you're responsible for configuring them all!
        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
DetFlags.Micromegas_setOff()
DetFlags.sTGC_setOff()
DetFlags.FTK_setOff()
checkHGTDOff = getattr(DetFlags, 'HGTD_setOff', None)
if checkHGTDOff is not None:
    checkHGTDOff()  #Default for now

from AthenaCommon.DetFlags import DetFlags

DetFlags.Print()

# removed configuration of forward detectors from standard simulation config
# corresponding code block removed

## Set the PhysicsList
if hasattr(runArgs, 'physicsList'):
    simFlags.PhysicsList = runArgs.physicsList