48def LegacyMuonRecoChainCfg(flags):
49 result = ComponentAccumulator()
50 from MuonConfig.MuonSegmentFindingConfig import MuonLayerHoughAlgCfg, MuonSegmentFinderAlgCfg, MuonSegmentCnvAlgCfg
51
52 result.merge(MuonLayerHoughAlgCfg(flags))
53 result.merge(MuonSegmentFinderAlgCfg(flags, NSWSegmentCollectionName=""))
54
55 from MuonConfig.MuonTrackBuildingConfig import MuPatTrackBuilderCfg
56 result.merge(MuPatTrackBuilderCfg(flags))
57 from xAODTrackingCnv.xAODTrackingCnvConfig import MuonStandaloneTrackParticleCnvAlgCfg
58 result.merge(MuonStandaloneTrackParticleCnvAlgCfg(flags))
59
60 from MuonCombinedConfig.MuonCombinedReconstructionConfig import MuonCombinedMuonCandidateAlgCfg, MuonSegContainerMergerAlgCfg
61 result.merge(MuonCombinedMuonCandidateAlgCfg(flags))
62
63
64 result.merge(MuonSegContainerMergerAlgCfg(flags, TagMaps =[], InputSegmentContainers =["TrackMuonSegments"]))
65
66 result.merge(MuonSegmentCnvAlgCfg(flags,
67 SegmentContainerName="TrkMuonSegments",
68 xAODContainerName="MuonSegments"))
69
70 result.merge(MuonSegmentCnvAlgCfg(flags,
71 name = "UnAssocMuonSegmentAlg",
72 SegmentContainerName="UnAssocMuonTrkSegments",
73 xAODContainerName="UnAssocMuonSegments"))
74
75
76 from MuonCombinedConfig.MuonCombinedReconstructionConfig import MuonCreatorAlgCfg
77 result.merge(MuonCreatorAlgCfg(flags, TagMaps=[], CreateSAmuons = True, MakeClusters= False,
78 ClusterContainerName="", MuonContainerLocation="MuonsLegacy"))
79
80 result.getEventAlgo("MuonCreatorAlg").MuonCreatorTool.RequireMSOEforSA = False
81
82
83 from DerivationFrameworkMuons.MuonsToolsConfig import DiMuonTaggingAlgCfg
84 result.merge(DiMuonTaggingAlgCfg(flags, applyTrigger=False, Mu1RequireQual = False, Mu2RequireQual = False,
85 UseTrackProbe = False, InvariantMassLow=60. * 1000.,
86 TrackContainerKey = "MuonSpectrometerTrackParticles", BranchPrefix="HabemusZ",
87 MuonContainerKey = "MuonsLegacy"))
88
89
90 from MuonObjectMarker.ObjectMarkerConfig import SegmentMarkerAlgCfg, MeasurementMarkerAlgCfg
91 result.merge(SegmentMarkerAlgCfg(flags, SelectMuons="passHabemusZ", SegmentKey="MuonSegments", MuonKey="MuonsLegacy"))
92
93 result.merge(MeasurementMarkerAlgCfg(flags, SelectSegments="passHabemusZ",
94 SegmentKey="MuonSegments", SegmentLinkKey="HabemusZ"))
95
96 from MuonObjectMarker.ObjectMarkerConfig import MuonSegmentFitParDecorAlgCfg
97 result.merge(MuonSegmentFitParDecorAlgCfg(flags, name="MuonSegmentDecorAlg_MuonSegments",
98 SegmentKey="MuonSegments"))
99 result.merge(MuonSegmentFitParDecorAlgCfg(flags, name="MuonSegmentDecorAlg_UnAssocMuonSegments",
100 SegmentKey="UnAssocMuonSegments"))
101
102 if flags.Muon.setupTruthAlgorithms:
103 from MuonTruthAlgsR4.MuonTruthAlgsConfig import RecoSegmentTruthAssocCfg
104 result.merge(RecoSegmentTruthAssocCfg(flags,
105 name="TrkMuonSegmentsTruthMatchingAlg",
106 SegmentKey="MuonSegments"))
107 result.merge(RecoSegmentTruthAssocCfg(flags,
108 name="UnAssocSegmentsTruthMatchingAlg",
109 SegmentKey="UnAssocMuonSegments"))
110
111
112 from xAODMuonViewAlgs.ViewAlgsConfig import SegmentViewAlgCfg
113 result.merge(SegmentViewAlgCfg(flags,
114 SegmentsKeys=["UnAssocMuonSegments", "MuonSegments"],
115 ViewKey="LegacyChainSegments",
116 ExtraInputs = [] if not flags.Input.isMC else [( "SG::AuxVectorBase", "UnAssocMuonSegments.truthParticleLink"),
117 ( "SG::AuxVectorBase", "MuonSegments.truthParticleLink")]))
118
119 return result
120