13 import modularAnalysis
as ma
15 from simulation
import add_simulation
16 from reconstruction
import add_reconstruction
17 from generators
import add_evtgen_generator
25 outPath = str(sys.argv[1])
27 outPath =
'root_files/test/KLID_MDST_TEST.root'
29 noEvents = int(sys.argv[2])
33 bkgScale = float(sys.argv[3])
37 useKLM = bool(sys.argv[4])
41 useECL = bool(sys.argv[5])
45 KLMexpertPath = str(sys.argv[6])
50 if outPath[-5:] !=
'.root':
51 outPath = outPath + str(noEvents) +
'.root'
60 ma.setupEventInfo(noEvents, mypath)
62 add_evtgen_generator(mypath, finalstate=final_state, signaldecfile=dec_file)
64 add_simulation(mypath, bkgfiles=glob.glob(
'/sw/belle2/bkg/*.root'))
66 add_reconstruction(mypath)
76 if((
not useKLM)
and (
not useECL)):
77 sys.exit(
"neither KLM nor ECL data will be written. Aborting...")
79 data_writer = b2.register_module(
'DataWriter')
80 data_writer.param(
"outPath", outPath)
81 data_writer.param(
"useKLM", useKLM)
82 data_writer.param(
"useECL", useECL)
83 mypath.add_module(data_writer)