Belle II Software  release-06-02-00
svdTrackingValidation.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 <header>
14  <contact>software-tracking@belle2.org</contact>
15  <input>EvtGenSimNoBkg.root</input>
16  <output>SVDTrackingValidation.root</output>
17  <description>
18  This module validates that the svd only track finding is capable of reconstructing tracks in Y(4S) runs.
19  </description>
20 </header>
21 """
22 
23 import tracking
24 from tracking.validation.run import TrackingValidationRun
25 import logging
26 import basf2
27 VALIDATION_OUTPUT_FILE = 'SVDTrackingValidation.root'
28 N_EVENTS = 1000
29 ACTIVE = True
30 
31 basf2.set_random_seed(1337)
32 
33 
34 def setupFinderModule(path):
35  tracking.add_hit_preparation_modules(path, components=["SVD"])
36  tracking.add_vxd_track_finding_vxdtf2(path, components=["SVD"])
37 
38 
40  """
41  Validation class for the four 4-SVD Layer tracking
42  """
43 
44  n_events = N_EVENTS
45 
46  generator_module = 'generic'
47 
48  root_input_file = '../EvtGenSimNoBkg.root'
49 
50  components = None
51 
52 
53  finder_module = staticmethod(setupFinderModule)
54 
55 
56  tracking_coverage = {
57  'WhichParticles': ['SVD'], # Include all particles seen in the SVD detector, also secondaries
58  'UsePXDHits': False,
59  'UseSVDHits': True,
60  'UseCDCHits': False,
61  }
62 
63 
64  fit_tracks = True
65 
66  pulls = True
67 
68  output_file_name = VALIDATION_OUTPUT_FILE
69 
70  # tweak sectormap
71  # def adjust_path(self, path):
72  # basf2.set_module_parameters( path, "SectorMapBootstrap", ReadSecMapFromDB=False)
73  # basf2.set_module_parameters( path, "SectorMapBootstrap", ReadSectorMap=True)
74  # basf2.set_module_parameters( path, "SectorMapBootstrap", SectorMapsInputFile="mymap.root")
75 
76 
77 def main():
78  """
79  create SVD validation class and execute
80  """
81  validation_run = SVD4Layer()
82  validation_run.configure_and_execute_from_commandline()
83 
84 
85 if __name__ == '__main__':
86  logging.basicConfig(level=logging.INFO)
87  if ACTIVE:
88  main()
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:75