|
@@ -186,13 +186,13 @@ def scale_signal(x, scale, popt_CB=popt_CB):
|
|
|
return scale * CB(x, *popt_CB)
|
|
|
|
|
|
|
|
|
-popt, pcov = curve_fit(scale_signal, bin_centers, extracted_signal, sigma=bin_errors, p0=[1.])
|
|
|
+popt, pcov = curve_fit(scale_signal, bin_centers, extracted_signal, sigma=pldict['Data'][3], p0=[1.])
|
|
|
NHiggs = int(popt_CB[0] * popt[0])
|
|
|
|
|
|
plt.figure(figsize=(12, 8))
|
|
|
plt.title('Fitted signal', fontsize=22)
|
|
|
plt.plot(xs, scale_signal(xs, popt), color='r', label='Fitted signal')
|
|
|
-plt.scatter(bin_centers, extracted_signal, color='k', label='Extracted signal')
|
|
|
+plt.errorbar(bin_centers, extracted_signal, pldict['Data'][3], xerrs, marker='o', markersize=5, color='k', ecolor='k', ls='', label='Extracted signal')
|
|
|
plt.text(130, -200, r'$\alpha_{{scale}} = {:.3f}$'.format(*popt) + '\n' + r'$N_{{Higgs}} = {:d}$'.format(NHiggs), size=20, bbox=dict(facecolor='w', edgecolor='gray', boxstyle='round,pad=0.5'))
|
|
|
plt.xlabel(r'$m_{\mu \mu}$', fontsize=20)
|
|
|
plt.ylabel('Number of events', fontsize=20)
|