ATLAS Offline Software
Loading...
Searching...
No Matches
PixelG4_SDToolConfig.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
5from ISF_Algorithms.CollectionMergerConfig import CollectionMergerCfg
6
7
8def PixelSensorSDCfg(ConfigFlags, name="PixelSensorSD", **kwargs):
9 bare_collection_name = "PixelHits"
10 mergeable_collection_suffix = "_G4"
11 merger_input_property = "PixelHits"
12 region = "ID"
13
14 acc, hits_collection_name = CollectionMergerCfg(ConfigFlags,
15 bare_collection_name,
16 mergeable_collection_suffix,
17 merger_input_property,
18 region)
19 kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog","Pixel::dbmDiamondLog"])
20 kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
21
22 result = ComponentAccumulator()
23 result.merge(acc)
24 result.setPrivateTools(CompFactory.PixelSensorSDTool(name, **kwargs))
25 return result
26
27
28def PixelSensor_CTBCfg(ConfigFlags, name="PixelSensor_CTB", **kwargs):
29 kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog"])
30 kwargs.setdefault("OutputCollectionNames", ["PixelHits"])
31 result = ComponentAccumulator()
32 result.setPrivateTools(CompFactory.PixelSensorSDTool(name, **kwargs))
33 return result
34
35
36def DBMSensorSDCfg(ConfigFlags, name="DBMSensorSD", **kwargs):
37 kwargs.setdefault("LogicalVolumeNames", ["Pixel::dbmDiamondLog"])
38 kwargs.setdefault("OutputCollectionNames", ["DBMHits"])
39 result = ComponentAccumulator()
40 result.setPrivateTools(CompFactory.PixelSensorSDTool(name, **kwargs))
41 return result
42
43
44def ITkPixelSensorSDCfg(ConfigFlags, name="ITkPixelSensorSD", **kwargs):
45 bare_collection_name = "ITkPixelHits"
46 mergeable_collection_suffix = "_G4"
47 merger_input_property = "ITkPixelHits"
48 region = "ITk"
49
50 acc, hits_collection_name = CollectionMergerCfg(ConfigFlags,
51 bare_collection_name,
52 mergeable_collection_suffix,
53 merger_input_property,
54 region)
55 # Ensure we create a Gmx sensor
56 kwargs.setdefault("GmxSensor",True)
57 kwargs.setdefault("LogicalVolumeNames", ["ITkPixel::InnerBarrelSingleMod_Sensor",
58 "ITkPixel::InnerRingSingleMod_Sensor",
59 "ITkPixel::InnerQuadMod_Sensor",
60 "ITkPixel::OuterQuadMod_Sensor",
61 "ITkPixel::InnerBarrelQuadMod_Sensor",
62 "ITkPixel::InnerEndcapQuadMod_Sensor",
63 "ITkPixel::OuterBarrelQuadMod_Sensor",
64 "ITkPixel::OuterEndcapQuadMod_Sensor",
65 "ITkPixel::InclinedQuadMod_Sensor"])
66 kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
67
68 result = ComponentAccumulator()
69 result.merge(acc)
70 result.setPrivateTools(CompFactory.PixelSensorSDTool(name, **kwargs))
71 return result
72
73def PLRSensorSDCfg(ConfigFlags, name="PLRSensorSD", **kwargs):
74 bare_collection_name = "PLR_Hits"
75 mergeable_collection_suffix = "_G4"
76 merger_input_property = "PLR_Hits"
77 region = "ITk"
78
79 acc, hits_collection_name = CollectionMergerCfg(ConfigFlags,
80 bare_collection_name,
81 mergeable_collection_suffix,
82 merger_input_property,
83 region)
84 # Ensure we create a Gmx sensor
85 kwargs.setdefault("GmxSensor",True)
86 if ConfigFlags.Detector.GeometryITkPixel:
87 # If ITkPixel has been built, the PLR will be inside an envelope volume within it
88 kwargs.setdefault("LogicalVolumeNames", ["ITkPixel::PLR_Sensor"])
89 else:
90 kwargs.setdefault("LogicalVolumeNames", ["PLR::PLR_Sensor"])
91 kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
92
93 result = ComponentAccumulator()
94 result.merge(acc)
95 result.setPrivateTools(CompFactory.PixelSensorSDTool(name, **kwargs))
96 return result
PLRSensorSDCfg(ConfigFlags, name="PLRSensorSD", **kwargs)
PixelSensorSDCfg(ConfigFlags, name="PixelSensorSD", **kwargs)
ITkPixelSensorSDCfg(ConfigFlags, name="ITkPixelSensorSD", **kwargs)
PixelSensor_CTBCfg(ConfigFlags, name="PixelSensor_CTB", **kwargs)
DBMSensorSDCfg(ConfigFlags, name="DBMSensorSD", **kwargs)