ATLAS Offline Software
Loading...
Searching...
No Matches
python.G4UserActionsConfig Namespace Reference

Functions

 AthenaStackingActionToolCfg (flags, name='G4UA::AthenaStackingActionTool', **kwargs)
 LooperKillerToolCfg (flags, name='G4UA::LooperKillerTool', **kwargs)
 MonopoleLooperKillerToolCfg (flags, name="G4UA::MonopoleLooperKillerTool", **kwargs)
 G4SimTimerToolCfg (flags, name='G4UA::G4SimTimerTool', **kwargs)
 G4TrackCounterToolCfg (flags, name='G4UA::G4TrackCounterTool', **kwargs)
 StoppedParticleActionToolCfg (flags, name="G4UA::StoppedParticleActionTool", **kwargs)
 FixG4CreatorProcessToolCfg (flags, name="G4UA::FixG4CreatorProcessTool", **kwargs)
 HitWrapperToolCfg (flags, name="G4UA::HitWrapperTool", **kwargs)
 LengthIntegratorToolCfg (flags, name="G4UA::UserActionSvc.LengthIntegratorTool", **kwargs)
 RadiationMapsMakerToolCfg (flags, name="G4UA::UserActionSvc.RadiationMapsMakerTool", **kwargs)
 HIPKillerToolCfg (flags, name="G4UA::HIPKillerTool", **kwargs)
 FastIDKillerToolCfg (flags, name="G4UA::FastIDKillerTool", **kwargs)
 CelerOffloadToolCfg (flags, name="G4UA::CelerOffloadTool", **kwargs)

Function Documentation

◆ AthenaStackingActionToolCfg()

AthenaStackingActionToolCfg ( flags,
name = 'G4UA::AthenaStackingActionTool',
** kwargs )

Definition at line 13 of file G4UserActionsConfig.py.

13def AthenaStackingActionToolCfg(flags, name='G4UA::AthenaStackingActionTool', **kwargs):
14
15 result = ComponentAccumulator()
16
17 if "ATLAS" in flags.GeoModel.AtlasVersion:
18 kwargs.setdefault('KillAllNeutrinos', True)
19
20 if flags.Sim.NRRThreshold and flags.Sim.NRRWeight:
21 if flags.Sim.CalibrationRun is not CalibrationRun.Off:
22 raise NotImplementedError("Neutron Russian Roulette should not be used in Calibration Runs.")
23 kwargs.setdefault('ApplyNRR', True)
24 kwargs.setdefault('NRRThreshold', flags.Sim.NRRThreshold)
25 kwargs.setdefault('NRRWeight', flags.Sim.NRRWeight)
26
27 if flags.Sim.PRRThreshold and flags.Sim.PRRWeight:
28 if flags.Sim.CalibrationRun is not CalibrationRun.Off:
29 raise NotImplementedError("Photon Russian Roulette should not be used in Calibration Runs.")
30 kwargs.setdefault('ApplyPRR', True)
31 kwargs.setdefault('PRRThreshold', flags.Sim.PRRThreshold)
32 kwargs.setdefault('PRRWeight', flags.Sim.PRRWeight)
33 kwargs.setdefault('IsISFJob', flags.Sim.ISFRun)
34
35 result.setPrivateTools( CompFactory.G4UA.AthenaStackingActionTool(name,**kwargs) )
36 return result
37
38

◆ CelerOffloadToolCfg()

CelerOffloadToolCfg ( flags,
name = "G4UA::CelerOffloadTool",
** kwargs )

Definition at line 151 of file G4UserActionsConfig.py.

151def CelerOffloadToolCfg(flags, name="G4UA::CelerOffloadTool", **kwargs):
152 result = ComponentAccumulator()
153 kwargs.setdefault("max_num_tracks", 1024*16)
154 kwargs.setdefault("initializer_capacity", 1024*128*4)
155 # Avoid stuck tracks (use CELER_NONFATAL_FLUSH env var to continue processing)
156 kwargs.setdefault("max_step_iters", 10000)
157 kwargs.setdefault("ignore_processes", ["CoulombScat"])
158 result.setPrivateTools(CompFactory.G4UA.CelerOffloadTool(name, **kwargs))
159 return result

◆ FastIDKillerToolCfg()

FastIDKillerToolCfg ( flags,
name = "G4UA::FastIDKillerTool",
** kwargs )
isDalek = True : kill all particles with kinetic energy below
'energyCut' leaving the ID envelope (R,Z).

isDalek = False : kill all particles leaving the ID envelope
(R,Z), except e+-/gamma with total energy >= 'energyCut'

Definition at line 129 of file G4UserActionsConfig.py.

129def FastIDKillerToolCfg(flags, name="G4UA::FastIDKillerTool", **kwargs):
130 """
131 isDalek = True : kill all particles with kinetic energy below
132 'energyCut' leaving the ID envelope (R,Z).
133
134 isDalek = False : kill all particles leaving the ID envelope
135 (R,Z), except e+-/gamma with total energy >= 'energyCut'
136 """
137 result = ComponentAccumulator()
138 # FIXME UserActionConfig not yet migrated
139 # example custom configuration
140 # if name in flags.Sim.UserActionConfig.keys():
141 # for prop,value in flags.Sim.UserActionConfig[name].iteritems():
142 # kwargs.setdefault(prop,value)
143 from AthenaCommon.SystemOfUnits import MeV, mm
144 kwargs.setdefault("energyCut", 100.*MeV) # Energy cut in MeV
145 kwargs.setdefault("isDalek", False)
146 kwargs.setdefault("R", 1150.*mm) # ID outer radius
147 kwargs.setdefault("Z", 3490.*mm) # ID maximum Z coordiate
148 result.setPrivateTools(CompFactory.G4UA.FastIDKillerTool(name, **kwargs))
149 return result
150

◆ FixG4CreatorProcessToolCfg()

FixG4CreatorProcessToolCfg ( flags,
name = "G4UA::FixG4CreatorProcessTool",
** kwargs )

Definition at line 77 of file G4UserActionsConfig.py.

77def FixG4CreatorProcessToolCfg(flags, name="G4UA::FixG4CreatorProcessTool", **kwargs):
78 result = ComponentAccumulator()
79 result.setPrivateTools(CompFactory.G4UA.FixG4CreatorProcessTool(name, **kwargs))
80 return result
81
82

◆ G4SimTimerToolCfg()

G4SimTimerToolCfg ( flags,
name = 'G4UA::G4SimTimerTool',
** kwargs )

Definition at line 53 of file G4UserActionsConfig.py.

53def G4SimTimerToolCfg(flags, name='G4UA::G4SimTimerTool', **kwargs):
54 result = ComponentAccumulator()
55 result.setPrivateTools(CompFactory.G4UA.G4SimTimerTool(name,**kwargs))
56 return result
57
58

◆ G4TrackCounterToolCfg()

G4TrackCounterToolCfg ( flags,
name = 'G4UA::G4TrackCounterTool',
** kwargs )

Definition at line 59 of file G4UserActionsConfig.py.

59def G4TrackCounterToolCfg(flags, name='G4UA::G4TrackCounterTool', **kwargs):
60 result = ComponentAccumulator()
61 result.setPrivateTools(CompFactory.G4UA.G4TrackCounterTool(name,**kwargs))
62 return result
63
64

◆ HIPKillerToolCfg()

HIPKillerToolCfg ( flags,
name = "G4UA::HIPKillerTool",
** kwargs )

Definition at line 123 of file G4UserActionsConfig.py.

123def HIPKillerToolCfg(flags, name="G4UA::HIPKillerTool", **kwargs):
124 result = ComponentAccumulator()
125 result.setPrivateTools(CompFactory.G4UA.HIPKillerTool(name, **kwargs))
126 return result
127
128

◆ HitWrapperToolCfg()

HitWrapperToolCfg ( flags,
name = "G4UA::HitWrapperTool",
** kwargs )

Definition at line 83 of file G4UserActionsConfig.py.

83def HitWrapperToolCfg(flags, name="G4UA::HitWrapperTool", **kwargs):
84 result = ComponentAccumulator()
85 # TODO UserActionConfig flag not yet migrated
86 # example custom configuration
87 # if name in flags.Sim.UserActionConfig.keys():
88 # for prop,value in flags.Sim.UserActionConfig[name].iteritems():
89 # kwargs.setdefault(prop,value)
90 result.setPrivateTools(CompFactory.G4UA.HitWrapperTool(name, **kwargs))
91 return result
92
93

◆ LengthIntegratorToolCfg()

LengthIntegratorToolCfg ( flags,
name = "G4UA::UserActionSvc.LengthIntegratorTool",
** kwargs )

Definition at line 94 of file G4UserActionsConfig.py.

94def LengthIntegratorToolCfg(flags, name="G4UA::UserActionSvc.LengthIntegratorTool", **kwargs):
95 THistSvc= CompFactory.THistSvc
96 result = ComponentAccumulator()
97 histsvc = THistSvc(name="THistSvc")
98 histsvc.Output = ["lengths DATAFILE='LengthIntegrator.root' OPT='RECREATE'"]
99 result.addService(histsvc)
100 kwargs.setdefault("HistoSvc", "THistSvc")
101 result.setPrivateTools(CompFactory.G4UA.LengthIntegratorTool(name, **kwargs))
102 return result
103

◆ LooperKillerToolCfg()

LooperKillerToolCfg ( flags,
name = 'G4UA::LooperKillerTool',
** kwargs )

Definition at line 39 of file G4UserActionsConfig.py.

39def LooperKillerToolCfg(flags, name='G4UA::LooperKillerTool', **kwargs):
40 result = ComponentAccumulator()
41 result.setPrivateTools(CompFactory.G4UA.LooperKillerTool(name, **kwargs))
42 return result
43
44

◆ MonopoleLooperKillerToolCfg()

MonopoleLooperKillerToolCfg ( flags,
name = "G4UA::MonopoleLooperKillerTool",
** kwargs )

Definition at line 45 of file G4UserActionsConfig.py.

45def MonopoleLooperKillerToolCfg(flags, name="G4UA::MonopoleLooperKillerTool", **kwargs):
46 kwargs.setdefault("MaxSteps", 2000000)
47 kwargs.setdefault("PrintSteps", 2)
48 kwargs.setdefault("VerboseLevel", 0)
49 kwargs.setdefault("BSM_Only", True)
50 return LooperKillerToolCfg(flags, name, **kwargs)
51
52

◆ RadiationMapsMakerToolCfg()

RadiationMapsMakerToolCfg ( flags,
name = "G4UA::UserActionSvc.RadiationMapsMakerTool",
** kwargs )

Definition at line 104 of file G4UserActionsConfig.py.

104def RadiationMapsMakerToolCfg(flags, name="G4UA::UserActionSvc.RadiationMapsMakerTool", **kwargs):
105 result = ComponentAccumulator()
106 kwargs.setdefault("ActivationFileName","Activations.txt")
107 kwargs.setdefault("NBinsDPhi",1)
108 kwargs.setdefault("NBinsTheta",1)
109 kwargs.setdefault("NBinsR3D",120)
110 kwargs.setdefault("NBinsZ3D",240)
111 kwargs.setdefault("NBinsPhi3D",28)
112 kwargs.setdefault("NBinsLogTimeCut",26)
113 kwargs.setdefault("PhiMinZoom",0.0)
114 kwargs.setdefault("PhiMaxZoom",22.5)
115 kwargs.setdefault("LogTMin",-3.0)
116 kwargs.setdefault("LogTMax",10.0)
117 kwargs.setdefault("ElemZMin",1)
118 kwargs.setdefault("ElemZMax",1)
119 result.setPrivateTools(CompFactory.G4UA.RadiationMapsMakerTool(name, **kwargs))
120 return result
121
122

◆ StoppedParticleActionToolCfg()

StoppedParticleActionToolCfg ( flags,
name = "G4UA::StoppedParticleActionTool",
** kwargs )

Definition at line 65 of file G4UserActionsConfig.py.

65def StoppedParticleActionToolCfg(flags, name="G4UA::StoppedParticleActionTool", **kwargs):
66 # Just have to set the stopping condition
67 result = ComponentAccumulator()
68 # TODO UserActionConfig not yet migrated
69 # example custom configuration
70 # if name in flags.Sim.UserActionConfig.keys():
71 # for prop,value in flags.Sim.UserActionConfig[name].iteritems():
72 # kwargs.setdefault(prop,value)
73 result.setPrivateTools(CompFactory.G4UA.StoppedParticleActionTool(name, **kwargs))
74 return result
75
76