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