Belle II Software
release-08-01-10
cosmicsAxialHoughTrackingValidation.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<contact>software-tracking@belle2.org</contact>
14
<input>CosmicsSimNoBkg.root</input>
15
<description>Validates the axial hough finder working on segments in cosmics events.</description>
16
</header>
17
"""
18
19
from
tracking.validation.run
import
TrackingValidationRun
20
import
logging
21
import
trackfindingcdc.cdcdisplay
as
cdcdisplay
22
import
os
23
import
basf2
24
VALIDATION_OUTPUT_FILE =
'CosmicsAxialHoughTrackingValidation.root'
25
N_EVENTS = 1000
26
ACTIVE =
False
27
28
29
class
CosmicsAxialHough
(
TrackingValidationRun
):
30
"""Validate the CDC axial Hough track finder with cosmic rays"""
31
32
n_events = N_EVENTS
33
34
generator_module =
'Cosmics'
35
36
root_input_file =
'../CosmicsSimNoBkg.root'
37
38
components =
None
39
40
def
finder_module
(self, path):
41
"""Add the CDC track-finding module to the basf2 path"""
42
path.add_module(
'TFCDC_WireHitPreparer'
)
43
path.add_module(
"TFCDC_ClusterPreparer"
)
44
path.add_module(
'TFCDC_SegmentFinderFacetAutomaton'
,
45
SegmentOrientation=
"downwards"
)
46
path.add_module(
'TFCDC_AxialTrackCreatorSegmentHough'
)
47
path.add_module(
'TFCDC_TrackExporter'
)
48
49
interactive_display =
False
50
if
interactive_display:
51
cdc_display_module = cdcdisplay.CDCSVGDisplayModule(os.getcwd(), interactive=
True
)
52
cdc_display_module.draw_recotracks =
True
53
cdc_display_module.draw_recotrack_seed_trajectories =
True
54
path.add_module(cdc_display_module)
55
56
57
tracking_coverage = {
58
'WhichParticles'
: [
'CDC'
],
# Include all particles seen in CDC, also secondaries
59
'UsePXDHits'
:
False
,
60
'UseSVDHits'
:
False
,
61
'UseCDCHits'
:
True
,
62
'UseOnlyAxialCDCHits'
:
True
,
63
"UseReassignedHits"
:
True
,
64
}
65
66
67
pulls =
True
68
69
output_file_name = VALIDATION_OUTPUT_FILE
70
71
72
def
main
():
73
basf2.set_random_seed(1337)
74
validation_run =
CosmicsAxialHough
()
75
validation_run.configure_and_execute_from_commandline()
76
77
78
if
__name__ ==
'__main__'
:
79
logging.basicConfig(level=logging.INFO)
80
if
ACTIVE:
81
main
()
82
else
:
83
print(
"This validation deactivated and thus basf2 is not executed.\n"
84
"If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
85
"Exiting."
)
cosmicsAxialHoughTrackingValidation.CosmicsAxialHough
Definition:
cosmicsAxialHoughTrackingValidation.py:29
tracking.run.tracked_event_generation.ReadOrGenerateTrackedEventsRun.finder_module
finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition:
tracked_event_generation.py:33
tracking.validation.run.TrackingValidationRun
Definition:
run.py:25
main
Definition:
main.py:1
trackfindingcdc.cdcdisplay
Definition:
__init__.py:1
tracking.validation.run
Definition:
run.py:1
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
tracking
validation
cosmicsAxialHoughTrackingValidation.py
Generated on Mon Sep 23 2024 14:06:42 for Belle II Software by
1.9.1