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