12 from basf2
import set_log_level, register_module, process, LogLevel, \
13 set_random_seed, print_params, create_path, statistics
16 set_log_level(LogLevel.WARNING)
19 particlegun = register_module(
'ParticleGun')
35 particlegun.param(
'pdgCodes', [-11, 11])
40 particlegun.param(
'nTracks', 10)
53 particlegun.param(
'varyNTracks',
False)
96 particlegun.param(
'momentumGeneration',
'uniform')
97 particlegun.param(
'momentumParams', [0.05, 3])
120 particlegun.param(
'thetaGeneration',
'uniform')
121 particlegun.param(
'thetaParams', [17, 150])
148 particlegun.param(
'phiGeneration',
'uniform')
149 particlegun.param(
'phiParams', [0, 360])
159 particlegun.param(
'vertexGeneration',
'fixed')
160 particlegun.param(
'xVertexParams', [0])
161 particlegun.param(
'yVertexParams', [0])
162 particlegun.param(
'zVertexParams', [0])
184 particlegun.param(
'independentVertices',
False)
188 print_params(particlegun)
194 eventinfosetter = register_module(
'EventInfoSetter')
196 progress = register_module(
'Progress')
198 gearbox = register_module(
'Gearbox')
200 geometry = register_module(
'Geometry')
202 output = register_module(
'RootOutput')
206 eventinfosetter.param({
'evtNumList': [100],
'runList': [1]})
209 output.param(
'outputFileName',
'ParticleGunOutput.root')
213 main.add_module(eventinfosetter)
214 main.add_module(progress)
215 main.add_module(particlegun)
217 main.add_module(output)