ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_PrepRawDataFormationConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def HGTD_ClusterMakerToolCfg(flags, name = "HGTD_ClusterMakerTool", **kwargs):
7 """Configures a tool that forms HGTD clusters """
8 acc = ComponentAccumulator()
9
10 acc.setPrivateTools(CompFactory.HGTD_ClusterMakerTool(name, **kwargs))
11 return acc
12
13def SinglePadClusterToolCfg(flags, name = "SinglePadClusterTool", **kwargs):
14 """Configures a tool that creates 1-to-1 HGTD clusters out of single pads """
15 if flags.HGTD.Geometry.useGeoModelXml:
16 from HGTD_GeoModelXml.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
17 else:
18 from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
19 acc = HGTD_ReadoutGeometryCfg(flags)
20
21 kwargs.setdefault("ClusterMakerTool", acc.popToolsAndMerge(HGTD_ClusterMakerToolCfg(flags)))
22 acc.setPrivateTools(CompFactory.HGTD.SinglePadClusterTool(name, **kwargs))
23 return acc
24
25def PadClusterizationCfg(flags, name = "PadClusterizationAlg", **kwargs):
26 """Schedules a clusterization alg to produce HGTD_Clusters out of HGTD_RDOs """
27 acc = ComponentAccumulator()
28
29 kwargs.setdefault("ClusterizationTool", acc.popToolsAndMerge(SinglePadClusterToolCfg(flags)))
30 kwargs.setdefault("RDOContainerName", "HGTD_RDOs")
31 kwargs.setdefault("PRDContainerName", "HGTD_Clusters")
32
33 # Monitor Execution Time
34 if flags.HGTD.doMonitoring and 'MonTool' not in kwargs:
35 # Monitoring lives in ACTS since this is (will be) the same used for the ACTS clusterisation algorithm
36 from ActsConfig.ActsMonitoringConfig import ActsHgtdClusterizationMonitoringToolCfg
37 kwargs.setdefault('MonTool', acc.popToolsAndMerge(ActsHgtdClusterizationMonitoringToolCfg(flags)))
38
39 acc.addEventAlgo(CompFactory.HGTD.PadClusterizationAlg(name, **kwargs))
40 return acc
HGTD_ClusterMakerToolCfg(flags, name="HGTD_ClusterMakerTool", **kwargs)
SinglePadClusterToolCfg(flags, name="SinglePadClusterTool", **kwargs)
PadClusterizationCfg(flags, name="PadClusterizationAlg", **kwargs)