nuebar_signif.C
Go to the documentation of this file.
3 #include "CAFAna/Fit/Fit.h"
12 #include "CAFAna/FC/FCSurface.h"
16 #include "CAFAna/Vars/FitVars.h"
17 #include "OscLib/IOscCalc.h"
19 
20 #include "TCanvas.h"
21 #include "TBox.h"
22 #include "TColor.h"
23 #include "TGraph.h"
24 #include "TVectorD.h"
25 #include "TF1.h"
26 #include "TLegend.h"
27 #include "TText.h"
28 #include "TLatex.h"
29 #include "TPad.h"
30 #include "TLine.h"
31 #include "TMarker.h"
32 #include "TStyle.h"
33 #include "TSystem.h"
34 #include "TGaxis.h"
35 
36 #include <algorithm>
37 #include <vector>
38 #include <string>
39 
40 using namespace ana;
41 
42 void nuebar_signif(int num = 1, bool throwexp = true, bool corrSysts = false,
43  TString options="fake2017_part1")
44 {
45 
46  bool fake2017 = options.Contains("fake2017");
47  bool realData = options.Contains("realData");
48  bool fake2018 = options.Contains("fake2018");
49 
50  bool part1 = options.Contains("part1");
51  bool part2 = options.Contains("part2");
52 
53  auto filename = "throw_exp_nuesignif_"+options + (corrSysts?"_with_syst_":"_just_stat_")+std::to_string(num)+".root";
54 
55  //////////////////////////////////////////////////
56  // Load Nue and Numu experiments
57  //////////////////////////////////////////////////
58  //need numu only for prestage seeds
59  std::vector <const IPrediction * > preds;
60  std::vector <std::pair <TH1D*, double > > cosmics;
61  std::vector <Spectrum * > data;
62  std::vector <const IExperiment * > expts;
63 
64  auto calc_fake = DefaultOscCalc();
65  double th23, dmsq, dcp;
66  if(fake2017) {th23 = 0.51; dmsq = 2.44e-3; dcp = 1.21;}
67  //SetFakeCalc(calc_fake, 0.51, 2.44e-3, 1.21);
68  // if(fake2018) {th23 = 0.58; dmsq = 2.51e-3; dcp = 0.17;}
69  //SetFakeCalc(calc_fake, 0.58, 2.51e-3, 0.17);
70  //else if(!realData) {std::cerr << "need setting for data\n"; exit(1);} //don't forget about it later
71 
72  preds.push_back(GetNuePrediction2018("prop", DefaultOscCalc(), corrSysts, "rhc", false)); //make decomp choosable?
73  cosmics.push_back(GetNueCosmics2018("rhc"));
74  data.push_back(GetNueData2018("rhc"));
75 
76 /// Start with part 1 to get the norm coef.
77  if(part1){
78  if(throwexp) {
79 
80  TFile* file = new TFile(filename,"recreate");
81 
82  TFile* histFHCNH = new TFile("/nova/ana/nu_e_ana/Ana2018/Results/FHCOnly/contours/delta_th23/syst/hist_contours_2018_joint_realData_FHCOnly_onlyNHcombo_systs.root","read");
83  TFile* histFHCIH = new TFile("/nova/ana/nu_e_ana/Ana2018/Results/FHCOnly/contours/delta_th23/syst/hist_contours_2018_joint_realData_FHCOnly_onlyIHcombo_systs.root","read");
84 
85  TH2F* histNH_pdf = new TH2F("histNH_pdf","histNH_pdf", 30, 0, 2*M_PI, 30, 0.3, 0.7);
86  TH2F* histIH_pdf = new TH2F("histIH_pdf","histIH_pdf", 30, 0, 2*M_PI, 30, 0.3, 0.7);
87 
88  auto histNH = (TH2F*)histFHCNH->Get("delta_th23_NH");
89  auto histIH = (TH2F*)histFHCIH->Get("delta_th23_IH");
90 
91  for(int i = 1; i<=30; i++){
92  for(int j = 1; j<=30; j++){
93  double binNH = histNH->GetBinContent(i,j);
94  histNH_pdf->SetBinContent(i, j, exp(-binNH/2.0));
95  double binIH = histIH->GetBinContent(i,j);
96  histIH_pdf->SetBinContent(i, j, exp(-binIH/2.0));
97  }
98  }
99 
100  new TCanvas();
101  histNH_pdf->Draw("colz");
102  gPad->Print("plots/pdf_transform_hist2d_delta_th23_nh.pdf");
103 
104  new TCanvas();
105  histIH_pdf->Draw("colz");
106  gPad->Print("plots/pdf_transform_hist2d_delta_th23_ih.pdf");
107 
108 
109  cout<<"integrals: "<<histNH_pdf->Integral()<<" and ih is "<<histIH_pdf->Integral()<<endl;
110  double sep = histNH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral());
111  cout<<"probablilty to get the NH is "<<histNH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral())<<" and to get the ih is "<<histIH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral())<<endl;
112 
113  TFile* dmsqFHC = new TFile("/nova/ana/nu_e_ana/Ana2018/Results/FHCOnly/slices/syst/hist_slices_2017_joint_realData_FHCOnlycombo_systs_dmsq_noOct.root","read");
114 
115  TH1F* histdmsqNH_pdf = new TH1F("histdmsqNH_pdf", "histdmsqNH_pdf", 60, 2e-3, 3e-3);
116  TH1F* histdmsqIH_pdf = new TH1F("histdmsqIH_pdf", "histdmsqIH_pdf", 60, -3e-3, -2e-3);
117 
118  auto histdmsqNH = (TH1F*)dmsqFHC->Get("slice_dmsq_NH");
119  auto histdmsqIH = (TH1F*)dmsqFHC->Get("slice_dmsq_IH");
120 
121  for(int i = 1; i<=60; i++){
122  double binNH = histdmsqNH->GetBinContent(i);
123  histdmsqNH_pdf->SetBinContent(i, exp(-binNH/2.0));
124  double binIH = histdmsqIH->GetBinContent(i);
125  histdmsqIH_pdf->SetBinContent(i, exp(-binIH/2.0));
126  }
127 
128  new TCanvas();
129  histdmsqNH_pdf->Draw("hist");
130  gPad->Print("plots/pdf_transform_dmsq32_nh.pdf");
131 
132  new TCanvas();
133  histdmsqIH_pdf->Draw("hist");
134  gPad->Print("plots/pdf_transform_dmsq32_ih.pdf");
135 
136  double POT = kAna2018RHCPOT;
137  int i = 0;
138 
139  for (int j = 0; j<num; j++){
140 
141  TDirectory* d = file->mkdir(("ex_"+std::to_string(j)).c_str());
142  file->cd(("ex_"+std::to_string(j)).c_str());
143 
144  TRandom3 rnd(0);
145 
146  double hie = rnd.Uniform(1);
147  cout<<"hie is "<<hie<<" hie separator is "<<sep<<endl;
148  bool isNH;
149  if(hie<sep) isNH = true;
150  else isNH = false;
151  double thisdcp, thisth23, thisdmsq, thisth13;
152  if (isNH) {
153  histNH_pdf->GetRandom2(thisdcp, thisth23);
154  thisdmsq= histdmsqNH_pdf->GetRandom();
155  }
156  else{
157  histIH_pdf->GetRandom2(thisdcp, thisth23);
158  thisdmsq = histdmsqIH_pdf->GetRandom();
159  }
160  thisth13 = rnd.Gaus(0.082, 0.004);
161 
162  calc_fake->SetdCP(thisdcp*M_PI);
163  calc_fake->SetTh23(asin(sqrt(thisth23)));
164  calc_fake->SetDmsq32(thisdmsq);
165  calc_fake->SetTh13(asin(sqrt(thisth13))/2);
166 
167  TVectorD v(4);
168  v[0] = thisdmsq;
169  v[1] = thisth23;
170  v[2] = thisdcp;
171  v[3] = thisth13;
172  v.Write((std::to_string(j)+"_osc_pars").c_str());
173  cout<<"osc pars in exp "<<j<<" are "<<thisdmsq<<" "<<thisth23<<" "<<thisdcp<<endl;
174 
175  cout<<"Set syst. shifts"<<endl;
176  auto systs = getAllAna2018Systs(kNueAna2018, true, kRHC);
177 
178  SystShifts shifts;
179  for (auto &s:systs){
180 
181  auto sh = rnd.Gaus(0, 1);
182  cout<<s->ShortName()<<"("<<sh<<"), ";
183  shifts.SetShift(s, sh);
184  TVectorD vs(1);
185  vs[0] = sh;
186  vs.Write((std::to_string(j)+"_"+s->ShortName()).c_str());
187 
188  }
189  cout<<"\n\n";
190 
191  auto tempnue = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kNuMuToNuE, Current::kCC, Sign::kNu).ToTH1(POT);
192  auto tempnuebar = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kNuMuToNuE, Current::kCC, Sign::kAntiNu).ToTH1(POT);
193  auto temptau = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kAllNuTau, Current::kCC, Sign::kBoth).ToTH1(POT);
194  auto tempbeam = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kNuEToNuE, Current::kCC, Sign::kBoth).ToTH1(POT);
195  auto tempnc = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kAll, Current::kNC, Sign::kBoth).ToTH1(POT);
196  auto tempcc = preds[i]->PredictComponentSyst(calc_fake, shifts, Flavors::kAllNuMu, Current::kCC, Sign::kBoth).ToTH1(POT);
197 
198  cout<<"mock components: nue "<< tempnue->Integral()<<" nue bar "<<tempnuebar->Integral()<<" tau "<<temptau->Integral()<<" beam "<<tempbeam->Integral()<<" nc "<<tempnc->Integral()<<" cc "<<tempcc->Integral()<<endl;
199  tempnue->Write((std::to_string(i)+"_nue").c_str());
200  tempnuebar->Write((std::to_string(i)+"_nuebar").c_str());
201  temptau->Write((std::to_string(i)+"_tau").c_str());
202  tempbeam->Write((std::to_string(i)+"_beam").c_str());
203  tempnc->Write((std::to_string(i)+"_nc").c_str());
204  tempcc->Write((std::to_string(i)+"_cc").c_str());
205 
206  }
207  }
208 
209 
210  if(!throwexp){
211 
212  TFile* file = new TFile(filename,"read");
213  int i = 0;
214 
215  calc_fake->SetdCP(1.20786*M_PI);
216  calc_fake->SetTh23(asin(sqrt(0.513445)));
217  calc_fake->SetDmsq32(2.46343e-3);
218  calc_fake->SetTh13(asin(sqrt(0.0820218))/2);
219 
220  double POT = kAna2018RHCPOT;
221  auto ws2018fhc = preds[i]->PredictComponent(calc_fake, Flavors::kNuMuToNuE, Current::kCC, Sign::kNu).ToTH1(POT);
222 
223  auto tot2018bkg = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuTau, Current::kCC, Sign::kBoth).ToTH1(POT);
224  auto beam2018 = preds[i]->PredictComponent(calc_fake, Flavors::kNuEToNuE, Current::kCC, Sign::kBoth).ToTH1(POT);
225  tot2018bkg->Add(beam2018);
226  auto nc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAll, Current::kNC, Sign::kBoth).ToTH1(POT);
227  tot2018bkg->Add(nc2018);
228  auto cc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuMu, Current::kCC, Sign::kBoth).ToTH1(POT);
229 
230  auto Nws2018fhc = ws2018fhc->Integral();
231  auto Ntot2018bkg = tot2018bkg->Integral();
232 
233  cout<<"2018 ws is "<<ws2018fhc->Integral()<<" and tot bkg is "<<tot2018bkg->Integral()<<endl;
234 
235  TH1F* ws = new TH1F("ws", "ws", 100, 0, 10);
236  TH1F* bkg = new TH1F("bkg", "bkg", 100, 0, 10);
237 
238  TH1F* ws_norm = new TH1F("wsnorm", "ws norm", 100, 0, 10);
239  TH1F* bkg_norm = new TH1F("bkgnorm", "bkg norm", 100, 0, 10);
240 
241  for (int j = 0; j<num; j++){
242 
243  auto thisws = (TH1F*)file->Get(TString::Format("ex_%s/%s_nue", std::to_string(j).c_str(), std::to_string(i).c_str()));
244 
245  auto thisbkg = (TH1F*)file->Get(TString::Format("ex_%s/%s_tau", std::to_string(j).c_str(), std::to_string(i).c_str()));
246 
247  auto thiscc = (TH1F*)file->Get(TString::Format("ex_%s/%s_cc", std::to_string(j).c_str(), std::to_string(i).c_str()));
248  thisbkg->Add(thiscc);
249  auto thisnc = (TH1F*)file->Get(TString::Format("ex_%s/%s_nc", std::to_string(j).c_str(), std::to_string(i).c_str()));
250  thisbkg->Add(thisnc);
251  auto thisbeam = (TH1F*)file->Get(TString::Format("ex_%s/%s_beam", std::to_string(j).c_str(), std::to_string(i).c_str()));
252  thisbkg->Add(thisbeam);
253 
254  auto Nws = thisws->Integral();
255  auto Nbkg = thisbkg->Integral();
256 
257  ws->Fill(Nws);
258  bkg->Fill(Nbkg);
259 
260  ws_norm->Fill(Nws/Nws2018fhc);
261  bkg_norm->Fill(Nbkg/Ntot2018bkg);
262 
263  }
264 
265  new TCanvas;
266  ws->Draw("hist");
267  gPad->Print(("plots/events_ws_"+std::to_string(num)+".pdf").c_str());
268 
269  new TCanvas;
270  bkg->Draw("hist");
271  gPad->Print(("plots/events_bkg_"+std::to_string(num)+".pdf").c_str());
272 
273  new TCanvas;
274  ws_norm->Draw("hist");
275  gPad->Print(("plots/events_ws_norm_"+std::to_string(num)+".pdf").c_str());
276 
277  new TCanvas;
278  bkg_norm->Draw("hist");
279  gPad->Print(("plots/events_bkg_norm_"+std::to_string(num)+".pdf").c_str());
280 
281  }//end !throw
282 
283 }//end the part 1
284 
285 //start with part2 to get the signif. itself
286 if(part2){
287 
288  if(throwexp){
289 
290  TFile* file = new TFile("throw_exp_nuesignif_fake2017_part1_with_syst_10000.root","read");
291  int i = 0;
292 
293  calc_fake->SetdCP(1.20786*M_PI);
294  calc_fake->SetTh23(asin(sqrt(0.513445)));
295  calc_fake->SetDmsq32(2.46343e-3);
296  calc_fake->SetTh13(asin(sqrt(0.0820218))/2);
297 
298  double POT = kAna2018RHCPOT;
299  auto ws2018fhc = preds[i]->PredictComponent(calc_fake, Flavors::kNuMuToNuE, Current::kCC, Sign::kNu).ToTH1(POT);
300 
301  auto tot2018bkg = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuTau, Current::kCC, Sign::kBoth).ToTH1(POT);
302  auto beam2018 = preds[i]->PredictComponent(calc_fake, Flavors::kNuEToNuE, Current::kCC, Sign::kBoth).ToTH1(POT);
303  tot2018bkg->Add(beam2018);
304  auto nc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAll, Current::kNC, Sign::kBoth).ToTH1(POT);
305  tot2018bkg->Add(nc2018);
306  auto cc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuMu, Current::kCC, Sign::kBoth).ToTH1(POT);
307  tot2018bkg->Add(cc2018);
308 
309  auto Nws2018fhc = ws2018fhc->Integral();
310  auto Ntot2018bkg = tot2018bkg->Integral();
311 
312  cout<<"2018 ws is "<<ws2018fhc->Integral()<<" and tot bkg is "<<tot2018bkg->Integral()<<endl;
313 
314  TH1F* ws_norm = new TH1F("wsnorm", "ws norm", 50, 0, 10);
315  TH1F* bkg_norm = new TH1F("bkgnorm", "bkg norm", 100, 0, 10);
316 
317  for (int j = 0; j<10000; j++){
318 
319  auto thisws = (TH1F*)file->Get(TString::Format("ex_%s/%s_nue", std::to_string(j).c_str(), std::to_string(i).c_str()));
320 
321  auto thisbkg = (TH1F*)file->Get(TString::Format("ex_%s/%s_tau", std::to_string(j).c_str(), std::to_string(i).c_str()));
322  auto thiscc = (TH1F*)file->Get(TString::Format("ex_%s/%s_cc", std::to_string(j).c_str(), std::to_string(i).c_str()));
323  thisbkg->Add(thiscc);
324  auto thisnc = (TH1F*)file->Get(TString::Format("ex_%s/%s_nc", std::to_string(j).c_str(), std::to_string(i).c_str()));
325  thisbkg->Add(thisnc);
326  auto thisbeam = (TH1F*)file->Get(TString::Format("ex_%s/%s_beam", std::to_string(j).c_str(), std::to_string(i).c_str()));
327  thisbkg->Add(thisbeam);
328 
329  auto Nws = thisws->Integral();
330  auto Nbkg = thisbkg->Integral();
331 
332  ws_norm->Fill(Nws/Nws2018fhc);
333  bkg_norm->Fill(Nbkg/Ntot2018bkg);
334 
335  }
336 
337  TFile* writefile = new TFile(filename,"recreate");
338 
339  auto tempnue = preds[i]->PredictComponent(calc_fake, Flavors::kNuMuToNuE, Current::kCC, Sign::kNu).ToTH1(POT);
340 
341  auto tempbkg = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuTau, Current::kCC, Sign::kBoth).ToTH1(POT);
342  auto tempbeam = preds[i]->PredictComponent(calc_fake, Flavors::kNuEToNuE, Current::kCC, Sign::kBoth).ToTH1(POT);
343  tempbkg->Add(tempbeam);
344  auto tempnc = preds[i]->PredictComponent(calc_fake, Flavors::kAll, Current::kNC, Sign::kBoth).ToTH1(POT);
345  tempbkg->Add(tempnc);
346  auto tempcc = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuMu, Current::kCC, Sign::kBoth).ToTH1(POT);
347  tempbkg->Add(tempcc);
348 
349  for (int k = 0; k<num; k++){
350 
351  auto thistempnue = (TH1*)tempnue->Clone(UniqueName().c_str());
352  auto thistempbkg = (TH1*)tempbkg->Clone(UniqueName().c_str());
353 
354  auto Nws = ws_norm->GetRandom();
355  auto Nbkg = bkg_norm->GetRandom();
356 
357  cout<<" Nws "<<Nws<<" before scale "<<thistempnue->Integral();
358  thistempnue->Scale(Nws);
359  cout<<" after scale "<<thistempnue->Integral()<<endl;
360 
361  cout<<" Nbkg "<<Nbkg<<" before scale "<<thistempbkg->Integral();
362  thistempbkg->Scale(Nbkg);
363  cout<<" after scale "<<thistempbkg->Integral()<<endl;
364 
365  cout<<"cosmic "<<cosmics[i].first->Integral()<<endl;
366 
367  auto total = Spectrum(cosmics[i].first, POT,0);
368  total+=Spectrum(thistempnue, POT,0);
369  total+=Spectrum(thistempbkg, POT,0);
370 
371  auto mockexp = total.MockData(POT);
372  cout<<"mock exp "<<mockexp.Integral(POT)<<endl;
373  mockexp.SaveTo(writefile, (std::to_string(k)+"_mockexp").c_str());
374 
375  }
376  } // end throw fake2
377 
378  if(!throwexp){
379 
380  TFile* file = new TFile(filename,"read");
381 
382  int i = 0;
383 
384  calc_fake->SetdCP(1.20786*M_PI);
385  calc_fake->SetTh23(asin(sqrt(0.513445)));
386  calc_fake->SetDmsq32(2.46343e-3);
387  calc_fake->SetTh13(asin(sqrt(0.0820218))/2);
388 
389  double POT = kAna2018RHCPOT;
390  auto ws2018fhc = preds[i]->PredictComponent(calc_fake, Flavors::kNuMuToNuE, Current::kCC, Sign::kNu).ToTH1(POT);
391 
392  auto tot2018bkg = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuTau, Current::kCC, Sign::kBoth).ToTH1(POT);
393  auto beam2018 = preds[i]->PredictComponent(calc_fake, Flavors::kNuEToNuE, Current::kCC, Sign::kBoth).ToTH1(POT);
394  tot2018bkg->Add(beam2018);
395  auto nc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAll, Current::kNC, Sign::kBoth).ToTH1(POT);
396  tot2018bkg->Add(nc2018);
397  auto cc2018 = preds[i]->PredictComponent(calc_fake, Flavors::kAllNuMu, Current::kCC, Sign::kBoth).ToTH1(POT);
398  tot2018bkg->Add(cc2018);
399  tot2018bkg->Add(cosmics[i].first);
400  tot2018bkg->Add(ws2018fhc);
401  cout<<"total 2018 bkg is "<<tot2018bkg->Integral();
402 
403  new TCanvas;
404 
405  auto realdata = data[i]->ToTH1(POT);
406 
407  realdata->SetLineColor(kGreen+2);
408  realdata->Draw("hist");
409  tot2018bkg->Draw("hist same");
410  gPad->Print("plots/check_the_2018data_bkg.pdf");
411 
412  cout<<" total 2018 rhc data is "<<realdata->Integral();
413  auto LLreal = LogLikelihood(tot2018bkg, realdata);
414  cout<<" likelihood btw real data and fhc predicted bkg is "<<LLreal<<endl;
415 
416  TH1F* chi2 = new TH1F("chi2", "chi2", 40, 0, 40);
417  TH1F* integral = new TH1F("integrals", "integrals", 40, 0, 40);
418 
419  for (int j = 0; j<num; j++){
420  auto thisdata = LoadFromFile<Spectrum>(file, TString::Format("%s_mockexp", std::to_string(j).c_str()).Data()).release()->ToTH1(POT);
421  auto thisLL = LogLikelihood(tot2018bkg, thisdata);
422  auto integr = thisdata->Integral();
423  integral->Fill(integr);
424  chi2->Fill(thisLL);
425  }
426 
427  TFile* writefile = new TFile("finalhisti_"+options+".root","recreate");
428  chi2->Write("histchi");
429  writefile->Close();
430 
431  cout<<"integral for chiN > LLreal "<<chi2->Integral((int)LLreal,40);
432 
433  new TCanvas;
434  integral->Draw("hist");
435  gPad->Print("plots/integrals_"+options+"_"+std::to_string(num)+"_exp.pdf");
436 
437  new TCanvas;
438  chi2->Draw("hist");
439  auto line = new TLine(LLreal, 0, LLreal, 5000);
440  line->SetLineColor(kRed);
441  line->Draw();
442  gPad->Print("plots/chisq_with_"+options+"_"+std::to_string(num)+"_exp.pdf");
443  }
444  }
445 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Antineutrinos-only.
Definition: IPrediction.h:50
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
(&#39; appearance&#39;)
Definition: IPrediction.h:18
double th23
Definition: runWimpSim.h:98
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
(&#39;beam &#39;)
Definition: IPrediction.h:15
T sqrt(T number)
Definition: d0nt_math.hpp:156
string filename
Definition: shutoffs.py:106
double LogLikelihood(const Eigen::ArrayXd &ea, const Eigen::ArrayXd &oa, bool useOverflow)
The log-likelihood formula from the PDG.
Definition: EigenUtils.cxx:36
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
double chi2()
#define M_PI
Definition: SbMath.h:34
const double kAna2018RHCPOT
Definition: Exposures.h:208
const XML_Char const XML_Char * data
Definition: expat.h:268
const XML_Char * s
Definition: expat.h:262
std::vector< const ISyst * > getAllAna2018Systs(const EAnaType2018 ana, const bool smallgenie, const BeamType2018 beam, bool isFit)
Charged-current interactions.
Definition: IPrediction.h:39
double Nbkg[10]
Definition: Xdiff_gwt.C:53
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
void nuebar_signif(int num=1, bool throwexp=true, bool corrSysts=false, TString options="fake2017_part1")
Definition: nuebar_signif.C:42
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
std::vector< float > Spectrum
Definition: Constants.h:570
Neutrinos-only.
Definition: IPrediction.h:49
const char sep
OStream cout
Definition: OStream.cxx:6
std::vector< double > POT
std::pair< TH1D *, double > GetNueCosmics2018(std::string beam, bool GetFromUPS=false, bool NERSC=false)
int num
Definition: f2_nu.C:119
Neutral-current interactions.
Definition: IPrediction.h:40
TFile * file
Definition: cellShifts.C:17
Both neutrinos and antineutrinos.
Definition: IPrediction.h:52
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
const IPrediction * GetNuePrediction2018(std::string decomp, osc::IOscCalc *calc, bool corrSysts, std::string beam, bool isFakeData, bool GetFromUPS=false, bool minimizeMemory=false, bool NERSC=false)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
All neutrinos, any flavor.
Definition: IPrediction.h:26
Float_t e
Definition: plot.C:35
Spectrum * GetNueData2018(std::string beam)
void SetShift(const ISyst *syst, double shift, bool force=false)
Definition: SystShifts.cxx:80
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition: Utilities.cxx:29
T asin(T number)
Definition: d0nt_math.hpp:60