13 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
14 from AthenaConfiguration.ComponentFactory
import CompFactory
15 from AthenaConfiguration.Enums
import BeamType
19 name="InDetAmbiguityProcessor",
20 ClusterSplitProbContainer='',
27 if "ScoringTool" not in kwargs:
28 if (flags.Beam.Type
is BeamType.Cosmics):
29 from InDetConfig.InDetTrackScoringToolsConfig
import (
30 InDetCosmicsScoringToolCfg
as InDetScoringToolCfg)
31 elif (flags.Tracking.ActiveConfig.extension ==
"R3LargeD0" and
32 flags.Tracking.nnCutLargeD0Threshold > 0):
34 from InDetConfig.InDetTrackScoringToolsConfig
import (
35 InDetNNScoringToolSiCfg
as InDetScoringToolCfg)
37 from InDetConfig.InDetTrackScoringToolsConfig
import (
38 InDetAmbiScoringToolSiCfg
as InDetScoringToolCfg)
39 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
40 InDetScoringToolCfg(flags)))
42 if "Fitter" not in kwargs:
43 if flags.Tracking.ActiveConfig.isLowPt:
44 from TrkConfig.CommonTrackFitterConfig
import (
45 InDetTrackFitterLowPtCfg)
46 InDetTrackFitter = acc.popToolsAndMerge(
49 from TrkConfig.CommonTrackFitterConfig
import InDetTrackFitterCfg
51 kwargs.setdefault(
"Fitter", InDetTrackFitter)
53 if "AssociationTool" not in kwargs:
54 from InDetConfig.InDetAssociationToolsConfig
import (
55 InDetPRDtoTrackMapToolGangedPixelsCfg)
56 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
59 if "TrackSummaryTool" not in kwargs:
60 from TrkConfig.TrkTrackSummaryToolConfig
import (
61 InDetTrackSummaryToolCfg)
62 kwargs.setdefault(
"TrackSummaryTool", acc.popToolsAndMerge(
65 if "SelectionTool" not in kwargs:
66 from InDetConfig.InDetAmbiTrackSelectionToolConfig
import (
67 InDetAmbiTrackSelectionToolCfg)
68 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
71 kwargs.setdefault(
"InputClusterSplitProbabilityName",
72 ClusterSplitProbContainer)
73 kwargs.setdefault(
"OutputClusterSplitProbabilityName", (
74 'InDetAmbiguityProcessorSplitProb' +
75 flags.Tracking.ActiveConfig.extension))
76 kwargs.setdefault(
"SuppressTrackFit", (
77 not flags.Tracking.ActiveConfig.doAmbiguityProcessorTrackFit))
78 kwargs.setdefault(
"SuppressHoleSearch",
False)
79 kwargs.setdefault(
"tryBremFit",
80 flags.Tracking.ActiveConfig.doBremRecoverySi)
81 kwargs.setdefault(
"caloSeededBrem", flags.Tracking.doCaloSeededBrem)
82 kwargs.setdefault(
"pTminBrem", flags.Tracking.ActiveConfig.minPTBrem)
83 kwargs.setdefault(
"RefitPrds",
True)
84 kwargs.setdefault(
"MatEffects", flags.Tracking.materialInteractionsType
85 if flags.Tracking.materialInteractions
else 0)
87 if flags.Tracking.ActiveConfig.extension ==
"Pixel":
88 kwargs.setdefault(
"SuppressHoleSearch",
True)
90 acc.setPrivateTools(CompFactory.Trk.SimpleAmbiguityProcessorTool(
91 name+flags.Tracking.ActiveConfig.extension, **kwargs))
97 name='InDetTRT_SeededAmbiguityProcessor',
98 ClusterSplitProbContainer="",
102 if "Fitter" not in kwargs:
103 from TrkConfig.CommonTrackFitterConfig
import InDetTrackFitterBTCfg
104 kwargs.setdefault(
"Fitter", acc.popToolsAndMerge(
107 if "AssociationTool" not in kwargs:
108 from InDetConfig.InDetAssociationToolsConfig
import (
109 InDetPRDtoTrackMapToolGangedPixelsCfg)
110 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
116 if "ScoringTool" not in kwargs:
117 if flags.Beam.Type
is BeamType.Cosmics:
118 from InDetConfig.InDetTrackScoringToolsConfig
import (
119 InDetCosmicScoringTool_TRTCfg
as InDetScoringToolCfg)
121 from InDetConfig.InDetTrackScoringToolsConfig
import (
122 InDetTRT_SeededScoringToolCfg
as InDetScoringToolCfg)
123 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
124 InDetScoringToolCfg(flags)))
126 if "TrackSummaryTool" not in kwargs:
127 from TrkConfig.TrkTrackSummaryToolConfig
import (
128 InDetTrackSummaryToolCfg)
129 kwargs.setdefault(
"TrackSummaryTool", acc.popToolsAndMerge(
132 if "SelectionTool" not in kwargs:
133 from InDetConfig.InDetAmbiTrackSelectionToolConfig
import (
134 InDetTRTAmbiTrackSelectionToolCfg)
135 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
138 kwargs.setdefault(
"InputClusterSplitProbabilityName",
139 ClusterSplitProbContainer)
140 kwargs.setdefault(
"OutputClusterSplitProbabilityName", (
141 'InDetTRT_SeededAmbiguityProcessorSplitProb' +
142 flags.Tracking.ActiveConfig.extension))
143 kwargs.setdefault(
"RefitPrds",
False)
144 kwargs.setdefault(
"SuppressTrackFit", (
145 not flags.Tracking.ActiveConfig.doAmbiguityProcessorTrackFit))
146 kwargs.setdefault(
"SuppressHoleSearch",
False)
147 kwargs.setdefault(
"MatEffects", flags.Tracking.materialInteractionsType
148 if flags.Tracking.materialInteractions
else 0)
151 CompFactory.Trk.SimpleAmbiguityProcessorTool(name, **kwargs))
157 name='InDetTrig_SeededAmbiguityProcessor',
163 kwargs.setdefault(
"SuppressTrackFit", (
164 not flags.Tracking.ActiveConfig.doAmbiguityProcessorTrackFit))
166 kwargs.setdefault(
"SuppressHoleSearch",
False)
169 kwargs.setdefault(
"tryBremFit",
170 flags.Tracking.ActiveConfig.doBremRecoverySi)
171 kwargs.setdefault(
"pTminBrem", 5*Units.GeV)
172 kwargs.setdefault(
"MatEffects", 3)
174 if "Fitter" not in kwargs:
175 from TrkConfig.TrkGlobalChi2FitterConfig
import (
176 InDetTrigGlobalChi2FitterCfg,InDetTrigGlobalChi2FitterCosmicsCfg)
177 if flags.Tracking.ActiveConfig.input_name ==
"cosmics":
178 kwargs.setdefault(
"Fitter", acc.popToolsAndMerge(
181 kwargs.setdefault(
"Fitter", acc.popToolsAndMerge(
184 if "ScoringTool" not in kwargs:
185 from InDetConfig.InDetTrackScoringToolsConfig
import (
186 InDetTrigAmbiScoringToolCfg)
187 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
190 if "TrackSummaryTool" not in kwargs:
191 from TrkConfig.TrkTrackSummaryToolConfig
import (
192 InDetTrigTrackSummaryToolCfg)
193 kwargs.setdefault(
"TrackSummaryTool", acc.popToolsAndMerge(
196 if "AssociationTool" not in kwargs:
197 from InDetConfig.InDetAssociationToolsConfig
import (
198 TrigPRDtoTrackMapToolGangedPixelsCfg)
199 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
202 if "SelectionTool" not in kwargs:
203 from InDetConfig.InDetAmbiTrackSelectionToolConfig
import (
204 InDetTrigAmbiTrackSelectionToolCfg,InDetTrigAmbiTrackSelectionToolCosmicsCfg)
206 if flags.Tracking.ActiveConfig.input_name ==
"cosmics":
207 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
210 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
214 CompFactory.Trk.SimpleAmbiguityProcessorTool(name, **kwargs))
220 name="InDetAmbiguityScoreProcessor",
221 ClusterSplitProbContainer="",
227 if "ScoringTool" not in kwargs:
228 if (flags.Beam.Type
is BeamType.Cosmics):
229 from InDetConfig.InDetTrackScoringToolsConfig
import (
230 InDetCosmicsScoringToolCfg
as InDetScoringToolCfg)
231 elif (flags.Tracking.ActiveConfig.extension ==
"R3LargeD0" and
232 flags.Tracking.nnCutLargeD0Threshold > 0):
233 from InDetConfig.InDetTrackScoringToolsConfig
import (
234 InDetNNScoringToolSiCfg
as InDetScoringToolCfg)
236 from InDetConfig.InDetTrackScoringToolsConfig
import (
237 InDetAmbiScoringToolSiCfg
as InDetScoringToolCfg)
238 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
239 InDetScoringToolCfg(flags)))
241 if "SplitProbTool" not in kwargs:
242 if flags.Tracking.doPixelTruthSplit:
243 from InDetConfig.SiClusterizationToolConfig
import (
244 TruthPixelClusterSplitProbToolCfg
as PixelClusterSplitProbToolCfg)
246 from InDetConfig.SiClusterizationToolConfig
import (
247 NnPixelClusterSplitProbToolCfg
as PixelClusterSplitProbToolCfg)
248 kwargs.setdefault(
"SplitProbTool", (
249 acc.popToolsAndMerge(PixelClusterSplitProbToolCfg(flags))
250 if flags.Tracking.doPixelClusterSplitting
else None))
252 if "AssociationTool" not in kwargs:
253 from InDetConfig.InDetAssociationToolsConfig
import (
254 InDetPRDtoTrackMapToolGangedPixelsCfg)
255 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
258 if "AssociationToolNotGanged" not in kwargs:
259 from TrkConfig.TrkAssociationToolsConfig
import PRDtoTrackMapToolCfg
260 kwargs.setdefault(
"AssociationToolNotGanged",
263 kwargs.setdefault(
"AssociationMapName", (
264 "PRDtoTrackMapAmbi_"+flags.Tracking.ActiveConfig.extension))
266 if flags.Tracking.ActiveConfig.useTIDE_Ambi:
267 kwargs.setdefault(
"sharedProbCut",
268 flags.Tracking.pixelClusterSplitProb1)
269 kwargs.setdefault(
"sharedProbCut2",
270 flags.Tracking.pixelClusterSplitProb2)
272 extension = flags.Tracking.ActiveConfig.extension
273 if extension == flags.Tracking.PrimaryPassConfig.value:
275 kwargs.setdefault(
"SplitClusterMap_new", (
276 f
"SplitClusterAmbiguityMap{extension}"))
278 kwargs.setdefault(
"InputClusterSplitProbabilityName",
279 ClusterSplitProbContainer)
280 kwargs.setdefault(
"OutputClusterSplitProbabilityName",
281 f
"SplitProb{flags.Tracking.ActiveConfig.extension}")
283 if (flags.Tracking.doTIDE_AmbiTrackMonitoring
and
284 flags.Tracking.ActiveConfig.extension ==
""):
285 from TrkConfig.TrkValToolsConfig
import TrkObserverToolCfg
287 acc.addPublicTool(TrkObserverTool)
288 kwargs.setdefault(
"ObserverTool", TrkObserverTool)
291 CompFactory.Trk.DenseEnvironmentsAmbiguityScoreProcessorTool(
292 f
"{name}{flags.Tracking.ActiveConfig.extension}", **kwargs))
298 name="ITkAmbiguityScoreProcessor",
299 ClusterSplitProbContainer='',
307 if "ScoringTool" not in kwargs:
308 if flags.Beam.Type
is BeamType.Cosmics:
309 from InDetConfig.InDetTrackScoringToolsConfig
import (
310 ITkCosmicsScoringToolCfg
as ITkScoringToolCfg)
312 from InDetConfig.InDetTrackScoringToolsConfig
import (
313 ITkAmbiScoringToolCfg
as ITkScoringToolCfg)
314 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
315 ITkScoringToolCfg(flags)))
317 if "SplitProbTool" not in kwargs:
318 if flags.Tracking.doPixelTruthSplit:
319 from InDetConfig.SiClusterizationToolConfig
import (
320 ITkTruthPixelClusterSplitProbToolCfg
as PixelClusterSplitProbToolCfg)
322 from InDetConfig.SiClusterizationToolConfig
import (
323 ITkNnPixelClusterSplitProbToolCfg
as PixelClusterSplitProbToolCfg)
324 kwargs.setdefault(
"SplitProbTool", (
325 acc.popToolsAndMerge(PixelClusterSplitProbToolCfg(flags))
326 if flags.Tracking.doPixelClusterSplitting
else None))
328 if "AssociationTool" not in kwargs:
329 from InDetConfig.InDetAssociationToolsConfig
import (
330 ITkPRDtoTrackMapToolGangedPixelsCfg)
331 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
334 if "AssociationToolNotGanged" not in kwargs:
335 from TrkConfig.TrkAssociationToolsConfig
import (
336 PRDtoTrackMapToolCfg)
337 kwargs.setdefault(
"AssociationToolNotGanged", acc.popToolsAndMerge(
340 kwargs.setdefault(
"sharedProbCut", flags.Tracking.pixelClusterSplitProb1)
341 kwargs.setdefault(
"sharedProbCut2", flags.Tracking.pixelClusterSplitProb2)
343 extension = flags.Tracking.ActiveConfig.extension
344 if extension == flags.Tracking.PrimaryPassConfig.value:
346 kwargs.setdefault(
"SplitClusterMap_new", (
347 'SplitClusterAmbiguityMap' + extension))
349 kwargs.setdefault(
"AssociationMapName", (
350 'ITkPRDtoTrackMapAmbi_' + flags.Tracking.ActiveConfig.extension))
351 kwargs.setdefault(
"InputClusterSplitProbabilityName", (
352 ClusterSplitProbContainer))
353 kwargs.setdefault(
"OutputClusterSplitProbabilityName", (
354 'SplitProb'+flags.Tracking.ActiveConfig.extension))
357 CompFactory.Trk.DenseEnvironmentsAmbiguityScoreProcessorTool(
358 name+flags.Tracking.ActiveConfig.extension, **kwargs))
364 name="InDetAmbiguityProcessor",
370 if "ScoringTool" not in kwargs:
371 if (flags.Beam.Type
is BeamType.Cosmics):
372 from InDetConfig.InDetTrackScoringToolsConfig
import (
373 InDetCosmicsScoringToolCfg
as InDetScoringToolCfg)
374 elif (flags.Tracking.ActiveConfig.extension ==
"R3LargeD0" and
375 flags.Tracking.nnCutLargeD0Threshold > 0):
376 from InDetConfig.InDetTrackScoringToolsConfig
import (
377 InDetNNScoringToolSiCfg
as InDetScoringToolCfg)
379 from InDetConfig.InDetTrackScoringToolsConfig
import (
380 InDetAmbiScoringToolSiCfg
as InDetScoringToolCfg)
381 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
382 InDetScoringToolCfg(flags)))
384 if "Fitter" not in kwargs:
387 if flags.Tracking.ActiveConfig.isLowPt:
388 from TrkConfig.CommonTrackFitterConfig
import (
389 InDetTrackFitterLowPtAmbiCfg)
390 InDetTrackFitterLowPt = acc.popToolsAndMerge(
393 name=(
'InDetTrackFitterLowPt' +
394 flags.Tracking.ActiveConfig.extension)))
395 fitter_list.append(InDetTrackFitterLowPt)
397 from TrkConfig.CommonTrackFitterConfig
import (
398 InDetTrackFitterAmbiCfg)
399 InDetTrackFitterAmbi = acc.popToolsAndMerge(
402 name=(
'InDetTrackFitterAmbi' +
403 flags.Tracking.ActiveConfig.extension)))
404 fitter_list.append(InDetTrackFitterAmbi)
406 kwargs.setdefault(
"Fitter", fitter_list)
408 if "AssociationTool" not in kwargs:
409 from InDetConfig.InDetAssociationToolsConfig
import (
410 InDetPRDtoTrackMapToolGangedPixelsCfg)
411 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
414 if "TrackSummaryTool" not in kwargs:
415 from TrkConfig.TrkTrackSummaryToolConfig
import (
416 InDetTrackSummaryToolCfg)
417 kwargs.setdefault(
"TrackSummaryTool", acc.popToolsAndMerge(
420 if "SelectionTool" not in kwargs:
421 from InDetConfig.InDetAmbiTrackSelectionToolConfig
import (
422 InDetAmbiTrackSelectionToolCfg)
423 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
426 kwargs.setdefault(
"AssociationMapName", (
427 'PRDtoTrackMapAmbi_' + flags.Tracking.ActiveConfig.extension))
428 kwargs.setdefault(
"InputClusterSplitProbabilityName", (
429 'SplitProb'+flags.Tracking.ActiveConfig.extension))
430 kwargs.setdefault(
"OutputClusterSplitProbabilityName", (
431 'InDetAmbiguityProcessorSplitProb' +
432 flags.Tracking.ActiveConfig.extension))
433 kwargs.setdefault(
"SuppressTrackFit", (
434 not flags.Tracking.ActiveConfig.doAmbiguityProcessorTrackFit))
435 kwargs.setdefault(
"SuppressHoleSearch",
False)
436 kwargs.setdefault(
"tryBremFit",
437 flags.Tracking.ActiveConfig.doBremRecoverySi)
438 kwargs.setdefault(
"caloSeededBrem", flags.Tracking.doCaloSeededBrem)
439 kwargs.setdefault(
"pTminBrem", flags.Tracking.ActiveConfig.minPTBrem)
440 kwargs.setdefault(
"RefitPrds",
True)
441 kwargs.setdefault(
"KeepHolesFromBeforeRefit",
False)
442 kwargs.setdefault(
"MatEffects", flags.Tracking.materialInteractionsType
443 if flags.Tracking.materialInteractions
else 0)
445 if (flags.Tracking.doTIDE_AmbiTrackMonitoring
and
446 flags.Tracking.ActiveConfig.extension ==
""):
447 from TrkConfig.TrkValToolsConfig
import (
448 TrkObserverToolCfg, WriterTrkObserverToolCfg)
450 acc.addPublicTool(TrkObserverTool)
451 kwargs.setdefault(
"ObserverTool", TrkObserverTool)
453 TrkObserverToolWriter = acc.popToolsAndMerge(
455 acc.addPublicTool(TrkObserverToolWriter)
456 kwargs.setdefault(
"ObserverToolWriter", TrkObserverToolWriter)
459 CompFactory.Trk.DenseEnvironmentsAmbiguityProcessorTool(
460 name+flags.Tracking.ActiveConfig.extension, **kwargs))
466 name="ITkAmbiguityProcessor",
473 if "ScoringTool" not in kwargs:
474 if flags.Beam.Type
is BeamType.Cosmics:
475 from InDetConfig.InDetTrackScoringToolsConfig
import (
476 ITkCosmicsScoringToolCfg
as ITkScoringToolCfg)
478 from InDetConfig.InDetTrackScoringToolsConfig
import (
479 ITkAmbiScoringToolCfg
as ITkScoringToolCfg)
480 kwargs.setdefault(
"ScoringTool", acc.popToolsAndMerge(
481 ITkScoringToolCfg(flags)))
483 if "Fitter" not in kwargs:
484 from TrkConfig.CommonTrackFitterConfig
import (
485 ITkTrackFitterAmbiCfg)
487 ITkTrackFitterAmbi = acc.popToolsAndMerge(
490 name=(
'ITkTrackFitterAmbi' +
491 flags.Tracking.ActiveConfig.extension)))
492 fitter_list.append(ITkTrackFitterAmbi)
493 kwargs.setdefault(
"Fitter", fitter_list)
495 if "AssociationTool" not in kwargs:
496 from InDetConfig.InDetAssociationToolsConfig
import (
497 ITkPRDtoTrackMapToolGangedPixelsCfg)
498 kwargs.setdefault(
"AssociationTool", acc.popToolsAndMerge(
501 if "TrackSummaryTool" not in kwargs:
502 from TrkConfig.TrkTrackSummaryToolConfig
import (
503 ITkTrackSummaryToolCfg)
504 kwargs.setdefault(
"TrackSummaryTool", acc.popToolsAndMerge(
507 if "SelectionTool" not in kwargs:
508 from InDetConfig.InDetAmbiTrackSelectionToolConfig
import (
509 ITkAmbiTrackSelectionToolCfg)
510 kwargs.setdefault(
"SelectionTool", acc.popToolsAndMerge(
513 kwargs.setdefault(
"AssociationMapName", (
514 'ITkPRDtoTrackMapAmbi_' + flags.Tracking.ActiveConfig.extension))
515 kwargs.setdefault(
"InputClusterSplitProbabilityName", (
516 'SplitProb'+flags.Tracking.ActiveConfig.extension))
517 kwargs.setdefault(
"OutputClusterSplitProbabilityName", (
518 'ITkAmbiguityProcessorSplitProb' +
519 flags.Tracking.ActiveConfig.extension))
520 kwargs.setdefault(
"SuppressTrackFit", (
521 not flags.Tracking.ActiveConfig.doAmbiguityProcessorTrackFit))
522 kwargs.setdefault(
"SuppressHoleSearch",
False)
525 kwargs.setdefault(
"tryBremFit",
526 flags.Tracking.ActiveConfig.doBremRecoverySi)
527 kwargs.setdefault(
"caloSeededBrem", flags.Tracking.ActiveConfig.doCaloSeededBremSi)
528 kwargs.setdefault(
"pTminBrem", flags.Tracking.ActiveConfig.minPTBrem[0])
529 kwargs.setdefault(
"RefitPrds",
True)
530 kwargs.setdefault(
"KeepHolesFromBeforeRefit",
False)
531 kwargs.setdefault(
"MatEffects", flags.Tracking.materialInteractionsType
532 if flags.Tracking.materialInteractions
else 0)
535 CompFactory.Trk.DenseEnvironmentsAmbiguityProcessorTool(
536 name+flags.Tracking.ActiveConfig.extension, **kwargs))