Belle II Software development
SVDHoughTrackingValidation.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <contact>software-tracking@belle2.org</contact>
14 <input>EvtGenSimNoBkg.root</input>
15 <output>SVDHoughTrackingValidation.root</output>
16 <description>
17 This module validates that the SVDHoughTracking is capable of reconstructing tracks in Y(4S) runs.
18 </description>
19</header>
20"""
21
22import tracking
23from tracking.validation.run import TrackingValidationRun
24import logging
25import basf2
26from tracking.path_utils import add_svd_hough_tracking
27
28VALIDATION_OUTPUT_FILE = 'SVDHoughTrackingValidation.root'
29N_EVENTS = 1000
30ACTIVE = False
31
32
33class SVDHoughTrackingValidation(TrackingValidationRun):
34 """
35 Validation class for the four 4-SVD Layer tracking
36 """
37
38 n_events = N_EVENTS
39
40 generator_module = 'generic'
41
42 root_input_file = '../EvtGenSimNoBkg.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 resolution = True
68
69 use_fit_information = True
70
71 output_file_name = VALIDATION_OUTPUT_FILE
72
73 non_expert_parameters = []
74
75
76def main():
77 """
78 create SVD validation class and execute
79 """
80 basf2.set_random_seed(1337)
81 validation_run = SVDHoughTrackingValidation()
82 validation_run.configure_and_execute_from_commandline()
83
84
85if __name__ == '__main__':
86 logging.basicConfig(level=logging.INFO)
87 if ACTIVE:
88 main()
89 else:
90 print("This validation deactivated and thus basf2 is not executed.\n"
91 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
92 "Exiting.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1