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
ReconstructForTREPS.py
1
#!/usr/bin/env python3
2
3
10
11
import
basf2
12
from
modularAnalysis
import
fillParticleListFromMC, reconstructDecay, variablesToNtuple, inputMdst
13
14
# main path
15
main = basf2.create_path()
16
17
# load input mdst file
18
inputMdst(
'utrepsbpipi_100k.root'
, path=main)
19
20
# get pi+:MC from MCParticles
21
fillParticleListFromMC(
'pi+:MC'
,
'mcPrimary'
, path=main)
22
23
# reconstruct a virtual gamma for convenience
24
reconstructDecay(
'gamma:Virtual -> pi+:MC pi-:MC'
,
''
, path=main)
25
26
# store variables of gamma:Virtual to ntuple
27
variablesToNtuple
(
'gamma:Virtual'
, [
'M'
,
'E'
,
'daughter(0, cosTheta)'
,
'daughter(1, cosTheta)'
], path=main)
28
29
# process
30
basf2.process(main)
31
32
# show call statistics
33
print(basf2.statistics)
variablesToNtuple
Definition:
variablesToNtuple.py:1
generators
examples
ReconstructForTREPS.py
Generated on Sat Apr 12 2025 02:42:11 for Belle II Software by
1.9.6