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