1 """ComponentAccumulator Geant4 tools config for ISF
3 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
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
12 def EntryLayerToolCfg(flags, name="ISF_EntryLayerTool", **kwargs):
14 kwargs[
"GeoIDSvc"] = result.getPrimaryAndMerge(
GeoIDSvcCfg(flags))
16 if not flags.Sim.RecordStepInfo:
18 kwargs.setdefault(
"ParticleFilters", [result.addPublicTool(result.popToolsAndMerge(
EntryLayerFilterCfg(flags)))])
20 if flags.GeoModel.Run < LHCPeriod.Run4:
21 kwargs.setdefault(
"CaloEntryVolumeString",
"IDET::IDET")
23 kwargs.setdefault(
"CaloEntryVolumeString",
"ITK::ITK")
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.name)
31 result.setPrivateTools(CompFactory.ISF.EntryLayerTool(name, **kwargs))
37 kwargs[
"GeoIDSvc"] = result.getPrimaryAndMerge(
GeoIDSvcCfg(flags))
39 if not flags.Sim.RecordStepInfo:
42 kwargs.setdefault(
"ParticleFilters", [filt])
44 if flags.GeoModel.Run < LHCPeriod.Run4:
45 kwargs.setdefault(
"CaloEntryVolumeString",
"IDET::IDET")
47 kwargs.setdefault(
"CaloEntryVolumeString",
"ITK::ITK")
49 result.setPrivateTools(CompFactory.ISF.EntryLayerToolMT(name, **kwargs))
56 kwargs.setdefault(
"ParticleFilters", [result.addPublicTool(result.popToolsAndMerge(
EntryLayerFilterCfg(flags)))])
58 if flags.GeoModel.Run < LHCPeriod.Run4:
59 kwargs.setdefault(
"CaloEntryVolumeString",
"IDET::IDET")
61 kwargs.setdefault(
"CaloEntryVolumeString",
"ITK::ITK")
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.name)
69 result.setPrivateTools(CompFactory.ISF.EntryLayerTool(name, **kwargs))
78 kwargs.setdefault(
"ParticleFilters", [filt])
80 if flags.GeoModel.Run < LHCPeriod.Run4:
81 kwargs.setdefault(
"CaloEntryVolumeString",
"IDET::IDET")
83 kwargs.setdefault(
"CaloEntryVolumeString",
"ITK::ITK")
85 result.setPrivateTools(CompFactory.ISF.EntryLayerToolMT(name, **kwargs))