Commit 008b5028 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'muon-newjo' into 'master'

Add inside-out muon reco to trigger new JO test

See merge request atlas/athena!41397
parents 884457ff 76f2582d
......@@ -122,7 +122,7 @@ def MuonCombinedInDetDetailedTrackSelectorToolCfg(flags, name="MuonCombinedInDet
def MuonCombinedParticleCreatorCfg(flags, name="MuonCombinedParticleCreator",**kwargs):
result = ComponentAccumulator()
if flags.Muon.MuonTrigger:
if flags.Muon.SAMuonTrigger:
from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryToolCfg
acc = MuonTrackSummaryToolCfg(flags)
kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools())
......@@ -140,7 +140,6 @@ def MuonCombinedParticleCreatorCfg(flags, name="MuonCombinedParticleCreator",**k
if flags.Beam.Type=="cosmics":
kwargs.setdefault("PerigeeExpression","Origin")
tool = CompFactory.Trk.TrackParticleCreatorTool(name,**kwargs)
result.addPublicTool(tool)
result.setPrivateTools(tool)
return result
......@@ -258,9 +257,12 @@ def MuonCreatorToolCfg(flags, name="MuonCreatorTool", **kwargs):
kwargs.setdefault("TrackQuery", result.popToolsAndMerge(MuonTrackQueryCfg(flags)) )
acc = MuonTrackSummaryToolCfg(flags)
kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools())
result.merge(acc)
if flags.Muon.SAMuonTrigger:
acc = MuonTrackSummaryToolCfg(flags)
kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools())
result.merge(acc)
else:
kwargs.setdefault("TrackSummaryTool", result.popToolsAndMerge(MuonCombinedTrackSummaryToolCfg(flags)))
if flags.Muon.MuonTrigger:
kwargs.setdefault('MakeTrackAtMSLink',True)
......@@ -275,7 +277,6 @@ def MuonCreatorToolCfg(flags, name="MuonCreatorTool", **kwargs):
result.addService(trackingVolSvc)
tool = CompFactory.MuonCombined.MuonCreatorTool(name,**kwargs)
result.addPublicTool(tool)
result.setPrivateTools(tool)
return result
......@@ -417,6 +418,7 @@ def iPatFitterCfg(flags, name='iPatFitter', **kwargs):
kwargs.setdefault("MaterialAllocator",result.popPrivateTools() )
if flags.Muon.MuonTrigger:
kwargs.setdefault("MaxIterations", 15)
if flags.Muon.SAMuonTrigger:
from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryToolCfg
acc = MuonTrackSummaryToolCfg(flags)
kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools())
......@@ -968,8 +970,8 @@ def MuonLayerSegmentMatchingToolCfg(flags, name="MuonLayerSegmentMatchingTool",
return result
def MuonInsideOutRecoToolCfg(flags, name="MuonInsideOutRecoTool", **kwargs ):
# if TriggerFlags.MuonSlice.doTrigMuonConfig:
# kwargs.setdefault("VertexContainer", "")
if flags.Muon.MuonTrigger:
kwargs.setdefault("VertexContainer", "")
result = MuonLayerSegmentFinderToolCfg(flags, name= "MuonLayerSegmentFinderTool")
layersegmentfindertool = result.popPrivateTools()
kwargs.setdefault("MuonLayerSegmentFinderTool", layersegmentfindertool)
......@@ -1006,8 +1008,8 @@ def MuonInsideOutRecoToolCfg(flags, name="MuonInsideOutRecoTool", **kwargs ):
kwargs.setdefault("TrackAmbiguityProcessor", acc.getPrimary())
result.merge(acc)
from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryToolCfg
kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge( MuonTrackSummaryToolCfg(flags) ) )
kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge( MuonCombinedTrackSummaryToolCfg(flags) ) )
tool = CompFactory.MuonCombined.MuonInsideOutRecoTool(name, **kwargs)
result.setPrivateTools(tool)
......
......@@ -39,3 +39,24 @@ def TrigMuonEFTrackIsolationAlgCfg(flags, name = "TrigMuonEFTrackIsolation", **k
acc.addEventAlgo(isoAlg)
return acc
def MuonFilterAlgCfg(flags, name="FilterZeroMuons", **kwargs):
filterZeroMuons = CompFactory.MuonFilterAlg
acc = ComponentAccumulator()
kwargs.setdefault("MuonContainerLocation", "MuonsCB")
acc.addEventAlgo(filterZeroMuons(name, **kwargs))
return acc
def MergeEFMuonsAlgCfg(flags, name="MergeEFMuonsAlg", **kwargs):
mergeMuons = CompFactory.MergeEFMuonsAlg
acc = ComponentAccumulator()
kwargs.setdefault("MuonCBContainerLocation", "MuonsCB_outsideIn")
kwargs.setdefault("MuonInsideOutContainerLocation", "MuonsCB_insideOut")
kwargs.setdefault("MuonOutputLocation", "MuonsCB")
acc.addEventAlgo(mergeMuons(name, **kwargs))
return acc
......@@ -25,10 +25,11 @@ from LArGeoAlgsNV.LArGMConfig import LArGMCfg
from TileGeoModel.TileGMConfig import TileGMCfg
from MuonConfig.MuonSegmentFindingConfig import MooSegmentFinderAlgCfg
from MuonConfig.MuonTrackBuildingConfig import MuonTrackBuildingCfg
from MuonCombinedConfig.MuonCombinedReconstructionConfig import MuonCombinedMuonCandidateAlgCfg
from MuonCombinedConfig.MuonCombinedReconstructionConfig import MuonCombinedMuonCandidateAlgCfg, MuonInsideOutRecoAlgCfg
from MuonCombinedConfig.MuonCombinedReconstructionConfig import MuonCombinedInDetCandidateAlg, MuonCombinedAlgCfg, MuonCreatorAlgCfg
from TrigMuonEF.TrigMuonEFConfig_newJO import TrigMuonEFTrackIsolationAlgCfg
from TrigMuonEF.TrigMuonEFConfig_newJO import TrigMuonEFTrackIsolationAlgCfg, MuonFilterAlgCfg, MergeEFMuonsAlgCfg
from AthenaCommon.CFElements import seqAND, parOR, seqOR
import pprint
from AthenaCommon.Logging import logging
......@@ -43,6 +44,9 @@ def EFMuonCBViewDataVerifierCfg(name):
EFMuonCBViewDataVerifier.DataObjects = [( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ),
( 'Muon::TgcPrepDataContainer' , 'StoreGateSvc+TGC_Measurements' ),
( 'Muon::RpcPrepDataContainer' , 'StoreGateSvc+RPC_Measurements' ),
( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ),
( 'Muon::CscPrepDataContainer' , 'StoreGateSvc+CSC_Clusters' ),
( 'Muon::HoughDataPerSectorVec' , 'StoreGateSvc+HoughDataPerSectorVec' ),
( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
if 'FS' in name:
EFMuonCBViewDataVerifier.DataObjects += [( 'MuonCandidateCollection' , 'StoreGateSvc+MuonCandidates_FS' )]
......@@ -71,6 +75,7 @@ def EFMuonViewDataVerifierCfg(name='RoI'):
result.addEventAlgo(EFMuonViewDataVerifier)
return result
def MuFastViewDataVerifier():
result = ComponentAccumulator()
dataobjects = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
......@@ -406,12 +411,38 @@ def muEFCBStep(flags, chainDict, name='RoI'):
InDetCandidateLocation="IndetCandidates_"+name, MuonContainerLocation = "MuonsCB_"+name, SegmentContainerName = "xaodCBSegments", TrackSegmentContainerName = "TrkCBSegments",
ExtrapolatedLocation = "CBExtrapolatedMuons", MSOnlyExtrapolatedLocation = "CBMSonlyExtrapolatedMuons", CombinedLocation = "HLT_CBCombinedMuon_"+name)
recoCB.mergeReco(muonCreatorCBCfg)
#Inside out recovery
finalMuons = "MuonsCB_"+name
if 'FS' not in name:
acc = ComponentAccumulator()
seqIO = seqOR("muonInsideOutSeq")
acc.addSequence(seqIO)
seqFilter = seqAND("muonFilterSeq")
acc.addSequence(seqFilter, seqIO.name)
muonFilterCfg = MuonFilterAlgCfg(flags, name="FilterZeroMuons", MuonContainerLocation="MuonsCB_"+name)
acc.merge(muonFilterCfg, sequenceName=seqFilter.name)
seqIOreco = parOR("muonInsideOutRecoSeq")
acc.addSequence(seqIOreco, parentName=seqFilter.name)
muonInsideOutCfg = MuonInsideOutRecoAlgCfg(flags, name="TrigMuonInsideOutRecoAlg", InDetCandidateLocation = "IndetCandidates_"+name)
acc.merge(muonInsideOutCfg, sequenceName=seqIOreco.name)
insideOutCreatorAlgCfg = MuonCreatorAlgCfg(flags, name="TrigMuonCreatorAlgInsideOut", TagMaps=["muGirlTagMap"], InDetCandidateLocation="IndetCandidates_"+name,
MuonContainerLocation = "MuonsInsideOut_"+name, SegmentContainerName = "xaodInsideOutCBSegments",
TrackSegmentContainerName = "TrkInsideOutCBSegments", ExtrapolatedLocation = "InsideOutCBExtrapolatedMuons",
MSOnlyExtrapolatedLocation = "InsideOutCBMSOnlyExtrapolatedMuons", CombinedLocation = "InsideOutCBCombinedMuon")
acc.merge(insideOutCreatorAlgCfg, sequenceName=seqIOreco.name)
finalMuons = "MuonsCBMerged"
muonMergeCfg = MergeEFMuonsAlgCfg(flags, name="MergeEFMuons", MuonCBContainerLocation = "MuonsCB_"+name,
MuonInsideOutContainerLocation = "MuonsInsideOut_"+name, MuonOutputLocation = finalMuons)
acc.merge(muonMergeCfg, sequenceName=seqIO.name)
recoCB.mergeReco(acc)
selAccEFCB.mergeReco(recoCB)
efmuCBHypo = efMuHypoCfg( flags,
name = 'TrigMuonEFCBHypo_'+name,
inputMuons = "MuonsCB_"+name )
inputMuons = finalMuons )
selAccEFCB.addHypoAlgo(efmuCBHypo)
......
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