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
trainFeasibleAxialSegmentPairFilter.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
FeasibleAxialSegmentPairFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
20
"""Run to record segment pairs encountered at the AxialSegmentPairCreator 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_FeasibleAxialSegmentPairFilter.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
41
# In contrast to other training use only the first *half* loop for more aggressive training
42
path.add_module(
"TFCDC_WireHitPreparer"
,
43
flightTimeEstimation=
"outwards"
)
44
45
path.add_module(
'TFCDC_ClusterPreparer'
,
46
SuperClusterDegree=3,
47
SuperClusterExpandOverApogeeGap=
True
)
48
49
# Also fix the segment orientation to outwards to make training additionally aggressive
50
path.add_module(
"TFCDC_SegmentFinderFacetAutomaton"
)
51
52
53
if
self.
task
==
"train"
:
54
varSets = [
55
"feasible"
,
56
"filter(truth)"
,
57
]
58
59
elif
self.
task
==
"eval"
:
60
varSets = [
61
"filter(feasible)"
,
62
"filter(truth)"
,
63
]
64
65
elif
self.
task
==
"explore"
:
66
varSets = [
67
"basic"
,
68
"fitless"
,
69
"hit_gap"
,
70
"fit"
,
71
# "filter(simple)",
72
# "filter(feasible)",
73
# "filter(realistic)",
74
"filter(truth)"
,
75
]
76
77
else
:
78
raise
ValueError(
"Unknown task "
+ self.
task
)
79
80
path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton"
,
81
SegmentPairAxialBridging=
True
,
82
AxialSegmentPairFilter=
"unionrecording"
,
83
AxialSegmentPairFilterParameters={
84
"rootFileName"
: self.sample_file_name,
85
"varSets"
: varSets,
86
},
87
SegmentPairFilter=
'none'
,
88
SegmentPairRelationFilter=
'none'
)
89
90
return
path
91
92
37
def
create_path
(self):
…
19
class
FeasibleAxialSegmentPairFilterTrainingRun
(TrainingRunMixin,
ReadOrGenerateEventsRun
):
…
93
def
main
():
94
run =
FeasibleAxialSegmentPairFilterTrainingRun
()
95
run.configure_and_execute_from_commandline()
96
97
98
if
__name__ ==
"__main__"
:
99
import
logging
100
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s'
)
101
main
()
tracking.run.event_generation.ReadOrGenerateEventsRun
Definition
event_generation.py:34
trainFeasibleAxialSegmentPairFilter.FeasibleAxialSegmentPairFilterTrainingRun
Definition
trainFeasibleAxialSegmentPairFilter.py:19
trainFeasibleAxialSegmentPairFilter.FeasibleAxialSegmentPairFilterTrainingRun.create_path
create_path(self)
Definition
trainFeasibleAxialSegmentPairFilter.py:37
trainFeasibleAxialSegmentPairFilter.FeasibleAxialSegmentPairFilterTrainingRun.identifier
identifier(self)
Definition
trainFeasibleAxialSegmentPairFilter.py:33
trainFeasibleAxialSegmentPairFilter.FeasibleAxialSegmentPairFilterTrainingRun.task
str task
Process each event according to the user's desired task (train, eval, explore)
Definition
trainFeasibleAxialSegmentPairFilter.py:53
main
Definition
main.py:1
tracking.run.event_generation
Definition
event_generation.py:1
tracking
trackFindingCDC
train
trainFeasibleAxialSegmentPairFilter.py
Generated on Sun May 18 2025 03:06:52 for Belle II Software by
1.13.2