diff --git a/scripts/Max_Evol_Plots/Max_Evol_2593.pdf b/scripts/Max_Evol_Plots/Max_Evol_2593.pdf new file mode 100644 index 0000000..b64b0b9 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2593.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2594.pdf b/scripts/Max_Evol_Plots/Max_Evol_2594.pdf new file mode 100644 index 0000000..20cd490 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2594.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2595.pdf b/scripts/Max_Evol_Plots/Max_Evol_2595.pdf new file mode 100644 index 0000000..35d1a6a --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2595.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2596.pdf b/scripts/Max_Evol_Plots/Max_Evol_2596.pdf new file mode 100644 index 0000000..f14bd8c --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2596.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2597.pdf b/scripts/Max_Evol_Plots/Max_Evol_2597.pdf new file mode 100644 index 0000000..487bd4d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2597.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2598.pdf b/scripts/Max_Evol_Plots/Max_Evol_2598.pdf new file mode 100644 index 0000000..319043f --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2598.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2599.pdf b/scripts/Max_Evol_Plots/Max_Evol_2599.pdf new file mode 100644 index 0000000..4db4184 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2599.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2600.pdf b/scripts/Max_Evol_Plots/Max_Evol_2600.pdf new file mode 100644 index 0000000..85407da --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2600.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2601.pdf b/scripts/Max_Evol_Plots/Max_Evol_2601.pdf new file mode 100644 index 0000000..80751f6 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2601.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2602.pdf b/scripts/Max_Evol_Plots/Max_Evol_2602.pdf new file mode 100644 index 0000000..fd3bcac --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2602.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2603.pdf b/scripts/Max_Evol_Plots/Max_Evol_2603.pdf new file mode 100644 index 0000000..f320cd0 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2603.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2604.pdf b/scripts/Max_Evol_Plots/Max_Evol_2604.pdf new file mode 100644 index 0000000..756aac4 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2604.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2605.pdf b/scripts/Max_Evol_Plots/Max_Evol_2605.pdf new file mode 100644 index 0000000..2cd2cba --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2605.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2606.pdf b/scripts/Max_Evol_Plots/Max_Evol_2606.pdf new file mode 100644 index 0000000..5d6957c --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2606.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2607.pdf b/scripts/Max_Evol_Plots/Max_Evol_2607.pdf new file mode 100644 index 0000000..016e559 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2607.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2608.pdf b/scripts/Max_Evol_Plots/Max_Evol_2608.pdf new file mode 100644 index 0000000..a1be7ce --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2608.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2609.pdf b/scripts/Max_Evol_Plots/Max_Evol_2609.pdf new file mode 100644 index 0000000..d19b769 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2609.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2610.pdf b/scripts/Max_Evol_Plots/Max_Evol_2610.pdf new file mode 100644 index 0000000..2af64ba --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2610.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2611.pdf b/scripts/Max_Evol_Plots/Max_Evol_2611.pdf new file mode 100644 index 0000000..e6ac1d7 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2611.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2612.pdf b/scripts/Max_Evol_Plots/Max_Evol_2612.pdf new file mode 100644 index 0000000..6111611 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2612.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2613.pdf b/scripts/Max_Evol_Plots/Max_Evol_2613.pdf new file mode 100644 index 0000000..348c49f --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2613.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2614.pdf b/scripts/Max_Evol_Plots/Max_Evol_2614.pdf new file mode 100644 index 0000000..59d42ed --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2614.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2615.pdf b/scripts/Max_Evol_Plots/Max_Evol_2615.pdf new file mode 100644 index 0000000..637d274 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2615.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2616.pdf b/scripts/Max_Evol_Plots/Max_Evol_2616.pdf new file mode 100644 index 0000000..087249c --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2616.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2625.pdf b/scripts/Max_Evol_Plots/Max_Evol_2625.pdf new file mode 100644 index 0000000..e3f9c51 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2625.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2626.pdf b/scripts/Max_Evol_Plots/Max_Evol_2626.pdf new file mode 100644 index 0000000..674eb3e --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2626.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2627.pdf b/scripts/Max_Evol_Plots/Max_Evol_2627.pdf new file mode 100644 index 0000000..03bd268 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2627.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2628.pdf b/scripts/Max_Evol_Plots/Max_Evol_2628.pdf new file mode 100644 index 0000000..f813010 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2628.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2629.pdf b/scripts/Max_Evol_Plots/Max_Evol_2629.pdf new file mode 100644 index 0000000..f25be35 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2629.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2630.pdf b/scripts/Max_Evol_Plots/Max_Evol_2630.pdf new file mode 100644 index 0000000..faf24bb --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2630.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2631.pdf b/scripts/Max_Evol_Plots/Max_Evol_2631.pdf new file mode 100644 index 0000000..16723aa --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2631.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2632.pdf b/scripts/Max_Evol_Plots/Max_Evol_2632.pdf new file mode 100644 index 0000000..cddc8b4 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2632.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2633.pdf b/scripts/Max_Evol_Plots/Max_Evol_2633.pdf new file mode 100644 index 0000000..db5d24f --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2633.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2634.pdf b/scripts/Max_Evol_Plots/Max_Evol_2634.pdf new file mode 100644 index 0000000..3c35992 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2634.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2635.pdf b/scripts/Max_Evol_Plots/Max_Evol_2635.pdf new file mode 100644 index 0000000..136ea4a --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2635.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2636.pdf b/scripts/Max_Evol_Plots/Max_Evol_2636.pdf new file mode 100644 index 0000000..7cc5d97 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2636.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2637.pdf b/scripts/Max_Evol_Plots/Max_Evol_2637.pdf new file mode 100644 index 0000000..8dc625c --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2637.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2638.pdf b/scripts/Max_Evol_Plots/Max_Evol_2638.pdf new file mode 100644 index 0000000..171a664 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2638.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2639.pdf b/scripts/Max_Evol_Plots/Max_Evol_2639.pdf new file mode 100644 index 0000000..953685b --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2639.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2640.pdf b/scripts/Max_Evol_Plots/Max_Evol_2640.pdf new file mode 100644 index 0000000..57e6476 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2640.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2641.pdf b/scripts/Max_Evol_Plots/Max_Evol_2641.pdf new file mode 100644 index 0000000..cdfe8d4 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2641.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2642.pdf b/scripts/Max_Evol_Plots/Max_Evol_2642.pdf new file mode 100644 index 0000000..56fdf2d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2642.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2657.pdf b/scripts/Max_Evol_Plots/Max_Evol_2657.pdf new file mode 100644 index 0000000..2ef480c --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2657.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2658.pdf b/scripts/Max_Evol_Plots/Max_Evol_2658.pdf new file mode 100644 index 0000000..1ffaec1 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2658.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2659.pdf b/scripts/Max_Evol_Plots/Max_Evol_2659.pdf new file mode 100644 index 0000000..0e5687d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2659.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2660.pdf b/scripts/Max_Evol_Plots/Max_Evol_2660.pdf new file mode 100644 index 0000000..3f9ed81 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2660.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2661.pdf b/scripts/Max_Evol_Plots/Max_Evol_2661.pdf new file mode 100644 index 0000000..c71c4eb --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2661.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2662.pdf b/scripts/Max_Evol_Plots/Max_Evol_2662.pdf new file mode 100644 index 0000000..200bf67 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2662.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2663.pdf b/scripts/Max_Evol_Plots/Max_Evol_2663.pdf new file mode 100644 index 0000000..024cc8d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2663.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2664.pdf b/scripts/Max_Evol_Plots/Max_Evol_2664.pdf new file mode 100644 index 0000000..1bec2be --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2664.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2665.pdf b/scripts/Max_Evol_Plots/Max_Evol_2665.pdf new file mode 100644 index 0000000..30fcd37 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2665.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2666.pdf b/scripts/Max_Evol_Plots/Max_Evol_2666.pdf new file mode 100644 index 0000000..7b63392 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2666.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2667.pdf b/scripts/Max_Evol_Plots/Max_Evol_2667.pdf new file mode 100644 index 0000000..f313222 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2667.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2668.pdf b/scripts/Max_Evol_Plots/Max_Evol_2668.pdf new file mode 100644 index 0000000..a7ef33d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2668.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2669.pdf b/scripts/Max_Evol_Plots/Max_Evol_2669.pdf new file mode 100644 index 0000000..0e36fdd --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2669.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2670.pdf b/scripts/Max_Evol_Plots/Max_Evol_2670.pdf new file mode 100644 index 0000000..9f25b1f --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2670.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2671.pdf b/scripts/Max_Evol_Plots/Max_Evol_2671.pdf new file mode 100644 index 0000000..b1688a3 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2671.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2672.pdf b/scripts/Max_Evol_Plots/Max_Evol_2672.pdf new file mode 100644 index 0000000..7fb4351 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2672.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2673.pdf b/scripts/Max_Evol_Plots/Max_Evol_2673.pdf new file mode 100644 index 0000000..2d9e3bc --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2673.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2674.pdf b/scripts/Max_Evol_Plots/Max_Evol_2674.pdf new file mode 100644 index 0000000..b16bb3e --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2674.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2675.pdf b/scripts/Max_Evol_Plots/Max_Evol_2675.pdf new file mode 100644 index 0000000..434023d --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2675.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2676.pdf b/scripts/Max_Evol_Plots/Max_Evol_2676.pdf new file mode 100644 index 0000000..442d673 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2676.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2677.pdf b/scripts/Max_Evol_Plots/Max_Evol_2677.pdf new file mode 100644 index 0000000..8e20a35 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2677.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2678.pdf b/scripts/Max_Evol_Plots/Max_Evol_2678.pdf new file mode 100644 index 0000000..68cadb1 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2678.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2679.pdf b/scripts/Max_Evol_Plots/Max_Evol_2679.pdf new file mode 100644 index 0000000..df22363 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2679.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/Max_Evol_2680.pdf b/scripts/Max_Evol_Plots/Max_Evol_2680.pdf new file mode 100644 index 0000000..8cb4700 --- /dev/null +++ b/scripts/Max_Evol_Plots/Max_Evol_2680.pdf Binary files differ diff --git a/scripts/Max_Evol_Plots/TimeDifferences.pdf b/scripts/Max_Evol_Plots/TimeDifferences.pdf new file mode 100644 index 0000000..bc6688d --- /dev/null +++ b/scripts/Max_Evol_Plots/TimeDifferences.pdf Binary files differ diff --git a/scripts/checkShift.py b/scripts/checkShift.py new file mode 100644 index 0000000..f53c349 --- /dev/null +++ b/scripts/checkShift.py @@ -0,0 +1,131 @@ +import ROOT +import numpy as np +from ROOT import TFile, TLorentzVector, TVector3, TRotation, TLorentzRotation, TMath, TH1D, TCanvas, TH2D, TObject, TF1 +import matplotlib.pyplot as plt +import pandas as pd +import pickle +from checkPulseData import Table +import os +import math as m + + +#Given the fitted parameters calculates the maximum point +def GetMaximumPoint(t0, t0_err, tau, tau_err): + + t = t0 + (3 - m.sqrt(3))*tau + t_err = m.sqrt(t0_err*t0_err + (3 - m.sqrt(3))*tau_err*(3 - m.sqrt(3))*tau_err) + return t, t_err + +#Obtains the fitted parameters from pulse shapes +def GetFitParameters(fileData, detector, layer, isect, ifill, calibstep, istrip): + + v = np.array(fileData.Get('{}/{}/{}/{}/v_pulse{}_val{}'.format(detector,layer, isect, ifill, calibstep, istrip))) + return v + + + +if __name__ == '__main__': + + #Plotting options + plot1 = True + plot2 = True + location = os.path.expandvars('$DISK/data/ST/Aging/') + fileData = TFile(location+'CCEScan.root') + + detector = 'TT' + layer = 'TTaU' + nstrips = [5]#[3, 5, 7] + + #Voltage map + voltMapTT = [400., 350., 300., 250., 225., 200., 175., 150., 125., 100., 60.] + + #Load Fills + macros = os.path.expandvars('$CCEHOME/macros/CCEScan/') + with open(macros + 'Fills.dat', 'rb') as f: + fills = f.read().splitlines() + fills.remove('2797') + fills.remove('3108') + + #Load Sectors + with open(macros + '{DET}sectors.dat'.format(DET=detector), 'rb') as f: + sectors = f.read().splitlines() + + #Define table columns + table = Table('Detector', 'Sector', 'Fill', 'N strips', 'Vbias', 'x_max','x_err') + + + + for isect in sectors: + print '====== SECTOR {}================'.format(isect) + + + for ifill in fills: + #print '====== FILL {}================'.format(ifill) + + + for istrip in nstrips: + + for calibstep in range(0,len(voltMapTT)): + #print '====== CALIBSTEP {}================'.format(calibstep) + + v_fit = GetFitParameters(fileData, detector, layer, isect, ifill, calibstep, istrip) + #print 'v_fit: ', v_fit + x_max, x_err = GetMaximumPoint(v_fit[4], v_fit[5], v_fit[2], v_fit[3]) + #print 'x_max: ', x_max + table.append(detector, int(isect), int(ifill), istrip, voltMapTT[calibstep], x_max, x_err) + + + + df = pd.DataFrame.from_dict(table) + + #################### + if(plot1 == True): + + print 'Plotting...' + + for isect in sectors: + df1 = df[df.Sector == int(isect)] + + for v in voltMapTT: + + plt.errorbar(df1[(df1.Vbias == v)]['Fill'], df1[(df1.Vbias == v)]['x_max'], df1[(df1.Vbias == v)]['x_err'], fmt='-^',label=str(v)) + + + plt.xlabel("Fill number") + plt.ylabel('Time of the pulse shape maximum (ns)') + plt.title("Time evolution of max. position for sector {}".format(str(isect))) + + plt.legend(loc='upper left') + #plt.show() + plt.savefig('./Max_Evol_Plots/Max_Evol_{}.pdf'.format(str(isect))) + plt.clf() + + ##################### + if(plot2): + + df1 = df[(df.Fill == 5162)] + df2 = df[(df.Fill == 5448)] + + + + + for vbias in voltMapTT: + + if (vbias < 70.): + continue + + df1v = df1[(df1.Vbias == vbias)][['Sector','x_max','x_err']] + df2v = df2[(df2.Vbias == vbias)][['Sector','x_max','x_err']] + df1v = df1v.sort_values(['Sector'], ascending=True).reset_index(drop=True) + df2v = df2v.sort_values(['Sector'], ascending=True).reset_index(drop=True) + + plt.errorbar(df1v['Sector'], df2v['x_max'] - df1v['x_max'], yerr= df2v['x_err'] + df1v['x_err'], fmt='^', label= '{} V'.format(vbias)) + + plt.xlabel("Sector") + plt.ylabel('Time difference (ns)') + plt.title("Time difference of max. positions fill 5448-5162" ) + + plt.legend(loc='upper left') + plt.savefig('./Max_Evol_Plots/TimeDifferences.pdf'.format(str(isect))) + plt.clf() +