Commit b1fbd0f0 authored by Walter Lampl's avatar Walter Lampl
Browse files

MuonConfig: Add new config-flag 'Muon.enableAlignment'

parent 449e1cd5
......@@ -2,6 +2,7 @@
from AthenaConfiguration.AthConfigFlags import AthConfigFlags
from AthenaConfiguration.AutoConfigFlags import DetDescrInfo
from AthenaConfiguration.Enums import ProductionStep
import re
# Some comments from Ed about existing flags
......@@ -126,6 +127,9 @@ def createMuonConfigFlags():
mcf.addFlag("Muon.MuonTrigger", False)
mcf.addFlag("Muon.SAMuonTrigger", False)
mcf.addFlag("Muon.enableAlignment",lambda flags: (flags.Common.Project != 'AthSimulation' \
and (flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay)))
# TODO - add configuration for above
return mcf
......
......@@ -33,9 +33,7 @@ def MuonDetectorToolCfg(flags):
from MuonGeoModel.MMPassivationFlag import MMPassivationFlag
detTool.passivationWidthMM = MMPassivationFlag.correction
enableAlignment = flags.Common.Project != 'AthSimulation' \
and (flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay)
if enableAlignment:
if flags.Muon.enableAlignment:
# Condition DB is needed only if A-lines or B-lines are requested
if not (not flags.Muon.Align.UseALines and flags.Muon.Align.UseBLines=='none'):
detTool.UseConditionDb = 1
......@@ -182,9 +180,7 @@ def MuonGeoModelCfg(flags, forceDisableAlignment=False):
detTool.FillCacheInitTime = 0 # We do not need to fill cache for the MuonGeoModel MuonDetectorTool, just for the condAlg
gms.DetectorTools += [ detTool ]
enableAlignment = flags.Common.Project != 'AthSimulation' \
and (flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay)
if enableAlignment and not forceDisableAlignment:
if flags.Muon.enableAlignment and not forceDisableAlignment:
acc.merge(MuonDetectorCondAlgCfg(flags))
acc.merge(MuonIdHelperSvcCfg(flags)) # This line can be removed once the configuration methods for all 258 components which directly use this service are updated!!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment