PlotNusSensAna01.C
Go to the documentation of this file.
1 #include <cmath>
2 #include <iostream>
3 #include <string>
4 #include <vector>
5 
8 #include "CAFAna/Fit/Fit.h"
10 #include "CAFAna/Analysis/Style.h"
18 #include "NuXAna/Systs/NusSysts.h"
19 #include "CAFAna/Systs/Systs.h"
20 #include "CAFAna/Vars/FitVars.h"
24 #include "OscLib/OscCalcSterile.h"
25 
26 #include "TCanvas.h"
27 #include "TFile.h"
28 #include "TH1.h"
29 #include "TH2.h"
30 #include "TMath.h"
31 #include "TGaxis.h"
32 #include "TLegend.h"
33 #include "TLatex.h"
34 #include "TStyle.h"
35 #include "TPaveText.h"
36 #include "TLegendEntry.h"
37 #include "TMarker.h"
38 
39 
40 using namespace ana;
41 
42 
43 // One struct to contain all values for angle fits
44 struct AngleValues{
45  int nbins23;
46  double min23;
47  double max23;
48 
49  int nbins34;
50  double min34;
51  double max34;
52 
53  int nbins24;
54  double min24;
55  double max24;
56 };
57 
58 void TexInfo();
59 
60 TLegend* MakeLegend(double x1, double y1, double x2, double y2, double textsize = 0.03)
61 {
62  TLegend* leg = new TLegend(x1, y1, x2, y2);
63  leg->SetBorderSize(0);
64  leg->SetFillColor(kWhite);
65  leg->SetFillStyle(0);
66  leg->SetFillStyle(0);
67  leg->SetTextFont(42);
68  leg->SetTextSize(textsize);
69  return leg;
70 }
71 
72 
73 void SigmaLines(double xmin, double xmax);
74 
75 void PlotText(const double xpos, const double start, const double step);
76 
77 // Reset calculator values after each fit to preset defaults
79 
81  const IFitVar* var, std::vector<const IFitVar*> vars,
82  int nbins, double min, double max,
83  TDirectory* rootOut, std::string name, std::string special,
84  Color_t color, std::vector<const ISyst*> systs = {});
85 
86 void CompareSlices(TH1* stats, TH1* systs, std::string angle, TDirectory* rootOut, double xmin, double xmax);
87 
89  const IFitVar* varA,
90  int nbinsA, double minA, double maxA,
91  const IFitVar* varB,
92  int nbinsB, double minB, double maxB,
93  TDirectory* rootOut, std::string angles,
94  std::vector<const IFitVar*> vars,
95  std::vector<const ISyst*> systs);
96 
97 
98 void PlotNusSensAna01(std::string inputFilename)
99 {
100  TH1::AddDirectory(0);
101 
102 
103  TFile input(inputFilename.c_str(), "READ"); // Load in MC prediction
104 
105  // Get the nus systematics
106  std::vector<const ISyst*> systs = getAllNusSysts();
107 
108  // Load in the NuMI data spectrum
109  Spectrum* intime = LoadFromFile<Spectrum>("$NOVA_ANA/steriles/Ana01/fout_nus_ana01_box_opening_restricted.root","spec_nus_cale_numi").release();
110 
111  TH1 *hSpectrum = intime->ToTH1(intime->POT());
112  Spectrum data_spec(hSpectrum, intime->POT(), intime->Livetime());
113  std::cout << "Data spectrum: " << data_spec.POT()
114  <<" POT and "
115  << data_spec.ToTH1(intime->POT())->GetSumOfWeights()
116  << " events" << std::endl;
117 
118  // Load in the out-of-NuMI-time weighted spectrum (cosmics)
119  Spectrum* cosmic_scale = LoadFromFile<Spectrum>("$NOVA_ANA/steriles/Ana01/AnaResults.root","cosmic__CalE").release();
120  TH1D* hcosmic = (TH1D*)cosmic_scale->ToTH1(cosmic_scale->Livetime(), kLivetime);
121  Spectrum cosmic(hcosmic, intime->POT(), intime->Livetime());
122 
123  // Load the MC Prediction
124  std::unique_ptr<PredictionInterp> pred_p1p2e3b =
125  PredictionInterp::LoadFrom((TDirectory*)input.Get("nus_pred_p1p2e3b"));
126 
127  std::unique_ptr<PredictionInterp> pred_e3c =
128  PredictionInterp::LoadFrom((TDirectory*)input.Get("nus_pred_e3c"));
129 
130  const double pot_p1p2e3b =
134 
135  const double pot_e3ce3d = kSecondAnaEpoch3cPOT + kSecondAnaEpoch3dPOT;
136 
137  // Combine period1/period2/epoch3b + epoch3c, weighted appropriately
139  {&(*pred_p1p2e3b),pot_p1p2e3b},
140  {&(*pred_e3c),pot_e3ce3d}
141  });
142 
143  // Make a default sterile calculator and set values
145  calc4f->SetNFlavors(4);
146  ResetAngles(calc4f); // paranoia
147 
148  // Output file
149  TFile* rootOut = new TFile("d24_profile_nus_sens_results.root","recreate");
150 
151  // Take 68% band from PDG LIVE 2015: pdglive.lbl.gov
152  // #sin^{2}#theta_{23} = 0.514 + 0.055 - 0.056
153  // #asin(sqrt(0.514)) + #asin(sqrt(0.541 + 0.055)) - #asin(sqrt(0.541 + 0.056)) in degrees
154  // This is the Gaussian constraint on #theta_{23}
156  45.8,
157  3.2);
158 
159  CountingExperiment nus_expt(&pred, data_spec, cosmic);
160  MultiExperiment nus_multi({&th23Constraint, &nus_expt});
161 
162 
163  // Vector of parameters to fit: #theta_{23}, #theta_{34}, #theta_{24}
164  std::vector<const IFitVar*> fitvars;
165  fitvars.push_back(&kFitTheta34InDegreesSterile);
166  fitvars.push_back(&kFitTheta24InDegreesSterile);
167  fitvars.push_back(&kFitTheta23InDegreesSterile);
168  fitvars.push_back(&kFitDelta24InPiUnitsSterile);
169 
170 
171  // Set up binning values for slice and surface plots
172  AngleValues avals;
173  avals.nbins23 = 200;
174  avals.min23 = 20.;
175  avals.max23 = 70.;
176  avals.nbins34 = 200;
177  avals.min34 = 0.;
178  avals.max34 = 50.;
179  avals.nbins24 = 180;
180  avals.min24 = 0.;
181  avals.max24 = 45.;
182 
183  std::string name = "hTh";
184  std::string fullname, special, angles;
185 
186  const Color_t kStatsFitCol = kAzure+2;
187  const Color_t kSystsFitCol = kBlack;
188 
189  // Theta 34 Slices
190  fullname = name + "34";
191  special = "stats";
192  TH1* h34Stats = Plot1DSlice(&nus_multi, calc4f,
197  avals.nbins34, avals.min34, avals.max34,
198  rootOut, fullname, special, kStatsFitCol);
199 
200  fullname = name + "34";
201  special = "systs";
202  TH1* h34Systs = Plot1DSlice(&nus_multi, calc4f,
206  &kFitDelta24InPiUnitsSterile},
207  avals.nbins34, avals.min34, avals.max34,
208  rootOut, fullname, special, kSystsFitCol,
209  systs);
210 
211  CompareSlices(h34Stats, h34Systs, "34", rootOut,
212  avals.min34, avals.max34);
213 
214  // Theta 24 Slices
215  fullname = name + "24";
216  special = "stats";
217  TH1* h24Stats = Plot1DSlice(&nus_multi, calc4f,
221  &kFitDelta24InPiUnitsSterile},
222  avals.nbins24, avals.min24, avals.max24,
223  rootOut, fullname, special, kStatsFitCol);
224 
225  fullname = name + "24";
226  special = "systs";
227  TH1* h24Systs = Plot1DSlice(&nus_multi, calc4f,
231  &kFitDelta24InPiUnitsSterile},
232  avals.nbins24, avals.min24, avals.max24,
233  rootOut, fullname, special, kSystsFitCol,
234  systs);
235 
236  CompareSlices(h24Stats, h24Systs, "24", rootOut,
237  avals.min24, avals.max24);
238 
239  Theta 23 Slices
240  fullname = name + "23";
241  special = "stats";
242  TH1* h23Stats = Plot1DSlice(&nus_multi, calc4f,
246  &kFitDelta24InPiUnitsSterile},
247  avals.nbins23, avals.min23, avals.max23,
248  rootOut, fullname, special, kStatsFitCol);
249 
250  fullname = name + "23";
251  special = "systs";
252  TH1* h23Systs = Plot1DSlice(&nus_multi, calc4f,
256  &kFitDelta24InPiUnitsSterile},
257  avals.nbins23, avals.min23, avals.max23,
258  rootOut, fullname, special, kSystsFitCol,
259  systs);
260 
261  CompareSlices(h23Stats, h23Systs, "23", rootOut,
262  avals.min23, avals.max23);
263 
264  // Lower nbins for surfaces
265  avals.nbins34 = 50;
266  avals.nbins23 = 50;
267  avals.nbins24 = 45;
268 
269  angles = "3424";
270  Theta 34 v 24
271  Plot2DSlice(&nus_multi,calc4f,
273  avals.nbins34,avals.min34,avals.max34,
275  avals.nbins24,avals.min24,avals.max24,
276  rootOut, angles,
277  {&kFitTheta23InDegreesSterile,&kFitDelta24InPiUnitsSterile},
278  systs
279  );
280 
281  angles = "2324";
282  // Theta 23 v 24
283  Plot2DSlice(&nus_multi,calc4f,
285  avals.nbins23,avals.min23,avals.max23,
287  avals.nbins24,avals.min24,avals.max24,
288  rootOut, angles,
289  {&kFitTheta34InDegreesSterile,&kFitDelta24InPiUnitsSterile},
290  systs
291  );
292 
293  angles = "3423";
294  // Theta 34 v 23
295  Plot2DSlice(&nus_multi,calc4f,
297  avals.nbins34,avals.min34,avals.max34,
299  avals.nbins23,avals.min23,avals.max23,
300  rootOut, angles,
301  {&kFitTheta24InDegreesSterile,&kFitDelta24InPiUnitsSterile},
302  systs
303  );
304 
305  rootOut->Close();
306 }
307 
308 
309 
311  const IFitVar* var, std::vector<const IFitVar*> vars,
312  int nbins, double min, double max,
313  TDirectory* rootOut, std::string name, std::string special,
314  Color_t color, std::vector<const ISyst*> systs)
315 {
316  ResetAngles(calc); // Reset calculator before fitting
317 
318  TH1* h = (vars.size() > 0 ?
319  Profile(expt, calc, var, nbins, min, max, -1, vars, systs) :
320  Slice(expt, calc, var, nbins, min, max));
321 
322 
323  std::string fullname = name + special;
324  // Formatting
325  h->SetLineColor(color);
326  h->SetMaximum(5);
327  h->SetMinimum(0);
328  h->SetName(fullname.c_str()); // Object name for saving
329  rootOut->WriteTObject(h); // Save raw histogram
330 
331 
332  std::cout << fullname << std::endl;
333  std::string cname = "c1D" + name.substr(1, name.size()-1) + special;
334  // Angle subscripts should be at position 4,5; get them
335  std::string indices = name.substr(3,2);
336  std::string ctitle = "Theta" + indices + " chi-squared slice" + special;
337  std::string htitle = "#theta_{"+indices+"} (deg.)";
338  h->GetXaxis()->SetTitle(htitle.c_str());
339 
340  // Actually draw things together
341  TCanvas* c = new TCanvas(cname.c_str(), ctitle.c_str(), 600, 500);
342  h->GetXaxis()->SetRangeUser(min+0.25,max);
343  h->Draw("l");
344  TexInfo();
345  SigmaLines(min, max);
346  PlotText(0.135, 0.82, 0.055);
347  TLegend* leg = 0;
348  // Special case legend position for each angle slice
349  if(indices.compare("34") == 0)
350  leg = MakeLegend(0.135, 0.35, 0.435, 0.50, 0.037);
351  if(indices.compare("24") == 0)
352  leg = MakeLegend(0.600, 0.35, 0.900, 0.50, 0.037);
353  if(indices.compare("23") == 0)
354  leg = MakeLegend(0.350, 0.35, 0.650, 0.50, 0.037);
355  if(special.compare("stats") == 0)
356  leg->AddEntry(h,"stat. only","L");
357  if(special.compare("systs") == 0)
358  leg->AddEntry(h,"syst.","L");
359  leg->Draw();
360 
361  Preliminary();
362  CenterTitles(h);
363  rootOut->WriteTObject(c);
364 
365  return h;
366 }
367 
368 
369 void CompareSlices(TH1* stats, TH1* systs, std::string angle, TDirectory* rootOut, double min, double max)
370 {
371 
372  std::string cname = "c1DComp" + angle;
373  std::string ctitle = "Theta" + angle + " chi-squared slice comparison";
374  TCanvas* c = new TCanvas(cname.c_str(), ctitle.c_str(), 600, 500);
375  stats->GetXaxis()->SetRangeUser(min+0.25,max);
376  systs->GetXaxis()->SetRangeUser(min+0.25,max);
377  stats->Draw("l");
378  systs->Draw("l same");
379  TexInfo();
380  SigmaLines(min, max);
381  Preliminary();
382  PlotText(0.135, 0.82, 0.055);
383  TLegend* leg = 0;
384  // Special case legend for angle slice
385  if(angle.compare("34") == 0)
386  leg = MakeLegend(0.135, 0.35, 0.435, 0.50, 0.037);
387  if(angle.compare("24") == 0)
388  leg = MakeLegend(0.600, 0.35, 0.900, 0.50, 0.037);
389  if(angle.compare("23") == 0)
390  leg = MakeLegend(0.350, 0.35, 0.650, 0.50, 0.037);
391  leg->AddEntry(stats,"stat.","L");
392  leg->AddEntry(systs,"syst.","L");
393  leg->Draw();
394  rootOut->WriteTObject(c);
395 
396  return;
397 }
398 
399 
401  const IFitVar* varA,
402  int nbinsA, double minA, double maxA,
403  const IFitVar* varB,
404  int nbinsB, double minB, double maxB,
405  TDirectory* rootOut, std::string angles,
406  std::vector<const IFitVar*> vars,
407  std::vector<const ISyst*> systs)
408 {
409 
410  ResetAngles(calc);
411  std::string cname = "c2D" + angles;
412  std::string cnamestat = "c2D" + angles + "stat";
413  std::string cnamesyst = "c2D" + angles + "syst";
414  std::string hnamestat = "h" + angles + "stat";
415  std::string hnamesyst = "h" + angles + "syst";
416  std::string ctitle = "Surface for Theta" + angles;
417  std::string ctitlestat = "Surface for Theta" + angles + " stat.";
418  std::string ctitlesyst = "Surface for Theta" + angles + " syst.";
419 
420  FrequentistSurface surfStat(expt, calc,
421  varA, nbinsA, minA, maxA,
422  varB, nbinsB, minB, maxB,
423  vars);
424  ResetAngles(calc);
425  FrequentistSurface surfSyst(expt, calc,
426  varA, nbinsA, minA, maxA,
427  varB, nbinsB, minB, maxB,
428  vars, systs);
429  ResetAngles(calc);
430 
431  TH1* hSurfStat = surfStat.ToTH2(); // Create a histogram from the surfaces
432  hSurfStat->SetName(hnamestat.c_str()); // Set the name for saving
433  rootOut->WriteTObject(hSurfStat); // Save the raw histogram
434 
435  TH1* hSurfSyst = surfSyst.ToTH2(); // Create a histogram from the surfaces
436  hSurfSyst->SetName(hnamesyst.c_str()); // Set the name for saving
437  rootOut->WriteTObject(hSurfSyst); // Save the raw histogram
438 
439  TCanvas* c = new TCanvas(cname.c_str(), ctitle.c_str());
440 
441  surfStat.DrawContour(Gaussian68Percent1D(surfStat), kDashed, kAzure+2);
442  surfStat.DrawContour(Gaussian90Percent1D(surfStat), kSolid, kAzure+2);
443  surfSyst.DrawContour(Gaussian68Percent1D(surfSyst), kDashed, kBlack);
444  surfSyst.DrawContour(Gaussian90Percent1D(surfSyst), kSolid, kBlack);
445 
446  PlotText(0.135, 0.82, 0.055);
447  TLegend* legcomp = MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
448  TH1* dummy = new TH1F("","",1,0,1);
449 
450  dummy->SetLineColor(kAzure+2);
451  dummy->SetLineStyle(kDashed);
452  dummy->SetLineWidth(2);
453  legcomp->AddEntry(dummy->Clone(),"68% C.L. (stat.)","L");
454  dummy->SetLineColor(kAzure+2);
455  dummy->SetLineStyle(kSolid);
456  legcomp->AddEntry(dummy->Clone(),"90% C.L. (stat.)","L");
457  dummy->SetLineColor(kBlack);
458  dummy->SetLineStyle(kDashed);
459  legcomp->AddEntry(dummy->Clone(),"68% C.L. (syst.)","L");
460  dummy->SetLineColor(kBlack);
461  dummy->SetLineStyle(kSolid);
462  legcomp->AddEntry(dummy->Clone(),"90% C.L. (syst.)","L");
463  legcomp->Draw();
464  rootOut->WriteTObject(c);
465 
466  // Plot statisics only
467  TCanvas* cStat = new TCanvas(cnamestat.c_str(), ctitlestat.c_str());
468 
469  surfStat.DrawContour(Gaussian68Percent1D(surfStat), kDashed, kAzure+2);
470  surfStat.DrawContour(Gaussian90Percent1D(surfStat), kSolid, kAzure+2);
471 
472  PlotText(0.135, 0.82, 0.055);
473  TLegend* legStat = MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
474 
475  dummy->SetLineColor(kAzure+2);
476  dummy->SetLineStyle(kDashed);
477  dummy->SetLineWidth(2);
478  legStat->AddEntry(dummy->Clone(),"68% C.L. (stat.)","L");
479  dummy->SetLineColor(kAzure+2);
480  dummy->SetLineStyle(kSolid);
481  legStat->AddEntry(dummy->Clone(),"90% C.L. (stat.)","L");
482  legStat->Draw();
483  rootOut->WriteTObject(cStat);
484 
485  // Plot stats. + systs. only
486  TCanvas* cSyst = new TCanvas(cnamesyst.c_str(), ctitlesyst.c_str());
487 
488  surfSyst.DrawContour(Gaussian68Percent1D(surfSyst), kDashed, kBlack);
489  surfSyst.DrawContour(Gaussian90Percent1D(surfSyst), kSolid, kBlack);
490 
491  PlotText(0.135, 0.82, 0.055);
492  TLegend* legSyst = MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
493 
494  dummy->SetLineColor(kBlack);
495  dummy->SetLineStyle(kDashed);
496  dummy->SetLineWidth(2);
497  legSyst->AddEntry(dummy->Clone(),"68% C.L. (syst.)","L");
498  dummy->SetLineColor(kBlack);
499  dummy->SetLineStyle(kSolid);
500  legSyst->AddEntry(dummy->Clone(),"90% C.L. (syst.)","L");
501  legSyst->Draw();
502  rootOut->WriteTObject(cSyst);
503 
504  return;
505 }
506 
507 
508 void PlotText(const double xpos, const double start, const double step)
509 {
510  TLatex* tex = new TLatex();
511  tex->SetNDC();
512  tex->SetTextFont(42);
513  tex->SetTextSize(0.037);
514  tex->SetTextAlign(11);
515  tex->DrawLatex(xpos, start, "NOvA 6.05#times10^{20} POT-equiv.");
516  tex->DrawLatex(xpos, start - 1*step, "#Deltam^{2}_{32} = 2.44#times10^{-3} eV^{2}");
517  tex->DrawLatex(xpos, start - 2*step, "#theta_{13} = 8.5#circ, ^{}#theta_{23} = 45#circ");
518  tex->DrawLatex(xpos, start - 3*step, "#Deltam^{2}_{41} = 0.5 eV^{2}");
519 }
520 
521 
522 void TexInfo()
523 {
524  const double xtex = 0.76;
525  const double y68 = 0.28;
526  const double y90 = 0.55;
527 
528  TLatex *tex = new TLatex();
529  tex->SetNDC();
530  tex->SetTextFont(42);
531  tex->SetTextSize(0.037);
532  tex->SetTextAlign(11);
533  tex->DrawLatex(xtex, y68, "68% C.L."); // 1-sigma
534  tex->DrawLatex(xtex, y90, "90% C.L."); // 2-sigma
535 }
536 
537 
538 void SigmaLines(double xmin, double xmax)
539 {
540  TLine* line68 = new TLine();
541  TLine* line90 = new TLine();
542  // Fixes horizontal effects at max canvas value
543  TLine* line05 = new TLine();
544  // Dashed line for 1 and 2 sigma lines
545  line68->SetLineStyle(kDashed);
546  line90->SetLineStyle(kDashed);
547 
548  line68->SetLineWidth(2);
549  line90->SetLineWidth(2);
550  line05->SetLineWidth(2);
551  line68->DrawLine(xmin, 1, xmax, 1);
552  line90->DrawLine(xmin, 2.71, xmax, 2.71);
553  line05->DrawLine(xmin, 5, xmax, 5);
554 }
555 
556 
558 {
560  calc->SetDm(4, 0.5); // #deltam41 = 0.5 eV^2
561  calc->SetAngle(2, 3, M_PI/4); // 45 degress, maximal mixing
562  calc->SetAngle(3, 4, 0.); // 0 degrees
563  calc->SetAngle(2, 4, 0.); // 0 degrees
564 
565  return;
566 }
const XML_Char * name
Definition: expat.h:151
TCut intime("tave>=217.0 && tave<=227.8")
Double_t angle
Definition: plot.C:86
TH2 * Gaussian90Percent1D(const FrequentistSurface &s)
Up-value surface for 90% confidence in 1D in gaussian approximation.
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::map< std::string, double > xmax
void ResetAngles(osc::OscCalcSterile *calc)
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
const double kSecondAnaPeriod2POT
Definition: Exposures.h:74
TH1 * Plot1DSlice(IExperiment *expt, osc::OscCalcSterile *calc, const IFitVar *var, std::vector< const IFitVar * > vars, int nbins, double min, double max, TDirectory *rootOut, std::string name, std::string special, Color_t color, std::vector< const ISyst * > systs={})
Float_t y1[n_points_granero]
Definition: compare.C:5
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:148
A simple Gaussian constraint on an arbitrary IFitVar.
Float_t x1[n_points_granero]
Definition: compare.C:5
const double kSecondAnaEpoch3dPOT
Definition: Exposures.h:77
const double kSecondAnaEpoch3bPOT
Definition: Exposures.h:75
Adapt the PMNS_Sterile calculator to standard interface.
const FitTheta23InDegreesSterile kFitTheta23InDegreesSterile
int stats(TString inputFilePath, Int_t firstRun, Int_t lastRun, Float_t thresh, TString myDet)
Definition: stats.C:13
void PlotNusSensAna01(std::string inputFilename)
TGraph * Profile(const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double input_minchi, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts, std::map< const IFitVar *, TGraph * > &profVarsMap, std::map< const ISyst *, TGraph * > &profSystsMap, MinuitFitter::FitOpts opts)
scan in one variable, profiling over all others
Definition: Fit.cxx:48
void CenterTitles(TH1 *histo)
Definition: Plots.cxx:1481
const double kSecondAnaPeriod1POT
Definition: Exposures.h:73
const FitTheta24InDegreesSterile kFitTheta24InDegreesSterile
osc::OscCalcDumb calc
#define M_PI
Definition: SbMath.h:34
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
void Plot2DSlice(IExperiment *expt, osc::OscCalcSterile *calc, const IFitVar *varA, int nbinsA, double minA, double maxA, const IFitVar *varB, int nbinsB, double minB, double maxB, TDirectory *rootOut, std::string angles, std::vector< const IFitVar * > vars, std::vector< const ISyst * > systs)
const FitDelta24InPiUnitsSterile kFitDelta24InPiUnitsSterile
Log-likelihood scan across two parameters.
const int nbins
Definition: cellShifts.C:15
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
Definition: Calcs.cxx:97
expt
Definition: demo5.py:34
std::vector< const ISyst * > getAllNusSysts()
Get a vector of all the nus group systs.
Definition: NusSysts.cxx:202
Sum up livetimes from individual cosmic triggers.
void DrawContour(TH2 *fc, Style_t style, Color_t color, double minchi=-1)
Definition: ISurface.cxx:44
void CompareSlices(TH1 *stats, TH1 *systs, std::string angle, TDirectory *rootOut, double xmin, double xmax)
const std::map< std::pair< std::string, std::string >, Variable > vars
void SigmaLines(double xmin, double xmax)
TGraph * Slice(const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double minchi, MinuitFitter::FitOpts opts)
scan in one variable, holding all others constant
Definition: Fit.cxx:169
void ResetSterileCalcToDefault(osc::OscCalcSterile *calc)
Reset calculator to default assumptions for all parameters.
Definition: Calcs.cxx:76
double POT() const
Definition: Spectrum.h:227
void Preliminary()
OStream cout
Definition: OStream.cxx:6
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
void PlotText(const double xpos, const double start, const double step)
TH2 * ToTH2(double minchi=-1) const
Definition: ISurface.cxx:161
Combine multiple component experiments.
void SetAngle(int i, int j, double th)
static std::unique_ptr< PredictionInterp > LoadFrom(TDirectory *dir, const std::string &name)
void SetDm(int i, double dm)
void TexInfo()
TLatex * tex
Definition: f2_nu.C:499
Base class defining interface for experiments.
Definition: IExperiment.h:14
const FitTheta34InDegreesSterile kFitTheta34InDegreesSterile
Interface definition for fittable variables.
Definition: IFitVar.h:16
const double kSecondAnaEpoch3cPOT
Definition: Exposures.h:76
Sum MC predictions from different periods scaled according to data POT targets.
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
double Livetime() const
Seconds. For informational purposes only. No calculations use this.
Definition: Spectrum.h:230
Compare a data spectrum to MC expectation using only the event count.
const float Theta() const
Definition: HoughPeak.h:88
TH2 * Gaussian68Percent1D(const FrequentistSurface &s)
Up-value surface for 68% confidence in 1D in gaussian approximation.
TLegend * MakeLegend(double x1, double y1, double x2, double y2, double textsize=0.03)
enum BeamMode string