7 mode_prefix = sys.argv[1]
10 if mode_prefix ==
"EFF":
11 nucZs = [1, 2, 6, 10, 13, 18, 26, 82 ]
12 nucAs = [2, 4, 12, 20, 27, 40, 56, 208]
18 neut_pdgs = [
"14",
"-14"]
19 if mode_prefix ==
"EFF":
21 spline_dir =
"../../../../splines/" 22 spline_suffix =
"QE_splines.xml" 25 data_dir =
"./data/" + mode_prefix +
"/" 27 spline = spline_dir + mode_prefix +
"_" + spline_suffix
32 subprocess.call([
"mkdir", data_dir])
34 for neut_pdg
in neut_pdgs:
35 data_dir =
"./data/" + mode_prefix +
"/" +
"nu_" + neut_pdg +
"/" 36 subprocess.call([
"mkdir", data_dir])
37 for runnum
in range(start_run, end_run + 1):
38 for i
in range(len(nucZs)):
41 folder = data_dir +
str(nucZ) +
"_" +
str(nucA)
42 cmd = [
"mkdir", folder]
44 target =
str(1000000000+nucA*10+nucZ*10000)
46 cmd1 = [
"gevgen",
"-r",
str(runnum),
"-n", num_ev,
"-p", neut_pdg,
"-t", target,
"-e", energy,
47 "--cross-sections", spline,
"--seed",
str(runnum),
"--event-generator-list",
"CCQE"]
48 cmd2 = [
"gntpc",
"-i",
"gntp." +
str(runnum) +
".ghep.root",
"-f",
"gst"]
49 cmds.append([cmd1, cmd2, folder])
53 mutex = threading.Lock()
63 subprocess.call(cmd[0], cwd = cmd[2])
64 subprocess.call(cmd[1], cwd = cmd[2])
67 for i
in range(num_threads):
68 t = threading.Thread(target=generate_genie_files)
def generate_genie_files()