9 col =
'submit_collector.py'
10 algo = {
't0': [
't0_cal_algo.py',
'histT0.root'],
11 'xt': [
'xt_cal_algo.py',
'histXT.root'],
12 'sigma': [
'space_reso_cal_algo.py',
'histSigma.root'],
13 'tw': [
'time_walk_cal_algo.py',
'histTW.root']
16 if os.path.exists(
'calib_result')
is False:
17 os.mkdir(
'calib_result')
19 seq = [
't0',
't0',
't0',
't0',
't0',
't0',
't0',
't0',
20 'xt',
'sigma',
'xt',
'sigma',
28 for i, s
in enumerate(seq):
29 command =
' '.join([
'basf2', col,
'0.00001'])
if i < 2
else ' '.join([
'basf2 ', col,
'0.001'])
31 subprocess.run(command, shell=
True)
33 dlist = glob.glob(
'rootfile/*/centraldb')
38 command_alg =
' '.join([
'basf2', algo[s][0]])
40 subprocess.run(command_alg, shell=
True)
41 cdir =
'/'.join([
'calib_result', str(i)])
44 if os.path.exists(
'rootfile')
is True:
45 shutil.move(
'rootfile', cdir)
46 if os.path.exists(hist)
is True:
47 shutil.move(hist, cdir)
51 command =
' '.join([
'basf2 ', col,
'0.001'])
53 subprocess.run(command, shell=
True)
54 cdir =
'/'.join([
'calib_result', str(nSeq)])
56 if os.path.exists(
'rootfile')
is True:
57 shutil.move(
'rootfile', cdir)