3 import matplotlib.pyplot
as plt
10 with
open(
'output.log', mode=
'r') as csv_file:
11 csv_reader = csv.reader(csv_file, delimiter=',')
13 for csv_row
in csv_reader :
18 etabin = float(csv_row[1])
19 ptvalue = float(csv_row[2])
20 exectime = float(csv_row[3])
24 pdict = ptDict[ptvalue]
27 pdict = ptDict[ptvalue]
31 vpdict = pdict[etabin]
34 vpdict = pdict[etabin]
36 vpdict += [ exectime ]
39 plt.figure(figsize=(7, 5))
42 plt.loglog(ptDict.keys(),[i[0][0]
for i
in np.array(
list(ptDict.values()))],
'.-', label=
'0<$\eta$<0.5')
43 plt.loglog(ptDict.keys(),[i[1][0]
for i
in np.array(
list(ptDict.values()))],
'.-', label=
'0.5<$\eta$<1.0')
44 plt.loglog(ptDict.keys(),[i[2][0]
for i
in np.array(
list(ptDict.values()))],
'.-', label=
'1.0<$\eta$<1.5')
45 plt.loglog(ptDict.keys(),[i[3][0]
for i
in np.array(
list(ptDict.values()))],
'.-', label=
'1.5<$\eta$<2.0')
46 plt.loglog(ptDict.keys(),[i[4][0]
for i
in np.array(
list(ptDict.values()))],
'.-', label=
'2.0<$\eta$<2.5')
47 ax.set_xlabel(
'$p_T$ [GeV/c]')
48 ax.set_ylabel(
'time/track [sec]')
50 ax.set_xlim((0.09,105))
51 plt.legend(numpoints=1)
53 plt.suptitle(
"KF timing vs. $p_T$")