3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from MuonConfig.MuonDataPrepConfig
import PrimaryMeasContNamesCfg
12 from MuonObjectMarker.ObjectMarkerConfig
import TruthMeasMarkerAlgCfg
14 kwargs.setdefault(
"TruthSegDecors", [markerAlg.SegmentLinkKey])
15 kwargs[
"TruthSegDecors"] += [markerAlg.SegmentLinkKey]
16 the_tool = CompFactory.MuonValR4.PatternVisualizationTool(name, **kwargs)
17 result.setPrivateTools(the_tool)
23 kwargs.setdefault(
"isMC", flags.Input.isMC)
24 theAlg = CompFactory.MuonValR4.MuonRecoChainTester(name, **kwargs)
25 result.addEventAlgo(theAlg, primary =
True)
30 kwargs.setdefault(
"isMC", flags.Input.isMC)
33 if flags.Detector.GeometryMDT
or flags.Detector.GeometryRPC
or flags.Detector.GeometryTGC:
34 seedKeys+=[
"MuonHoughStationSegmentSeeds"]
35 segmentKeys+=[
"R4MuonSegments"]
36 if flags.Detector.GeometryMM
or flags.Detector.GeometrysTGC:
37 seedKeys+=[
"MuonHoughNswSegmentSeeds"]
38 segmentKeys+=[
"R4MuonSegmentsNsw"]
39 kwargs.setdefault(
"SegmentSeedKeys", seedKeys)
40 kwargs.setdefault(
"SegmentKeys", segmentKeys)
42 theAlg = CompFactory.MuonValR4.MuonHoughTransformTester(name, **kwargs)
43 result.addEventAlgo(theAlg, primary=
True)
48 from MuonConfig.MuonSegmentFindingConfig
import MuonLayerHoughAlgCfg, MuonSegmentFinderAlgCfg, MuonSegmentCnvAlgCfg
53 from MuonConfig.MuonTrackBuildingConfig
import MuPatTrackBuilderCfg
55 from xAODTrackingCnv.xAODTrackingCnvConfig
import MuonStandaloneTrackParticleCnvAlgCfg
58 from MuonCombinedConfig.MuonCombinedReconstructionConfig
import MuonCombinedMuonCandidateAlgCfg, MuonSegContainerMergerAlgCfg
65 SegmentContainerName=
"TrkMuonSegments",
66 xAODContainerName=
"MuonSegments"))
69 name =
"UnAssocMuonSegmentAlg",
70 SegmentContainerName=
"UnAssocMuonTrkSegments",
71 xAODContainerName=
"UnAssocMuonSegments"))
74 from MuonCombinedConfig.MuonCombinedReconstructionConfig
import MuonCreatorAlgCfg
75 result.merge(
MuonCreatorAlgCfg(flags, TagMaps=[], CreateSAmuons =
True, MakeClusters=
False,
76 ClusterContainerName=
""))
78 result.getEventAlgo(
"MuonCreatorAlg").MuonCreatorTool.RequireMSOEforSA =
False
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"))
87 from MuonObjectMarker.ObjectMarkerConfig
import SegmentMarkerAlgCfg, MeasurementMarkerAlgCfg
88 result.merge(
SegmentMarkerAlgCfg(flags, SelectMuons=
"passHabemusZ", SegmentKey=
"MuonSegments"))
91 SegmentKey=
"MuonSegments", SegmentLinkKey=
"HabemusZ"))
93 from MuonObjectMarker.ObjectMarkerConfig
import MuonSegmentFitParDecorAlgCfg
95 SegmentKey=
"MuonSegments"))
97 SegmentKey=
"UnAssocMuonSegments"))
100 from MuonTruthAlgsR4.MuonTruthAlgsConfig
import RecoSegmentTruthAssocCfg
102 name=
"TrkMuonSegmentsTruthMatchingAlg",
103 SegmentKey=
"MuonSegments"))
105 name=
"UnAssocSegmentsTruthMatchingAlg",
106 SegmentKey=
"UnAssocMuonSegments"))
109 from xAODMuonViewAlgs.ViewAlgsConfig
import SegmentViewAlgCfg
111 SegmentsKeys=[
"UnAssocMuonSegments",
"MuonSegments"],
112 ViewKey=
"LegacyChainSegments",
113 ExtraInputs = []
if not flags.Input.isMC
else [(
"SG::AuxVectorBase",
"UnAssocMuonSegments.truthParticleLink"),
114 (
"SG::AuxVectorBase",
"MuonSegments.truthParticleLink")]))
120 from MuonPatternCnv.MuonPatternCnvConfig
import MuonPatternCnvAlgCfg
122 PatternCombiKey=
"R4HoughPatterns",
123 HoughDataPerSecKey=
"R4HoughDataPerSec"))
124 from MuonConfig.MuonSegmentFindingConfig
import MuonSegmentFinderAlgCfg, MuonSegmentCnvAlgCfg
126 name=
"MuonSegmentFinderR4Pattern",
127 MuonLayerHoughCombisKey=
"R4HoughPatterns",
128 SegmentCollectionName=
"TrkMuonSegmentsFromHoughR4",
129 NSWSegmentCollectionName=
""))
131 SegmentContainerName=
"TrkMuonSegmentsFromHoughR4",
132 xAODContainerName=
"MuonSegmentsFromHoughR4"))
134 from MuonConfig.MuonTrackBuildingConfig
import MuPatTrackBuilderCfg
136 from xAODTrackingCnv.xAODTrackingCnvConfig
import MuonStandaloneTrackParticleCnvAlgCfg
138 MuonSegmentCollection =
"TrkMuonSegmentsFromHoughR4",
139 SpectrometerTrackOutputLocation=
"MuonTracksFromHoughR4"))
141 TrackContainerName=
"MuonTracksFromHoughR4",
142 xAODTrackParticlesFromTracksContainerName=
"MuonSpectrometerTrackParticlesFromHoughR4"))
145 from MuonObjectMarker.ObjectMarkerConfig
import MuonSegmentFitParDecorAlgCfg
147 SegmentKey=
"MuonSegmentsFromHoughR4"))
149 from MuonTruthAlgsR4.MuonTruthAlgsConfig
import RecoSegmentTruthAssocCfg
151 name=
"MuonSegmentsFromHoughR4TruthMatching",
152 SegmentKey=
"MuonSegmentsFromHoughR4"))
159 from MuonSegmentCnv.MuonSegmentCnvConfig
import MuonR4SegmentCnvAlgCfg
162 from MuonConfig.MuonTrackBuildingConfig
import MuPatTrackBuilderCfg
164 MuonSegmentCollection =
"TrackMuonSegmentsR4",
165 SpectrometerTrackOutputLocation=
"MuonTracksR4"))
166 from xAODTrackingCnv.xAODTrackingCnvConfig
import MuonStandaloneTrackParticleCnvAlgCfg
169 TrackContainerName=
"MuonTracksR4",
170 xAODTrackParticlesFromTracksContainerName=
"MuonSpectrometerTrackParticlesR4"))
176 if not flags.Input.isMC:
178 from MuonTruthAlgsR4.MuonTruthAlgsConfig
import TrackToTruthPartAssocCfg
180 track_colstp = [
"MuonSpectrometerTrackParticlesR4",
"MuonSpectrometerTrackParticlesFromHoughR4",
"MuonSpectrometerTrackParticles"]
182 for trk
in track_colstp: