Belle II Software
development
Toggle main menu visibility
Main Page
Topics
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
a
b
c
e
f
g
n
p
s
v
z
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 Symbols
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
trainFeasibleTrackRelationFilter.py
1
#!/usr/bin/env python3
2
3
10
11
import
os
12
import
sys
13
import
os.path
14
15
from
tracking.run.event_generation
import
ReadOrGenerateEventsRun
16
from
trackfindingcdc.run.training
import
TrainingRunMixin
17
18
19
class
FeasibleTrackRelationFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
20
"""Run to record track relations encountered at the TrackLinker and retrain its mva method"""
21
22
23
n_events = 10000
24
25
generator_module =
"generic"
26
27
bkg_files = os.path.join(os.environ[
"VO_BELLE2_SW_DIR"
],
"bkg"
)
28
29
30
truth =
"truth_positive"
31
32
@property
33
def
identifier
(self):
34
"""Database identifier of the filter being trained"""
35
return
"trackfindingcdc_FeasibleTrackRelationFilter.xml"
36
33
def
identifier
(self):
…
37
def
create_path
(self):
38
"""Setup the recording path after the simulation"""
39
path = super().
create_path
()
40
path.add_module(
"TFCDC_WireHitPreparer"
,
41
flightTimeEstimation=
"outwards"
)
42
43
path.add_module(
'TFCDC_ClusterPreparer'
,
44
SuperClusterDegree=3,
45
SuperClusterExpandOverApogeeGap=
True
)
46
47
path.add_module(
"TFCDC_SegmentFinderFacetAutomaton"
)
48
49
50
if
self.
task
==
"train"
:
51
varSets = [
52
"feasible"
,
53
"filter(truth)"
,
54
]
55
56
elif
self.
task
==
"eval"
:
57
varSets = [
58
"filter(feasible)"
,
59
"filter(truth)"
,
60
]
61
62
elif
self.
task
==
"explore"
:
63
varSets = [
64
"basic"
,
65
"hit_gap"
,
66
"filter(truth)"
,
67
]
68
69
else
:
70
raise
ValueError(
"Unknown task "
+ self.
task
)
71
72
path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton"
,
73
TrackRelationFilter=
"unionrecording"
,
74
TrackRelationFilterParameters={
75
"rootFileName"
: self.sample_file_name,
76
"varSets"
: varSets,
77
})
78
79
return
path
80
81
37
def
create_path
(self):
…
19
class
FeasibleTrackRelationFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
…
82
def
main
():
83
run =
FeasibleTrackRelationFilterTrainingRun
()
84
run.configure_and_execute_from_commandline()
85
86
87
if
__name__ ==
"__main__"
:
88
import
logging
89
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s'
)
90
main
()
tracking.run.event_generation.ReadOrGenerateEventsRun
Definition
event_generation.py:34
trainFeasibleTrackRelationFilter.FeasibleTrackRelationFilterTrainingRun
Definition
trainFeasibleTrackRelationFilter.py:19
trainFeasibleTrackRelationFilter.FeasibleTrackRelationFilterTrainingRun.create_path
create_path(self)
Definition
trainFeasibleTrackRelationFilter.py:37
trainFeasibleTrackRelationFilter.FeasibleTrackRelationFilterTrainingRun.identifier
identifier(self)
Definition
trainFeasibleTrackRelationFilter.py:33
trainFeasibleTrackRelationFilter.FeasibleTrackRelationFilterTrainingRun.task
str task
Process each event according to the user's desired task (train, eval, explore)
Definition
trainFeasibleTrackRelationFilter.py:50
main
Definition
main.py:1
tracking.run.event_generation
Definition
event_generation.py:1
tracking
trackFindingCDC
train
trainFeasibleTrackRelationFilter.py
Generated on Sat May 17 2025 03:08:24 for Belle II Software by
1.13.2