Belle II Software
release-08-01-10
SVDHoughTrackingValidationBkg.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
<header>
13
<contact>software-tracking@belle2.org</contact>
14
<input>EvtGenSim.root</input>
15
<output>SVDHoughTrackingValidationBkg.root</output>
16
<description>
17
This module validates that the SVDHoughTracking is capable of reconstructing tracks in Y(4S) runs with background.
18
</description>
19
</header>
20
"""
21
22
import
tracking
23
from
tracking.validation.run
import
TrackingValidationRun
24
import
logging
25
import
basf2
26
from
tracking.path_utils
import
add_svd_hough_tracking
27
28
VALIDATION_OUTPUT_FILE =
'SVDHoughTrackingValidationBkg.root'
29
N_EVENTS = 1000
30
ACTIVE =
True
31
32
33
class
SVDHoughTrackingValidationBkg
(
TrackingValidationRun
):
34
"""
35
Validation class for the DATCON tracking
36
"""
37
38
n_events = N_EVENTS
39
40
generator_module =
'generic'
41
42
root_input_file =
'../EvtGenSim.root'
43
44
components =
None
45
46
@staticmethod
47
def
finder_module
(path):
48
"""Add the VXDHoughTracking module and related modules to the basf2 path"""
49
tracking.add_hit_preparation_modules(path, components=[
"SVD"
])
50
add_svd_hough_tracking(path)
51
52
53
tracking_coverage = {
54
'WhichParticles'
: [
'SVD'
],
# Include all particles seen in the SVD detector, also secondaries
55
'UsePXDHits'
:
False
,
56
'UseSVDHits'
:
True
,
57
'UseCDCHits'
:
False
,
58
}
59
60
61
fit_tracks =
True
62
63
pulls =
True
64
65
use_expert_folder =
False
66
67
output_file_name = VALIDATION_OUTPUT_FILE
68
69
non_expert_parameters = []
70
71
72
def
main
():
73
"""
74
create SVD validation class and execute
75
"""
76
basf2.set_random_seed(1337)
77
validation_run =
SVDHoughTrackingValidationBkg
()
78
validation_run.configure_and_execute_from_commandline()
79
80
81
if
__name__ ==
'__main__'
:
82
logging.basicConfig(level=logging.INFO)
83
if
ACTIVE:
84
main
()
85
else
:
86
print(
"This validation deactivated and thus basf2 is not executed.\n"
87
"If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
88
"Exiting."
)
SVDHoughTrackingValidationBkg.SVDHoughTrackingValidationBkg
Definition:
SVDHoughTrackingValidationBkg.py:33
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
tracking.path_utils
Definition:
path_utils.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
SVDHoughTrackingValidationBkg.py
Generated on Mon Sep 23 2024 14:06:43 for Belle II Software by
1.9.1