ATLAS Offline Software
Loading...
Searching...
No Matches
InDetBoundaryCheckToolConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2# Configuration of InDetBoundaryCheckTool package
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6
7def InDetBoundaryCheckToolCfg(flags, name='InDetBoundarySearchTool', **kwargs):
8 result = ComponentAccumulator()
9
10 if 'SctSummaryTool' not in kwargs:
11 if flags.Detector.EnableSCT:
12 from SCT_ConditionsTools.SCT_ConditionsToolsConfig import (
13 SCT_ConditionsSummaryToolCfg)
14 kwargs.setdefault("SctSummaryTool", result.popToolsAndMerge(
15 SCT_ConditionsSummaryToolCfg(flags)))
16 else:
17 kwargs.setdefault("SctSummaryTool", None)
18
19 if flags.Detector.EnableSCT:
20 if "SCTDetElStatus" not in kwargs and not flags.Common.isOnline:
21 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import (
22 SCT_DetectorElementStatusAlgCfg)
23 result.merge(SCT_DetectorElementStatusAlgCfg(flags))
24 kwargs.setdefault("SCTDetElStatus", "SCTDetectorElementStatus")
25
26 if flags.Detector.EnablePixel:
27 if 'PixelLayerTool' not in kwargs:
28 from InDetConfig.InDetTestPixelLayerConfig import (
29 InDetTestPixelLayerToolCfg)
30 kwargs.setdefault("PixelLayerTool", result.popToolsAndMerge(
31 InDetTestPixelLayerToolCfg(flags)))
32 else:
33 kwargs.setdefault("PixelLayerTool", "")
34
35 kwargs.setdefault("UsePixel", flags.Detector.EnablePixel)
36 kwargs.setdefault("UseSCT", flags.Detector.EnableSCT)
37 kwargs.setdefault("CheckBadSCT", flags.InDet.checkDeadElementsOnTrack)
38
39 result.setPrivateTools(
40 CompFactory.InDet.InDetBoundaryCheckTool(name, **kwargs))
41 return result
42
43
45 flags, name="CombinedMuonIDBoundaryCheckTool", **kwargs):
46 result = ComponentAccumulator()
47
48 if flags.Detector.EnablePixel:
49 if 'PixelLayerTool' not in kwargs:
50 from InDetConfig.InDetTestPixelLayerConfig import (
51 CombinedMuonPixelLayerToolCfg)
52 kwargs.setdefault("PixelLayerTool", result.popToolsAndMerge(
53 CombinedMuonPixelLayerToolCfg(flags)))
54 else:
55 kwargs.setdefault("PixelLayerTool", "")
56
57 result.setPrivateTools(result.popToolsAndMerge(
58 InDetBoundaryCheckToolCfg(flags, name, **kwargs)))
59 return result
60
61
63 flags, name="InDetTrigBoundaryCheckTool", **kwargs):
64 acc = ComponentAccumulator()
65 from SCT_ConditionsTools.SCT_ConditionsToolsConfig import (
66 SCT_ConditionsSummaryToolCfg)
67
68 kwargs.setdefault("SCTDetElStatus", "")
69 kwargs.setdefault("SctSummaryTool", acc.popToolsAndMerge(
70 SCT_ConditionsSummaryToolCfg(flags,
71 withFlaggedCondTool=False,
72 withTdaqTool=False)))
73
74 from InDetConfig.InDetTestPixelLayerConfig import (
75 InDetTrigTestPixelLayerToolCfg)
76 kwargs.setdefault("PixelLayerTool", acc.popToolsAndMerge(
77 InDetTrigTestPixelLayerToolCfg(flags)))
78
79 acc.setPrivateTools(acc.popToolsAndMerge(
80 InDetBoundaryCheckToolCfg(flags, name, **kwargs)))
81 return acc
82
83
85 flags, name="CombinedMuonIDBoundaryCheckTool", **kwargs):
86 result = ComponentAccumulator()
87
88 if flags.Detector.EnablePixel:
89 if 'PixelLayerTool' not in kwargs:
90 from InDetConfig.InDetTestPixelLayerConfig import (
91 CombinedMuonTrigPixelLayerToolCfg)
92 kwargs.setdefault("PixelLayerTool", result.popToolsAndMerge(
93 CombinedMuonTrigPixelLayerToolCfg(flags)))
94 else:
95 kwargs.setdefault("PixelLayerTool", "")
96
97 result.setPrivateTools(result.popToolsAndMerge(
98 InDetTrigBoundaryCheckToolCfg(flags, name, **kwargs)))
99 return result
100
101
102def ITkBoundaryCheckToolCfg(flags, name='ITkBoundaryCheckTool', **kwargs):
103 result = ComponentAccumulator()
104
105 kwargs.setdefault("SctSummaryTool", None) # SCTDetElStatus is used instead
106 if "SCTDetElStatus" not in kwargs :
107 if flags.Detector.EnableITkStrip :
108 if not flags.Trigger.doHLT :
109 from SCT_ConditionsAlgorithms.ITkStripConditionsAlgorithmsConfig import (
110 ITkStripDetectorElementStatusAlgCfg)
111 result.merge(ITkStripDetectorElementStatusAlgCfg(flags))
112 kwargs.setdefault("SCTDetElStatus", "ITkStripDetectorElementStatus")
113 else :
114 kwargs.setdefault("SCTDetElStatus", "")
115
116 if 'PixelLayerTool' not in kwargs:
117 from InDetConfig.InDetTestPixelLayerConfig import (
118 ITkTestPixelLayerToolCfg)
119 kwargs.setdefault("PixelLayerTool", result.popToolsAndMerge(
120 ITkTestPixelLayerToolCfg(flags)))
121
122 kwargs.setdefault("UsePixel", flags.Detector.EnableITkPixel)
123 kwargs.setdefault("UseSCT", flags.Detector.EnableITkStrip)
124 kwargs.setdefault("CheckBadSCT", False)
125
126 result.setPrivateTools(
127 CompFactory.InDet.InDetBoundaryCheckTool(name, **kwargs))
128 return result
CombinedMuonIDBoundaryCheckToolCfg(flags, name="CombinedMuonIDBoundaryCheckTool", **kwargs)
InDetBoundaryCheckToolCfg(flags, name='InDetBoundarySearchTool', **kwargs)
InDetTrigBoundaryCheckToolCfg(flags, name="InDetTrigBoundaryCheckTool", **kwargs)
CombinedMuonTrigIDBoundaryCheckToolCfg(flags, name="CombinedMuonIDBoundaryCheckTool", **kwargs)
ITkBoundaryCheckToolCfg(flags, name='ITkBoundaryCheckTool', **kwargs)