MuonDetectorTool.FillCacheInitTime = 0  # default is 0
#MuonDetectorTool.DumpMemoryBreakDown = True # default is false
# selection of active stations
MuonDetectorTool.StationSelection = 0  # default is 0
#MuonDetectorTool.SelectedStations  = [ "X" ] # irrelevant if stationselection is 0 - this will switch off all stations
MuonDetectorTool.SelectedStations = ["EIL", "T", "CSS", "BMS"
                                     ]  # irrelevant if stationselection is 0
MuonDetectorTool.SelectedStations = ["BOL"
                                     ]  # irrelevant if stationselection is 0
MuonDetectorTool.SelectedStJzz = [1, -1]
MuonDetectorTool.SelectedStJff = [3]
# alignment control
MuonDetectorTool.ControlAlines = GeneralControlAlines  # default is 111111
MuonDetectorTool.DumpAlines = False
if useAlign:
    MuonDetectorTool.UseConditionDb = 1
    #default is 1
else:
    MuonDetectorTool.UseConditionDb = 0
    # override default
MuonDetectorTool.UseAsciiConditionData = 0
#default is 0
#MuonDetectorTool.AlternateASZTFile='asztfile.txt' #if enabled the Alines in Oracle (if any) will not be used
# cutouts
MuonDetectorTool.IncludeCutouts = 1
MuonDetectorTool.IncludeCutoutsBog = 1
MuonDetectorTool.IncludeCtbBis = 1
MuonDetectorTool.EnableFineClashFixing = 0
# inert materials
#MuonDetectorTool.ForceSwitchOnOff_BUILDINERTMATERIALS = 1000;# avoid building the dead matter
#MuonDetectorTool.ForceSwitchOnOff_BUILDINERTMATERIALS = 1001;# avoid building the dead matter
                                          "/MUONALIGN/TGC/SIDEC"]
    ToolSvc += MuonAlignmentDbTool
    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
    MGM_AlignmentDbTool.OutputLevel = DEBUG


#***************************************************** HERE setup MuonDetectorManager
from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
MuonDetectorTool = MuonDetectorTool()
MuonDetectorTool.StationSelection = 0
MuonDetectorTool.SelectedStations = [ "EIL", "B" ]
MuonDetectorTool.ControlAlines    = GeneralControlAlines
MuonDetectorTool.ForceSwitchOnOff_BUILDINERTMATERIALS = 1000; # avoid building the dead matter
MuonDetectorTool.ForceSwitchOnOff_MINIMALGEO = 1001;          # IMPORTANT: do not account for cutouts (Amdc does not)
if useAlign:
    MuonDetectorTool.UseConditionDb = 1; #default is 1 
else:
    MuonDetectorTool.UseConditionDb = 0; # override default 
MuonDetectorTool.UseAsciiConditionData = 0; #default is 0 
MuonDetectorTool.OutputLevel = DEBUG

print MuonDetectorTool
MessageSvc.setDebug+=["MGM::MuonDetectorManager::updateAlignment"]


#***************************************************** HERE setup Amdc 
include ("AmdcAth/AmdcAth_jobOptions.py")
from AmdcAth.AmdcAthConf import AmdcsimrecAthenaSvc
AmdcsimrecAthenaSvc = AmdcsimrecAthenaSvc()

AmdcsimrecAthenaSvc.ControlALine =  GeneralControlAlines