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
trainRealisticSegmentPairRelationFilter.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
RealisticSegmentPairRelationFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
20
"""Run to record segment pair relations encountered at the SegmentPairRelationCreator 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_RealisticSegmentPairRelationFilter.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
"realistic"
,
53
"filter(truth)"
,
54
"truth"
,
55
]
56
57
elif
self.
task
==
"eval"
:
58
varSets = [
59
"filter(simple)"
,
60
"filter(realistic)"
,
61
"filter(truth)"
,
62
]
63
64
elif
self.
task
==
"explore"
:
65
varSets = [
66
"basic"
,
67
"fit"
,
68
"filter(simple)"
,
69
"filter(truth)"
,
70
]
71
72
else
:
73
raise
ValueError(
"Unknown task "
+ self.
task
)
74
75
path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton"
,
76
SegmentPairRelationFilter=
"unionrecording"
,
77
SegmentPairRelationFilterParameters={
78
"rootFileName"
: self.sample_file_name,
79
"varSets"
: varSets,
80
})
81
82
return
path
83
84
37
def
create_path
(self):
…
19
class
RealisticSegmentPairRelationFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
…
85
def
main
():
86
run =
RealisticSegmentPairRelationFilterTrainingRun
()
87
run.configure_and_execute_from_commandline()
88
89
90
if
__name__ ==
"__main__"
:
91
import
logging
92
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s'
)
93
main
()
tracking.run.event_generation.ReadOrGenerateEventsRun
Definition
event_generation.py:34
trainRealisticSegmentPairRelationFilter.RealisticSegmentPairRelationFilterTrainingRun
Definition
trainRealisticSegmentPairRelationFilter.py:19
trainRealisticSegmentPairRelationFilter.RealisticSegmentPairRelationFilterTrainingRun.create_path
create_path(self)
Definition
trainRealisticSegmentPairRelationFilter.py:37
trainRealisticSegmentPairRelationFilter.RealisticSegmentPairRelationFilterTrainingRun.identifier
identifier(self)
Definition
trainRealisticSegmentPairRelationFilter.py:33
trainRealisticSegmentPairRelationFilter.RealisticSegmentPairRelationFilterTrainingRun.task
str task
Process each event according to the user's desired task (train, eval, explore)
Definition
trainRealisticSegmentPairRelationFilter.py:50
main
Definition
main.py:1
tracking.run.event_generation
Definition
event_generation.py:1
tracking
trackFindingCDC
train
trainRealisticSegmentPairRelationFilter.py
Generated on Thu May 22 2025 03:01:02 for Belle II Software by
1.13.2