ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_Geant4
ISF_Geant4CommonTools
python
ISF_Geant4CommonToolsConfig.py
Go to the documentation of this file.
1
"""ComponentAccumulator Geant4 tools config for ISF
2
3
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4
"""
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
AthenaConfiguration.Enums
import
LHCPeriod, ProductionStep
8
from
ISF_Services.ISF_ServicesCoreConfig
import
GeoIDSvcCfg, ATLFAST_GeoIDSvcCfg
9
from
ISF_Tools.ISF_ToolsConfig
import
EntryLayerFilterCfg
10
11
12
def
EntryLayerToolCfg
(flags, name="ISF_EntryLayerTool", **kwargs):
13
result = ComponentAccumulator()
14
kwargs[
"GeoIDSvc"
] = result.getPrimaryAndMerge(GeoIDSvcCfg(flags))
15
16
if
not
flags.Sim.RecordStepInfo:
17
# No filtering for FCS Parameterization input samples
18
kwargs.setdefault(
"ParticleFilters"
, [result.addPublicTool(result.popToolsAndMerge(EntryLayerFilterCfg(flags)))])
19
20
if
flags.GeoModel.Run < LHCPeriod.Run4:
21
kwargs.setdefault(
"CaloEntryVolumeString"
,
"IDET::IDET"
)
22
else
:
23
kwargs.setdefault(
"CaloEntryVolumeString"
,
"ITK::ITK"
)
24
25
if
flags.Common.ProductionStep == ProductionStep.FastChain:
26
if
flags.Digitization.PileUp:
27
OEsvc = CompFactory.StoreGateSvc(
"OriginalEvent_SG"
)
28
result.addService(OEsvc)
29
kwargs.setdefault(
"EvtStore"
, OEsvc)
30
31
result.setPrivateTools(CompFactory.ISF.EntryLayerTool(name, **kwargs))
32
return
result
33
34
35
def
EntryLayerToolMTCfg
(flags, name="ISF_EntryLayerToolMT", **kwargs):
36
result = ComponentAccumulator()
37
kwargs[
"GeoIDSvc"
] = result.getPrimaryAndMerge(GeoIDSvcCfg(flags))
38
39
if
not
flags.Sim.RecordStepInfo:
40
# No filtering for FCS Parameterization input samples
41
filt = result.popToolsAndMerge(EntryLayerFilterCfg(flags))
42
kwargs.setdefault(
"ParticleFilters"
, [filt])
43
44
if
flags.GeoModel.Run < LHCPeriod.Run4:
45
kwargs.setdefault(
"CaloEntryVolumeString"
,
"IDET::IDET"
)
46
else
:
47
kwargs.setdefault(
"CaloEntryVolumeString"
,
"ITK::ITK"
)
48
49
result.setPrivateTools(CompFactory.ISF.EntryLayerToolMT(name, **kwargs))
50
return
result
51
52
53
def
ATLFAST_EntryLayerToolCfg
(flags, name="ISF_ATLFAST_EntryLayerTool", **kwargs):
54
result = ComponentAccumulator()
55
kwargs[
"GeoIDSvc"
] = result.getPrimaryAndMerge(ATLFAST_GeoIDSvcCfg(flags))
56
kwargs.setdefault(
"ParticleFilters"
, [result.addPublicTool(result.popToolsAndMerge(EntryLayerFilterCfg(flags)))])
57
58
if
flags.GeoModel.Run < LHCPeriod.Run4:
59
kwargs.setdefault(
"CaloEntryVolumeString"
,
"IDET::IDET"
)
60
else
:
61
kwargs.setdefault(
"CaloEntryVolumeString"
,
"ITK::ITK"
)
62
63
if
flags.Common.ProductionStep == ProductionStep.FastChain:
64
if
flags.Digitization.PileUp:
65
OEsvc = CompFactory.StoreGateSvc(
"OriginalEvent_SG"
)
66
result.addService(OEsvc)
67
kwargs.setdefault(
"EvtStore"
, OEsvc)
68
69
result.setPrivateTools(CompFactory.ISF.EntryLayerTool(name, **kwargs))
70
return
result
71
72
73
def
ATLFAST_EntryLayerToolMTCfg
(flags, name="ISF_ATLFAST_EntryLayerToolMT", **kwargs):
74
result = ComponentAccumulator()
75
kwargs[
"GeoIDSvc"
] = result.getPrimaryAndMerge(ATLFAST_GeoIDSvcCfg(flags))
76
77
filt = result.popToolsAndMerge(EntryLayerFilterCfg(flags))
78
kwargs.setdefault(
"ParticleFilters"
, [filt])
79
80
if
flags.GeoModel.Run < LHCPeriod.Run4:
81
kwargs.setdefault(
"CaloEntryVolumeString"
,
"IDET::IDET"
)
82
else
:
83
kwargs.setdefault(
"CaloEntryVolumeString"
,
"ITK::ITK"
)
84
85
result.setPrivateTools(CompFactory.ISF.EntryLayerToolMT(name, **kwargs))
86
return
result
ISF_Geant4CommonToolsConfig.EntryLayerToolMTCfg
EntryLayerToolMTCfg(flags, name="ISF_EntryLayerToolMT", **kwargs)
Definition
ISF_Geant4CommonToolsConfig.py:35
ISF_Geant4CommonToolsConfig.EntryLayerToolCfg
EntryLayerToolCfg(flags, name="ISF_EntryLayerTool", **kwargs)
Definition
ISF_Geant4CommonToolsConfig.py:12
ISF_Geant4CommonToolsConfig.ATLFAST_EntryLayerToolMTCfg
ATLFAST_EntryLayerToolMTCfg(flags, name="ISF_ATLFAST_EntryLayerToolMT", **kwargs)
Definition
ISF_Geant4CommonToolsConfig.py:73
ISF_Geant4CommonToolsConfig.ATLFAST_EntryLayerToolCfg
ATLFAST_EntryLayerToolCfg(flags, name="ISF_ATLFAST_EntryLayerTool", **kwargs)
Definition
ISF_Geant4CommonToolsConfig.py:53
Generated on
for ATLAS Offline Software by
1.17.0