11from basf2
import set_log_level, register_module, process, LogLevel, \
12 set_random_seed, print_params, create_path, statistics
15set_log_level(LogLevel.WARNING)
18particlegun = register_module(
'ParticleGun')
34particlegun.param(
'pdgCodes', [-11, 11])
39particlegun.param(
'nTracks', 10)
52particlegun.param(
'varyNTracks',
False)
95particlegun.param(
'momentumGeneration',
'uniform')
96particlegun.param(
'momentumParams', [0.05, 3])
119particlegun.param(
'thetaGeneration',
'uniform')
120particlegun.param(
'thetaParams', [17, 150])
147particlegun.param(
'phiGeneration',
'uniform')
148particlegun.param(
'phiParams', [0, 360])
158particlegun.param(
'vertexGeneration',
'fixed')
159particlegun.param(
'xVertexParams', [0])
160particlegun.param(
'yVertexParams', [0])
161particlegun.param(
'zVertexParams', [0])
183particlegun.param(
'independentVertices',
False)
187print_params(particlegun)
193eventinfosetter = register_module(
'EventInfoSetter')
195progress = register_module(
'Progress')
197gearbox = register_module(
'Gearbox')
199geometry = register_module(
'Geometry')
201output = register_module(
'RootOutput')
205eventinfosetter.param({
'evtNumList': [100],
'runList': [1]})
208output.param(
'outputFileName',
'ParticleGunOutput.root')
212main.add_module(eventinfosetter)
213main.add_module(progress)
214main.add_module(particlegun)
216main.add_module(output)