prob_biprob_pedagogical.C
Go to the documentation of this file.
3 #include "CAFAna/Core/IFitVar.h"
4 #include "CAFAna/Fit/Fit.h"
5 #include "CAFAna/Vars/FitVars.h"
6 
9 #include "OscLib/IOscCalc.h"
10 #include "Utilities/func/MathUtil.h"
11 
12 using namespace ana;
13 
14 #include "TFile.h"
15 #include "TH2.h"
16 #include "TMarker.h"
17 #include "TCanvas.h"
18 #include "TGraph.h"
19 #include "TLatex.h"
20 #include "TLegend.h"
21 #include "TColor.h"
22 #include "TStyle.h"
23 #include "TPaveText.h"
24 
25 #include <iostream>
26 #include <iomanip>
27 
28 
29 TCanvas * ProbabilityCanvas(double maxprob, bool isFHC, TString title=""){
30  maxprob=maxprob*100;
31  auto c1= new TCanvas(UniqueName().c_str(), UniqueName().c_str(), 700, 500);
32  c1->SetLeftMargin(0.15);
33  c1->SetRightMargin(0.10);
34  c1->SetBottomMargin(0.15);
35  c1->SetFillStyle(0);
36  TH2* axes = new TH2F(UniqueName().c_str(), ";Neutrino energy (GeV)",
37  20, 0, 5, 100, 0, maxprob);
38  axes->SetTitle(title);
39  TString ystr = "P#left(#nu_{#mu}#rightarrow#nu_{e}#right) %";
40  if (!isFHC) ystr = "P#left(#bar{#nu}_{#mu}#rightarrow#bar{#nu}_{e}#right) %";
41 
42  axes->GetYaxis()->SetTitle(ystr);
43  axes->GetXaxis()->CenterTitle();
44  axes->GetYaxis()->CenterTitle();
45 
46  axes->GetXaxis()->SetTitleSize(0.9*kBlessedTitleFontSize);
47  axes->GetYaxis()->SetTitleSize(0.9*kBlessedTitleFontSize);
48  axes->GetXaxis()->SetLabelSize(kBlessedLabelFontSize);
49  axes->GetYaxis()->SetLabelSize(kBlessedLabelFontSize);
50  axes->GetXaxis()->SetTitleOffset(0.9);
51  axes->GetYaxis()->SetTitleOffset(0.8);
52  axes->Draw();
53 
54  return c1;
55 }
56 
57 TCanvas * BiprobabilityCanvas(double maxprob = 0.08, TString title=""){
58  maxprob=maxprob*100;
59  auto c1= new TCanvas(UniqueName().c_str(), UniqueName().c_str(), 500, 500);
60  c1->SetLeftMargin(0.15);
61  c1->SetRightMargin(0.10);
62  c1->SetBottomMargin(0.15);
63  c1->SetFillStyle(0);
64  TH2* axes = new TH2F(UniqueName().c_str(), ";P_{#mue};P_{#bar{#mu}#bar{e}}",
65  100, 0, maxprob, 100, 0, maxprob);
66  axes->SetTitle(title);
67 
68  axes->GetXaxis()->SetTitle("P#left(#nu_{#mu}#rightarrow#nu_{e}#right) %");
69  axes->GetYaxis()->SetTitle("P#left(#bar{#nu}_{#mu}#rightarrow#bar{#nu}_{e}#right) %");
70  axes->GetXaxis()->CenterTitle();
71  axes->GetYaxis()->CenterTitle();
72 
73  axes->GetXaxis()->SetTitleSize(0.9*kBlessedTitleFontSize);
74  axes->GetYaxis()->SetTitleSize(0.9*kBlessedTitleFontSize);
75  axes->GetXaxis()->SetLabelSize(kBlessedLabelFontSize);
76  axes->GetYaxis()->SetLabelSize(kBlessedLabelFontSize);
77  axes->GetXaxis()->SetTitleOffset(0.9);
78  axes->GetYaxis()->SetTitleOffset(0.8);
79  axes->Draw();
80 
81  TGraph* one = new TGraph;
82  one->SetPoint(0, 0, 0);
83  one->SetPoint(1, maxprob, maxprob);
84  one->SetLineWidth(2);
85 // one->SetLineStyle(7);
86  one->SetLineColor(kGray);
87 // one->Draw("l");
88  return c1;
89 }
90 
91 TMarker * GetMarker_dCP (int delta, Int_t color)
92 {
93  TMarker * mark = new TMarker;
94  mark->SetMarkerColor(color);
95  Int_t style;
96  if(delta==0) style = kOpenCircle;
97  if(delta==1) style = kFullCircle;
98  if(delta==2) style = kOpenSquare;
99  if(delta==3) style = kFullSquare;
100  mark->SetMarkerStyle(style);
101  return mark;
102 }
103 
105  const bool isFHC,
106  Int_t color=1, Int_t style = kSolid)
107 {
108  gStyle->SetLineStyleString(11,"8 16");
109 
110  int pdgfrom = (isFHC ? 14:-14);
111  int pdgto = (isFHC ? 12:-12);
112  double scale = 100.;
113  TGraph* gmue = new TGraph();
114  for(double E = .25; E < 5.1; E += .0025){
115  const double Pmue = calc->P(pdgfrom, pdgto, E);
116  gmue->SetPoint(gmue->GetN(),E,Pmue*scale);
117  }
118  gmue->SetLineWidth(2);
119  gmue->SetLineColor(color);
120  gmue->SetLineStyle(style);
121  return gmue;
122 }
123 
124 
126  int maxDegree = 360,
127  TString label="", Int_t color=1, Int_t style = kSolid,
128  bool markers=true)
129 {
130  double sc=100;
131  TGraph* g = new TGraph;
132  double avgx = 0, avgy = 0;
133 
134  for(int dIdx = 0; dIdx <= maxDegree; ++dIdx){
135  double delta = dIdx*2./360.;
136  calc->SetdCP(delta*M_PI);
137  const double P = calc->P(14, 12, E)*sc;
138  const double Pbar = calc->P(-14, -12, E)*sc;
139  g->SetPoint(g->GetN(), P, Pbar);
140 
141  if(markers){
142  if(dIdx%90==0)
143  GetMarker_dCP(dIdx/90,color)->DrawMarker(P,Pbar);
144  }
145  avgx += P;
146  avgy += Pbar;
147  }
148  avgx=avgx/100.;
149  avgy=avgy/100.;
150  TLatex* ltx = new TLatex(avgx, avgy,label);
151  ltx->SetTextAlign(22);
152  ltx->SetTextSize(0.04);
153  ltx->SetTextColor(color);
154  ltx->Draw();
155 
156  g->SetLineWidth(2);
157  g->SetLineColor(color);
158  g->SetLineStyle(style);
159  g->Draw("l");
160  return g;
161 }
162 TLegend * DefaultLegend(double x1, double y1,double x2, double y2)
163 {
164  auto leg = new TLegend(x1,y1,x2,y2);
165  leg->SetFillStyle(0);
166  leg->SetTextSize(0.75*kBlessedLabelFontSize);
167  return leg;
168 }
169 
170 TLegend * Legend_dCP(double x1, double y1,double x2, double y2)
171 {
172  auto leg = new TLegend(x1,y1,x2,y2);
173  leg->SetFillStyle(0);
174  leg->SetTextSize(0.75*kBlessedLabelFontSize);
175  leg->AddEntry(GetMarker_dCP(0,1),"#delta=0","p");
176  leg->AddEntry(GetMarker_dCP(1,1),"#delta=#pi/2","p");
177  leg->AddEntry(GetMarker_dCP(2,1),"#delta=#pi","p");
178  leg->AddEntry(GetMarker_dCP(3,1),"#delta=3#pi/2","p");
179  leg->SetNColumns(2);
180  return leg;
181 }
182 
183 TLatex * HieLabel(int hie, Int_t color, double x, double y)
184 {
185  auto ltx = new TLatex();
186  ltx->SetTextSize(0.75*kBlessedLabelFontSize);
187  ltx->SetTextColor(color);
188  ltx->SetTextAlign(22);
189  if(hie>0) ltx->DrawLatexNDC(x,y,"#Deltam_{32}^{2}>0");
190  if(hie<0) ltx->DrawLatexNDC(x,y,"#Deltam_{32}^{2}<0");
191 
192  return ltx;
193 }
194 
195 TPaveText * PaveParams (std::vector<TString> txts,
196  double x1, double y1, double x2, double y2)
197 {
198  auto pave = new TPaveText(x1,y1,x2,y2,"NDC NB");
199  pave->SetTextAlign(12);
200  pave->SetFillStyle(0);
201  pave->SetLineColorAlpha(kWhite,0);
202  pave->SetTextSize(0.7*kBlessedLabelFontSize);
203  for (auto txt:txts){
204  pave->AddText(txt);
205  }
206  return pave;
207 }
208 
209 TPaveText * PaveParams (double x1, double y1, double x2, double y2)
210 {
211  std::vector <TString> txts = {
212  "sin^{2}2#theta_{13}=0.085",
213  "#Deltam_{32}^{2}=2.67#times10^{-3}eV^{2}" ,
214  "sin^{2}#theta_{23}=0.404,0.623"
215  };
216  auto pave = PaveParams(txts, x1,y1,x2,y2);
217  return pave;
218 }
219 
220 
222 {
223  double P, Pbar;
224  double E=2.;
225  std::vector <TString> txts;
226 
227 // Biprobability canvas
228  auto c_biprob = BiprobabilityCanvas(0.085,"NOvA: L=810 km, E=2.0 GeV");
229  auto c_prob_f = ProbabilityCanvas(0.085,true,"NOvA: L=810 km");
230  auto c_prob_r = ProbabilityCanvas(0.085,false,"NOvA: L=810 km");
231 
232  c_biprob->Print("plots_ped/plot_pedag_biprob_0.pdf");
233  c_prob_f->Print("plots_ped/plot_pedag_prob_f_0.pdf");
234  c_prob_r->Print("plots_ped/plot_pedag_prob_r_0.pdf");
235 
236 // Add NH 0.5 0 no matter
237  auto calc = DefaultOscCalc();
238  calc->SetRho(0);
239  txts = {"No matter effects",
240  "sin^{2}2#theta_{13}=0.085",
241  "|#Deltam_{32}^{2}|=2.44#times10^{-3}eV^{2}",
242  "sin^{2}#theta_{23}=0.5"};
243 
244  auto leg =DefaultLegend(0.63,0.60,0.89, 0.68);
245 
246  P = calc->P(14, 12, E)*100.;
247  Pbar = calc->P(-14, -12, E)*100.;
248  c_prob_f->cd();
249  auto gr1 = TheoryLine_E(calc, true, kPrimColorNH);
250  gr1->Draw("same");
251  GetMarker_dCP(0,kPrimColorNH)->DrawMarker(E,P);
252  PaveParams(txts, 0.63,0.68,0.89,0.885)->Draw();
253  leg->AddEntry(gr1->Clone(),"NH #delta=0","l");
254  leg->Draw();
255 
256  c_prob_r->cd();
257  TheoryLine_E(calc, false, kPrimColorNH)->Draw("same");
258  GetMarker_dCP(0,kPrimColorNH)->DrawMarker(E,Pbar);
259  PaveParams(txts, 0.63,0.68,0.89,0.885)->Draw();
260  leg->Draw();
261 
262  c_biprob->cd();
263  GetMarker_dCP(0,kPrimColorNH)->DrawMarker(P,Pbar);
264  Legend_dCP(0.16,0.16,0.5,0.27)->Draw();
265  PaveParams(txts, 0.53,0.68,0.89,0.885)->Draw();
266 
267  c_biprob->Print("plots_ped/plot_pedag_biprob_1.pdf");
268  c_prob_f->Print("plots_ped/plot_pedag_prob_f_1.pdf");
269  c_prob_r->Print("plots_ped/plot_pedag_prob_r_1.pdf");
270 
271 // Add IH 0.5 0 no matter
272 
273  calc->SetDmsq32(-1*fabs(calc->GetDmsq32()));
274 // calc->SetDmsq32(-2.49E-3);
275  P = calc->P(14, 12, E)*100.;
276  Pbar = calc->P(-14, -12, E)*100.;
277  c_prob_f->cd();
278  gr1 = TheoryLine_E(calc, true, kPrimColorIH);
279  gr1->Draw("same");
280  GetMarker_dCP(0,kPrimColorIH)->DrawMarker(E,P);
281  leg->SetY1NDC(0.58);
282  leg->AddEntry(gr1->Clone(),"IH #delta=0","l");
283  gPad->Modified();
284 
285  c_prob_r->cd();
286  TheoryLine_E(calc, false, kPrimColorIH)->Draw("same");
287  GetMarker_dCP(0,kPrimColorIH)->DrawMarker(E,Pbar);
288  gPad->Modified();
289 
290  c_biprob->cd();
291  GetMarker_dCP(0,kPrimColorIH)->DrawMarker(P,Pbar);
292 
293  c_biprob->Print("plots_ped/plot_pedag_biprob_2.pdf");
294  c_prob_f->Print("plots_ped/plot_pedag_prob_f_2.pdf");
295  c_prob_r->Print("plots_ped/plot_pedag_prob_r_2.pdf");
296 
297 
298 // Add NH IH 0.5 pi/2 no matter
299  calc->SetdCP(0.5*M_PI);
300  P = calc->P(14, 12, E)*100.;
301  Pbar = calc->P(-14, -12, E)*100.;
302  c_prob_f->cd();
303  TheoryLine_E(calc, true, kPrimColorIH,11)->Draw("same");
304  GetMarker_dCP(1,kPrimColorIH)->DrawMarker(E,P);
305 
306  c_prob_r->cd();
307  TheoryLine_E(calc, false, kPrimColorIH,11)->Draw("same");
308  GetMarker_dCP(1,kPrimColorIH)->DrawMarker(E,Pbar);
309 
310  c_biprob->cd();
311  TheoryEllipse_dCP(calc, 2, 90, "",kPrimColorIH,kSolid,true)->Draw("same");
312 
313  calc->SetDmsq32(fabs(calc->GetDmsq32()));
314  P = calc->P(14, 12, E)*100.;
315  Pbar = calc->P(-14, -12, E)*100.;
316 
317  c_prob_f->cd();
318  TheoryLine_E(calc, true, kPrimColorNH,11)->Draw("same");
319  GetMarker_dCP(1,kPrimColorNH)->DrawMarker(E,P);
320 
321  TGraph* dummy = new TGraph();
322  dummy->SetLineWidth(2); dummy->SetLineColor(kGray+2);
323  dummy->SetLineStyle(11);
324  leg->AddEntry(dummy->Clone(),"#delta=#pi/2","l");
325  leg->SetY1NDC(0.54);
326  gPad->Modified();
327 
328  c_prob_r->cd();
329  TheoryLine_E(calc, false, kPrimColorNH,11)->Draw("same");
330  GetMarker_dCP(1,kPrimColorNH)->DrawMarker(E,Pbar);
331  gPad->Modified();
332 
333  c_biprob->cd();
334  TheoryEllipse_dCP(calc, 2, 90, "",kPrimColorNH,kSolid,true)->Draw("same");
335 
336  c_biprob->Print("plots_ped/plot_pedag_biprob_3.pdf");
337  c_prob_f->Print("plots_ped/plot_pedag_prob_f_3.pdf");
338  c_prob_r->Print("plots_ped/plot_pedag_prob_r_3.pdf");
339 
340 // Add NH IH 0.5 pi no matter
341  calc->SetdCP(1.*M_PI);
342  P = calc->P(14, 12, E)*100.;
343  Pbar = calc->P(-14, -12, E)*100.;
344  c_prob_f->cd();
345  TheoryLine_E(calc, true, kPrimColorNH,9)->Draw("same");
346  GetMarker_dCP(2,kPrimColorNH)->DrawMarker(E,P);
347 
348  c_prob_r->cd();
349  TheoryLine_E(calc, false, kPrimColorNH,9)->Draw("same");
350  GetMarker_dCP(2,kPrimColorNH)->DrawMarker(E,Pbar);
351 
352  c_biprob->cd();
353  TheoryEllipse_dCP(calc, 2, 180, "",kPrimColorNH,kSolid,true)->Draw("same");
354 
355  calc->SetDmsq32(-fabs(calc->GetDmsq32()));
356  P = calc->P(14, 12, E)*100.;
357  Pbar = calc->P(-14, -12, E)*100.;
358 
359  c_prob_f->cd();
360  TheoryLine_E(calc, true, kPrimColorIH,9)->Draw("same");
361  GetMarker_dCP(2,kPrimColorIH)->DrawMarker(E,P);
362 
363  dummy->SetLineStyle(9);
364  leg->AddEntry(dummy->Clone(),"#delta=#pi","l");
365  leg->SetY1NDC(0.5);
366  gPad->Modified();
367 
368  c_prob_r->cd();
369  TheoryLine_E(calc, false, kPrimColorIH,9)->Draw("same");
370  GetMarker_dCP(2,kPrimColorIH)->DrawMarker(E,Pbar);
371  gPad->Modified();
372 
373  c_biprob->cd();
374  TheoryEllipse_dCP(calc, 2, 180, "",kPrimColorIH,kSolid,true)->Draw("same");
375 
376  c_biprob->Print("plots_ped/plot_pedag_biprob_4.pdf");
377  c_prob_f->Print("plots_ped/plot_pedag_prob_f_4.pdf");
378  c_prob_r->Print("plots_ped/plot_pedag_prob_r_4.pdf");
379 
380 
381  // Add NH IH 0.5 ellipse no matter
382  calc->SetDmsq32(+fabs(calc->GetDmsq32()));
383  calc->SetdCP(1.5*M_PI);
384  P = calc->P(14, 12, E)*100.;
385  Pbar = calc->P(-14, -12, E)*100.;
386  c_prob_f->cd();
387  TheoryLine_E(calc, true, kPrimColorNH,3)->Draw("same");
388  GetMarker_dCP(3,kPrimColorNH)->DrawMarker(E,P);
389 
390  c_prob_r->cd();
391  TheoryLine_E(calc, false, kPrimColorNH,3)->Draw("same");
392  GetMarker_dCP(3,kPrimColorNH)->DrawMarker(E,Pbar);
393 
394  c_biprob->cd();
395  TheoryEllipse_dCP(calc, 2, 360, "",kPrimColorNH,kSolid,true)->Draw("same");
396 
397  calc->SetDmsq32(-fabs(calc->GetDmsq32()));
398  calc->SetdCP(1.5*M_PI);
399 
400  P = calc->P(14, 12, E)*100.;
401  Pbar = calc->P(-14, -12, E)*100.;
402 
403  c_prob_f->cd();
404  TheoryLine_E(calc, true, kPrimColorIH,3)->Draw("same");
405  GetMarker_dCP(3,kPrimColorIH)->DrawMarker(E,P);
406 
407  dummy->SetLineStyle(3);
408  leg->AddEntry(dummy->Clone(),"#delta=3#pi/2","l");
409  leg->SetY1NDC(0.46);
410  gPad->Modified();
411 
412  c_prob_r->cd();
413  TheoryLine_E(calc, false, kPrimColorIH,3)->Draw("same");
414  GetMarker_dCP(3,kPrimColorIH)->DrawMarker(E,Pbar);
415  gPad->Modified();
416 
417  c_biprob->cd();
418  TheoryEllipse_dCP(calc, 2, 360, "",kPrimColorIH,kSolid,true)->Draw("same");
419 
420  c_biprob->Print("plots_ped/plot_pedag_biprob_5.pdf");
421  c_prob_f->Print("plots_ped/plot_pedag_prob_f_5.pdf");
422  c_prob_r->Print("plots_ped/plot_pedag_prob_r_5.pdf");
423 
424  // Remove no matter add matter
425  c_biprob = BiprobabilityCanvas(0.085,"NOvA: L=810 km, E=2.0 GeV");
426  c_prob_f = ProbabilityCanvas(0.085,true,"NOvA: L=810 km");
427  c_prob_r = ProbabilityCanvas(0.085,false,"NOvA: L=810 km");
428  calc = DefaultOscCalc();
429  txts = {
430  "sin^{2}2#theta_{13}=0.085",
431  "|#Deltam_{32}^{2}|=2.44#times10^{-3}eV^{2}",
432  "sin^{2}#theta_{23}=0.5"};
433 
434  for(int hie:{+1,-1}){
435  int color = (hie>0? kPrimColorNH:kPrimColorIH);
436  for(int del:{0,1,/*2,*/3}){
437  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
438  calc->SetdCP(del*M_PI/2);
439  P = calc->P(14, 12, E)*100.;
440  Pbar = calc->P(-14, -12, E)*100.;
441  c_prob_f->cd();
442  int style = kSolid;
443  if(del==1) style = 11;
444  if(del==2) style = 9;
445  if(del==3) style = 3;
446  TheoryLine_E(calc, true, color,style)->Draw("same");
447  GetMarker_dCP(del,color)->DrawMarker(E,P);
448 
449  c_prob_r->cd();
450  TheoryLine_E(calc, false, color,style)->Draw("same");
451  GetMarker_dCP(del,color)->DrawMarker(E,Pbar);
452  }
453  c_biprob->cd();
454  TheoryEllipse_dCP(calc, 2, 360, "",color,kSolid,true)->Draw("same");
455  }
456  leg->Clear();
457  dummy->SetLineStyle(kSolid);
458  dummy->SetLineColor(kPrimColorNH);leg->AddEntry(dummy->Clone(),"NH #delta=0","l");
459  dummy->SetLineColor(kPrimColorIH);leg->AddEntry(dummy->Clone(),"IH #delta=0","l");
460  dummy->SetLineColor(kGray+2);
461  dummy->SetLineStyle(11);leg->AddEntry(dummy->Clone(),"#delta=#pi/2","l");
462  dummy->SetLineStyle( 3);leg->AddEntry(dummy->Clone(),"#delta=3#pi/2","l");
463 
464  for(auto c:{c_biprob, c_prob_f, c_prob_r}){
465  c->cd();
466  if(c==c_biprob){
467  PaveParams(txts, 0.53,0.68,0.89,0.885)->Draw();
468  Legend_dCP(0.16,0.16,0.5,0.27)->Draw();
469  }
470  else{
471  PaveParams(txts, 0.63,0.68,0.89,0.885)->Draw();
472  leg->Draw();
473  }
474  }
475  c_biprob->Print("plots_ped/plot_pedag_biprob_6.pdf");
476  c_prob_f->Print("plots_ped/plot_pedag_prob_f_6.pdf");
477  c_prob_r->Print("plots_ped/plot_pedag_prob_r_6.pdf");
478 
479  // Remove 0.5 add 0.4 0.6
480  c_prob_f = ProbabilityCanvas(0.085,true,"NOvA: L=810 km");
481  c_prob_r = ProbabilityCanvas(0.085,false,"NOvA: L=810 km");
482  txts = {
483  "sin^{2}2#theta_{13}=0.085",
484  "|#Deltam_{32}^{2}|=2.44#times10^{-3}eV^{2}",
485 // "sin^{2}#theta_{23}=0.404,0.623"
486  "#delta_{CP}=0"
487  };
488 
489  calc = DefaultOscCalc();
490 
491  for(int hie:{+1,-1}){
492  for(double ssth23:{0.404,0.5, 0.623}) {
493  int color = (hie>0? kPrimColorNH:kPrimColorIH);
494  int style = kSolid;
495  if(ssth23<0.45) {style = 2; color = color -1;}
496  if(ssth23>0.6) {style = 9; color = color -1;}
497 
498  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
500  P = calc->P(14, 12, E)*100.;
501  Pbar = calc->P(-14, -12, E)*100.;
502  c_prob_f->cd();
503  TheoryLine_E(calc, true, color,style)->Draw("same");
504 
505  c_prob_r->cd();
506  TheoryLine_E(calc, false, color,style)->Draw("same");
507  }//end th23
508  }//end hie
509 
510  leg->Clear();
511  dummy->SetLineStyle(kSolid);
512  dummy->SetLineColor(kPrimColorNH);leg->AddEntry(dummy->Clone(),
513  "NH sin^{2}#theta_{23}=0.5","l");
514  dummy->SetLineColor(kPrimColorIH);leg->AddEntry(dummy->Clone(),
515  "IH sin^{2}#theta_{23}=0.5","l");
516  dummy->SetLineColor(kGray+2);
517  dummy->SetLineStyle(2);leg->AddEntry(dummy->Clone(),"sin^{2}#theta_{23}=0.404","l");
518  dummy->SetLineStyle(9);leg->AddEntry(dummy->Clone(),"sin^{2}#theta_{23}=0.623","l");
519 
520  for(auto c:{c_prob_f, c_prob_r}){
521  c->cd();
522  PaveParams(txts, 0.63,0.68,0.89,0.885)->Draw();
523  leg->Draw();
524  }
525 
526  c_biprob = BiprobabilityCanvas(0.085,"NOvA: L=810 km, E=2.0 GeV");
527  txts = {
528  "sin^{2}2#theta_{13}=0.085",
529  "|#Deltam_{32}^{2}|=2.44#times10^{-3}eV^{2}",
530  "sin^{2}#theta_{23}=0.404,0.623"
531  };
532  PaveParams(txts, 0.53,0.68,0.89,0.885)->Draw();
533  Legend_dCP(0.16,0.16,0.5,0.27)->Draw();
534 
535  calc = DefaultOscCalc();
536  for(int hie:{+1,-1}){
537  for(double ssth23:{0.404,0.623}) {
538  int color = (hie>0? kPrimColorNH:kPrimColorIH);
539  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
541  TheoryEllipse_dCP(calc, 2, 360,
542  TString::Format("%.3f",ssth23),
543  color,kSolid,true)->Draw("same");
544 
545  }
546  }
547  c_biprob->Print("plots_ped/plot_pedag_biprob_7.pdf");
548  c_prob_f->Print("plots_ped/plot_pedag_prob_f_7.pdf");
549  c_prob_r->Print("plots_ped/plot_pedag_prob_r_7.pdf");
550 
551 
552  // Switch to higher dmsq
553  // Remove 0.5 add 0.4 0.6
554  c_prob_f = ProbabilityCanvas(0.085,true,"NOvA: L=810 km");
555  c_prob_r = ProbabilityCanvas(0.085,false,"NOvA: L=810 km");
556  txts = {
557  "sin^{2}2#theta_{13}=0.085",
558  "|#Deltam_{32}^{2}|=2.67#times10^{-3}eV^{2}",
559 // "sin^{2}#theta_{23}=0.404,0.623"
560  "#delta_{CP}=0"
561  };
562 
563  calc = DefaultOscCalc();
564 // calc->SetDmsq32(2.67e-3);
565 
566  for(int hie:{+1,-1}){
567  for(double ssth23:{0.404,0.5, 0.623}) {
568 
569  int style = kSolid;
570  for(double dmsq:{2.44e-3, 2.67e-3}){
571  calc->SetDmsq32(dmsq);
572  int color = (hie>0? kPrimColorNH:kPrimColorIH);
573  if(ssth23<0.45) {style = 2; color = color -1;}
574  if(ssth23>0.6) {style = 9; color = color -1;}
575 
576  if(dmsq<2.5e-3) color = kGray;
577 
578  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
580  P = calc->P(14, 12, E)*100.;
581  Pbar = calc->P(-14, -12, E)*100.;
582  c_prob_f->cd();
583  TheoryLine_E(calc, true, color,style)->Draw("same");
584 
585  c_prob_r->cd();
586  TheoryLine_E(calc, false, color,style)->Draw("same");
587  }//end dmsq
588  }//end th23
589  }//end hie
590 
591  leg->Clear();
592  dummy->SetLineStyle(kSolid);
593  dummy->SetLineColor(kPrimColorNH);leg->AddEntry(dummy->Clone(),
594  "NH sin^{2}#theta_{23}=0.5","l");
595  dummy->SetLineColor(kPrimColorIH);leg->AddEntry(dummy->Clone(),
596  "IH sin^{2}#theta_{23}=0.5","l");
597  dummy->SetLineColor(kGray+2);
598  dummy->SetLineStyle(2);leg->AddEntry(dummy->Clone(),"sin^{2}#theta_{23}=0.404","l");
599  dummy->SetLineStyle(9);leg->AddEntry(dummy->Clone(),"sin^{2}#theta_{23}=0.623","l");
600 
601  for(auto c:{c_prob_f, c_prob_r}){
602  c->cd();
603  PaveParams(txts, 0.63,0.68,0.89,0.885)->Draw();
604  leg->Draw();
605  }
606 
607  c_biprob = BiprobabilityCanvas(0.085,"NOvA: L=810 km, E=2.0 GeV");
608  txts = {
609  "sin^{2}2#theta_{13}=0.085",
610  "|#Deltam_{32}^{2}|=2.67#times10^{-3}eV^{2}",
611  "sin^{2}#theta_{23}=0.404,0.623"
612  };
613  PaveParams(txts, 0.53,0.68,0.89,0.885)->Draw();
614  Legend_dCP(0.16,0.16,0.5,0.27)->Draw();
615 
616  calc = DefaultOscCalc();
617  calc->SetDmsq32(2.67e-3);
618  for(int hie:{+1,-1}){
619 
620  for(double ssth23:{0.404,0.623}) {
621  for(double dmsq:{2.44e-3, 2.67e-3}){
622  calc->SetDmsq32(dmsq);
623  int color = (hie>0? kPrimColorNH:kPrimColorIH);
624  if(dmsq<2.5e-3) color = kGray+1;
625 
626  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
628  TheoryEllipse_dCP(calc, 2, 360,
629  TString::Format("%.3f",ssth23),
630  color,kSolid,true)->Draw("same");
631  }
632  }
633  }
634  c_biprob->Print("plots_ped/plot_pedag_biprob_8.pdf");
635  c_prob_f->Print("plots_ped/plot_pedag_prob_f_8.pdf");
636  c_prob_r->Print("plots_ped/plot_pedag_prob_r_8.pdf");
637 
638 
639  //Hyperspace!
640 
641  for(int i=0; i<=10; i++){
642  c_biprob = BiprobabilityCanvas(0.09,"NOvA: L=810 km, E=2.0 GeV");
643  double dmsq = (2.4+(2.75-2.4)/10.*i);
644  txts = {
645  "sin^{2}2#theta_{13}=0.085#pm0.005",
646  TString::Format("|#Deltam_{32}^{2}|=%.2f#times10^{-3}eV^{2}",dmsq),
647  "sin^{2}#theta_{23}=0.3-0.7"
648  };
649  PaveParams(txts, 0.51,0.68,0.89,0.885)->Draw();
650  Legend_dCP(0.16,0.16,0.5,0.27)->Draw();
651 
652  calc = DefaultOscCalc();
653  for(int hie:{+1,-1}){
654  for(double ssth23:{0.404,0.5,0.623,0.42,0.44,0.46,0.48,0.52,0.54,0.56,0.58,0.60,0.3,0.32,0.34,0.36,0.38,0.64,0.66,0.68,0.7}) {
655  for(double ss2th13:{0.080,0.085,0.090}){
656  int color = (hie>0? kPrimColorNH:kPrimColorIH);
657  calc->SetDmsq32(dmsq*1e-3);
658  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
661  TheoryEllipse_dCP(calc, 2, 360,
662  "",
663  color,kSolid,true)->Draw("same");
664  }
665  }
666  }
667 
668  c_biprob->Print((TString)"plots_ped/plot_pedag_biprob_hyp_"+std::to_string(i)+".pdf");
669  }//end i
670 
671 }
const Color_t kPrimColorIH
Definition: Style.h:64
const Color_t kPrimColorNH
Definition: Style.h:61
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
double ssth23
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
Float_t y1[n_points_granero]
Definition: compare.C:5
double delta
Definition: runWimpSim.h:98
TPaveText * PaveParams(std::vector< TString > txts, double x1, double y1, double x2, double y2)
Float_t x1[n_points_granero]
Definition: compare.C:5
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Definition: FitVars.cxx:48
virtual double P(int flavBefore, int flavAfter, double E) override
E in GeV; flavors as PDG codes (so, neg==>antinu)
Definition: OscCalcDumb.h:21
osc::OscCalcDumb calc
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
#define M_PI
Definition: SbMath.h:34
TGraph * gr1
Definition: compare.C:42
list markers
Definition: styles.py:7
TLegend * Legend_dCP(double x1, double y1, double x2, double y2)
TGraph * TheoryEllipse_dCP(osc::IOscCalcAdjustable *calc, double E=2, int maxDegree=360, TString label="", Int_t color=1, Int_t style=kSolid, bool markers=true)
const char * label
#define P(a, b, c, d, e, x)
TCanvas * BiprobabilityCanvas(double maxprob=0.08, TString title="")
Double_t scale
Definition: plot.C:25
TLegend * DefaultLegend(double x1, double y1, double x2, double y2)
TCanvas * ProbabilityCanvas(double maxprob, bool isFHC, TString title="")
Float_t E
Definition: plot.C:20
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
TLatex * HieLabel(int hie, Int_t color, double x, double y)
static bool isFHC
TMarker * GetMarker_dCP(int delta, Int_t color)
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
double ss2th13
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
c1
Definition: demo5.py:24
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
const Float_t kBlessedLabelFontSize
Definition: Style.h:90
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13
auto one()
Definition: PMNS.cxx:49
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
Float_t e
Definition: plot.C:35
const Float_t kBlessedTitleFontSize
Definition: Style.h:89
void prob_biprob_pedagogical()
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition: Utilities.cxx:30
TGraph * TheoryLine_E(osc::IOscCalcAdjustable *calc, const bool isFHC, Int_t color=1, Int_t style=kSolid)
virtual void SetdCP(const T &dCP)=0