Belle II Software
development
KLMK0LGenerate.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<output>KLMK0LOutput.root</output>
14
<contact>Leo Piilonen (piilonen
@vt.edu
)</contact>
15
<description>Generation of 2000 B -> J/psi K_L0 events
for
KLM validation.</description>
16
</header>
17
"""
18
19
import basf2
20
from simulation import add_simulation
21
from reconstruction import add_reconstruction
22
23
basf2.set_log_level(basf2.LogLevel.WARNING)
24
25
# Fixed random seed
26
basf2.set_random_seed(123456)
27
28
# Create main path
29
main = basf2.create_path()
30
31
# Event data
32
eventinfosetter = basf2.register_module('EventInfoSetter')
33
eventinfosetter.param('evtNumList', [2000])
34
35
# Evtgen and beam parameters.
36
evtgen = basf2.register_module('EvtGenInput')
37
evtgen.param('userDECFile', basf2.find_file('klm/validation/btojpsikl0.dec'))
38
39
# Add progress bars
40
progress = basf2.register_module('Progress')
41
progressBar = basf2.register_module('ProgressBar')
42
43
# Output
44
output = basf2.register_module('RootOutput')
45
output.param('outputFileName', '../KLMK0LOutput.root')
46
47
# Add modules to main path
48
main.add_module(eventinfosetter)
49
main.add_module(evtgen)
50
51
add_simulation(path=main)
52
add_reconstruction(path=main)
53
54
main.add_module(progress)
55
main.add_module(progressBar)
56
57
main.add_module(output)
58
59
# Process the path
60
basf2.process(main)
klm
validation
KLMK0LGenerate.py
Generated on Tue Nov 12 2024 02:39:42 for Belle II Software by
1.9.6