ATLAS Offline Software
MuonG4SDConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
6  result = ComponentAccumulator()
7  tools = []
8 
9  from AthenaConfiguration.Enums import BeamType
10  if flags.Beam.Type is BeamType.Cosmics:
11  if flags.Detector.EnableMDT:
12  from MuonG4SD.MuonG4SDToolConfig import MDTSensitiveDetectorCosmicsCfg
13  tools += [ result.popToolsAndMerge(MDTSensitiveDetectorCosmicsCfg(flags)) ]
14  if flags.Detector.EnableRPC:
15  from MuonG4SD.MuonG4SDToolConfig import RPCSensitiveDetectorCosmicsCfg
16  tools += [ result.popToolsAndMerge(RPCSensitiveDetectorCosmicsCfg(flags)) ]
17  if flags.Detector.EnableTGC:
18  from MuonG4SD.MuonG4SDToolConfig import TGCSensitiveDetectorCosmicsCfg
19  tools += [ result.popToolsAndMerge(TGCSensitiveDetectorCosmicsCfg(flags)) ]
20  if flags.Detector.EnableCSC:
21  from MuonG4SD.MuonG4SDToolConfig import CSCSensitiveDetectorCosmicsCfg
22  tools += [ result.popToolsAndMerge(CSCSensitiveDetectorCosmicsCfg(flags)) ]
23  else:
24  if flags.Detector.EnableMDT:
25  from MuonG4SD.MuonG4SDToolConfig import MDTSensitiveDetectorCfg
26  tools += [ result.popToolsAndMerge(MDTSensitiveDetectorCfg(flags)) ]
27  if flags.Detector.EnableRPC:
28  from MuonG4SD.MuonG4SDToolConfig import RPCSensitiveDetectorCfg
29  tools += [ result.popToolsAndMerge(RPCSensitiveDetectorCfg(flags)) ]
30  if flags.Detector.EnableTGC:
31  from MuonG4SD.MuonG4SDToolConfig import TGCSensitiveDetectorCfg
32  tools += [ result.popToolsAndMerge(TGCSensitiveDetectorCfg(flags)) ]
33  if flags.Detector.EnableCSC:
34  from MuonG4SD.MuonG4SDToolConfig import CSCSensitiveDetectorCfg
35  tools += [ result.popToolsAndMerge(CSCSensitiveDetectorCfg(flags)) ]
36 
37  if flags.Detector.EnablesTGC :
38  from MuonG4SD.MuonG4SDToolConfig import sTGCSensitiveDetectorCfg
39  tools += [ result.popToolsAndMerge(sTGCSensitiveDetectorCfg(flags)) ]
40  if flags.Detector.EnableMM :
41  from MuonG4SD.MuonG4SDToolConfig import MicromegasSensitiveDetectorCfg
42  tools += [ result.popToolsAndMerge(MicromegasSensitiveDetectorCfg(flags)) ]
43 
44  result.setPrivateTools(tools)
45  return result
46 
47 
49  simHitContainers = []
50  if flags.Detector.EnableMDT:
51  simHitContainers+=[("MDTSimHitCollection", "MDT_Hits")]
52  if flags.Detector.EnableRPC:
53  simHitContainers+=[("RPCSimHitCollection", "RPC_Hits")]
54  if flags.Detector.EnableTGC:
55  simHitContainers+=[("TGCSimHitCollection", "TGC_Hits")]
56  if flags.Detector.EnableMM:
57  simHitContainers+=[("MMSimHitCollection", "MM_Hits")]
58  if flags.Detector.EnablesTGC:
59  simHitContainers+=[("sTGCSimHitCollection", "sTGC_Hits")]
60  if flags.Detector.EnableCSC:
61  simHitContainers+=[("CSCSimHitCollection", "CSC_Hits")]
62  return simHitContainers
63 
65  return [f"{contType}#{contName}" for contType, contName in SimHitContainerListCfg(flags) ]
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MuonG4SDToolConfig.TGCSensitiveDetectorCfg
def TGCSensitiveDetectorCfg(flags, name="TGCSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:150
MuonG4SDToolConfig.TGCSensitiveDetectorCosmicsCfg
def TGCSensitiveDetectorCosmicsCfg(flags, name="TGCSensitiveDetectorCosmics", **kwargs)
Definition: MuonG4SDToolConfig.py:133
MuonG4SDToolConfig.CSCSensitiveDetectorCosmicsCfg
def CSCSensitiveDetectorCosmicsCfg(flags, name="CSCSensitiveDetectorCosmics", **kwargs)
Definition: MuonG4SDToolConfig.py:8
MuonG4SDToolConfig.sTGCSensitiveDetectorCfg
def sTGCSensitiveDetectorCfg(flags, name="sTGCSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:167
MuonG4SDToolConfig.RPCSensitiveDetectorCosmicsCfg
def RPCSensitiveDetectorCosmicsCfg(flags, name="RPCSensitiveDetectorCosmics", **kwargs)
Definition: MuonG4SDToolConfig.py:99
MuonG4SDToolConfig.RPCSensitiveDetectorCfg
def RPCSensitiveDetectorCfg(flags, name="RPCSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:116
MuonG4SDConfig.SetupSensitiveDetectorsCfg
def SetupSensitiveDetectorsCfg(flags)
Definition: MuonG4SDConfig.py:5
MuonG4SDToolConfig.MDTSensitiveDetectorCosmicsCfg
def MDTSensitiveDetectorCosmicsCfg(flags, name="MDTSensitiveDetectorCosmics", **kwargs)
Definition: MuonG4SDToolConfig.py:48
MuonG4SDToolConfig.CSCSensitiveDetectorCfg
def CSCSensitiveDetectorCfg(flags, name="CSCSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:23
MuonG4SDConfig.OutputSimContainersCfg
def OutputSimContainersCfg(flags)
Definition: MuonG4SDConfig.py:64
MuonG4SDConfig.SimHitContainerListCfg
def SimHitContainerListCfg(flags)
Definition: MuonG4SDConfig.py:48
MuonG4SDToolConfig.MicromegasSensitiveDetectorCfg
def MicromegasSensitiveDetectorCfg(flags, name="MicromegasSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:82
MuonG4SDToolConfig.MDTSensitiveDetectorCfg
def MDTSensitiveDetectorCfg(flags, name="MDTSensitiveDetector", **kwargs)
Definition: MuonG4SDToolConfig.py:65