Commit 22bd2ab7 authored by Savanna Shaw's avatar Savanna Shaw
Browse files

Remove doTrigMuonConfig flag

Replacing the trigger slice flag doTrigMuonConfig with the corresponding flag that is part of the ConfigFlags (Muon.MuonTrigger). Replaced all teh places that check the flag in the muon configuration, replaced the setting of the flag in runHLT_standalone (it was also being set in MuonRecoSequences.py, but this isn't needed, so was dropped), and removed the flag from the MuonSLiceFlags (ATR-20389).
parent d6db5f99
......@@ -32,7 +32,7 @@ from .MuonRecFlags import muonRecFlags
from .MuonStandaloneFlags import muonStandaloneFlags
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from InDetRecExample import TrackingCommon
#==============================================================
......@@ -378,7 +378,7 @@ def MuonTrackCleaner(name,extraFlags=None,**kwargs):
kwargs.setdefault("Fitter", getPrivateTool('MCTBFitterMaterialFromTrack') )
kwargs.setdefault("SLFitter", getPrivateTool('MCTBSLFitterMaterialFromTrack'))
kwargs.setdefault("MdtRotCreator", getPrivateTool('MdtDriftCircleOnTrackCreator'))
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("Iterate", False)
kwargs.setdefault("RecoverOutliers", False)
# kwargs.setdefault("CompRotCreator", getPrivateTool('TriggerChamberClusterOnTrackCreator')) Not in DB
......
......@@ -23,7 +23,7 @@ from RecExConfig.RecFlags import rec
from AthenaCommon.CfgGetter import getPrivateTool, getPrivateToolClone, getPublicTool, getService
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from InDetRecExample import TrackingCommon
#--------------------------------------------------------------------------------
......@@ -103,7 +103,7 @@ def MdtDriftCircleOnTrackCreator(name="MdtDriftCircleOnTrackCreator",**kwargs):
else:
kwargs.setdefault("IsMC", True)
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("doMDT", True)
return CfgMgr.Muon__MdtDriftCircleOnTrackCreator(name, WasConfigured=True, **kwargs)
......@@ -178,7 +178,7 @@ def MuonHoughPatternFinderTool(name="MuonHoughPatternFinderTool",**kwargs):
getPublicTool("MuonHoughPatternTool")
if muonStandaloneFlags.reconstructionMode() == 'collisions':
kwargs.setdefault("MDT_TDC_cut", False)
if muonStandaloneFlags.reconstructionMode() == 'collisions' or TriggerFlags.MuonSlice.doTrigMuonConfig:
if muonStandaloneFlags.reconstructionMode() == 'collisions' or ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("RecordAll",False)
return CfgMgr.Muon__MuonHoughPatternFinderTool(name,**kwargs)
......@@ -376,7 +376,7 @@ def MuonClusterSegmentFinderTool(name="MuonClusterSegmentFinderTool", extraFlags
kwargs.setdefault("SLFitter","Trk::GlobalChi2Fitter/MCTBSLFitterMaterialFromTrack")
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401
from AthenaCommon.AppMgr import ToolSvc
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("TrackSummaryTool", "MuonTrackSummaryTool" )
else:
kwargs.setdefault("TrackSummaryTool", ToolSvc.CombinedMuonTrackSummary)
......@@ -439,7 +439,7 @@ def DCMathT0FitSegmentMaker(name='DCMathT0FitSegmentMaker',extraFlags=None,**kwa
# end of factory function DCMathSegmentMaker
def MuonLayerHoughTool(name='MuonLayerHoughTool',extraFlags=None,**kwargs):
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("DoTruth", False)
else:
kwargs.setdefault("DoTruth", rec.doTruth())
......
......@@ -19,7 +19,7 @@ from AthenaCommon.CfgGetter import getPublicTool,getPublicToolClone
from RecExConfig.ObjKeyStore import cfgKeyStore
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
#==============================================================
# call setDefaults to update default flags
......@@ -71,7 +71,7 @@ def MooSegmentFinderAlg( name="MuonSegmentMaker",**kwargs ):
kwargs.setdefault("UseMDT", muonRecFlags.doMDTs())
kwargs.setdefault("UseRPC", muonRecFlags.doRPCs())
kwargs.setdefault("UseTGC", muonRecFlags.doTGCs())
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("UseTGCPriorBC", False)
kwargs.setdefault("UseTGCNextBC", False)
else:
......
......@@ -278,7 +278,7 @@ def StauCreatorAlgCfg(flags, name="StauCreatorAlg", **kwargs ):
kwargs.setdefault("ClusterContainerName", "SlowMuonClusterCollection")
kwargs.setdefault("TagMaps",["stauTagMap"])
kwargs.setdefault("CopySegments", False)
# if not TriggerFlags.MuonSlice.doTrigMuonConfig:
# if not flags.Muon.MuonTrigger:
# recordMuonCreatorAlgObjs (kwargs)
acc = MuonCreatorAlgCfg(flags, name,**kwargs)
result.merge(acc)
......
......@@ -15,11 +15,11 @@ from MuonRecExample.MooreTools import MuonSeededSegmentFinder, MuonChamberHoleRe
from MuonRecExample.MuonRecTools import DCMathSegmentMaker
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
from MuonRecExample.MuonRecFlags import muonRecFlags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
def MuonInsideOutRecoTool( name="MuonInsideOutRecoTool", **kwargs ):
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("VertexContainer", "")
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
from AthenaCommon.AppMgr import ToolSvc
......@@ -71,7 +71,7 @@ def MuonStauSegmentRegionRecoveryTool(name="MuonStauSegmentRegionRecoveryTool",*
kwargs.setdefault("SeededSegmentFinder", getPublicTool("MuonStauSeededSegmentFinder") )
kwargs.setdefault("ChamberHoleRecoveryTool", getPublicTool("MuonStauChamberHoleRecoveryTool") )
kwargs.setdefault("Fitter", getPublicTool("CombinedStauTrackBuilderFit") )
if TriggerFlags.MuonSlice.doTrigMuonConfig and athenaCommonFlags.isOnline:
if ConfigFlags.Muon.MuonTrigger and athenaCommonFlags.isOnline:
kwargs.setdefault('MdtCondKey', "")
return MuidSegmentRegionRecoveryTool(name,**kwargs)
......@@ -91,7 +91,7 @@ def MuonStauCandidateTrackBuilderTool( name="MuonStauCandidateTrackBuilderTool",
def MuonStauInsideOutRecoTool( name="MuonStauInsideOutRecoTool", **kwargs ):
kwargs.setdefault("MuonCandidateTrackBuilderTool", getPublicTool("MuonStauCandidateTrackBuilderTool") )
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("VertexContainer", "")
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
from AthenaCommon.AppMgr import ToolSvc
......
......@@ -12,7 +12,7 @@ from AthenaCommon import CfgMgr
from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys
from InDetRecExample.InDetKeys import InDetKeys
from InDetRecExample.InDetJobProperties import InDetFlags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
def MuonCaloTagAlg(name="MuonCaloTagAlg",**kwargs):
reco_cscs = MuonGeometryFlags.hasCSC() and muonRecFlags.doCSCs()
......@@ -180,7 +180,7 @@ def MuonCreatorAlg( name="MuonCreatorAlg",**kwargs ):
# but don't set this default in case the StauCreatorAlg is created (see below)
if not muonCombinedRecFlags.doMuGirl() and not name=="StauCreatorAlg":
kwargs.setdefault("TagMaps",["muidcoTagMap","stacoTagMap","caloTagMap","segmentTagMap"])
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("MakeClusters", False)
kwargs.setdefault("ClusterContainerName", "")
kwargs.setdefault("CopySegments", False)
......@@ -219,7 +219,7 @@ def StauCreatorAlg( name="StauCreatorAlg", **kwargs ):
kwargs.setdefault("ClusterContainerName", "SlowMuonClusterCollection")
kwargs.setdefault("TagMaps",["stauTagMap"])
kwargs.setdefault("CopySegments", False)
if not TriggerFlags.MuonSlice.doTrigMuonConfig:
if not ConfigFlags.Muon.MuonTrigger:
recordMuonCreatorAlgObjs (kwargs)
return MuonCreatorAlg(name,**kwargs)
......
......@@ -24,8 +24,7 @@ from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
from IOVDbSvc.CondDB import conddb
from AthenaCommon.GlobalFlags import globalflags
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from InDetRecExample import TrackingCommon
GeV = 1000
......@@ -51,7 +50,7 @@ def iPatFitter( name='iPatFitter', **kwargs):
kwargs.setdefault("MaterialAllocator",getPublicTool("MuidMaterialAllocator"))
from InDetRecExample import TrackingCommon
kwargs.setdefault("SolenoidalIntersector",TrackingCommon.getSolenoidalIntersector())
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("MaxIterations", 15)
else:
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
......@@ -66,7 +65,7 @@ def iPatSLFitter( name='iPatSLFitter', **kwargs):
kwargs.setdefault("FullCombinedFit", True )
kwargs.setdefault("MaterialAllocator",getPublicTool("MuidMaterialAllocator"))
kwargs.setdefault("LineMomentum", muonStandaloneFlags.straightLineFitMomentum() )
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("MaxIterations", 15)
else:
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
......@@ -85,7 +84,7 @@ def MuidTrackCleaner( name='MuidTrackCleaner', **kwargs ):
kwargs.setdefault("PullCut" , 4.0)
kwargs.setdefault("PullCutPhi" , 4.0)
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("Iterate", False)
kwargs.setdefault("RecoverOutliers", False)
......@@ -121,7 +120,7 @@ def MuidCaloEnergyMeas( name='MuidCaloEnergyMeas', **kwargs ):
def MuidCaloEnergyTool( name='MuidCaloEnergyTool', **kwargs ):
kwargs.setdefault("CaloMeasTool", getPublicTool("MuidCaloEnergyMeas") )
kwargs.setdefault("CaloParamTool", getPublicTool("MuidCaloEnergyParam") )
if DetFlags.haveRIO.Calo_on() and not TriggerFlags.MuonSlice.doTrigMuonConfig:
if DetFlags.haveRIO.Calo_on() and not ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("EnergyLossMeasurement", True )
kwargs.setdefault("MinFinalEnergy", 1.0*GeV )
kwargs.setdefault("MinMuonPt", 10.0*GeV )
......@@ -129,7 +128,7 @@ def MuidCaloEnergyTool( name='MuidCaloEnergyTool', **kwargs ):
else:
kwargs.setdefault("EnergyLossMeasurement", False )
if DetFlags.haveRIO.ID_on() and not TriggerFlags.MuonSlice.doTrigMuonConfig:
if DetFlags.haveRIO.ID_on() and not ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("TrackIsolation", True )
else:
kwargs.setdefault("TrackIsolation", False )
......@@ -233,7 +232,7 @@ def MuonMaterialProviderTool( name = "MuonMaterialProviderTool"):
ToolSvc += muonCaloEnergyTool
materialProviderTool = TrackingCommon.getTrkMaterialProviderTool( name = "MuonTrkMaterialProviderTool", MuonCaloEnergyTool = muonCaloEnergyTool)
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
materialProviderTool.UseCaloEnergyMeasurement = False
return materialProviderTool
......@@ -276,7 +275,7 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
reco_cscs = MuonGeometryFlags.hasCSC() and muonRecFlags.doCSCs()
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("MuonHoleRecovery" , "" )
trigTrackSummary = getPublicToolClone("TrigMuonTrackSummary", "MuonTrackSummaryTool")
if DetFlags.detdescr.ID_on():
......@@ -356,7 +355,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ):
kwargs.setdefault("CaloMaterialProvider" , getPublicTool("MuonMaterialProviderTool"))
kwargs.setdefault("TrackQuery" , getPrivateTool("MuonTrackQuery") )
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("MuonHoleRecovery" , "" )
trigTrackSummary = getPublicToolClone("TrigMuonTrackSummary", "MuonTrackSummaryTool")
if DetFlags.detdescr.ID_on():
......@@ -418,7 +417,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ):
def MuidErrorOptimisationTool(name='MuidErrorOptimisationTool', **kwargs):
useAlignErrs = True
if conddb.dbdata == 'COMP200' or conddb.dbmc == 'COMP200' or 'HLT' in globalflags.ConditionsTag() or conddb.isOnline or TriggerFlags.MuonSlice.doTrigMuonConfig:
if conddb.dbdata == 'COMP200' or conddb.dbmc == 'COMP200' or 'HLT' in globalflags.ConditionsTag() or conddb.isOnline or ConfigFlags.Muon.MuonTrigger:
useAlignErrs = False
kwargs.setdefault( 'RefitTool', getPublicToolClone("MuidRefitTool", "MuonRefitTool", AlignmentErrors = useAlignErrs, Fitter = getPublicTool("iPatFitter") ) )
kwargs.setdefault( 'PrepareForFit', False )
......
......@@ -7,7 +7,7 @@ from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone
from AthenaCommon.BeamFlags import jobproperties
beamFlags = jobproperties.Beam
from TriggerJobOpts.TriggerFlags import TriggerFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from InDetRecExample import TrackingCommon
def MuonCombinedInDetDetailedTrackSelectorTool( name='MuonCombinedInDetDetailedTrackSelectorTool', **kwargs):
......@@ -24,7 +24,7 @@ def MuonCombinedInDetDetailedTrackSelectorTool( name='MuonCombinedInDetDetailedT
kwargs.setdefault("nHitBLayerPlusPix", 0 )
kwargs.setdefault("nHitTrt", 0 )
kwargs.setdefault("useTrackQualityInfo", False )
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("IPd0Max", 19999.0 )
kwargs.setdefault("IPz0Max", 19999.0 )
kwargs.setdefault("z0Max", 19999.0 )
......@@ -76,7 +76,7 @@ def AtlasTrackToVertexTool(name="AtlasTrackToVertexTool",**kwargs) :
return TrackingCommon.getInDetTrackToVertexTool(name, **kwargs)
def MuonCombinedParticleCreator(name="MuonCombinedParticleCreator",**kwargs):
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("TrackSummaryTool" , getPublicTool("MuonTrackSummaryTool") )
else:
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
......@@ -105,7 +105,7 @@ def MuonPrintingTool(name="MuonPrintingTool",**kwargs ):
def MuonCreatorTool(name="MuonCreatorTool",**kwargs):
kwargs.setdefault("CaloMaterialProvider", getPublicTool("MuonMaterialProviderTool"))
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault('MakeTrackAtMSLink',True)
kwargs.setdefault("FillTimingInformation",False)
kwargs.setdefault("MuonSelectionTool", "")
......@@ -130,7 +130,7 @@ def MuonCreatorTool_LRT(name="MuonCreatorTool_LRT",**kwargs):
return MuonCreatorTool(name, **kwargs)
def ExtrapolateMuonToIPTool(name="ExtrapolateMuonToIPTool",**kwargs):
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
kwargs.setdefault("TrackSummaryTool", getPublicTool("MuonTrackSummaryTool"))
else:
import MuonCombinedRecExample.CombinedMuonTrackSummary # noqa: F401 (import side-effects)
......@@ -142,7 +142,7 @@ def MuonCandidateTool(name="MuonCandidateTool",**kwargs):
if beamFlags.beamType() == 'cosmics':
kwargs.setdefault("ExtrapolationStrategy", 1 )
kwargs.setdefault("TrackExtrapolationTool", getPublicTool("ExtrapolateMuonToIPTool"))
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
trigTrackBuilder = getPublicToolClone("TrigCombinedMuonTrackBuilder","CombinedMuonTrackBuilder",
TrackSummaryTool=getPublicTool("MuonTrackSummaryTool"))
kwargs.setdefault("TrackBuilder", trigTrackBuilder)
......@@ -159,7 +159,7 @@ def MuonCombinedTool(name="MuonCombinedTool",**kwargs):
def MuonCombinedFitTagTool(name="MuonCombinedFitTagTool",**kwargs):
from AthenaCommon.AppMgr import ToolSvc
if TriggerFlags.MuonSlice.doTrigMuonConfig:
if ConfigFlags.Muon.MuonTrigger:
from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import Trk__IntersectorWrapper as Propagator
TrigMuonPropagator = Propagator(name = 'TrigMuonPropagator')
ToolSvc += TrigMuonPropagator
......
......@@ -7,13 +7,6 @@ from AthenaCommon.JobProperties import jobproperties # noqa: F401
from TriggerJobOpts.CommonSignatureHelper import CommonSignatureHelper
_flags = []
class doTrigMuonConfig(JobProperty):
""" configure for trigger if true, offline if false """
statusOn=True
allowedTypes=['bool']
StoredValue=False
_flags.append(doTrigMuonConfig)
class signatures(JobProperty):
""" signatures in Muon slice """
......
......@@ -406,7 +406,7 @@ if ConfigFlags.Trigger.doCalo:
CAtoGlobalWrapper(triggerTransBSCfg_Calo, ConfigFlags, seqName="HLTBeginSeq")
if ConfigFlags.Trigger.doMuon:
TriggerFlags.MuonSlice.doTrigMuonConfig=True
ConfigFlags.Muon.MuonTrigger=True
import MuonCnvExample.MuonCablingConfig # noqa: F401
import MuonRecExample.MuonReadCalib # noqa: F401
......
......@@ -20,8 +20,6 @@ CBTPnameFS = recordable("HLT_CBCombinedMuon_FSTrackParticles")
ExtrpTPname = recordable("HLT_MSExtrapolatedMuons_RoITrackParticles")
ExtrpTPnameFS = recordable("HLT_MSExtrapolatedMuons_FSTrackParticles")
MSextrpTPname = recordable("HLT_MSOnlyExtrapolatedMuons_FSTrackParticles")
from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.MuonSlice.doTrigMuonConfig=True
from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
......
Markdown is supported
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