Belle II Software
release-05-02-19
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
k
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
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
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
ReconstructForTREPS.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
9
10
import
basf2
11
from
modularAnalysis
import
fillParticleListFromMC, reconstructDecay, variablesToNtuple, inputMdst
12
13
# main path
14
main = basf2.create_path()
15
16
# load input mdst file
17
inputMdst(
'default'
,
'utrepsbpipi_100k.root'
, path=main)
18
19
# get pi+:MC from MCParticles
20
fillParticleListFromMC(
'pi+:MC'
,
'mcPrimary'
, path=main)
21
22
# reconstruct a virtual gamma for convenience
23
reconstructDecay(
'gamma:Virtual -> pi+:MC pi-:MC'
,
''
, path=main)
24
25
# store variables of gamma:Virtual to ntuple
26
variablesToNtuple
(
'gamma:Virtual'
, [
'M'
,
'E'
,
'daughter(0, cosTheta)'
,
'daughter(1, cosTheta)'
], path=main)
27
28
# process
29
basf2.process
(main)
30
31
# show call statistics
32
print(basf2.statistics)
variablesToNtuple
Definition:
variablesToNtuple.py:1
basf2.process
def process(path, max_event=0)
Definition:
__init__.py:25
generators
examples
ReconstructForTREPS.py
Generated on Tue Jan 4 2022 02:57:57 for Belle II Software by
1.8.17