ATLAS Offline Software
MuonTrackingGeometryConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 # Configuration of MuonTrackingGeometry packages
3 
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 
7 def MuonStationTypeBuilderCfg(flags, name='MuonStationTypeBuilder', **kwargs):
8  result = ComponentAccumulator()
9  result.setPrivateTools(
10  CompFactory.Muon.MuonStationTypeBuilder(name, **kwargs))
11  return result
12 
13 def MuonStationBuilderCfg(flags, name='MuonStationBuilder', useCond=True, **kwargs):
14  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
15  result = MuonGeoModelCfg(flags)
16 
17  if "StationTypeBuilder" not in kwargs:
18  kwargs.setdefault("StationTypeBuilder", result.popToolsAndMerge(
20 
21  if useCond:
22  name = name + 'Cond'
23  muonStationBuilder = CompFactory.Muon.MuonStationBuilderCond(name, **kwargs) if useCond else \
24  CompFactory.Muon.MuonStationBuilder(name, **kwargs)
25  result.setPrivateTools(muonStationBuilder)
26  return result
27 
28 def MuonInertMaterialBuilderCfg(flags, name='MuonInertMaterialBuilder',
29  useCond = True,
30  **kwargs):
31  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
32  result = MuonGeoModelCfg(flags)
33 
34  if useCond:
35  name = name + 'Cond'
36  muonInertMaterialBuilder = CompFactory.Muon.MuonInertMaterialBuilderCond(name, **kwargs) if useCond else \
37  CompFactory.Muon.MuonInertMaterialBuilder(name, **kwargs)
38  result.setPrivateTools(muonInertMaterialBuilder)
39  return result
40 
41 def MuonTrackingGeometryBuilderCfg(flags, name='MuonTrackingGeometryBuilder',
42  useCond = True,
43  **kwargs):
44  from SubDetectorEnvelopes.SubDetectorEnvelopesConfig import EnvelopeDefSvcCfg
45  result = ComponentAccumulator()
46 
47  kwargs.setdefault("EnvelopeDefinitionSvc", result.getPrimaryAndMerge(
48  EnvelopeDefSvcCfg(flags)))
49 
50  kwargs.setdefault("MuonStationBuilder", result.popToolsAndMerge(
52  name = 'MuonStationBuilder',
53  useCond = useCond)))
54 
55  kwargs.setdefault("InertMaterialBuilder", result.popToolsAndMerge(
57  name = 'MuonInertMaterialBuilder',
58  useCond = useCond)))
59 
60  kwargs.setdefault("EntryVolumeName", 'MuonSpectrometerEntrance')
61  kwargs.setdefault("ExitVolumeName", 'Muon::Containers::MuonSystem')
62 
63  if useCond:
64  name = name + 'Cond'
65  geometryBuilder = CompFactory.Muon.MuonTrackingGeometryBuilderCond(name, **kwargs) if useCond else \
66  CompFactory.Muon.MuonTrackingGeometryBuilder(name, **kwargs)
67  result.setPrivateTools(geometryBuilder)
68  return result
69 
70 
MuonTrackingGeometryConfig.MuonTrackingGeometryBuilderCfg
def MuonTrackingGeometryBuilderCfg(flags, name='MuonTrackingGeometryBuilder', useCond=True, **kwargs)
Definition: MuonTrackingGeometryConfig.py:41
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MuonTrackingGeometryConfig.MuonStationTypeBuilderCfg
def MuonStationTypeBuilderCfg(flags, name='MuonStationTypeBuilder', **kwargs)
Definition: MuonTrackingGeometryConfig.py:7
MuonTrackingGeometryConfig.MuonInertMaterialBuilderCfg
def MuonInertMaterialBuilderCfg(flags, name='MuonInertMaterialBuilder', useCond=True, **kwargs)
Definition: MuonTrackingGeometryConfig.py:28
MuonTrackingGeometryConfig.MuonStationBuilderCfg
def MuonStationBuilderCfg(flags, name='MuonStationBuilder', useCond=True, **kwargs)
Definition: MuonTrackingGeometryConfig.py:13
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
SubDetectorEnvelopesConfig.EnvelopeDefSvcCfg
def EnvelopeDefSvcCfg(flags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs)
Definition: SubDetectorEnvelopesConfig.py:15