14col =
'submit_collector.py'
15algo = {
't0': [
't0_cal_algo.py',
'histT0.root'],
16 'xt': [
'xt_cal_algo.py',
'histXT.root'],
17 'sigma': [
'space_reso_cal_algo.py',
'histSigma.root'],
18 'tw': [
'time_walk_cal_algo.py',
'histTW.root']
21if os.path.exists(
'calib_result')
is False:
22 os.mkdir(
'calib_result')
24seq = [
't0',
't0',
't0',
't0',
't0',
't0',
't0',
't0',
25 'xt',
'sigma',
'xt',
'sigma',
33for i, s
in enumerate(seq):
34 command =
' '.join([
'basf2', col,
'0.00001'])
if i < 2
else ' '.join([
'basf2 ', col,
'0.001'])
36 subprocess.run(command, shell=
True)
38 dlist = glob.glob(
'rootfile/*/centraldb')
43 command_alg =
' '.join([
'basf2', algo[s][0]])
45 subprocess.run(command_alg, shell=
True)
46 cdir =
'/'.join([
'calib_result', str(i)])
49 if os.path.exists(
'rootfile')
is True:
50 shutil.move(
'rootfile', cdir)
51 if os.path.exists(hist)
is True:
52 shutil.move(hist, cdir)
56command =
' '.join([
'basf2 ', col,
'0.001'])
58subprocess.run(command, shell=
True)
59cdir =
'/'.join([
'calib_result', str(nSeq)])
61if os.path.exists(
'rootfile')
is True:
62 shutil.move(
'rootfile', cdir)