7 from simulation
import add_simulation
8 from reconstruction
import add_reconstruction
10 basf2.set_log_level(basf2.LogLevel.WARNING)
12 eventinfosetter = basf2.register_module(
'EventInfoSetter')
13 eventinfosetter.param(
'evtNumList', [1000])
14 eventinfosetter.param(
'runList', [1])
15 eventinfosetter.param(
'expList', [0])
17 pGun = basf2.register_module(
'ParticleGun')
19 'pdgCodes': [13, -13],
21 'momentumGeneration':
'uniform',
22 'momentumParams': [1., 3.],
23 'thetaGeneration':
'uniform',
24 'thetaParams': [17., 150.],
25 'phiGeneration':
'uniform',
26 'phiParams': [0, 360],
27 'vertexGeneration':
'uniform',
28 'xVertexParams': [0.0, 0.0],
29 'yVertexParams': [0.0, 0.0],
30 'zVertexParams': [0.0, 0.0],
33 pGun.param(param_pGun)
35 output = basf2.register_module(
'RootOutput')
36 output.param(
'outputFileName',
'ParticleGunMuons.root')
39 main = basf2.create_path()
40 main.add_module(eventinfosetter)
43 add_reconstruction(main)
44 main.add_module(output)
45 main.add_module(
'Progress')
48 print(basf2.statistics)