plot_contprof.C
Go to the documentation of this file.
4 
5 std::string NoFC = "No Feldman-Cousins";
6 
7 void AddCyclicPoints(TGraph* g)
8 {
9  double x, y;
10  g->GetPoint(g->GetN()-1, x, y);
11  g->SetPoint(0, x-2, y);
12  g->GetPoint(1, x, y);
13  g->SetPoint(g->GetN(), x+2, y);
14 }
15 
16 TGraph* HistoToCyclicGraph(TH1* h)
17 {
18  TGraph* g = new TGraph;
19  g->SetPoint(0, 0, 0); // temporary
20  for(int i = 1; i <= h->GetNbinsX(); ++i)
21  g->SetPoint(i, h->GetXaxis()->GetBinCenter(i), h->GetBinContent(i));
22  g->SetLineColor(h->GetLineColor());
23  g->SetLineWidth(2);
24 
25  AddCyclicPoints(g);
26 
27  return g;
28 }
29 
30 
32  bool usecosmics = true,
33  bool systematics = true,
34  bool nh = true,
35  bool realdata = true)
36 {
37 
38  // experiment
39  std::string dataName = "fakedata";
40  if(realdata) dataName = "realdata";
41 
42  // cosmics
43  std::string cosmics = "nocosmics";
44  if(usecosmics) cosmics = "cosmics";
45 
46  // systematics
47  std::string systName2 = "StatsOnly";
48  std::string systName = "stats";
49  if(systematics){
50  systName2 = "WithSysts";
51  systName = "systs";
52  }
53  // calculator
54  double sinmax = 0.72, sinmin = 0.28;
55  double deltamax = 3.0, deltamin = 2.2;
56  double deltamaxprof = 3.0, deltaminprof = 2.0;
57  std::string calcName = "2018calc";
58  std::string hierarchy = "nh";
59  if(!nh){
60  hierarchy = "ih";
61  deltamax = -2.0; deltamin = -3.;
62  deltamaxprof = -2.0; deltaminprof = -3.;
63  }
64  // print on screen /////////////////////////////////////////////////////////
65  std::cout << "\n\nplot numu surface and profiles\n" << std::endl;
66  std::cout << "use cosmics: " << usecosmics << std::endl;
67  std::cout << "systematics: " << systName << ", calculator: " << calcName << ", hierarchy: " << hierarchy << std::endl;
68 
69 
70  //inputs
71  std::string din_name = "/nova/ana/nu_mu_ana/Ana2018/Results";
72  std::string dout_name = "";
73 
74 
75  bool lazyprint = true;
76  bool numuonly = true;
77  bool onlycf = true;
78  // print only confidence levels so it
79  // does or doesnt change contour colors
80  // already define colors
81  Color_t colort2k = kBlue;
82  Color_t colorminos = kRed;
83  Color_t uniquecol = kAzure-2;
84  Color_t uniquecol_sens = kAzure-4;
85  Color_t uniquecol_stats = kAzure-4;
86 
87  Style_t linenumu = kSolid;
88  Style_t linet2k = kDotted;
89  Style_t lineminos = kDashed;
90 
91  Style_t markernumu = kFullCircle;
92 
93  std::cout << "\nLoading input files" << std::endl;
94  std::string file_name_fhc = "surfprof_realdata_" + cosmics + "_fhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
95  std::string file_name_rhc = "surfprof_realdata_" + cosmics + "_rhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
96  std::string file_name_rhcfhc = "surfprof_realdata_" + cosmics + "_rhcfhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
97  std::string file_name_fhc_stats = "surfprof_realdata_" + cosmics + "_fhc__" + extrapName + "_stats_" + calcName + "_" + hierarchy + "__numu2018.root";
98  std::string file_name_rhc_stats = "surfprof_realdata_" + cosmics + "_rhc__" + extrapName + "_stats_" + calcName + "_" + hierarchy + "__numu2018.root";
99  std::string file_name_rhcfhc_stats = "surfprof_realdata_" + cosmics + "_rhcfhc__" + extrapName + "_stats_" + calcName + "_" + hierarchy + "__numu2018.root";
100  std::string file_name_fhc_sens = "surfprof_fakedata_" + cosmics + "_fhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
101  std::string file_name_rhc_sens = "surfprof_fakedata_" + cosmics + "_rhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
102  std::string file_name_rhcfhc_sens = "surfprof_fakedata_" + cosmics + "_rhcfhc__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018.root";
103  // IH 09,10,11
104  std::string file_name_fhc_ih = "surfprof_realdata_" + cosmics + "_fhc__" + extrapName + "_systs_" + calcName + "_ih__numu2018.root";
105  std::string file_name_rhc_ih = "surfprof_realdata_" + cosmics + "_rhc__" + extrapName + "_systs_" + calcName + "_ih__numu2018.root";
106  std::string file_name_rhcfhc_ih = "surfprof_realdata_" + cosmics + "_rhcfhc__" + extrapName + "_systs_" + calcName + "_ih__numu2018.root";
107 
108 
109  std::vector<std::string> input;
110  input.push_back(din_name + "/" + file_name_fhc);
111  input.push_back(din_name + "/" + file_name_rhc);
112  input.push_back(din_name + "/" + file_name_rhcfhc);
113  input.push_back(din_name + "/" + file_name_fhc_stats);
114  input.push_back(din_name + "/" + file_name_rhc_stats);
115  input.push_back(din_name + "/" + file_name_rhcfhc_stats);
116  input.push_back(din_name + "/" + file_name_fhc_sens);
117  input.push_back(din_name + "/" + file_name_rhc_sens);
118  input.push_back(din_name + "/" + file_name_rhcfhc_sens);
119  // IH 09,10,11
120  input.push_back(din_name + "/" + file_name_fhc_ih);
121  input.push_back(din_name + "/" + file_name_rhc_ih);
122  input.push_back(din_name + "/" + file_name_rhcfhc_ih);
123 
124  std::vector<Color_t> color_sigmaFHC = {kCyan+3, kCyan+1, kCyan-1};
125  std::vector<Color_t> color_sigmaRHC = {kViolet-6, kMagenta, kViolet-4};
126  std::vector<Color_t> color_sigma = {kAzure+2, kAzure-2, kAzure-4};
127  std::vector<Style_t> styleline_sigma = {kDotted, kDashed, kSolid};
128 
129  std::vector<Style_t> stylesurf = {kSolid, kSolid, kSolid, kDashed, kDashed, kDashed, kSolid, kSolid, kSolid, kDashed, kDashed, kDashed};
130  std::vector<Style_t> styleline = {kSolid, kSolid, kSolid, kDashed, kDashed, kDashed, kSolid, kSolid, kSolid, kDashed, kDashed, kDashed};
131  std::vector<Style_t> marker = {kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar, kFullStar};
132  std::vector<Color_t> color = {kCyan+1, kMagenta, kAzure-2, kCyan+1, kMagenta, kAzure-2, kCyan+1, kMagenta, kAzure-2, kCyan+1, kMagenta, kAzure-2};
133  std::vector<TFile*> infile;
134  std::vector<FrequentistSurface*> surface;
135  std::vector<TH1*> profile_sin23;
136  std::vector<TH1*> profile_delta32;
137  std::vector<TGraph*> grprofile_sin23;
138  std::vector<TGraph*> grprofile_delta32;
139  std::vector<float> rejmaxmix;
140  std::vector<double> sin23, sin23_sigmaM, sin23_sigmaP;
141  std::vector<double> delta32, delta32_sigmaM, delta32_sigmaP;
142 
143 
144  const int elements = input.size();
145 
146  for(unsigned int fileId = 0; fileId < input.size(); fileId ++){
147  infile.push_back( new TFile(input[fileId].c_str()) );
148  surface.push_back( LoadFrom<FrequentistSurface>(infile[fileId], "surface")).release() ;
149  profile_sin23.push_back( (TH1*)infile[fileId]->Get("profile_sin23") );
150  profile_delta32.push_back( (TH1*)infile[fileId]->Get("profile_delta32") );
151  surface[fileId]->SetTitle("");
152  profile_sin23[fileId]->SetTitle("");
153  profile_delta32[fileId]->SetTitle("");
154 
155  PimpHist(profile_sin23[fileId], styleline[fileId], color[fileId], 3, styleline[fileId], color[fileId], 1);
156  PimpHist(profile_delta32[fileId], styleline[fileId], color[fileId], 3, styleline[fileId], color[fileId], 1);
157 
158  grprofile_sin23.push_back(HistoToCyclicGraph(profile_sin23[fileId]));
159  grprofile_delta32.push_back(HistoToCyclicGraph(profile_delta32[fileId]));
160 
161  rejmaxmix.push_back( profile_sin23[fileId]->Interpolate(0.5) );
162  std::cout << "rej max mix " << fileId << " = " << rejmaxmix[fileId] << std::endl;
163 
164  std::vector<double> sin_sigma, delta_sigma; // first entry is -1 sigma, sencond is +1 sigma
165  std::vector<double> sin, delta; // minimum (central) sin and delta values
166  sin_sigma = FindCurveCrossings(profile_sin23[fileId], 1);
167  delta_sigma = FindCurveCrossings(profile_delta32[fileId], 1);
168  sin23.push_back(surface[fileId]->GetBestFitX());
169  sin23_sigmaM.push_back(surface[fileId]->GetBestFitX() - sin_sigma[0]);
170  sin23_sigmaP.push_back(sin_sigma[1] - surface[fileId]->GetBestFitX());
171  delta32.push_back(surface[fileId]->GetBestFitY());
172  delta32_sigmaM.push_back(surface[fileId]->GetBestFitY() - delta_sigma[0]);
173  delta32_sigmaP.push_back(delta_sigma[1] - surface[fileId]->GetBestFitY());
174 
175  std::cout << "\nfile " << fileId << std::endl;
176  std::cout << "max mix rej = " << rejmaxmix[fileId] << std::endl;
177  std::cout << "sin23 = " << sin23[fileId] << " +" << sin23_sigmaP[fileId] << " -" << sin23_sigmaM[fileId] << std::endl;
178  std::cout << "delta32 = " << delta32[fileId] << " +" << delta32_sigmaP[fileId] << " -" << delta32_sigmaM[fileId] << std::endl;
179  }
180 
181  // force profile get to zero
182  int isin_rhc=32; int isin_fhc=22; int isin_rhcfhc=27;
183  grprofile_sin23[0]->SetPoint(isin_fhc, sin_fhc, 0);
184  grprofile_sin23[1]->SetPoint(isin_rhc, sin_rhc, 0);
185  grprofile_sin23[2]->SetPoint(isin_rhcfhc, sin_rhcfhc, 0);
186  int isin_rhc_ih=33; int isin_fhc_ih=21; int isin_rhcfhc_ih=15;
187  grprofile_sin23[9]->SetPoint(isin_fhc_ih, sin_fhc_ih, 0);
188  grprofile_sin23[10]->SetPoint(isin_rhc_ih, sin_rhc_ih, 0);
189  grprofile_sin23[11]->SetPoint(isin_rhcfhc_ih, sin_rhcfhc_ih, 0);
190 
191 
192  // change to this with systematics real data
193  // get third ana results
194  Color_t color_nova2017 = kGray+2;
195  Style_t style_nova2017 = kDotted;
196  std::string nova2017 = "/nova/ana/nu_mu_ana/Ana2017/Results/ContProf_WithSysts_3ABestFit_3ACut_3AEnergy_OptBinning_9e20_Cosmics.root";
197  TFile* file_nova2017 = new TFile(nova2017.c_str());
198  FrequentistSurface* surface_nova2017 = LoadFrom<FrequentistSurface>(file_nova2017, "surface").release();
199 
200  std::string nova2017_2 = "/nova/ana/nu_mu_ana/Ana2017/Results/ContSqrtProf_WithSysts_3ABestFit_3ACut_3AEnergy_OptBinning_9e20_Cosmics.root";
201  TFile* file_nova2017_2 = new TFile(nova2017_2.c_str());
202  TH1* profile_sin23_nova2017 = (TH1*)file_nova2017_2->Get("profiletheta23");
203  TH1* profile_delta32_nova2017 =(TH1*)file_nova2017_2->Get("profiledelta32");
204  profile_sin23_nova2017->SetLineColor(color_nova2017);
205  profile_delta32_nova2017->SetLineColor(color_nova2017);
206  profile_sin23_nova2017->SetLineStyle(style_nova2017);
207  profile_delta32_nova2017->SetLineStyle(style_nova2017);
208  profile_sin23_nova2017->SetLineWidth(3);
209  profile_delta32_nova2017->SetLineWidth(3);
210  double rejmaxmix_nova = profile_sin23_nova2017->Interpolate(0.5);
211 
212 
213  // sigma constant lines
214  int n = 20;
215  float x[n], y1[n], y2[n], y3[n];
216  for(int i=0;i<n;i++) {
217  x[i] = -5.0 + i;
218  y1[i] = 1.0;
219  y2[i] = 2.0;
220  y3[i] = 3.0;
221  }
222  TGraph* grOne = new TGraph(n,x,y1);
223  TGraph* grTwo = new TGraph(n,x,y2);
224  TGraph* grThree = new TGraph(n,x,y3);
225  grOne->SetLineColor(kGray+1);
226  grOne->SetLineStyle(kDashed);
227  grTwo->SetLineColor(kGray+1);
228  grTwo->SetLineStyle(kDashed);
229  grThree->SetLineColor(kGray+1);
230  grThree->SetLineStyle(kDashed);
231 
232  std::string idName = extrapName+"_"+systName+"_"+cosmics;
233 
234 
235  // hack for legend
236  TGraph * dummyFHC = new TGraph();
237  dummyFHC->SetLineColor(color[0]);
238  dummyFHC->SetLineStyle(styleline[0]);
239  dummyFHC->SetLineWidth(3);
240  TGraph * dummyRHC = new TGraph();
241  dummyRHC->SetLineColor(color[1]);
242  dummyRHC->SetLineStyle(styleline[1]);
243  dummyRHC->SetLineWidth(3);
244  TGraph * dummy = new TGraph();
245  dummy->SetLineColor(color[2]);
246  dummy->SetLineStyle(styleline[2]);
247  dummy->SetLineWidth(3);
248  TGraph * dummy2017 = new TGraph();
249  dummy2017->SetLineColor(color_nova2017);
250  dummy2017->SetLineStyle(style_nova2017);
251  dummy2017->SetLineWidth(3);
252  TGraph * dummyNH = new TGraph();
253  dummyNH->SetLineColor(kGray+2);
254  dummyNH->SetLineStyle(kSolid);
255  dummyNH->SetLineWidth(3);
256  TGraph * dummyIH = new TGraph();
257  dummyIH->SetLineColor(kGray+2);
258  dummyIH->SetLineStyle(kDashed);
259  dummyIH->SetLineWidth(3);
260 
261 
262  // 2018 results
263  // data and sensitivity
264  if(lazyprint){
265  numuonly = true;
266  std::ofstream file;
267  new TCanvas("canvas");
268  TString out = dout_name + "/contours_realfakedata_" + cosmics + "__" + extrapName + "_systs_" + calcName + "_" + hierarchy + "__numu2018__FHCRHConly";
269  gPad->SetFillStyle(0);
270  gPad->SetTopMargin(0.08);
271  gPad->SetRightMargin(0.08);
272  gPad->SetBottomMargin(0.12);
273  gPad->SetLeftMargin(0.12);
274  gStyle->SetTitleOffset(0.95,"x");
275  gStyle->SetTitleOffset(0.85,"y");
276  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, deltamin, deltamax);
277  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
278  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
279  axes->GetXaxis()->SetTitleOffset(0.95);
280  axes->GetYaxis()->SetTitleOffset(0.85);
281  axes->GetXaxis()->SetTitleSize(0.055);
282  axes->GetYaxis()->SetTitleSize(0.055);
283  axes->GetXaxis()->SetLabelSize(0.04);
284  axes->GetYaxis()->SetLabelSize(0.04);
285  axes->GetXaxis()->CenterTitle();
286  axes->GetYaxis()->CenterTitle();
287  axes->SetTitle("");
288  axes->GetYaxis()->SetDecimals();
289  axes->Draw();
290  axes->Draw();
291  surface[2]->DrawContour(Gaussian90Percent2D(*surface[2]), kSolid, uniquecol);
292  surface[2]->DrawBestFit(uniquecol, kFullCircle);
293  surface[8]->DrawContour(Gaussian90Percent2D(*surface[8]), kDashed, uniquecol_sens);
294  TLegend *legend = new TLegend(0.35,0.68,0.65,0.88,NULL,"brNDC");
295  legend->SetTextSize(0.040); //no border for legend
296  legend->SetBorderSize(0);
297  legend->SetLineColor(1);
298  legend->SetLineStyle(1);
299  legend->SetLineWidth(0);
300  legend->SetFillColor(10);
301  legend->SetFillStyle(0);
302  TLegendEntry *entry = legend->AddEntry("NULL","NOvA NH 90% CL","h");
303  entry = legend->AddEntry("zero","#nu_{#mu} + #bar{#nu}_{#mu} 2018 Result","L");
304  entry->SetLineColor(uniquecol);
305  entry->SetLineStyle(styleline[2]);
306  entry->SetLineWidth(3);
307  entry->SetTextFont(42);
308  entry = legend->AddEntry("three","#nu_{#mu} + #bar{#nu}_{#mu} 2018 Sensitivity","L");
309  entry->SetLineColor(uniquecol_stats);
310  entry->SetLineStyle(kDashed);
311  entry->SetLineWidth(3);
312  entry->SetTextFont(42);
313  legend->Draw();
314  CornerLabel(NoFC);
316  DrawLegendBFNull(surface[2]->GetBestFitX(), surface[2]->GetBestFitY(), uniquecol, kFullCircle);
317  gPad->Print(out + ".png");
318  gPad->Print(out + ".pdf");
319  file.open (out + ".txt");
320  file<< "90% confidence level contour for NOvA's combined neutrino + antineutrino 2018 analysis with systematics (no Felman-Cousins correction), and sensitivity at 2018 best fit.";
321  file.close();
322 
323  }
324 
325 
326  // 2018 result
327  // systematics and no systematics
328  if(lazyprint){
329  // 90% systs
330  numuonly = true;
331  std::ofstream file;
332  new TCanvas("canvas");
333  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_systsstats_" + calcName + "_" + hierarchy + "__numu2018__FHCRHConly";
334  gPad->SetFillStyle(0);
335  gPad->SetTopMargin(0.08);
336  gPad->SetRightMargin(0.08);
337  gPad->SetBottomMargin(0.12);
338  gPad->SetLeftMargin(0.12);
339  gStyle->SetTitleOffset(0.95,"x");
340  gStyle->SetTitleOffset(0.85,"y");
341  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, deltamin, deltamax);
342  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
343  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
344  axes->GetXaxis()->SetTitleOffset(0.95);
345  axes->GetYaxis()->SetTitleOffset(0.85);
346  axes->GetXaxis()->SetTitleSize(0.055);
347  axes->GetYaxis()->SetTitleSize(0.055);
348  axes->GetXaxis()->SetLabelSize(0.04);
349  axes->GetYaxis()->SetLabelSize(0.04);
350  axes->GetXaxis()->CenterTitle();
351  axes->GetYaxis()->CenterTitle();
352  axes->SetTitle("");
353  axes->GetYaxis()->SetDecimals();
354  axes->Draw();
355  axes->Draw();
356  surface[2]->DrawContour(Gaussian90Percent2D(*surface[2]), kSolid, uniquecol);
357  surface[2]->DrawBestFit(uniquecol, kFullCircle);
358  surface[5]->DrawContour(Gaussian90Percent2D(*surface[5]), kDashed, uniquecol_stats);
359  TLegend *legend = new TLegend(0.35,0.68,0.65,0.88,NULL,"brNDC");
360  legend->SetTextSize(0.040); //no border for legend
361  legend->SetBorderSize(0);
362  legend->SetLineColor(1);
363  legend->SetLineStyle(1);
364  legend->SetLineWidth(0);
365  legend->SetFillColor(10);
366  legend->SetFillStyle(0);
367  TLegendEntry *entry = legend->AddEntry("NULL","NOvA NH 90% CL","h");
368  entry = legend->AddEntry("zero","#nu_{#mu} + #bar{#nu}_{#mu} 2018 with systematics","L");
369  entry->SetLineColor(uniquecol);
370  entry->SetLineStyle(styleline[2]);
371  entry->SetLineWidth(3);
372  entry->SetTextFont(42);
373  entry = legend->AddEntry("three","#nu_{#mu} + #bar{#nu}_{#mu} 2018 no systematics","L");
374  entry->SetLineColor(uniquecol_stats);
375  entry->SetLineStyle(kDashed);
376  entry->SetLineWidth(3);
377  entry->SetTextFont(42);
378  legend->Draw();
379  CornerLabel(NoFC);
381  DrawLegendBFNull(surface[2]->GetBestFitX(), surface[2]->GetBestFitY(), uniquecol, kFullCircle);
382  gPad->Print(out + ".png");
383  gPad->Print(out + ".pdf");
384  file.open (out + ".txt");
385  file<< "90% confidence level contour for NOvA's combined neutrino + antineutrino 2018 analysis U2 systematics (no Felman-Cousins correction).";
386  file.close();
387 
388  }
389 
390 
391  // 2018 result NH
392  if(lazyprint){
393  // 90% systs
394  numuonly = true;
395  std::ofstream file;
396  new TCanvas("canvas");
397  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018__FHCRHConlyNH";
398  gPad->SetFillStyle(0);
399  gPad->SetTopMargin(0.08);
400  gPad->SetRightMargin(0.08);
401  gPad->SetBottomMargin(0.12);
402  gPad->SetLeftMargin(0.12);
403  gStyle->SetTitleOffset(0.95,"x");
404  gStyle->SetTitleOffset(0.85,"y");
405  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, deltamin, deltamax);
406  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
407  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
408  axes->GetXaxis()->SetTitleOffset(0.95);
409  axes->GetYaxis()->SetTitleOffset(0.85);
410  axes->GetXaxis()->SetTitleSize(0.055);
411  axes->GetYaxis()->SetTitleSize(0.055);
412  axes->GetXaxis()->SetLabelSize(0.04);
413  axes->GetYaxis()->SetLabelSize(0.04);
414  axes->GetXaxis()->CenterTitle();
415  axes->GetYaxis()->CenterTitle();
416  axes->SetTitle("");
417  axes->GetYaxis()->SetDecimals();
418  axes->Draw();
419  axes->Draw();
420  for(int plotId = 2; plotId < 3; plotId++){
421  surface[plotId]->DrawContour(Gaussian90Percent2D(*surface[plotId]), kSolid, uniquecol);
422  surface[plotId]->DrawBestFit(uniquecol, kFullCircle);
423  }
424  TLegend *legend = new TLegend(0.35,0.78,0.65,0.88,NULL,"brNDC");
425  legend->SetTextSize(0.040); //no border for legend
426  legend->SetBorderSize(0);
427  legend->SetLineColor(1);
428  legend->SetLineStyle(1);
429  legend->SetLineWidth(0);
430  legend->SetFillColor(10);
431  legend->SetFillStyle(0);
432  TLegendEntry *entry = legend->AddEntry("NULL","NOvA NH 90% CL","h");
433  entry = legend->AddEntry("zero","#nu_{#mu} + #bar{#nu}_{#mu} 2018","L");
434  entry->SetLineColor(uniquecol);
435  entry->SetLineStyle(styleline[2]);
436  entry->SetLineWidth(3);
437  entry->SetTextFont(42);
438  legend->Draw();
439  CornerLabel(NoFC);
441  DrawLegendBFNull(surface[2]->GetBestFitX(), surface[2]->GetBestFitY(), uniquecol, kFullCircle);
442  gPad->Print(out + ".png");
443  gPad->Print(out + ".pdf");
444  file.open (out + ".txt");
445  file<< "90% confidence level contour for NOvA's NH combined neutrino + antineutrino 2018 analysis including systematics (no Felman-Cousins correction).";
446  file.close();
447 
448  }
449 
450 
451  // 2018 result NH
452  if(lazyprint){
453  // 90% systs
454  numuonly = true;
455  std::ofstream file;
456  new TCanvas("canvas");
457  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018__FHCRHConlyIH";
458  gPad->SetFillStyle(0);
459  gPad->SetTopMargin(0.08);
460  gPad->SetRightMargin(0.08);
461  gPad->SetBottomMargin(0.12);
462  gPad->SetLeftMargin(0.12);
463  gStyle->SetTitleOffset(0.95,"x");
464  gStyle->SetTitleOffset(0.85,"y");
465  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, -2.8, -2);
466  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
467  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
468  axes->GetXaxis()->SetTitleOffset(0.95);
469  axes->GetYaxis()->SetTitleOffset(0.85);
470  axes->GetXaxis()->SetTitleSize(0.055);
471  axes->GetYaxis()->SetTitleSize(0.055);
472  axes->GetXaxis()->SetLabelSize(0.04);
473  axes->GetYaxis()->SetLabelSize(0.04);
474  axes->GetXaxis()->CenterTitle();
475  axes->GetYaxis()->CenterTitle();
476  axes->SetTitle("");
477  axes->GetYaxis()->SetDecimals();
478  axes->Draw();
479  axes->Draw();
480  for(int plotId = 11; plotId < 12; plotId++){
481  surface[plotId]->DrawContour(Gaussian90Percent2D(*surface[plotId]), kSolid, uniquecol);
482  // surface[plotId]->DrawBestFit(uniquecol, kFullCircle);
483  }
484  TLegend *legend = new TLegend(0.35,0.78,0.65,0.88,NULL,"brNDC");
485  legend->SetTextSize(0.040); //no border for legend
486  legend->SetBorderSize(0);
487  legend->SetLineColor(1);
488  legend->SetLineStyle(1);
489  legend->SetLineWidth(0);
490  legend->SetFillColor(10);
491  legend->SetFillStyle(0);
492  TLegendEntry *entry = legend->AddEntry("NULL","NOvA IH 90% CL","h");
493  entry = legend->AddEntry("zero","#nu_{#mu} + #bar{#nu}_{#mu} 2018","L");
494  entry->SetLineColor(uniquecol);
495  entry->SetLineStyle(styleline[2]);
496  entry->SetLineWidth(3);
497  entry->SetTextFont(42);
498  legend->Draw();
499  CornerLabel(NoFC);
501  //DrawLegendBFNull(surface[2] -> GetBestFitX(), surface[2] -> GetBestFitY(), uniquecol, kFullCircle);
502  gPad->Print(out + ".png");
503  gPad->Print(out + ".pdf");
504  file.open (out + ".txt");
505  file<< "90% confidence level contour for NOvA's IH combined neutrino + antineutrino 2018 analysis including systematics (no Felman-Cousins correction).";
506  file.close();
507 
508  }
509 
510 
511  // 2018 and 2017 results
512  if(lazyprint){
513  numuonly = true;
514  std::ofstream file;
515  new TCanvas("canvas");
516  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018__FHCRHCand2017only";
517  gPad->SetFillStyle(0);
518  gPad->SetTopMargin(0.08);
519  gPad->SetRightMargin(0.08);
520  gPad->SetBottomMargin(0.12);
521  gPad->SetLeftMargin(0.12);
522  gStyle->SetTitleOffset(0.95,"x");
523  gStyle->SetTitleOffset(0.85,"y");
524  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, deltamin, deltamax);
525  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
526  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
527  axes->GetXaxis()->SetTitleOffset(0.95);
528  axes->GetYaxis()->SetTitleOffset(0.85);
529  axes->GetXaxis()->SetTitleSize(0.055);
530  axes->GetYaxis()->SetTitleSize(0.055);
531  axes->GetXaxis()->SetLabelSize(0.04);
532  axes->GetYaxis()->SetLabelSize(0.04);
533  axes->GetXaxis()->CenterTitle();
534  axes->GetYaxis()->CenterTitle();
535  axes->SetTitle("");
536  axes->GetYaxis()->SetDecimals();
537  axes->Draw();
538  axes->Draw();
539  surface_nova2017->DrawContour(Gaussian90Percent2D(*surface_nova2017), style_nova2017, color_nova2017);
540  for(int plotId = 2; plotId < 3; plotId++){
541  surface[plotId]->DrawContour(Gaussian90Percent2D(*surface[plotId]), kSolid, uniquecol);
542  surface[plotId]->DrawBestFit(uniquecol, kFullCircle);
543  }
544  CornerLabel(NoFC);
546  TLegend *legend = new TLegend(0.35,0.68,0.65,0.88,NULL,"brNDC");
547  legend->SetTextSize(0.040); //no border for legend
548  legend->SetBorderSize(0);
549  legend->SetLineColor(1);
550  legend->SetLineStyle(1);
551  legend->SetLineWidth(0);
552  legend->SetFillColor(10);
553  legend->SetFillStyle(0);
554  TLegendEntry *entry = legend->AddEntry("NULL","NOvA NH 90% CL","h");
555  entry = legend->AddEntry("zero","#nu_{#mu} + #bar{#nu}_{#mu} 2018","L");
556  entry->SetLineColor(uniquecol);
557  entry->SetLineStyle(styleline[2]);
558  entry->SetLineWidth(3);
559  entry->SetTextFont(42);
560  entry = legend->AddEntry("three","#nu_{#mu} 2017","L");
561  entry->SetLineColor(color_nova2017);
562  entry->SetLineStyle(style_nova2017);
563  entry->SetLineWidth(3);
564  entry->SetTextFont(42);
565  legend->Draw();
567  DrawLegendBFNull(surface[2]->GetBestFitX(), surface[2]->GetBestFitY(), uniquecol, kFullCircle);
568  gPad->Print(out + ".png");
569  gPad->Print(out + ".pdf");
570  file.open (out + ".txt");
571  file<< "90% confidence level contour for NOvA's combined neutrino + antineutrino 2018 analysis including systematics (no Felman-Cousins correction), overlayed with NOvA 2017 disappearance analysis result.";
572  file.close();
573 
574  }
575 
576 
577 
578  if(lazyprint){
579  numuonly = true;
580  std::ofstream file;
581  new TCanvas("canvas");
582  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018";
583  gPad->SetFillStyle(0);
584  gPad->SetTopMargin(0.08);
585  gPad->SetRightMargin(0.08);
586  gPad->SetBottomMargin(0.12);
587  gPad->SetLeftMargin(0.12);
588  gStyle->SetTitleOffset(0.95,"x");
589  gStyle->SetTitleOffset(0.85,"y");
590  TH2F *axes = new TH2F("setaxes","" ,50 ,sinmin, sinmax, 50, deltamin, deltamax);
591  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
592  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
593  axes->GetXaxis()->SetTitleOffset(0.95);
594  axes->GetYaxis()->SetTitleOffset(0.85);
595  axes->GetXaxis()->SetTitleSize(0.055);
596  axes->GetYaxis()->SetTitleSize(0.055);
597  axes->GetXaxis()->SetLabelSize(0.04);
598  axes->GetYaxis()->SetLabelSize(0.04);
599  axes->GetXaxis()->CenterTitle();
600  axes->GetYaxis()->CenterTitle();
601  axes->SetTitle("");
602  axes->GetYaxis()->SetDecimals();
603  axes->Draw();
604  axes->Draw();
605  surface_nova2017->DrawContour(Gaussian90Percent2D(*surface_nova2017), style_nova2017, color_nova2017);
606  for(int plotId = 0; plotId < 3; plotId++){
607  surface[plotId]->DrawContour(Gaussian90Percent2D(*surface[plotId]), styleline[plotId], color[plotId]);
608  //surface[plotId]->DrawBestFit(color[plotId], kFullCircle);
609  }
610  auto leg = new TLegend(0.35,0.67,0.70,0.82);
611  leg->SetNColumns(2);
612  leg->SetFillStyle(0);
613  leg->SetTextSize(0.05);
614  leg->SetMargin(1.3*leg->GetMargin());
615  TPaveText *pText1 = new TPaveText(0.35, 0.83, 0.70, 0.88, "brNDC");
616  TText *text1 = pText1->AddText("NOvA NH 90% CL");
617  text1->SetTextSize(0.05);
618  pText1->SetBorderSize(0);
619  pText1->SetFillStyle(0);
620  pText1->Draw();
621  leg->AddEntry(dummyFHC,"#nu_{#mu} only","l");
622  leg->AddEntry(dummy,"#nu_{#mu}+#bar{#nu}_{#mu}","l");
623  leg->AddEntry(dummyRHC,"#bar{#nu}_{#mu} only","l");
624  leg->AddEntry(dummy2017,"2017 #nu_{#mu}","l");
625  leg->Draw();
626  CornerLabel(NoFC);
628  //DrawLegendBFNull(surface[2] -> GetBestFitX(), surface[2] -> GetBestFitY(), kGray+2, kFullCircle);
629  gPad->Modified();
630  gPad->Print(out + ".png");
631  gPad->Print(out + ".pdf");
632  file.open (out + ".txt");
633  file<< "90% confidence level contour for NOvA's combined neutrino + antineutrino 2018 analysis, overlayed with the result from fitting neutrino and antineutrino data separately; all contours have systematic erros aplied and no Feldman-Cousins corrections. The green dashed line shows the 2017 disappearance analysis result.";
634  file.close();
635 
636  }
637 
638 
639  if(lazyprint){
640  numuonly = true;
641  std::ofstream file;
642  new TCanvas("canvas");
643  TString out = dout_name + "/contours_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__FHCandRHC_numu2018";
644  gPad->SetFillStyle(0);
645  gPad->SetTopMargin(0.08);
646  gPad->SetRightMargin(0.08);
647  gPad->SetBottomMargin(0.12);
648  gPad->SetLeftMargin(0.12);
649  gStyle->SetTitleOffset(0.95,"x");
650  gStyle->SetTitleOffset(0.85,"y");
651  TH2F *axes = new TH2F("setaxes","",50 ,sinmin, sinmax, 50, deltamin, deltamax);
652  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
653  axes->GetYaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
654  axes->GetXaxis()->SetTitleOffset(0.95);
655  axes->GetYaxis()->SetTitleOffset(0.85);
656  axes->GetXaxis()->SetTitleSize(0.055);
657  axes->GetYaxis()->SetTitleSize(0.055);
658  axes->GetXaxis()->SetLabelSize(0.04);
659  axes->GetYaxis()->SetLabelSize(0.04);
660  axes->GetXaxis()->CenterTitle();
661  axes->GetYaxis()->CenterTitle();
662  axes->SetTitle("");
663  axes->GetYaxis()->SetDecimals();
664  axes->Draw();
665  axes->Draw();
666  for(int plotId = 0; plotId < 2; plotId++){
667  surface[plotId]->DrawContour(Gaussian90Percent2D(*surface[plotId]), styleline[plotId], color[plotId]);
668  }
669  TLegend *legend = new TLegend(0.35,0.68,0.65,0.88,NULL,"brNDC");
670  legend->SetTextSize(0.040); //no border for legend
671  legend->SetBorderSize(0);
672  legend->SetLineColor(1);
673  legend->SetLineStyle(1);
674  legend->SetLineWidth(0);
675  legend->SetFillColor(10);
676  legend->SetFillStyle(0);
677  TLegendEntry *entry = legend->AddEntry("NULL","NOvA NH 90% CL","h");
678  entry = legend->AddEntry("zero","#nu_{#mu} only","L");
679  entry->SetLineColor(color[0]);
680  entry->SetLineStyle(styleline[0]);
681  entry->SetLineWidth(3);
682  entry->SetTextFont(42);
683  entry = legend->AddEntry("three","#bar{#nu}_{#mu} only","L");
684  entry->SetLineColor(color[1]);
685  entry->SetLineStyle(styleline[1]);
686  entry->SetLineWidth(3);
687  entry->SetTextFont(42);
688  legend->Draw();
689  CornerLabel(NoFC);
691  gPad->Modified();
692  gPad->Print(out + ".png");
693  gPad->Print(out + ".pdf");
694  file.open (out + ".txt");
695  file<< "90% confidence level contour for NOvA's muon neutrino and muon antineutrino data fitted separately; all contours have systematic erros aplied and no Feldman-Cousins corrections. The green dashed line shows the 2017 disappearance analysis result.";
696  file.close();
697 
698 }
699 
700 
701  // profile sin2theta23
702  if(lazyprint){
703  numuonly = true;
704  std::ofstream file;
705  new TCanvas("canvas");
706  TString out = dout_name + "/profile_sin23_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018";
707  gPad->SetFillStyle(0);
708  gPad->SetBottomMargin(0.115);
709  gStyle->SetTitleOffset(0.82,"x"); //override style script so nothing is clipped or overlapping with axis labels
710  gStyle->SetTitleOffset(0.85,"y");
711  TH2F *axes = new TH2F("setaxes","" ,38, sinmin, sinmax, 40, 0.0, 8.0);
712  axes->GetYaxis()->SetTitle("Significance (#sqrt{#Delta#chi^{2}})");
713  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
714  axes->GetXaxis()->CenterTitle();
715  axes->GetYaxis()->CenterTitle();
716  axes->SetTitle("");
717  axes->Draw();
718  axes->Draw();
719  profile_sin23_nova2017->Draw("l same");
720  for(int plotId = 0; plotId < 3; plotId++){
721  grprofile_sin23[plotId]->Draw("lp same"); // exp systs
722  }
723  grOne->Draw("same");
724  //grTwo->Draw("same");
725  //grThree->Draw("same");
726  auto leg = new TLegend(0.35,0.67,0.70,0.82);
727  leg->SetNColumns(2);
728  leg->SetFillStyle(0);
729  leg->SetTextSize(0.05);
730  leg->SetMargin(1.3*leg->GetMargin());
731  TPaveText *pText1 = new TPaveText(0.35, 0.83, 0.70, 0.88, "brNDC");
732  TText *text1 = pText1->AddText("NOvA Normal Hierarchy");
733  text1->SetTextSize(0.05);
734  pText1->SetBorderSize(0);
735  pText1->SetFillStyle(0);
736  pText1->Draw();
737  leg->AddEntry(dummyFHC,"#nu_{#mu} only","l");
738  leg->AddEntry(dummy,"#nu_{#mu}+#bar{#nu}_{#mu}","l");
739  leg->AddEntry(dummyRHC,"#bar{#nu}_{#mu} only","l");
740  leg->AddEntry(dummy2017,"2017 #nu_{#mu}","l");
741  leg->Draw();
742  CornerLabel(NoFC);
744  gPad->Modified();
745  gPad->Print(out + ".png");
746  gPad->Print(out + ".pdf");
747  gPad->Print(out + ".eps");
748  file.open (out + ".txt");
749  file << "sin$^2theta_{23}$ profile for NOvA's combined neutrino + antineutrino 2018 analysis, overlayed with the result from fitting neutrino and antineutrino data separately; all profiles have systematic erros aplied and no Feldman-Cousins corrections. The green dashed line shows the 2017 disappearance analysis result.";
750  file.close();
751  }
752 
753 
754 
755  // profile sin2theta23
756  // IH NH
757  if(lazyprint){
758  numuonly = true;
759  std::ofstream file;
760  new TCanvas("canvas");
761  TString out = dout_name + "/profile_sin23_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018__hierarchiesCombOnly";
762  gPad->SetFillStyle(0);
763  gPad->SetBottomMargin(0.115);
764  gStyle->SetTitleOffset(0.82,"x");
765  gStyle->SetTitleOffset(0.85,"y");
766  TH2F *axes = new TH2F("setaxes","" ,38, sinmin, sinmax, 40, 0.0, 8.0);
767  axes->GetYaxis()->SetTitle("Significance (#sqrt{#Delta#chi^{2}})");
768  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
769  axes->GetXaxis()->CenterTitle();
770  axes->GetYaxis()->CenterTitle();
771  axes->SetTitle("");
772  axes->Draw();
773  axes->Draw();
774  grprofile_sin23[2]->Draw("l same"); // NH
775  grprofile_sin23[11]->SetLineStyle(kDashed); // IH
776  grprofile_sin23[11]->Draw("l same"); // IH
777  grOne->Draw("same");
778  TPaveText *pText1 = new TPaveText(0.35, 0.83, 0.70, 0.88, "brNDC");
779  TText *text1 = pText1->AddText("NOvA 2018");
780  text1->SetTextSize(0.05);
781  pText1->SetBorderSize(0);
782  pText1->SetFillStyle(0);
783  pText1->Draw();
784  auto leg = new TLegend(0.30,0.70,0.60,0.82);
785  leg->SetFillStyle(0);
786  leg->SetTextSize(0.05);
787  leg->SetMargin(1.3*leg->GetMargin());
788  leg->AddEntry(dummy,"#nu_{#mu}+#bar{#nu}_{#mu} Normal Hierarchy","l");
789  leg->AddEntry(dummyIH,"#nu_{#mu}+#bar{#nu}_{#mu} Inverted Hierarchy","l");
790  leg->Draw();
791  CornerLabel(NoFC);
793  //legH->Draw();
794  gPad->Modified();
795  gPad->Print(out + ".png");
796  gPad->Print(out + ".pdf");
797  gPad->Print(out + ".eps");
798  file.open (out + ".txt");
799  file << "sin$^2theta_{23}$ profile for NOvA's combined neutrino + antineutrino 2018 analysis, including stematic erros aplied and no Feldman-Cousins corrections. Results for normal hierachy are in solid lines; results constraining the fit to inverted hierarchy are shown with dashed lines.";
800  file.close();
801  }
802 
803 
804 
805  // profile sin2theta23
806  // NH
807  if(lazyprint){
808  numuonly = true;
809  std::ofstream file;
810  new TCanvas("canvas");
811  TString out = dout_name + "/profile_sin23_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018__hierarchies";
812  gPad->SetFillStyle(0);
813  gPad->SetBottomMargin(0.115);
814  gStyle->SetTitleOffset(0.82,"x");
815  gStyle->SetTitleOffset(0.85,"y");
816  TH2F *axes = new TH2F("setaxes","" ,38, sinmin, sinmax, 40, 0.0, 8.0);
817  axes->GetYaxis()->SetTitle("Significance (#sqrt{#Delta#chi^{2}})");
818  axes->GetXaxis()->SetTitle("sin^{2}#theta_{23}");
819  axes->GetXaxis()->CenterTitle();
820  axes->GetYaxis()->CenterTitle();
821  axes->SetTitle("");
822  axes->Draw();
823  axes->Draw();
824  //profile_sin23_nova2017->Draw("l same");
825  for(int plotId = 0; plotId < 3; plotId++){
826  grprofile_sin23[plotId]->Draw("l same"); // NH
827  }
828  for(int plotId = 9; plotId < 12; plotId++){
829  grprofile_sin23[plotId]->SetLineStyle(kDashed); // IH
830  grprofile_sin23[plotId]->Draw("l same"); // IH
831  }
832  auto legH = new TLegend(0.15,0.71,0.30,0.83);
833  legH->SetFillStyle(0);
834  legH->SetTextSize(0.05);
835  legH->SetMargin(1.3*legH->GetMargin());
836  legH->AddEntry(dummyNH,"NOvA NH","l");
837  legH->AddEntry(dummyIH,"NOvA IH","l");
838  auto leg = new TLegend(0.40,0.64,0.60,0.83);
839  leg->SetFillStyle(0);
840  leg->SetTextSize(0.05);
841  leg->SetMargin(1.3*leg->GetMargin());
842  leg->SetMargin(1.3*leg->GetMargin());
843  leg->AddEntry(dummyFHC,"#nu_{#mu} only","l");
844  leg->AddEntry(dummy,"#nu_{#mu}+#bar{#nu}_{#mu}","l");
845  leg->AddEntry(dummyRHC,"#bar{#nu}_{#mu} only","l");
846  leg->Draw();
847  legH->Draw();
848  CornerLabel(NoFC);
850  gPad->Modified();
851  gPad->Print(out + ".png");
852  gPad->Print(out + ".pdf");
853  gPad->Print(out + ".eps");
854  file.open (out + ".txt");
855  file << "sin$^2theta_{23}$ profile for NOvA's combined neutrino + antineutrino 2018 analysis, overlayed with the result from fitting neutrino and antineutrino data separately; all profiles have systematic erros aplied and no Feldman-Cousins corrections. Results for normal hierachy are in solid lines; results constraining the fit to inverted hierarchy are shown with dashed lines.";
856  file.close();
857  }
858 
859 
860 
861  // profile deltam2
862  if(lazyprint){
863  numuonly = true;
864  std::ofstream file;
865  new TCanvas("canvas");
866  TString out = dout_name + "/profile_delta32_" + dataName + "_" + cosmics + "__" + extrapName + "_" + systName + "_" + calcName + "_" + hierarchy + "__numu2018";
867  gPad->SetFillStyle(0);
868  gPad->SetBottomMargin(0.115);
869  gStyle->SetTitleOffset(0.82,"x"); //override style script so nothing is clipped or overlapping with axis labels
870  gStyle->SetTitleOffset(0.85,"y");
871  TH2F *axes = new TH2F("setaxes","" , 24, 2.2, deltamaxprof, 40, 0.0, 8.0);
872  axes->GetYaxis()->SetTitle("Significance (#sqrt{#Delta#chi^{2}})");
873  axes->GetXaxis()->SetTitle("#Deltam^{2}_{32} (10^{-3} eV^{2})");
874  axes->GetXaxis()->CenterTitle();
875  axes->GetYaxis()->CenterTitle();
876  axes->SetTitle("");
877  axes->Draw();
878  axes->Draw();
879  profile_delta32_nova2017->Draw("l same");
880  for(int plotId = 0; plotId < 3; plotId++){
881  grprofile_delta32[plotId]->Draw("l same"); // exp systs
882  }
883  grOne->Draw("same");
884  auto leg = new TLegend(0.35,0.67,0.70,0.82);
885  leg->SetNColumns(2);
886  leg->SetFillStyle(0);
887  leg->SetTextSize(0.05);
888  leg->SetMargin(1.3*leg->GetMargin());
889  TPaveText *pText1 = new TPaveText(0.35, 0.83, 0.70, 0.88, "brNDC");
890  TText *text1 = pText1->AddText("NOvA Normal Hierarchy");
891  text1->SetTextSize(0.05);
892  pText1->SetBorderSize(0);
893  pText1->SetFillStyle(0);
894  pText1->Draw();
895  leg->AddEntry(dummyFHC,"#nu_{#mu} only","l");
896  leg->AddEntry(dummy,"#nu_{#mu}+#bar{#nu}_{#mu}","l");
897  leg->AddEntry(dummyRHC,"#bar{#nu}_{#mu} only","l");
898  leg->AddEntry(dummy2017,"2017 #nu_{#mu}","l");
899  leg->Draw();
900  CornerLabel(NoFC);
902  gPad->Modified();
903  gPad->Print(out + ".png");
904  gPad->Print(out + ".pdf");
905  gPad->Print(out + ".eps");
906  file.open (out + ".txt");
907  file << "$\Delta m^2_{32}$ profile for NOvA's combined neutrino + antineutrino 2018 analysis, overlayed with the result from fitting neutrino and antineutrino data separately; all profiles have systematic erros aplied and no Feldman-Cousins corrections. The green dashed line shows the 2017 disappearance analysis result.";
908  file.close();
909  }
910 
911 
912 
913 } // End of function
914 
enum BeamMode kRed
Float_t y1[n_points_granero]
Definition: compare.C:5
const double sin_rhcfhc_ih
Definition: settings.h:30
double delta
Definition: runWimpSim.h:98
const double sin_fhc_ih
Definition: settings.h:28
void CornerLabel(std::string &s)
Definition: numu_tools.h:145
std::vector< double > FindCurveCrossings(TGraph *g, double critVal)
Intended for use on the output of Profile.
Definition: Fit.cxx:232
const double sin_rhc_ih
Definition: settings.h:29
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8
std::string extrapName
void PimpHist(TH1 *hist, Style_t linestyle, Color_t linecolor, int linewidth, Style_t markerstyle, Color_t markercolor, double markersize)
Pimp histogram once and for all.
Definition: Plots.cxx:1406
Log-likelihood scan across two parameters.
double deltamin
Definition: plot_shifts.C:10
void AddCyclicPoints(TGraph *g)
Definition: plot_contprof.C:7
string infile
const double sin_rhc
TGraph * HistoToCyclicGraph(TH1 *h)
Definition: plot_contprof.C:16
def Interpolate(x1, y1, x2, y2, yvalue)
Definition: HandyFuncs.py:218
void DrawLegendBFNull(double bfSin, double bfDm, Color_t color, Style_t style)
Definition: numu_tools.h:80
void PreliminaryBoxOpening()
Definition: numu_tools.h:187
OStream cout
Definition: OStream.cxx:6
std::string NoFC
Definition: plot_contprof.C:5
T sin(T number)
Definition: d0nt_math.hpp:132
const double sin_fhc
std::vector< Style_t > styleline
TH2 * Gaussian90Percent2D(const FrequentistSurface &s)
Up-value surface for 90% confidence in 2D in gaussian approximation.
double deltamax
Definition: plot_shifts.C:10
enum BeamMode kViolet
void plot_contprof(std::string extrapName="extrap", bool usecosmics=true, bool systematics=true, bool nh=true, bool realdata=true)
Definition: plot_contprof.C:31
TFile * file
Definition: cellShifts.C:17
bool systematics
Definition: fnexvscaf.C:31
std::string dataName
const double sin_rhcfhc
enum BeamMode kBlue
def entry(str)
Definition: HTMLTools.py:26
enum BeamMode string