Belle II Software development
phase2_simulate_localDB.py
1#!/usr/bin/env python3
2
3
10
11
15import sys
16
17import basf2 as b2
18from generators import add_evtgen_generator
19
20print('***')
21print('*** Used steering script:')
22with open(sys.argv[0]) as fin:
23 print(fin.read(), end="")
24print('*** end of the script.')
25print('***')
26
27fileOUT = sys.argv[1]
28localdb_dir = sys.argv[2]
29
30dec_file = None
31final_state = 'mixed'
32
33# main path
34main = b2.create_path()
35
36# event info setter
37main.add_module("EventInfoSetter", expList=1002, runList=0, evtNumList=100)
38
39main.add_module('Gearbox')
40main.add_module('Geometry')
41
42# EvtGen
43add_evtgen_generator(path=main, finalstate=final_state, signaldecfile=dec_file)
44
45# Simulation
46main.add_module('FullSim', StoreAllSecondaries=True)
47
48# Digitizer
49main.add_module('SVDDigitizer')
50
51main.add_module("Progress")
52main.add_module('RootOutput', outputFileName=fileOUT)
53
54# generate events
55b2.process(main)
56
57# show call statistics
58print(b2.statistics)