diff --git a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py index c2b4acff..92973109 100644 --- a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py +++ b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py @@ -44,7 +44,7 @@ def gauss(x, A,mu, sigma): if len(Etot)<25: continue #print(p, res, mrecon) - if p==100: + if p==60: plt.sca(axs[0]) y, x, _=plt.hist(Etot, bins=100, range=(p*.5, p*1.5), histtype='step') plt.ylabel("events") @@ -61,7 +61,7 @@ def gauss(x, A,mu, sigma): #print(list(y), list(x)) coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0, sigma=list(np.sqrt(y[slc])+(y[slc]==0)), maxfev=10000) - if p==100: + if p==60: xx=np.linspace(p*0.5,p*1.5, 100) plt.plot(xx, fnc(xx,*coeff)) pvals.append(p) @@ -120,7 +120,7 @@ def gauss(x, A,mu, sigma): Etot=np.sum(E, axis=-1) #print(p, res, mrecon) - if p==100: + if p==60: plt.sca(axs[0]) y, x, _=plt.hist(1000*(theta_recon-theta_truth), bins=100, range=(-0.5, 0.5), histtype='step') plt.ylabel("events") @@ -137,7 +137,7 @@ def gauss(x, A,mu, sigma): #print(list(y), list(x)) coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0, sigma=list(np.sqrt(y[slc])+(y[slc]==0)), maxfev=10000) - if p==100: + if p==60: xx=np.linspace(-0.5,0.5, 100) plt.plot(xx, fnc(xx,*coeff)) pvals.append(p) @@ -187,11 +187,11 @@ def gauss(x, A,mu, sigma): continue #print(p, res, mrecon) - if p==100: + if p==60: plt.sca(axs[0]) y, x, _=plt.hist(mrecon, bins=100, range=(0, 0.2), histtype='step') plt.ylabel("events") - plt.title(f"$p_{{\pi^0}}$={p} GeV") + plt.title(f"$p_{{\\pi^0}}$={p} GeV") plt.xlabel("$m^{\\pi^{0}}_{recon}$ [GeV]") else: #y, x, _=plt.hist(mrecon, bins=100, range=(0, 0.2), histtype='step')#y, x =np.histogram(mrecon, bins=100, range=(0, 0.2)) @@ -201,11 +201,11 @@ def gauss(x, A,mu, sigma): from scipy.optimize import curve_fit slc=abs(bc-.135)<.1 fnc=gauss - p0=[100, .135, 0.2] + p0=[60, .135, 0.2] #print(list(y), list(x)) coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0, sigma=list(np.sqrt(y[slc])+(y[slc]==0)), maxfev=10000) - if p==100: + if p==60: xx=np.linspace(0,0.2) plt.plot(xx, fnc(xx,*coeff)) pvals.append(p) @@ -224,7 +224,7 @@ def gauss(x, A,mu, sigma): sigma=dresvals, maxfev=10000) xx=np.linspace(55, 200, 100) #plt.plot(xx, fnc(xx, *coeff), label=f'fit: ${coeff[0]*1000:.1f}+{coeff[1]*1000:.4f}\\times E$ MeV') -plt.plot(xx, fnc(xx, *coeff), label=f'fit: $({coeff[0]*1000:.1f}+{coeff[1]*1000:.4f}\\times [E\,in\,GeV])$ MeV') +plt.plot(xx, fnc(xx, *coeff), label=f'fit: $({coeff[0]*1000:.1f}+{coeff[1]*1000:.4f}\\times [E\\,in\\,GeV])$ MeV') plt.legend()