3 """Define methods to configure TrkG4UserActions"""
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
9 result.setPrivateTools(CompFactory.G4UA.MaterialStepRecorderTool(name, **kwargs))
14 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
15 from AthenaConfiguration.ComponentFactory
import CompFactory
23 actionAcc.setPrivateTools(actions)
24 MaterialStepRecorderAction = result.popToolsAndMerge(actionAcc)
27 from G4AtlasServices.G4AtlasUserActionConfig
import getDefaultActions
31 actionList = (defaultActions + MaterialStepRecorderAction)
37 kwargs_UATools.setdefault(
"UserActionTools",actionList)
38 result.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs_UATools))
44 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
45 from AthenaConfiguration.ComponentFactory
import CompFactory
52 actionAcc.setPrivateTools(actions)
53 MaterialStepRecorderAction = result.popToolsAndMerge(actionAcc)
55 actionList = MaterialStepRecorderAction
59 kwargs_UATools.setdefault(
"UserActionTools",actionList)
60 result.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs_UATools))
62 AthenaOutputStream=CompFactory.AthenaOutputStream
63 AthenaOutputStreamTool=CompFactory.AthenaOutputStreamTool
67 WritingTool = writingTool,
68 ItemList=[
'EventInfo#*',
'Trk::MaterialStepCollection#*'],
69 MetadataItemList = [
"EventStreamInfo#MaterialStepCollectionStream",
"IOVMetaDataContainer#*" ],
70 OutputFile =
"MaterialStepCollection.root")
72 StoreGateSvc=CompFactory.StoreGateSvc
74 outputStream.MetadataStore = result.getService(
"MetaDataStore")
76 MakeEventStreamInfo=CompFactory.MakeEventStreamInfo
78 streamInfoTool.Key =
"MaterialStepCollectionStream"
79 streamInfoTool.EventInfoKey =
"EventInfo"
80 outputStream.HelperTools.append(streamInfoTool)
82 result.addEventAlgo(outputStream)
87 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
88 from AthenaConfiguration.ComponentFactory
import CompFactory
90 THistSvc= CompFactory.THistSvc
93 histsvc.Output = [
"val DATAFILE='GeantFollowing.root' OPT='RECREATE'"]
94 result.addService(histsvc)
95 result.setPrivateTools(CompFactory.G4UA.GeantFollowerMSTool(name, **kwargs))