ATLAS Offline Software
Functions
python.TrkG4UserActionsConfig Namespace Reference

Functions

def MaterialStepRecorderCfg (configFlags, name="G4UA::UserActionSvc.MaterialStepRecorderTool", **kwargs)
 
def MaterialStepRecorderUserActionSvcCfg (configFlags, name="G4UA::MaterialStepRecorderUserActionSvc", **kwargs)
 
def MaterialStepRecorder (configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs)
 
def GeantFollowerMSToolCfg (configFlags, name="G4UA::GeantFollowerMSTool", **kwargs)
 

Function Documentation

◆ GeantFollowerMSToolCfg()

def python.TrkG4UserActionsConfig.GeantFollowerMSToolCfg (   configFlags,
  name = "G4UA::GeantFollowerMSTool",
**  kwargs 
)

Definition at line 86 of file TrkG4UserActionsConfig.py.

86 def GeantFollowerMSToolCfg(configFlags, name="G4UA::GeantFollowerMSTool", **kwargs): from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
87  from AthenaConfiguration.ComponentFactory import CompFactory
88 
89  THistSvc= CompFactory.THistSvc
90  result = ComponentAccumulator()
91  histsvc = THistSvc(name="THistSvc")
92  histsvc.Output = ["val DATAFILE='GeantFollowing.root' OPT='RECREATE'"]
93  result.addService(histsvc)
94  result.setPrivateTools(CompFactory.G4UA.GeantFollowerMSTool(name, **kwargs))
95 
96  return result
97 

◆ MaterialStepRecorder()

def python.TrkG4UserActionsConfig.MaterialStepRecorder (   configFlags,
  name = "G4UA::ISFFullUserActionSvc",
**  kwargs 
)

Definition at line 42 of file TrkG4UserActionsConfig.py.

42 def MaterialStepRecorder(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs):
43 
44  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
45  from AthenaConfiguration.ComponentFactory import CompFactory
46 
47  result = ComponentAccumulator()
48  #Setting up the CA
49  actionAcc = ComponentAccumulator()
50  actions = []
51  actions += [actionAcc.popToolsAndMerge(MaterialStepRecorderCfg(configFlags,**kwargs))]
52  actionAcc.setPrivateTools(actions)
53  MaterialStepRecorderAction = result.popToolsAndMerge(actionAcc)
54 
55  actionList = MaterialStepRecorderAction
56  #We clear it here because UserActionsTools also wants kwargs, different
57  #from the tool above - probably this caq be improved...
58  kwargs_UATools = {}
59  kwargs_UATools.setdefault("UserActionTools",actionList)
60  result.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs_UATools))
61 
62  AthenaOutputStream=CompFactory.AthenaOutputStream
63  AthenaOutputStreamTool=CompFactory.AthenaOutputStreamTool
64  writingTool = AthenaOutputStreamTool( "MaterialStepCollectionStreamTool" )
65 
66  outputStream = AthenaOutputStream(name = "MaterialStepCollectionStream",
67  WritingTool = writingTool,
68  ItemList=['EventInfo#*', 'Trk::MaterialStepCollection#*'],
69  MetadataItemList = [ "EventStreamInfo#MaterialStepCollectionStream", "IOVMetaDataContainer#*" ],
70  OutputFile = "MaterialStepCollection.root")
71 
72  StoreGateSvc=CompFactory.StoreGateSvc
73  result.addService(StoreGateSvc("MetaDataStore"))
74  outputStream.MetadataStore = result.getService("MetaDataStore")
75 
76  MakeEventStreamInfo=CompFactory.MakeEventStreamInfo
77  streamInfoTool = MakeEventStreamInfo( "MaterialStepCollectionStream_MakeEventStreamInfo" )
78  streamInfoTool.Key = "MaterialStepCollectionStream"
79  streamInfoTool.EventInfoKey = "EventInfo"
80  outputStream.HelperTools.append(streamInfoTool)
81 
82  result.addEventAlgo(outputStream)
83 
84  return result
85 

◆ MaterialStepRecorderCfg()

def python.TrkG4UserActionsConfig.MaterialStepRecorderCfg (   configFlags,
  name = "G4UA::UserActionSvc.MaterialStepRecorderTool",
**  kwargs 
)

Definition at line 5 of file TrkG4UserActionsConfig.py.

5 def MaterialStepRecorderCfg(configFlags, name="G4UA::UserActionSvc.MaterialStepRecorderTool", **kwargs):
6  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7  from AthenaConfiguration.ComponentFactory import CompFactory
8  result = ComponentAccumulator()
9  result.setPrivateTools(CompFactory.G4UA.MaterialStepRecorderTool(name, **kwargs))
10  return result
11 
12 

◆ MaterialStepRecorderUserActionSvcCfg()

def python.TrkG4UserActionsConfig.MaterialStepRecorderUserActionSvcCfg (   configFlags,
  name = "G4UA::MaterialStepRecorderUserActionSvc",
**  kwargs 
)

Definition at line 13 of file TrkG4UserActionsConfig.py.

13 def MaterialStepRecorderUserActionSvcCfg(configFlags, name="G4UA::MaterialStepRecorderUserActionSvc", **kwargs):
14  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
15  from AthenaConfiguration.ComponentFactory import CompFactory
16 
17  result = ComponentAccumulator()
18 
19  #Setting up the CA for the MaterialStepRecorder
20  actionAcc = ComponentAccumulator()
21  actions = []
22  actions += [actionAcc.popToolsAndMerge(MaterialStepRecorderCfg(configFlags))]
23  actionAcc.setPrivateTools(actions)
24  MaterialStepRecorderAction = result.popToolsAndMerge(actionAcc)
25 
26  #Retrieving the default action list
27  from G4AtlasServices.G4AtlasUserActionConfig import getDefaultActions
28  defaultActions = result.popToolsAndMerge(getDefaultActions(configFlags))
29 
30  #Adding LengthIntegrator to defaults
31  actionList = (defaultActions + MaterialStepRecorderAction)
32 
33  #Setting up UserActionsService
34 
36  kwargs_UATools = {}
37  kwargs_UATools.setdefault("UserActionTools",actionList)
38  result.addService(CompFactory.G4UA.UserActionSvc(name,**kwargs_UATools))
39 
40  return result
41 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
python.TrkG4UserActionsConfig.MaterialStepRecorderCfg
def MaterialStepRecorderCfg(configFlags, name="G4UA::UserActionSvc.MaterialStepRecorderTool", **kwargs)
Definition: TrkG4UserActionsConfig.py:5
MakeEventStreamInfo
This class provides an algorithm to make the EventStreamInfo object and update it.
Definition: MakeEventStreamInfo.h:27
Lb2Lll.THistSvc
THistSvc
Definition: Lb2Lll.py:216
AthenaOutputStream
algorithm that marks for write data objects in SG
Definition: AthenaOutputStream.h:55
G4AtlasUserActionConfig.getDefaultActions
def getDefaultActions(flags)
Definition: G4AtlasUserActionConfig.py:105
python.TrkG4UserActionsConfig.GeantFollowerMSToolCfg
def GeantFollowerMSToolCfg(configFlags, name="G4UA::GeantFollowerMSTool", **kwargs)
Definition: TrkG4UserActionsConfig.py:86
python.TrkG4UserActionsConfig.MaterialStepRecorder
def MaterialStepRecorder(configFlags, name="G4UA::ISFFullUserActionSvc", **kwargs)
Definition: TrkG4UserActionsConfig.py:42
AthenaOutputStreamTool
This is the implementation of IAthenaOutputStreamTool.
Definition: AthenaOutputStreamTool.h:31
python.TrkG4UserActionsConfig.MaterialStepRecorderUserActionSvcCfg
def MaterialStepRecorderUserActionSvcCfg(configFlags, name="G4UA::MaterialStepRecorderUserActionSvc", **kwargs)
Definition: TrkG4UserActionsConfig.py:13