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
trainBackgroundClusterFilter.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
import
os
5
import
sys
6
import
os.path
7
8
from
tracking.run.event_generation
import
ReadOrGenerateEventsRun
9
from
trackfindingcdc.run.training
import
TrainingRunMixin
10
11
12
class
BackgroundClusterFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
13
"""Run to record clusters encountered at the ClusterBackgroundDetector and retrain its mva method"""
14
15
16
n_events = 1000
17
18
generator_module =
"generic"
19
20
bkg_files = os.path.join(os.environ[
"VO_BELLE2_SW_DIR"
],
"bkg"
)
21
22
def
create_path
(self):
23
"""Setup the recording path after the simulation"""
24
path = super().
create_path
()
25
path.add_module(
"TFCDC_WireHitPreparer"
,
26
flightTimeEstimation=
"outwards"
)
27
28
29
if
self.
task
==
"train"
:
30
varSets = [
31
"basic"
,
32
"bkg_truth"
,
33
]
34
35
elif
self.
task
==
"eval"
:
36
varSets = [
37
"filter(mva_bkg)"
,
38
"bkg_truth"
,
39
]
40
41
elif
self.
task
==
"explore"
:
42
# Change me.
43
varSets = [
44
"basic"
,
45
"bkg_truth"
,
46
"filter(mva_bkg)"
,
47
]
48
49
path.add_module(
"TFCDC_ClusterPreparer"
,
50
ClusterFilter=
"unionrecording"
,
51
ClusterFilterParameters={
52
"rootFileName"
: self.sample_file_name,
53
"varSets"
: varSets,
54
})
55
56
return
path
57
58
59
def
main
():
60
run =
BackgroundClusterFilterTrainingRun
()
61
run.configure_and_execute_from_commandline()
62
63
64
if
__name__ ==
"__main__"
:
65
import
logging
66
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s'
)
67
main
()
trainBackgroundClusterFilter.BackgroundClusterFilterTrainingRun
Definition:
trainBackgroundClusterFilter.py:12
tracking.run.event_generation.ReadOrGenerateEventsRun
Definition:
event_generation.py:26
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:77
trainBackgroundClusterFilter.BackgroundClusterFilterTrainingRun.task
task
Process each event according to the user's desired task (train, eval, explore)
Definition:
trainBackgroundClusterFilter.py:29
tracking.run.event_generation
Definition:
event_generation.py:1
trainBackgroundClusterFilter.BackgroundClusterFilterTrainingRun.create_path
def create_path(self)
Definition:
trainBackgroundClusterFilter.py:22
tracking
trackFindingCDC
train
trainBackgroundClusterFilter.py
Generated on Tue Jan 4 2022 03:09:02 for Belle II Software by
1.8.17