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
plotting_R2.py
1
# Include this only if running in a Jupyter notebook
2
# %matplotlib inline
3
4
import
matplotlib.pyplot
as
plt
5
import
uproot
6
7
var_list = [
'isContinuumEvent'
,
'R2'
]
8
df = uproot.open(
"ContinuumSuppression_applied.root:tree"
).arrays(var_list, library=
'pd'
)
9
10
fig, ax = plt.subplots()
11
12
signal_df = df.query(
"(isContinuumEvent == 0.0)"
)
13
continuum_df = df.query(
"(isContinuumEvent == 1.0)"
)
14
15
hist_kwargs = dict(bins=30, range=(0, 1), histtype=
"step"
)
16
ax.hist(signal_df[
"R2"
], label=
"Not Continuum"
, **hist_kwargs)
17
ax.hist(continuum_df[
"R2"
], label=
"Continuum"
, **hist_kwargs)
18
ax.set_xlabel(
"R2"
)
19
ax.set_ylabel(
"Total number of candidates"
)
20
ax.legend()
21
fig.savefig(
"R2.pdf"
)
online_book
basf2
cs
plotting_R2.py
Generated on Wed Apr 9 2025 02:43:32 for Belle II Software by
1.9.6