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