ATLAS Offline Software
G4FastSimulationConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def SimpleFastKillerCfg(flags, **kwargs):
8  result = ComponentAccumulator()
9  kwargs.setdefault("RegionName" , "BeampipeFwdCut")
10  result.setPrivateTools(CompFactory.SimpleFastKillerTool(name="SimpleFastKiller", **kwargs))
11  return result
12 
13 
14 def DeadMaterialShowerCfg(flags, **kwargs):
15  result = ComponentAccumulator()
16  kwargs.setdefault("RegionName", "DeadMaterial")
17  result.setPrivateTools(CompFactory.DeadMaterialShowerTool(name="DeadMaterialShower", **kwargs))
18  return result
19 
20 def FastCaloSimCfg(flags, **kwargs):
21  result = ComponentAccumulator()
22  # Set the parametrization service
23  from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig import FastCaloSimV2ParamSvcCfg
24  kwargs.setdefault("ISF_FastCaloSimV2ParamSvc", result.getPrimaryAndMerge(FastCaloSimV2ParamSvcCfg(flags)))
25  # Set the FastCaloSim extrapolation tool
26  from ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConfig import FastCaloSimCaloExtrapolationCfg
27  kwargs.setdefault("FastCaloSimCaloExtrapolation", result.addPublicTool(result.popToolsAndMerge(FastCaloSimCaloExtrapolationCfg(flags))))
28  # Name of region where FastCaloSim will be triggered
29  kwargs.setdefault("RegionName", "CALO")
30  kwargs.setdefault('CaloCellContainerSDName', "ToolSvc.SensitiveDetectorMasterTool.CaloCellContainerSD")
31 
32  if flags.Sim.SimplifiedGeoPath:
33  # Enable Geant4 track transportation only if simplified geometry is provided
34  kwargs.setdefault('doG4Transport', True)
35  else:
36  kwargs.setdefault('doG4Transport', False)
37 
38  # Set the G4CaloTransportTool
39  from G4AtlasTools.G4AtlasToolsConfig import G4CaloTransportToolCfg
40  kwargs.setdefault("G4CaloTransportTool", result.addPublicTool(result.popToolsAndMerge(G4CaloTransportToolCfg(flags))))
41 
42  # Set the PunchThrough G4 part
43  from G4AtlasTools.G4AtlasToolsConfig import PunchThroughSimWrapperCfg
44  if "PunchThroughSimWrapper" not in kwargs:
45  kwargs.setdefault("PunchThroughSimWrapper", result.addPublicTool(result.popToolsAndMerge(PunchThroughSimWrapperCfg(flags))))
46 
47  # Config PunchThroughG4Tool
48  kwargs.setdefault('doPunchThrough', flags.Sim.FastCalo.doPunchThrough)
49 
50  result.setPrivateTools(CompFactory.FastCaloSimTool(name="FastCaloSim", **kwargs))
51  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
ISF_FastCaloSimServicesConfig.FastCaloSimV2ParamSvcCfg
def FastCaloSimV2ParamSvcCfg(flags, name="ISF_FastCaloSimV2ParamSvc", **kwargs)
Config.
Definition: ISF_FastCaloSimServicesConfig.py:164
ISF_FastCaloSimParametrizationConfig.FastCaloSimCaloExtrapolationCfg
def FastCaloSimCaloExtrapolationCfg(flags, name="FastCaloSimCaloExtrapolation", **kwargs)
Definition: ISF_FastCaloSimParametrizationConfig.py:66
G4FastSimulationConfig.FastCaloSimCfg
def FastCaloSimCfg(flags, **kwargs)
Definition: G4FastSimulationConfig.py:20
G4FastSimulationConfig.DeadMaterialShowerCfg
def DeadMaterialShowerCfg(flags, **kwargs)
Definition: G4FastSimulationConfig.py:14
G4AtlasToolsConfig.G4CaloTransportToolCfg
def G4CaloTransportToolCfg(flags, name='G4CaloTransportTool', **kwargs)
Definition: G4AtlasToolsConfig.py:76
G4FastSimulationConfig.SimpleFastKillerCfg
def SimpleFastKillerCfg(flags, **kwargs)
Definition: G4FastSimulationConfig.py:7
G4AtlasToolsConfig.PunchThroughSimWrapperCfg
def PunchThroughSimWrapperCfg(flags, name='PunchThroughSimWrapper', **kwargs)
Definition: G4AtlasToolsConfig.py:133