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
▼
Belle II Software
►
Modules
►
Namespaces
►
Classes
▼
Files
►
File List
►
File Members
013_first_steering_file.py
1
#!/usr/bin/env python3
2
3
import
sys
4
import
basf2
as
b2
5
import
modularAnalysis
as
ma
6
import
stdV0s
7
8
# get input file number from the command line
9
filenumber = sys.argv[1]
10
11
# create path
12
main = b2.Path()
13
14
# load input data from mdst/udst file
15
ma.inputMdstList(
16
filelist=[b2.find_file(f
"starterkit/2021/1111540100_eph3_BGx0_{filenumber}.root"
,
"examples"
)],
17
path=main,
18
)
19
20
# fill final state particle lists
21
ma.fillParticleList(
# [S10]
22
"e+:uncorrected"
,
23
"electronID > 0.1 and dr < 0.5 and abs(dz) < 2 and thetaInCDCAcceptance"
,
24
path=main,
25
)
# [E10]
26
stdV0s.stdKshorts
(path=main)
27
28
# combine final state particles to form composite particles [S20]
29
ma.reconstructDecay(
30
"J/psi:ee -> e+:uncorrected e-:uncorrected"
, cut=
"abs(dM) < 0.11"
, path=main
31
)
# [E20]
32
33
# combine J/psi and KS candidates to form B0 candidates
34
ma.reconstructDecay(
35
"B0 -> J/psi:ee K_S0:merged"
,
36
cut=
""
,
37
path=main,
38
)
39
# [E30]
40
# save variables to an output file (ntuple)
41
ma.variablesToNtuple(
42
"B0"
,
43
variables=[
'Mbc'
],
44
filename=
"Bd2JpsiKS.root"
,
45
treename=
"tree"
,
46
path=main,
47
)
48
49
# start the event loop (actually start processing things)
50
b2.process(main)
51
52
# print out the summary
53
print(b2.statistics)
stdV0s.stdKshorts
def stdKshorts(prioritiseV0=True, fitter='TreeFit', path=None, updateAllDaughters=False, writeOut=False)
Definition:
stdV0s.py:17
online_book
basf2
steering_files
013_first_steering_file.py
Generated on Thu Apr 10 2025 02:38:57 for Belle II Software by
1.9.6