8 result = ComponentAccumulator()
9 if not flags.Input.isMC:
12 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
13 result.merge(ActsGeometryContextAlgCfg(flags))
16 if flags.Detector.EnableMDT: containerNames+=[
"MDT_SDO" if useSDO
else "xMdtSimHits"]
17 if flags.Detector.EnableRPC: containerNames+=[
"RPC_SDO" if useSDO
else "xRpcSimHits"]
18 if flags.Detector.EnableTGC: containerNames+=[
"TGC_SDO" if useSDO
else "xTgcSimHits"]
19 if flags.Detector.EnableMM: containerNames+=[
"MM_SDO" if useSDO
else "xMmSimHits"]
20 if flags.Detector.EnablesTGC: containerNames+=[
"sTGC_SDO" if useSDO
else "xStgcSimHits"]
22 from MuonConfig.MuonCalibrationConfig
import MdtCalibDbAlgCfg, NswErrorCalibDbAlgCfg
23 if flags.Detector.EnableMDT:
24 result.merge(MdtCalibDbAlgCfg(flags))
25 if flags.Detector.EnableMM
or flags.Detector.EnablesTGC:
26 result.merge(NswErrorCalibDbAlgCfg(flags))
27 kwargs.setdefault(
"SimHitKeys", containerNames)
29 the_alg = CompFactory.MuonR4.TruthSegmentMaker(name, **kwargs)
30 result.addEventAlgo(the_alg, primary =
True)
34 result = ComponentAccumulator()
35 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
36 result.merge(ActsGeometryContextAlgCfg(flags))
37 the_alg = CompFactory.MuonR4.PrepDataToSimHitAssocAlg(name, **kwargs)
38 result.addEventAlgo(the_alg, primary =
True)
66 result = ComponentAccumulator()
67 if flags.Detector.GeometryMDT:
68 container =
"xMdtSimHits" if not useSDO
else "MDT_SDO"
69 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonMdtSimHitToTruthMappingAlg",
70 SimHitContainer = container,
71 HitIdDecoration =
"truthMdtHits")
72 result.addEventAlgo(the_alg)
73 if flags.Detector.GeometryRPC:
74 container =
"xRpcSimHits" if not useSDO
else "RPC_SDO"
75 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonRpcSimHitToTruthMappingAlg",
76 SimHitContainer = container,
77 HitIdDecoration =
"truthRpcHits")
78 result.addEventAlgo(the_alg)
79 if flags.Detector.GeometryTGC:
80 container =
"xTgcSimHits" if not useSDO
else "TGC_SDO"
81 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonTgcSimHitToTruthMappingAlg",
82 SimHitContainer = container,
83 HitIdDecoration =
"truthTgcHits")
84 result.addEventAlgo(the_alg)
85 if flags.Detector.GeometryMM:
86 container =
"xMmSimHits" if not useSDO
else "MM_SDO"
87 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonMmSimHitToTruthMappingAlg",
88 SimHitContainer = container,
89 HitIdDecoration =
"truthMMHits")
90 result.addEventAlgo(the_alg)
91 if flags.Detector.GeometrysTGC:
92 container =
"xStgcSimHits" if not useSDO
else "sTGC_SDO"
93 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonsTGCSimHitToTruthMappingAlg",
94 SimHitContainer = container,
95 HitIdDecoration =
"truthStgcHits")
96 result.addEventAlgo(the_alg)
101 result = ComponentAccumulator()
102 from MuonTrackFindingAlgs.TrackFindingConfig
import TrackSummaryToolCfg
103 kwargs.setdefault(
"SummaryTool", result.popToolsAndMerge(TrackSummaryToolCfg(flags,
104 fillHoles=
False, fillOutliers=
False,
105 recomputeSegment =
False)))
106 the_alg = CompFactory.MuonR4.TruthHitSummaryAlg(name, **kwargs)
107 result.addEventAlgo(the_alg, primary =
True)
111 result = ComponentAccumulator()
113 kwargs.setdefault(
"SegmentKey",
"")
114 from MuonConfig.MuonDataPrepConfig
import PrimaryMeasContNamesCfg
115 kwargs.setdefault(
"PrdContainer", PrimaryMeasContNamesCfg(flags))
116 the_alg = CompFactory.MuonR4.RecoSegToTruthAssocAlg(**kwargs)
117 result.addEventAlgo(the_alg, primary =
True)
121 result = ComponentAccumulator()
123 if flags.Detector.GeometryMDT: hitDecors+=[
"truthMdtHits"]
124 if flags.Detector.GeometryRPC: hitDecors+=[
"truthRpcHits"]
125 if flags.Detector.GeometryTGC: hitDecors+=[
"truthTgcHits"]
126 if flags.Detector.GeometryMM: hitDecors+=[
"truthMMHits"]
127 if flags.Detector.GeometrysTGC: hitDecors+=[
"truthStgcHits"]
128 kwargs.setdefault(
"SimHitIds", hitDecors)
129 the_alg = CompFactory.MuonR4.TruthSegToTruthPartAssocAlg(name, **kwargs)
130 result.addEventAlgo(the_alg, primary =
True)
134 result = ComponentAccumulator()
136 if flags.Detector.GeometryMDT: hitDecors+=[
"truthMdtHits"]
137 if flags.Detector.GeometryRPC: hitDecors+=[
"truthRpcHits"]
138 if flags.Detector.GeometryTGC: hitDecors+=[
"truthTgcHits"]
139 if flags.Detector.GeometryMM: hitDecors+=[
"truthMMHits"]
140 if flags.Detector.GeometrysTGC: hitDecors+=[
"truthStgcHits"]
141 kwargs.setdefault(
"SimHitIds", hitDecors)
142 the_alg = CompFactory.MuonR4.TrackToTruthPartAssocAlg(**kwargs)
143 result.addEventAlgo(the_alg, primary =
True)