15 from simulation
import add_simulation
16 from reconstruction
import add_reconstruction
18 basf2.set_log_level(basf2.LogLevel.WARNING)
20 eventinfosetter = basf2.register_module(
'EventInfoSetter')
21 eventinfosetter.param(
'evtNumList', [1000])
22 eventinfosetter.param(
'runList', [1])
23 eventinfosetter.param(
'expList', [0])
25 pGun = basf2.register_module(
'ParticleGun')
27 'pdgCodes': [13, -13],
29 'momentumGeneration':
'uniform',
30 'momentumParams': [1., 3.],
31 'thetaGeneration':
'uniform',
32 'thetaParams': [17., 150.],
33 'phiGeneration':
'uniform',
34 'phiParams': [0, 360],
35 'vertexGeneration':
'uniform',
36 'xVertexParams': [0.0, 0.0],
37 'yVertexParams': [0.0, 0.0],
38 'zVertexParams': [0.0, 0.0],
41 pGun.param(param_pGun)
43 output = basf2.register_module(
'RootOutput')
44 output.param(
'outputFileName',
'ParticleGunMuons.root')
47 main = basf2.create_path()
48 main.add_module(eventinfosetter)
51 add_reconstruction(main)
52 main.add_module(output)
53 main.add_module(
'Progress')
56 print(basf2.statistics)