ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_G4_SDToolConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthenaConfiguration.Enums import LHCPeriod
6from ISF_Algorithms.CollectionMergerConfig import CollectionMergerCfg
7
8
9def TRTSensitiveDetectorCfg(flags, name="TRTSensitiveDetector", **kwargs):
10 bare_collection_name = "TRTUncompressedHits"
11 mergeable_collection_suffix = "_G4"
12 merger_input_property = "TRTUncompressedHits"
13 region = "ID"
14
15 acc, hits_collection_name = CollectionMergerCfg(flags,
16 bare_collection_name,
17 mergeable_collection_suffix,
18 merger_input_property,
19 region)
20
21 logicalVolumeNames = ["TRT::Gas"]
22 if flags.GeoModel.Run in [LHCPeriod.Run2] or flags.GeoModel.SQLiteDB:
23 logicalVolumeNames += ["TRT::GasMA"]
24 if flags.GeoModel.Run in [LHCPeriod.Run2, LHCPeriod.Run3] and not flags.GeoModel.SQLiteDB:
25 logicalVolumeNames += ["TRT::Gas_Ar", "TRT::GasMA_Ar"]
26 # In the case that Krypton is used to fill some volumes then
27 # logicalVolumeNames += ["TRT::Gas_Kr", TRT::GasMA_Kr"]
28 kwargs.setdefault("LogicalVolumeNames", logicalVolumeNames)
29 kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
30
31 result = ComponentAccumulator()
32 result.merge(acc)
33 result.setPrivateTools(CompFactory.TRTSensitiveDetectorTool(name, **kwargs))
34 return result
35
36
37def TRTSensitiveDetector_CTBCfg(flags, name="TRTSensitiveDetector_CTB", **kwargs):
38 kwargs.setdefault("LogicalVolumeNames", ["TRT::GasMA"])
39 kwargs.setdefault("OutputCollectionNames", ["TRTUncompressedHits"])
40 result = ComponentAccumulator()
41 result.setPrivateTools(CompFactory.TRTSensitiveDetectorTool(name, **kwargs))
42 return result
TRTSensitiveDetectorCfg(flags, name="TRTSensitiveDetector", **kwargs)
TRTSensitiveDetector_CTBCfg(flags, name="TRTSensitiveDetector_CTB", **kwargs)