1"""ComponentAccumulator Geant4 tools config for ISF
3Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
7from AthenaConfiguration.Enums
import LHCPeriod, ProductionStep
8from ISF_Services.ISF_ServicesCoreConfig
import GeoIDSvcCfg, ATLFAST_GeoIDSvcCfg
9from ISF_Tools.ISF_ToolsConfig
import EntryLayerFilterCfg
13 result = ComponentAccumulator()
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))
36 result = ComponentAccumulator()
37 kwargs[
"GeoIDSvc"] = result.getPrimaryAndMerge(GeoIDSvcCfg(flags))
39 if not flags.Sim.RecordStepInfo:
41 filt = result.popToolsAndMerge(EntryLayerFilterCfg(flags))
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))
54 result = ComponentAccumulator()
55 kwargs[
"GeoIDSvc"] = result.getPrimaryAndMerge(ATLFAST_GeoIDSvcCfg(flags))
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))
74 result = ComponentAccumulator()
75 kwargs[
"GeoIDSvc"] = result.getPrimaryAndMerge(ATLFAST_GeoIDSvcCfg(flags))
77 filt = result.popToolsAndMerge(EntryLayerFilterCfg(flags))
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))