192 chi2file = TFile(args.chifile)
195 gStyle.SetPadLeftMargin(0.15); gStyle.SetPadRightMargin(0.15)
197 colours = [30, 38, 46]
198 contours = [chi2file.Get(
'90pct'),
199 chi2file.Get(
'3sigma'),
200 chi2file.Get(
'5sigma')]
203 contournames = [
'90pct',
'3s',
'5s']
204 contourtitles = [
'90% Confidence Level',
'3#sigma Confidence Level',
'5#sigma Confidence Level']
207 gr_range.SetPoint(0, 0.001, 0.01)
208 gr_range.SetPoint(1, 1, 100)
209 gr_range.SetMarkerColor(0)
212 bestfit.SetPoint(0, 0.062, 1.7)
213 bestfit.SetMarkerStyle(29)
214 bestfit.SetMarkerSize(1.6)
215 bestfit.SetMarkerColor(40)
217 print(
"contours has length " + str(len(contours)))
219 for i
in range(len(contours)):
224 with
open(args.compdir+
'numu'+contournames[i]+
'.txt')
as f:
227 x.append(float(line.split(
', ')[0]))
228 y.append(float(line.split(
', ')[1].replace(
"\n",
"")))
230 propcontours.append(TGraph())
231 for j
in range(len(x)):
232 propcontours[i].SetPoint(j, x[j], y[j])
234 tempcanvas = TCanvas(
'temp_canvas',
'', 1020, 990)
236 templegend = TLegend()
237 templegend.AddEntry(contours[i],
'Our contour',
'l')
238 templegend.AddEntry(propcontours[i],
'From proposal',
'l')
239 templegend.AddEntry(bestfit,
'Best Fit Point',
'p')
244 gr_range.SetTitle(contourtitles[i]+
' Comparison; sin^{2}(2#theta); #Delta m^{2} (eV^{2})')
247 gr_range.GetXaxis().SetRangeUser(0.001, 1)
248 gr_range.GetYaxis().SetRangeUser(0.01, 100)
250 for lst
in (contours, propcontours):
251 lst[i].SetMarkerStyle(20)
252 lst[i].SetMarkerSize(0.25)
253 lst[i].SetMarkerColor(colours[i]
if lst == contours
else 1)
254 lst[i].SetLineColor(colours[i]
if lst == contours
else 1)
256 contours[i].Draw(
'P same')
257 propcontours[i].Draw(
'P same')
260 bestfit.Draw(
'P same')
262 tempcanvas.SaveAs(args.outdir+contournames[i]+
'_comparison.pdf')