Belle II Software development
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
22from tracking.validation.run import TrackingValidationRun
23from tracking.path_utils import add_hit_preparation_modules, add_svd_hough_tracking
24import logging
25import basf2
26
27VALIDATION_OUTPUT_FILE = 'SVDHoughTrackingValidationBkg.root'
28N_EVENTS = 1000
29ACTIVE = True
30
31
32class SVDHoughTrackingValidationBkg(TrackingValidationRun):
33 """
34 Validation class for the SVDHoughTracking
35 """
36
37 n_events = N_EVENTS
38
39 generator_module = 'generic'
40
41 root_input_file = '../EvtGenSim.root'
42
43 components = None
44
45 @staticmethod
46 def finder_module(path):
47 """Add the VXDHoughTracking module and related modules to the basf2 path"""
48 add_hit_preparation_modules(path, components=["SVD"])
49 add_svd_hough_tracking(path)
50
51
52 tracking_coverage = {
53 'WhichParticles': ['SVD'], # Include all particles seen in the SVD detector, also secondaries
54 'UsePXDHits': False,
55 'UseSVDHits': True,
56 'UseCDCHits': False,
57 }
58
59
60 fit_tracks = True
61
62 pulls = True
63
64 use_expert_folder = False
65
66 output_file_name = VALIDATION_OUTPUT_FILE
67
68 non_expert_parameters = []
69
70
71def main():
72 """
73 create SVD validation class and execute
74 """
75 basf2.set_random_seed(1337)
76 validation_run = SVDHoughTrackingValidationBkg()
77 validation_run.configure_and_execute_from_commandline()
78
79
80if __name__ == '__main__':
81 logging.basicConfig(level=logging.INFO)
82 if ACTIVE:
83 main()
84 else:
85 print("This validation deactivated and thus basf2 is not executed.\n"
86 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
87 "Exiting.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1