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)
65 result = ComponentAccumulator()
66 if flags.Detector.GeometryMDT:
67 container =
"xMdtSimHits" if not useSDO
else "MDT_SDO"
68 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonMdtSimHitToTruthMappingAlg",
69 SimHitContainer = container,
70 HitIdDecoration =
"truthMdtHits")
71 result.addEventAlgo(the_alg)
72 if flags.Detector.GeometryRPC:
73 container =
"xRpcSimHits" if not useSDO
else "RPC_SDO"
74 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonRpcSimHitToTruthMappingAlg",
75 SimHitContainer = container,
76 HitIdDecoration =
"truthRpcHits")
77 result.addEventAlgo(the_alg)
78 if flags.Detector.GeometryTGC:
79 container =
"xTgcSimHits" if not useSDO
else "TGC_SDO"
80 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonTgcSimHitToTruthMappingAlg",
81 SimHitContainer = container,
82 HitIdDecoration =
"truthTgcHits")
83 result.addEventAlgo(the_alg)
84 if flags.Detector.GeometryMM:
85 container =
"xMmSimHits" if not useSDO
else "MM_SDO"
86 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonMmSimHitToTruthMappingAlg",
87 SimHitContainer = container,
88 HitIdDecoration =
"truthMMHits")
89 result.addEventAlgo(the_alg)
90 if flags.Detector.GeometrysTGC:
91 container =
"xStgcSimHits" if not useSDO
else "sTGC_SDO"
92 the_alg = CompFactory.MuonR4.SimHitToTruthPartAssocAlg(
"MuonsTGCSimHitToTruthMappingAlg",
93 SimHitContainer = container,
94 HitIdDecoration =
"truthStgcHits")
95 result.addEventAlgo(the_alg)
100 result = ComponentAccumulator()
101 from MuonTrackFindingAlgs.TrackFindingConfig
import TrackSummaryToolCfg
102 kwargs.setdefault(
"SummaryTool", result.popToolsAndMerge(TrackSummaryToolCfg(flags,
103 fillHoles=
False, fillOutliers=
False,
104 recomputeSegment =
False)))
105 the_alg = CompFactory.MuonR4.TruthHitSummaryAlg(name, **kwargs)
106 result.addEventAlgo(the_alg, primary =
True)
110 result = ComponentAccumulator()
112 kwargs.setdefault(
"SegmentKey",
"")
113 from MuonConfig.MuonDataPrepConfig
import PrimaryMeasContNamesCfg
114 kwargs.setdefault(
"PrdContainer", PrimaryMeasContNamesCfg(flags))
115 the_alg = CompFactory.MuonR4.RecoSegToTruthAssocAlg(**kwargs)
116 result.addEventAlgo(the_alg, primary =
True)
120 result = ComponentAccumulator()
122 if flags.Detector.GeometryMDT: hitDecors+=[
"truthMdtHits"]
123 if flags.Detector.GeometryRPC: hitDecors+=[
"truthRpcHits"]
124 if flags.Detector.GeometryTGC: hitDecors+=[
"truthTgcHits"]
125 if flags.Detector.GeometryMM: hitDecors+=[
"truthMMHits"]
126 if flags.Detector.GeometrysTGC: hitDecors+=[
"truthStgcHits"]
127 kwargs.setdefault(
"SimHitIds", hitDecors)
128 from ActsConfig.ActsGeometryConfig
import ActsExtrapolationToolCfg
129 kwargs.setdefault(
"ExtrapolationTool", result.popToolsAndMerge(ActsExtrapolationToolCfg(flags, MaxSteps=100000)))
130 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
131 kwargs.setdefault(
"TrackingGeometryTool", result.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(flags)))
133 the_alg = CompFactory.MuonR4.TruthSegToTruthPartAssocAlg(name, **kwargs)
134 result.addEventAlgo(the_alg, primary =
True)
138 result = ComponentAccumulator()
140 if flags.Detector.GeometryMDT: hitDecors+=[
"truthMdtHits"]
141 if flags.Detector.GeometryRPC: hitDecors+=[
"truthRpcHits"]
142 if flags.Detector.GeometryTGC: hitDecors+=[
"truthTgcHits"]
143 if flags.Detector.GeometryMM: hitDecors+=[
"truthMMHits"]
144 if flags.Detector.GeometrysTGC: hitDecors+=[
"truthStgcHits"]
145 kwargs.setdefault(
"SimHitIds", hitDecors)
146 the_alg = CompFactory.MuonR4.TrackToTruthPartAssocAlg(**kwargs)
147 result.addEventAlgo(the_alg, primary =
True)