Belle II Software  release-08-01-10
a01_trackingEfficiency_createData.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
29 
30 import sys
31 import basf2 as b2
32 from beamparameters import add_beamparameters
33 
34 b2.set_random_seed(1509)
35 
36 release = sys.argv[1]
37 
38 print(release)
39 
40 output_filename = './' + release + '/TV_data_' + release + '.root'
41 
42 print(output_filename)
43 
44 path = b2.create_path()
45 
46 eventinfosetter = b2.register_module('EventInfoSetter')
47 eventinfosetter.param('expList', [0])
48 eventinfosetter.param('runList', [1])
49 eventinfosetter.param('evtNumList', [10000])
50 
51 progress = b2.register_module('Progress')
52 
53 evtgeninput = b2.register_module('EvtGenInput')
54 evtgeninput.logging.log_level = b2.LogLevel.WARNING
55 
56 beamparameters = add_beamparameters(path, "Y4S")
57 
58 root_output = b2.register_module('RootOutput')
59 root_output.param('outputFileName', output_filename)
60 
61 path.add_module(eventinfosetter)
62 path.add_module(progress)
63 path.add_module(beamparameters)
64 path.add_module(evtgeninput)
65 path.add_module(root_output)
66 
67 b2.process(path)
68 print(b2.statistics)