ATLAS Offline Software
Loading...
Searching...
No Matches
G4FastSimulationConfig.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
5
6
7def SimpleFastKillerCfg(flags, **kwargs):
8 result = ComponentAccumulator()
9 kwargs.setdefault("RegionName" , "BeampipeFwdCut")
10 result.setPrivateTools(CompFactory.SimpleFastKillerTool(name="SimpleFastKiller", **kwargs))
11 return result
12
13
14def DeadMaterialShowerCfg(flags, **kwargs):
15 result = ComponentAccumulator()
16 kwargs.setdefault("RegionName", "DeadMaterial")
17 result.setPrivateTools(CompFactory.DeadMaterialShowerTool(name="DeadMaterialShower", **kwargs))
18 return result
19
20
21
22def FatrasG4Cfg(flags, **kwargs):
23 result = ComponentAccumulator()
24 # Name of region where FatrasG4 will be triggered
25 kwargs.setdefault("RegionName", "InDet")
26
27 result.setPrivateTools(CompFactory.FatrasG4Tool(name="FatrasG4", **kwargs))
28 return result
29
30
31def FastCaloSimCfg(flags, **kwargs):
32 result = ComponentAccumulator()
33 # Set the parametrization service
34 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig import FastCaloSimV2ParamSvcCfg
35 kwargs.setdefault("ISF_FastCaloSimV2ParamSvc", result.getPrimaryAndMerge(FastCaloSimV2ParamSvcCfg(flags)))
36 # Set the FastCaloSim extrapolation tool
37 from ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConfig import FastCaloSimCaloExtrapolationCfg
38 kwargs.setdefault("FastCaloSimCaloExtrapolation", result.addPublicTool(result.popToolsAndMerge(FastCaloSimCaloExtrapolationCfg(flags))))
39 # Name of region where FastCaloSim will be triggered
40 kwargs.setdefault("RegionName", "CALO")
41 kwargs.setdefault('CaloCellContainerSDName', "ToolSvc.SensitiveDetectorMasterTool.CaloCellContainerSD")
42
43 # Set the G4CaloTransportTool
44 from G4AtlasTools.G4AtlasToolsConfig import G4CaloTransportToolCfg
45 kwargs.setdefault("G4CaloTransportTool", result.addPublicTool(result.popToolsAndMerge(G4CaloTransportToolCfg(flags))))
46
47 # Set the PunchThrough G4 part
48 from G4AtlasTools.G4AtlasToolsConfig import PunchThroughSimWrapperCfg
49 if "PunchThroughSimWrapper" not in kwargs:
50 kwargs.setdefault("PunchThroughSimWrapper", result.addPublicTool(result.popToolsAndMerge(PunchThroughSimWrapperCfg(flags))))
51
52 # Config PunchThroughG4Tool
53 kwargs.setdefault('doPunchThrough', flags.Sim.FastCalo.doPunchThrough)
54
55 result.setPrivateTools(CompFactory.FastCaloSimTool(name="FastCaloSim", **kwargs))
56 return result
SimpleFastKillerCfg(flags, **kwargs)
DeadMaterialShowerCfg(flags, **kwargs)