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