6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
14 cfg.setPrivateTools(CompFactory.InDet.InDetAlignModuleTool(name, **kwargs))
19 flags, name="PixelGeometryManagerTool", **kwargs):
22 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
25 kwargs.setdefault(
"AlignmentLevel", 1)
26 kwargs.setdefault(
"AlignmentLevelBarrel", 12)
27 kwargs.setdefault(
"AlignmentLevelEndcaps", 12)
29 kwargs.setdefault(
"SetSoftCutBarrelX", 0.02)
30 kwargs.setdefault(
"SetSoftCutBarrelY", 0.02)
31 kwargs.setdefault(
"SetSoftCutBarrelZ", 0.02)
32 kwargs.setdefault(
"SetSoftCutBarrelRotX", 0.05)
33 kwargs.setdefault(
"SetSoftCutBarrelRotY", 0.05)
34 kwargs.setdefault(
"SetSoftCutBarrelRotZ", 0.05)
35 kwargs.setdefault(
"SetSoftCutEndcapX", 0.02)
36 kwargs.setdefault(
"SetSoftCutEndcapY", 0.02)
37 kwargs.setdefault(
"SetSoftCutEndcapZ", 0.02)
38 kwargs.setdefault(
"SetSoftCutEndcapRotX", 0.05)
39 kwargs.setdefault(
"SetSoftCutEndcapRotY", 0.05)
40 kwargs.setdefault(
"SetSoftCutEndcapRotZ", 0.05)
43 CompFactory.InDet.PixelGeometryManagerTool(name, **kwargs))
50 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
53 kwargs.setdefault(
"AlignmentLevel", 2)
54 kwargs.setdefault(
"AlignmentLevelBarrel", 2)
55 kwargs.setdefault(
"AlignmentLevelEndcaps", 2)
57 kwargs.setdefault(
"SetSoftCutBarrelX", 0.05)
58 kwargs.setdefault(
"SetSoftCutBarrelY", 0.05)
59 kwargs.setdefault(
"SetSoftCutBarrelZ", 0.05)
60 kwargs.setdefault(
"SetSoftCutBarrelRotX", 0.05)
61 kwargs.setdefault(
"SetSoftCutBarrelRotY", 0.05)
62 kwargs.setdefault(
"SetSoftCutBarrelRotZ", 0.05)
63 kwargs.setdefault(
"SetSoftCutEndcapX", 0.05)
64 kwargs.setdefault(
"SetSoftCutEndcapY", 0.05)
65 kwargs.setdefault(
"SetSoftCutEndcapZ", 0.005)
66 kwargs.setdefault(
"SetSoftCutEndcapRotX", 0.005)
67 kwargs.setdefault(
"SetSoftCutEndcapRotY", 0.05)
68 kwargs.setdefault(
"SetSoftCutEndcapRotZ", 0.05)
71 CompFactory.InDet.SCTGeometryManagerTool(name, **kwargs))
78 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
81 kwargs.setdefault(
"AlignPixel", flags.InDet.Align.alignPixel)
82 kwargs.setdefault(
"AlignSCT", flags.InDet.Align.alignSCT)
83 kwargs.setdefault(
"AlignmentLevel", 2)
84 kwargs.setdefault(
"ModuleSelection", [])
86 if kwargs[
"AlignPixel"]:
87 kwargs.setdefault(
"PixelGeometryManager", cfg.addPublicTool(
90 if kwargs[
"AlignSCT"]:
91 kwargs.setdefault(
"SCTGeometryManager", cfg.addPublicTool(
94 cfg.setPrivateTools(CompFactory.InDet.SiGeometryManagerTool(name, **kwargs))
101 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
104 kwargs.setdefault(
"AlignmentLevel", 2)
105 kwargs.setdefault(
"AlignmentLevelBarrel", 2)
106 kwargs.setdefault(
"AlignmentLevelEndcaps", 2)
107 kwargs.setdefault(
"AlignBarrelZ",
True)
109 kwargs.setdefault(
"SetSoftCutBarrelX", 0.1)
110 kwargs.setdefault(
"SetSoftCutBarrelY", 0.1)
111 kwargs.setdefault(
"SetSoftCutBarrelZ", 0.1)
112 kwargs.setdefault(
"SetSoftCutBarrelRotX", 0.05)
113 kwargs.setdefault(
"SetSoftCutBarrelRotY", 0.05)
114 kwargs.setdefault(
"SetSoftCutBarrelRotZ", 0.05)
115 kwargs.setdefault(
"SetSoftCutEndcapX", 0.1)
116 kwargs.setdefault(
"SetSoftCutEndcapY", 0.1)
117 kwargs.setdefault(
"SetSoftCutEndcapZ", 0.001)
118 kwargs.setdefault(
"SetSoftCutEndcapRotX", 0.05)
119 kwargs.setdefault(
"SetSoftCutEndcapRotY", 0.05)
120 kwargs.setdefault(
"SetSoftCutEndcapRotZ", 0.05)
123 CompFactory.InDet.TRTGeometryManagerTool(name, **kwargs))
128 flags, name="InDetGeometryManagerTool", **kwargs):
131 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
134 kwargs.setdefault(
"AlignSilicon", flags.InDet.Align.alignSilicon)
135 kwargs.setdefault(
"AlignTRT", flags.InDet.Align.alignTRT)
136 kwargs.setdefault(
"AlignmentLevel", 2)
138 if kwargs[
"AlignSilicon"]:
139 kwargs.setdefault(
"SiGeometryManager", cfg.addPublicTool(
142 if kwargs[
"AlignTRT"]:
143 kwargs.setdefault(
"TRTGeometryManager", cfg.addPublicTool(
147 CompFactory.InDet.InDetGeometryManagerTool(name, **kwargs))
157 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
159 kwargs.setdefault(
"PixelGeometryManager", cfg.addPublicTool(
161 kwargs.setdefault(
"SCTGeometryManager", cfg.addPublicTool(
163 kwargs.setdefault(
"SiGeometryManager", cfg.addPublicTool(
166 kwargs.setdefault(
"WriteOldConstants",
True)
168 cfg.setPrivateTools(CompFactory.InDet.SiTrkAlignDBTool(name, **kwargs))
174 cfg.addService(CompFactory.TRT_AlignDbSvc(name, **kwargs))
181 kwargs.setdefault(
"TrtAlignDbSvc", cfg.getPrimaryAndMerge(
183 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
185 kwargs.setdefault(
"TRTGeometryManager", cfg.addPublicTool(
188 kwargs.setdefault(
"WriteOldConstants",
True)
190 cfg.setPrivateTools(CompFactory.InDet.TRTTrkAlignDBTool(name, **kwargs))
197 kwargs.setdefault(
"SiTrkAlignDBTool", cfg.addPublicTool(
199 kwargs.setdefault(
"TRTTrkAlignDBTool", cfg.addPublicTool(
202 cfg.setPrivateTools(CompFactory.InDet.InDetTrkAlignDBTool(name, **kwargs))
209 if flags.InDet.Align.alignInDet:
211 elif flags.InDet.Align.alignTRT:
213 elif flags.InDet.Align.alignSilicon:
215 elif flags.InDet.Align.alignPixel:
217 elif flags.InDetAlign.alignSCT:
223 if flags.InDet.Align.alignInDet:
225 elif flags.InDet.Align.alignTRT:
227 elif (flags.InDet.Align.alignSilicon
or flags.InDet.Align.alignPixel
228 or flags.InDetAlign.alignSCT):
237 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
240 kwargs.setdefault(
"SolveOption", 3)
241 kwargs.setdefault(
"MinNumHitsPerModule", 10)
243 kwargs.setdefault(
"WriteTFile",
True)
244 kwargs.setdefault(
"ReadTFile",
True)
245 kwargs.setdefault(
"ScaleMatrix",
True)
246 kwargs.setdefault(
"WriteEigenMat",
False)
247 kwargs.setdefault(
"WriteEigenMatTxt",
False)
249 cfg.setPrivateTools(CompFactory.Trk.MatrixTool(name, **kwargs))
256 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
259 kwargs.setdefault(
"MatrixTool", cfg.popToolsAndMerge(
MatrixToolCfg(flags)))
261 kwargs.setdefault(
"StoreLocalDerivOnly", flags.InDet.Align.solveLocal)
262 kwargs.setdefault(
"SecondDerivativeCut", 0)
264 cfg.setPrivateTools(CompFactory.Trk.GlobalChi2AlignTool(name, **kwargs))
273 kwargs.setdefault(
"ResidualType", 0)
275 cfg.setPrivateTools(CompFactory.Trk.AlignResidualCalculator(name, **kwargs))
282 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
285 kwargs.setdefault(
"ResidualCalculator", cfg.popToolsAndMerge(
288 kwargs.setdefault(
"IncludeScatterers",
False)
289 kwargs.setdefault(
"RemoveATSOSNotInAlignModule",
False)
291 cfg.setPrivateTools(CompFactory.Trk.AlignTrackCreator(name, **kwargs))
298 flags, name="BeamspotVertexPreProcessor", **kwargs):
301 kwargs.setdefault(
"AlignModuleTool", cfg.addPublicTool(
304 if "TrackFitter" not in kwargs:
305 from TrkConfig.CommonTrackFitterConfig
import InDetTrackFitterCfg
306 kwargs.setdefault(
"TrackFitter", cfg.addPublicTool(
308 flags, FillDerivativeMatrix =
True))))
310 if "TrackToVertexIPEstimatorTool" not in kwargs:
311 from TrkConfig.TrkVertexFitterUtilsConfig
import (
312 TrackToVertexIPEstimatorCfg)
313 kwargs.setdefault(
"TrackToVertexIPEstimatorTool", cfg.addPublicTool(
316 if "BSConstraintTrackSelector" not in kwargs:
317 from InDetConfig.InDetTrackSelectionToolConfig
import (
318 Align_InDetTrackSelectionToolCfg)
319 kwargs.setdefault(
"BSConstraintTrackSelector", cfg.addPublicTool(
322 if "Extrapolator" not in kwargs:
323 from TrkConfig.AtlasExtrapolatorConfig
import InDetExtrapolatorCfg
324 kwargs.setdefault(
"Extrapolator", cfg.addPublicTool(
327 kwargs.setdefault(
"UseSingleFitter",
True)
328 kwargs.setdefault(
"RunOutlierRemoval",
False)
329 kwargs.setdefault(
"DoBSConstraint",
False)
330 kwargs.setdefault(
"DoAssociatedToPVSelection",
False)
333 CompFactory.Trk.BeamspotVertexPreProcessor(name, **kwargs))