From 2e60bcf5deed809efd477b77a129812f2697d3e3 Mon Sep 17 00:00:00 2001 From: Sebouh Paul Date: Tue, 7 Apr 2026 17:22:12 -0400 Subject: [PATCH 1/3] Update zdc_pi0_plots.py \, to \\, --- benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py index c2b4acff..0b1ceff0 100644 --- a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py +++ b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py @@ -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() From a8146da50f079c7b4c1c64bc50adee6071af1a9d Mon Sep 17 00:00:00 2001 From: Sebouh Paul Date: Tue, 7 Apr 2026 18:29:06 -0400 Subject: [PATCH 2/3] fixed another escape character --- benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py index 0b1ceff0..437e3568 100644 --- a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py +++ b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py @@ -191,7 +191,7 @@ def gauss(x, A,mu, sigma): 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)) From 004910751001ea3d67cc1ea84fab4b8d4025597e Mon Sep 17 00:00:00 2001 From: Sebouh Paul Date: Tue, 7 Apr 2026 23:14:37 -0400 Subject: [PATCH 3/3] Update zdc_pi0_plots.py change the reference energy for the pi0 from 100 GeV to 60 GeV --- benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py b/benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py index 437e3568..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,7 +187,7 @@ 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") @@ -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)