12import modularAnalysis
as ma
14from simulation
import add_simulation
15from reconstruction
import add_reconstruction
16from generators
import add_evtgen_generator
24 outPath = str(sys.argv[1])
26 outPath =
'root_files/test/KLID_MDST_TEST.root'
28 noEvents = int(sys.argv[2])
32 bkgScale = float(sys.argv[3])
36 useKLM = bool(sys.argv[4])
40 useECL = bool(sys.argv[5])
44 KLMexpertPath = str(sys.argv[6])
49if outPath[-5:] !=
'.root':
50 outPath = outPath + str(noEvents) +
'.root'
59ma.setupEventInfo(noEvents, mypath)
61add_evtgen_generator(mypath, finalstate=final_state, signaldecfile=dec_file)
63add_simulation(mypath, bkgfiles=glob.glob(
'/sw/belle2/bkg/*.root'))
65add_reconstruction(mypath)
75if ((
not useKLM)
and (
not useECL)):
76 sys.exit(
"neither KLM nor ECL data will be written. Aborting...")
78data_writer = b2.register_module(
'DataWriter')
79data_writer.param(
"outPath", outPath)
80data_writer.param(
"useKLM", useKLM)
81data_writer.param(
"useECL", useECL)
82mypath.add_module(data_writer)