Belle II Software  release-08-01-10
a04_trackingEfficiency_createPlots.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
21 
22 import sys
23 import basf2 as b2
24 
25 release = sys.argv[1]
26 
27 # roi = {noROI, vxdtf1, vxdtf2}
28 # bkg = {noBkg, stdBKG, std2GBKG}
29 # vxdtf = {vxdtf1, vxdtf2}
30 
31 roi = sys.argv[2]
32 bkg = sys.argv[3]
33 vxdtf = sys.argv[4]
34 
35 
36 input_root_files = './' + release + '/TV_reco_' + bkg + '_' + roi + '_' + vxdtf + '_' + release + '.root'
37 root_file_name_TRK = './' + release + '/TV_TRK_analysis_' + bkg + '_' + roi + '_' + vxdtf + '_' + release + '.root'
38 root_file_name_V0 = './' + release + '/TV_V0_analysis_' + bkg + '_' + roi + '_' + vxdtf + '_' + release + '.root'
39 
40 print('Tracking Validation will run over these files: ')
41 print(input_root_files)
42 print('simulation: ' + roi + ' ' + bkg)
43 print('reconstruction ' + vxdtf)
44 print()
45 
46 path = b2.create_path()
47 
48 root_input = b2.register_module('RootInput')
49 root_input.param('inputFileNames', input_root_files)
50 path.add_module(root_input)
51 
52 gearbox = b2.register_module('Gearbox')
53 path.add_module(gearbox)
54 
55 geometry = b2.register_module('Geometry')
56 # geometry.param('components',['PXD','SVD','CDC'])
57 path.add_module(geometry)
58 
59 create_plots_TRK = b2.register_module('TrackingPerformanceEvaluation')
60 create_plots_TRK.param('outputFileName', root_file_name_TRK)
61 create_plots_TRK.logging.log_level = b2.LogLevel.INFO
62 path.add_module(create_plots_TRK)
63 
64 create_plots_V0 = b2.register_module('V0findingPerformanceEvaluation')
65 create_plots_V0.param('outputFileName', root_file_name_V0)
66 create_plots_V0.logging.log_level = b2.LogLevel.INFO
67 path.add_module(create_plots_V0)
68 
69 path.add_module('Progress')
70 b2.process(path)
71 
72 print(b2.statistics)