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
trainSegmentTrackFilter.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
import
os
5
import
sys
6
import
os.path
7
import
shutil
8
9
import
basf2
10
11
from
tracking
import
add_cdc_track_finding
12
from
tracking.run.event_generation
import
ReadOrGenerateEventsRun
13
from
trackfindingcdc.run.training
import
TrainingRunMixin
14
from
tracking.adjustments
import
adjust_module
15
16
17
class
SegmentTrackFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
18
"""Run to record segment track combinations encountered at the SegmentTrackSelector and retrain its mva method"""
19
20
21
n_events = 2000
22
23
generator_module =
"generic"
24
25
bkg_files = os.path.join(os.environ[
"VO_BELLE2_SW_DIR"
],
"bkg"
)
26
27
28
truth =
"truth"
29
30
@property
31
def
identifier
(self):
32
"""Database identifier of the filter being trained"""
33
return
"trackfindingcdc_SegmentTrackFilter.xml"
34
35
def
create_path
(self):
36
"""Setup the recording path after the simulation"""
37
path = super().
create_path
()
38
39
add_cdc_track_finding(path)
40
41
42
if
self.
task
==
"train"
:
43
filterName =
"recording"
44
45
elif
self.
task
==
"eval"
:
46
filterName =
"eval"
47
48
self.
truth
=
"truth_accepted"
49
50
elif
self.
task
==
"explore"
:
51
# Change me.
52
filterName =
"recording"
53
54
adjust_module(path,
"TFCDC_SegmentTrackCombiner"
,
55
segmentTrackFilter=filterName,
56
segmentTrackFilterParameters={
57
"rootFileName"
: self.sample_file_name,
58
},
59
trackFilter=
"all"
,
60
trackFilterParameters={})
61
62
return
path
63
64
def
postprocess
(self):
65
"""Post-process the results for MC-truth acceptance"""
66
if
self.
task
==
"eval"
:
67
self.
truth
=
"truth_accept"
68
super().
postprocess
()
69
70
71
def
main
():
72
run =
SegmentTrackFilterTrainingRun
()
73
run.configure_and_execute_from_commandline()
74
75
76
if
__name__ ==
"__main__"
:
77
import
logging
78
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s'
)
79
main
()
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun
Definition:
trainSegmentTrackFilter.py:17
tracking.adjustments
Definition:
adjustments.py:1
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun.truth
string truth
degree of MC truth-matching
Definition:
trainSegmentTrackFilter.py:28
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
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun.identifier
def identifier(self)
Definition:
trainSegmentTrackFilter.py:31
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun.create_path
def create_path(self)
Definition:
trainSegmentTrackFilter.py:35
tracking.run.event_generation
Definition:
event_generation.py:1
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun.postprocess
def postprocess(self)
Definition:
trainSegmentTrackFilter.py:64
trainSegmentTrackFilter.SegmentTrackFilterTrainingRun.task
task
Process each event according to the user's desired task (train, eval, explore)
Definition:
trainSegmentTrackFilter.py:42
tracking
trackFindingCDC
train
trainSegmentTrackFilter.py
Generated on Tue Jan 4 2022 03:09:04 for Belle II Software by
1.8.17