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"]))
50 acc.addEventAlgo(CompFactory.ActsTrk.MaterialTrackWriter(name, **kwargs), primary =
True)
55 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
56 from AthenaConfiguration.ComponentFactory
import CompFactory
57 acc = ComponentAccumulator()
59 acc.addEventAlgo(CompFactory.ActsTrk.MaterialTrackReader(name, **kwargs), primary =
True)
64 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
65 from AthenaConfiguration.ComponentFactory
import CompFactory
66 acc = ComponentAccumulator()
67 acc.setPrivateTools(CompFactory.ActsTrk.RootMaterialWriterTool(name, **kwargs))
71 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
72 from AthenaConfiguration.ComponentFactory
import CompFactory
73 acc = ComponentAccumulator()
74 acc.setPrivateTools(CompFactory.ActsTrk.JsonMaterialWriterTool(name, **kwargs))
78 name="MaterialMapping",
81 WriteJsonMaterialMap=True,
82 WriteRootMaterialMap=False,
83 OutputMappedMaterialTracks="OuputMappedMaterialTracks",
84 OutputUnmappedMaterialTracks="OutputUnmappedMaterialTracks",
87 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
88 from AthenaConfiguration.ComponentFactory
import CompFactory
89 acc = ComponentAccumulator()
92 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometrySvcCfg
93 acc.merge( ActsTrackingGeometrySvcCfg(configFlags))
94 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
95 acc.merge(AtlasFieldCacheCondAlgCfg(configFlags))
96 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
97 acc.merge(ActsGeometryContextAlgCfg(configFlags))
100 if WriteRootMaterialMap:
102 if WriteJsonMaterialMap:
104 kwargs.setdefault(
"MaterialMapWriters", mapwriters)
106 kwargs.setdefault(
"MappedMaterialTrackCollectionKey", OutputMappedMaterialTracks)
107 kwargs.setdefault(
"UnmappedMaterialTrackCollectionKey", OutputUnmappedMaterialTracks)
111 acc.addEventAlgo(CompFactory.ActsTrk.MaterialMapping(name, **kwargs), primary =
True)
114 from ActsConfig.ActsMaterialConfig
import MaterialTrackWriterCfg
116 name=
"MappedMaterialTrackWriter",
117 FileName=
"material-tracks-mapped.root",
118 OutStream=
"ACTSMAPPEDMATERIALWRITER",
119 StoreSurface=StoreSurfInfo,
120 MaterialTrackCollectionKey=OutputMappedMaterialTracks))
122 name=
"UnmappedMaterialTrackWriter",
123 FileName=
"material-tracks-unmapped.root",
124 OutStream=
"ACTSUNMAPPEDMATERIALWRITER",
125 StoreSurface=StoreSurfInfo,
126 MaterialTrackCollectionKey=OutputUnmappedMaterialTracks))
133 OutputMaterialTracks="OutputMaterialTracks",
134 name="MaterialValidation", **kwargs) :
135 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
136 from AthenaConfiguration.ComponentFactory
import CompFactory
137 acc = ComponentAccumulator()
140 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometrySvcCfg
141 acc.merge( ActsTrackingGeometrySvcCfg(configFlags))
142 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
143 acc.merge(AtlasFieldCacheCondAlgCfg(configFlags))
144 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
145 acc.merge(ActsGeometryContextAlgCfg(configFlags))
147 kwargs.setdefault(
"MaterialTrackCollectionKey", OutputMaterialTracks)
149 acc.addEventAlgo(CompFactory.ActsTrk.MaterialValidation(name, **kwargs), primary =
True)
151 from ActsConfig.ActsMaterialConfig
import MaterialTrackWriterCfg
153 FileName=
"material-tracks-validation.root",
154 MaterialTrackCollectionKey=OutputMaterialTracks))
MaterialMappingCfg(configFlags, name="MaterialMapping", StoreTracks=False, StoreSurfInfo=False, WriteJsonMaterialMap=True, WriteRootMaterialMap=False, OutputMappedMaterialTracks="OuputMappedMaterialTracks", OutputUnmappedMaterialTracks="OutputUnmappedMaterialTracks", **kwargs)