Belle II Software
development
Toggle main menu visibility
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
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 Wed Apr 9 2025 02:43:05 for Belle II Software by
1.9.6