20outdir_base =
'/group/belle2/BGcampaigns/g4sim/'
21outdir_sub =
'phase2.1.4_collimators_1_upd'
23fileSAD =
'phase2.1.4_collimators_1_upd'
33outdir = outdir_base + outdir_sub
35bkgs = [
'Touschek LER',
'Coulomb LER',
'Brems LER',
'Touschek HER',
'Coulomb HER',
'Brems HER']
37bkgs_flag = [1, 1, 1, 1, 1, 1]
39time = [500, 500, 10000, 1000, 1000, 10000]
43q = [
'l',
'l',
's',
's',
's',
's']
51 if not os.path.isdir(outdir):
53 print(
"Made directory " + outdir)
54 if not os.path.isdir(outdir +
'/output'):
55 os.mkdir(outdir +
'/output')
56 print(
"Made directory " + outdir +
'/output')
57 if not os.path.isdir(outdir +
'/log'):
58 os.mkdir(outdir +
'/log')
59 print(
"Made directory " + outdir +
'/log')
60 for ifile
in range(0, files):
61 logname = f +
'_' + str(ifile) +
'.log'
62 logname =
"_".join(logname.split())
63 com =
'bsub -q ' + q[i] +
' -o /dev/null \"basf2 beast/scripts/phase2/generateSADBg.py ' + f +
' ' + str(time[i]) +
' ' + \
64 str(ifile) +
' study ' + phase +
' ' + fileSAD +
' ' + outdir +
'/output/ >& ' + outdir +
'/log/' + logname +
'\"'
69 if os.path.isfile(outdir +
'/log/' + logname)
and skp == 0:
70 answ = input(
"Output file already exists. Overwrite for all (y), skip existing (n): ")