4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 acc = ComponentAccumulator()
7 acc.setPrivateTools(CompFactory.ActsTrk.MaterialTrackRecorderTool(name, **kwargs))
12 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
13 from AthenaConfiguration.ComponentFactory
import CompFactory
15 acc = ComponentAccumulator()
18 actionAcc = ComponentAccumulator()
21 actionAcc.setPrivateTools(actions)
22 MaterialTrackRecorderAction = acc.popToolsAndMerge(actionAcc)
25 from G4AtlasServices.G4AtlasUserActionConfig
import getDefaultActions
26 defaultActions = acc.popToolsAndMerge(getDefaultActions(configFlags))
29 actionList = (defaultActions + MaterialTrackRecorderAction)
31 kwargs.setdefault(
"UserActionTools",actionList)
32 acc.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs), primary =
True)
37 name="MaterialTrackWriter",
38 FileName="material-tracks.root",
39 OutStream="ACTSMATERIALWRITER",
41 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
42 from AthenaConfiguration.ComponentFactory
import CompFactory
43 acc = ComponentAccumulator()
44 kwargs.setdefault(
"OutStream", OutStream)
45 kwargs.setdefault(
"useTrackingGeometry",
True)
47 from MuonConfig.MuonConfigUtils
import setupHistSvcCfg
48 acc.merge(setupHistSvcCfg(configFlags, outFile = FileName, outStream=kwargs[
"OutStream"]))
51 if kwargs[
"useTrackingGeometry"]:
52 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
53 kwargs.setdefault(
"TrackingGeometryTool", acc.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(configFlags)))
54 acc.addEventAlgo(CompFactory.ActsTrk.MaterialTrackWriter(name, **kwargs), primary =
True)
59 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
60 from AthenaConfiguration.ComponentFactory
import CompFactory
61 acc = ComponentAccumulator()
63 acc.addEventAlgo(CompFactory.ActsTrk.MaterialTrackReader(name, **kwargs), primary =
True)
68 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
69 from AthenaConfiguration.ComponentFactory
import CompFactory
70 acc = ComponentAccumulator()
71 acc.setPrivateTools(CompFactory.ActsTrk.RootMaterialWriterTool(name, **kwargs))
76 name="MaterialMapping",
78 OutputMappedMaterialTracks="OuputMappedMaterialTracks",
79 OutputUnmappedMaterialTracks="OutputUnmappedMaterialTracks",
81 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
82 from AthenaConfiguration.ComponentFactory
import CompFactory
83 acc = ComponentAccumulator()
86 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometrySvcCfg
87 acc.merge( ActsTrackingGeometrySvcCfg(configFlags))
90 kwargs.setdefault(
"MaterialMapWriters", mapwriters)
92 kwargs.setdefault(
"MappedMaterialTrackCollectionKey", OutputMappedMaterialTracks)
93 kwargs.setdefault(
"UnmappedMaterialTrackCollectionKey", OutputUnmappedMaterialTracks)
98 acc.addEventAlgo(CompFactory.ActsTrk.MaterialMapping(name, **kwargs), primary =
True)
101 from ActsConfig.ActsMaterialConfig
import MaterialTrackWriterCfg
103 name=
"MappedMaterialTrackWriter",
104 FileName=
"material-tracks-mapped.root",
105 OutStream=
"ACTSMAPPEDMATERIALWRITER",
106 MaterialTrackCollectionKey=OutputMappedMaterialTracks))
108 name=
"UnmappedMaterialTrackWriter",
109 FileName=
"material-tracks-unmapped.root",
110 OutStream=
"ACTSUNMAPPEDMATERIALWRITER",
111 MaterialTrackCollectionKey=OutputUnmappedMaterialTracks))
118 OutputMaterialTracks="OutputMaterialTracks",
119 name="MaterialValidation", **kwargs) :
120 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
121 from AthenaConfiguration.ComponentFactory
import CompFactory
122 acc = ComponentAccumulator()
125 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometrySvcCfg
126 acc.merge( ActsTrackingGeometrySvcCfg(configFlags))
128 kwargs.setdefault(
"MaterialTrackCollectionKey", OutputMaterialTracks)
130 acc.addEventAlgo(CompFactory.ActsTrk.MaterialValidation(name, **kwargs), primary =
True)
132 from ActsConfig.ActsMaterialConfig
import MaterialTrackWriterCfg
134 FileName=
"material-tracks-validation.root",
135 MaterialTrackCollectionKey=OutputMaterialTracks))
MaterialMappingCfg(configFlags, inputFiles, name="MaterialMapping", StoreTracks=False, OutputMappedMaterialTracks="OuputMappedMaterialTracks", OutputUnmappedMaterialTracks="OutputUnmappedMaterialTracks", **kwargs)