Belle II Software development
CombinedSVDTrackingValidationBkg.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>CombinedSVDTrackingValidationBkg.root</output>
16 <description>
17 This module validates that the combined VXDTF2 and SVDHoughTracking is capable of reconstructing tracks in Y(4S) runs.
18 </description>
19</header>
20"""
21
22from tracking.validation.run import TrackingValidationRun
23from tracking.path_utils import add_hit_preparation_modules, add_svd_standalone_tracking
24import logging
25import basf2
26
27VALIDATION_OUTPUT_FILE = 'CombinedSVDTrackingValidationBkg.root'
28N_EVENTS = 1000
29ACTIVE = True
30
31
32class CombinedSVDTrackingValidationBkg(TrackingValidationRun):
33 """
34 Validation class for the combined VXDTF2 and SVDHough tracking
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 combined SVD standalone track finders and related modules to the basf2 path"""
48 add_hit_preparation_modules(path, components=["SVD"])
49 add_svd_standalone_tracking(path, reco_tracks="RecoTracks", svd_standalone_mode="VXDTF2_and_SVDHough")
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 output_file_name = VALIDATION_OUTPUT_FILE
65
66 non_expert_parameters = []
67
68
69def main():
70 """
71 create SVD validation class and execute
72 """
73 basf2.set_random_seed(1337)
74 validation_run = CombinedSVDTrackingValidationBkg()
75 validation_run.configure_and_execute_from_commandline()
76
77
78if __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.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1