2 #include "TDirectory.h" 23 #include "CAFAna/Extrap/ExtrapSterile.h" 56 TLegend*
leg =
new TLegend(x1, y1, x2, y2);
57 leg->SetBorderSize(0);
58 leg->SetFillColor(kWhite);
62 leg->SetTextSize(textsize);
86 Color_t
color, std::vector<const ISyst*>
systs = {});
99 int nbinsA,
double minA,
double maxA,
101 int nbinsB,
double minB,
double maxB,
103 std::vector<const IFitVar*>
vars,
104 std::vector<const ISyst*>
systs = {});
147 TDirectory* rootOut, FILE* textOFS,
165 TDirectory* rootOut, FILE* textOFS,
172 TH1::AddDirectory(0);
177 std::string filenm =
"predInterpSysts_nus17_v1.root";
180 std::string loadLocation = folder + filenm +
".root";
185 TFile* rootL =
new TFile(loadLocation.c_str(),
"UPDATE");
186 TDirectory* tmpL = gDirectory;
187 TDirectory* loadDir = gDirectory;
189 loadDir->cd((loadLocation +
":/decompNC").c_str());
191 loadDir->cd((loadLocation +
":/prediction").c_str());
193 loadDir->cd((loadLocation +
":/sCos1").c_str());
196 loadDir->cd((loadLocation +
":/pFDPENum1").c_str());
198 loadDir->cd((loadLocation +
":/pFDPDen1").c_str());
200 loadDir->cd((loadLocation +
":/pFDEDen1").c_str());
202 loadDir->cd((loadLocation +
":/sNDPENum1").c_str());
204 loadDir->cd((loadLocation +
":/sNDPDen1").c_str());
206 loadDir->cd((loadLocation +
":/sNDEDen1").c_str());
217 const double livetime9 = 440.;
218 const double pot9 = 8.85e20;
219 const double livetime24 = 440.*(24/9);
220 const double pot24 = 24e20;
235 std::string labelEReco =
"Energy Deposited in (GeV)";
238 TFile* rootF =
new TFile(saveLocation.c_str(),
"RECREATE");
240 textF = fopen(textLocation.c_str(),
"w");
254 PlotStack(&pred, sCosmic9, calc3f, calc4f, rootF, textF,
"FDSpectra9", titleHelper, 9);
255 PlotStack(&decompNC, rootF, textF,
"NDSpectra9", titleHelper, 9);
258 titleHelper =
" Spectra for 24e20 POT";
259 PlotStack(&pred, sCosmic24, calc3f, calc4f, rootF, textF,
"FDSpectra24", titleHelper, 24);
260 PlotStack(&decompNC, rootF, textF,
"NDSpectra24", titleHelper, 24);
263 PlotPurEff(&pFDPurEffNum, &pFDPurityDen, &pFDEfcncyDen,
264 sNDPurEffNum, sNDPurityDen, sNDEfcncyDen,
265 calc3f, sCosmic9, rootF, textF,
"PurEff", labelEReco);
271 if(plotSensitivities){
282 std::vector<const IFitVar*> fitvars;
312 const Color_t kStatsFitCol = kBlack;
314 const Color_t kFitColor =
kRed;
325 rootF, fullname,
special, kStatsFitCol
334 &kFitDelta24InPiUnitsSterile},
336 rootF, fullname,
special, kStatsFitCol
356 {&kFitTheta23InDegreesSterile,
357 &kFitDelta24InPiUnitsSterile}
366 const IFitVar* var, std::vector<const IFitVar*> profVars,
370 std::vector<const ISyst*>
systs)
374 TH1*
h = (profVars.size() > 0 ?
375 Profile(expt, calc, var, nbins, min, max, -1, profVars) :
376 Slice(expt, calc, var, nbins, min, max));
383 h->SetLineColor(color);
386 h->SetName(fullname.c_str());
387 rootOut->WriteTObject(h);
393 std::string htitle =
"#theta_{"+indices+
"} (deg.)";
394 h->GetXaxis()->SetTitle(htitle.c_str());
397 TCanvas*
c =
new TCanvas(cname.c_str(), ctitle.c_str(), 600, 500);
398 h->GetXaxis()->SetRangeUser(min+0.25,max);
405 if(indices.compare(
"34") == 0)
406 leg =
MakeLegend(0.135, 0.35, 0.435, 0.50, 0.037);
407 if(indices.compare(
"24") == 0)
408 leg =
MakeLegend(0.600, 0.35, 0.900, 0.50, 0.037);
409 if(indices.compare(
"23") == 0)
410 leg =
MakeLegend(0.350, 0.35, 0.650, 0.50, 0.037);
411 if(special.compare(
"stats") == 0)
412 leg->AddEntry(h,
"stat. only",
"L");
413 if(special.compare(
"systs") == 0)
414 leg->AddEntry(h,
"syst.",
"L");
419 rootOut->WriteTObject(c);
429 std::string ctitle =
"Theta" + indices +
" ChiSq1Dcomp";
430 TCanvas*
c =
new TCanvas(cname.c_str(), ctitle.c_str(), 600, 500);
431 stats->GetXaxis()->SetRangeUser(min+0.25,max);
432 systs->GetXaxis()->SetRangeUser(min+0.25,max);
434 systs->Draw(
"l same");
441 if(indices.compare(
"34") == 0)
442 leg =
MakeLegend(0.135, 0.35, 0.435, 0.50, 0.037);
443 if(indices.compare(
"24") == 0)
444 leg =
MakeLegend(0.600, 0.35, 0.900, 0.50, 0.037);
445 if(indices.compare(
"23") == 0)
446 leg =
MakeLegend(0.350, 0.35, 0.650, 0.50, 0.037);
447 leg->AddEntry(stats,
"stat. [rate]",
"L");
449 leg->AddEntry(systs,
"stat. [shape]",
"L");
451 rootOut->WriteTObject(c);
461 int nbinsA,
double minA,
double maxA,
463 int nbinsB,
double minB,
double maxB,
465 std::vector<const IFitVar*>
vars,
466 std::vector<const ISyst*>
systs)
475 std::string ctitle =
"Surface for Theta" + indices;
476 std::string ctitlestat =
"Surface for Theta" + indices +
" statC";
477 std::string ctitlesyst =
"Surface for Theta" + indices +
" systS";
480 varA, nbinsA, minA, maxA,
481 varB, nbinsB, minB, maxB,
486 varA, nbinsA, minA, maxA,
487 varB, nbinsB, minB, maxB,
491 TH1* hSurfStat = surfStat.
ToTH2();
492 hSurfStat->SetName(hnamestat.c_str());
493 rootOut->WriteTObject(hSurfStat);
495 TH1* hSurfSyst = surfSyst.
ToTH2();
496 hSurfSyst->SetName(hnamesyst.c_str());
497 rootOut->WriteTObject(hSurfSyst);
499 TCanvas*
c =
new TCanvas(cname.c_str(), ctitle.c_str());
507 TLegend* legcomp =
MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
508 TH1*
dummy =
new TH1F(
"",
"",1,0,1);
510 dummy->SetLineColor(kAzure+2);
511 dummy->SetLineStyle(kDashed);
512 dummy->SetLineWidth(2);
513 legcomp->AddEntry(dummy->Clone(),
"68% C.L. (stat.) [rate]",
"L");
514 dummy->SetLineColor(kAzure+2);
515 dummy->SetLineStyle(kSolid);
516 legcomp->AddEntry(dummy->Clone(),
"90% C.L. (stat.) [rate]",
"L");
517 dummy->SetLineColor(kBlack);
518 dummy->SetLineStyle(kDashed);
519 legcomp->AddEntry(dummy->Clone(),
"68% C.L. (stat.) [shape]",
"L");
520 dummy->SetLineColor(kBlack);
521 dummy->SetLineStyle(kSolid);
522 legcomp->AddEntry(dummy->Clone(),
"90% C.L. (stat.) [shape]",
"L");
525 rootOut->WriteTObject(c);
528 TCanvas* cStat =
new TCanvas(cnamestat.c_str(), ctitlestat.c_str());
534 TLegend* legStat =
MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
536 dummy->SetLineColor(kAzure+2);
537 dummy->SetLineStyle(kDashed);
538 dummy->SetLineWidth(2);
539 legStat->AddEntry(dummy->Clone(),
"68% C.L. (stat.) [rate]",
"L");
540 dummy->SetLineColor(kAzure+2);
541 dummy->SetLineStyle(kSolid);
542 legStat->AddEntry(dummy->Clone(),
"90% C.L. (stat.) [rate]",
"L");
545 rootOut->WriteTObject(cStat);
548 TCanvas* cSyst =
new TCanvas(cnamesyst.c_str(), ctitlesyst.c_str());
554 TLegend* legSyst =
MakeLegend(0.500, 0.62, 0.800, 0.82, 0.037);
555 dummy->SetLineColor(kBlack);
556 dummy->SetLineStyle(kDashed);
557 dummy->SetLineWidth(2);
558 legSyst->AddEntry(dummy->Clone(),
"68% C.L. (stat.) [shape]",
"L");
559 dummy->SetLineColor(kBlack);
560 dummy->SetLineStyle(kSolid);
561 legSyst->AddEntry(dummy->Clone(),
"90% C.L. (stat.) [shape]",
"L");
564 rootOut->WriteTObject(cSyst);
571 TLatex*
tex =
new TLatex();
573 tex->SetTextFont(42);
574 tex->SetTextSize(0.037);
575 tex->SetTextAlign(11);
576 tex->DrawLatex(xpos, start,
"NOvA 9.0#times10^{20} POT");
577 tex->DrawLatex(xpos, start - 1*step,
"#Deltam^{2}_{32} = 2.44#times10^{-3} eV^{2}");
578 tex->DrawLatex(xpos, start - 2*step,
"#theta_{13} = 8.5#circ, ^{}#theta_{23} = 45#circ");
579 tex->DrawLatex(xpos, start - 3*step,
"#Deltam^{2}_{41} = 0.5 eV^{2}");
584 const double xtex = 0.76;
585 const double y68 = 0.28;
586 const double y90 = 0.55;
588 TLatex *
tex =
new TLatex();
590 tex->SetTextFont(42);
591 tex->SetTextSize(0.037);
592 tex->SetTextAlign(11);
593 tex->DrawLatex(xtex, y68,
"68% C.L.");
594 tex->DrawLatex(xtex, y90,
"90% C.L.");
599 TLine* line68 =
new TLine();
600 TLine* line90 =
new TLine();
602 TLine* line05 =
new TLine();
604 line68->SetLineStyle(kDashed);
605 line90->SetLineStyle(kDashed);
607 line68->SetLineWidth(2);
608 line90->SetLineWidth(2);
609 line05->SetLineWidth(2);
610 line68->DrawLine(xmin, 1, xmax, 1);
611 line90->DrawLine(xmin, 2.71, xmax, 2.71);
612 line05->DrawLine(xmin, 5, xmax, 5);
622 double realPOT = (double)POT*1e20;
625 sprintf(potBuff,
"%d", POT);
629 TH1* hAll = spectra[0].
ToTH1(realPOT);
630 TH1* hNC = spectra[1].
ToTH1(realPOT);
631 TH1* hNumu = spectra[2].
ToTH1(realPOT);
632 TH1* hNue = spectra[3].
ToTH1(realPOT);
633 TH1* hNutau = spectra[4].
ToTH1(realPOT);
634 TH1* hCos = spectra[5].
ToTH1(realPOT);
636 TH1* hStrl = (sterile ? sterile ->
ToTH1(realPOT) :
nullptr);
637 TH1* hStrlNC = (sterileNC ? sterileNC->
ToTH1(realPOT) :
nullptr);
642 std::string yLabel = (det.compare(
"ND") == 0 ?
"10^{3} Events" :
"Events");
643 yLabel +=
"/" + potStr +
" / 0.25 GeV";
644 std::string histTitle =
";" + xLabel +
";" + yLabel;
647 fprintf(textOFS,
"Event numbers at the %2.2s for %2de20 POT:\n", det.c_str(),
POT);
648 if(hStrlNC) { fprintf(textOFS,
"%12.12s, ",
"NC (Sterile)"); }
649 else { fprintf(textOFS,
"%14.14s",
""); }
650 fprintf(textOFS,
"%12.12s, %12.12s, %12.12s, %12.12s, %12.12s, %12.12s, %12.12s\n",
651 "NC (3 Flav)",
"All",
"Numu",
"Nue",
"Nutau",
"Cosmic",
"FOM");
654 double nNC3F = hNC ->Integral();
655 double nAll = hAll ->Integral();
656 double nNumu = hNumu->Integral();
657 double nNue = hNue ->Integral();
658 double nNutau = hNutau->Integral();
659 double nCos = hCos ->Integral();
660 double fom = nNC3F/
sqrt(nAll);
662 double nNCSt = hStrlNC->Integral();
663 fprintf(textOFS,
"%10E, ", nNCSt);
666 fprintf(textOFS,
"%14.14s",
"");
668 fprintf(textOFS,
"%10E, %10E, %10E, %10E, %10E, %10E, %10E\n\n",
669 nNC3F, nAll, nNumu, nNue, nNutau, nCos, fom);
679 hAll ->SetMinimum(0);
681 hNumu->SetMinimum(0);
682 hNutau->SetMinimum(0);
683 hNue ->SetMinimum(0);
684 hCos ->SetMinimum(0);
685 if(hStrlNC) { hStrl->SetMinimum(0); }
693 hCos ->SetLineColor(kCosmicBackgroundColor);
696 hStrlNC->SetLineStyle(2);
699 hAll ->SetTitle(histTitle.c_str());
700 hNC ->SetTitle(histTitle.c_str());
701 hNumu->SetTitle(histTitle.c_str());
702 hNue ->SetTitle(histTitle.c_str());
703 hNutau ->SetTitle(histTitle.c_str());
704 hCos ->SetTitle(histTitle.c_str());
705 if(hStrlNC) { hStrlNC->SetTitle(histTitle.c_str()); }
709 TH1* hCosStack = (TH1*)hCos->Clone();
712 TH1* hNumuStack = (TH1*)hCosStack->Clone();
713 hNumuStack->Add(hNumu);
716 TH1* hNueStack = (TH1*)hNumuStack->Clone();
717 hNueStack->Add(hNue);
723 TH1* hNCStack = (TH1*)hNueStack->Clone();
741 hCosStack ->SetLineColor(kCosmicBackgroundColor);
742 hCosStack ->SetFillColor(kCosmicBackgroundColor);
744 hNCStack ->SetMinimum(0);
745 hNumuStack->SetMinimum(0);
746 hNueStack ->SetMinimum(0);
748 hCosStack ->SetMinimum(0);
752 double maxvalstack = 0.;
753 for(
int i = 1,
n = hNC->GetNbinsX();
i <=
n; ++
i) {
758 maxvalstack =
std::max(maxvalstack, hNCStack->GetBinContent(
i) +
error);
762 if(det.compare(
"ND") == 0) {
763 double ndScale = 1./1000.;
764 hAll ->Scale(ndScale);
765 hNC ->Scale(ndScale);
766 hNue ->Scale(ndScale);
767 hNumu->Scale(ndScale);
768 hNCStack ->Scale(ndScale);
769 hNueStack ->Scale(ndScale);
770 hNumuStack->Scale(ndScale);
772 maxvalstack *= ndScale;
775 TLatex *
tex =
new TLatex();
777 tex->SetTextFont(42);
778 tex->SetTextSize(0.037);
779 tex->SetTextAlign(11);
782 TCanvas*
c =
new TCanvas(name.c_str(), title.c_str(), 800, 500);
783 if(det.compare(
"FD") == 0){
784 hNutau->SetMaximum(maxval*1.1);
785 hNutau->GetXaxis()->SetNdivisions(-405);
788 hNue->SetMaximum(maxval*1.1);
789 hNue->GetXaxis()->SetNdivisions(-405);
793 double xL = 0.5, xR = 0.7, yB = 0.59, yT = 0.84;
794 if(det.compare(
"ND") == 0) { yB += 0.05; }
795 TLegend*
leg =
new TLegend(xL, yB, xR, yT);
796 leg->SetBorderSize(0);
797 leg->SetFillColor(kWhite);
798 leg->SetFillStyle(0);
799 leg->SetFillStyle(0);
800 leg->SetTextFont(42);
801 leg->SetTextSize(0.037);
802 leg->AddEntry(hAll,
"Total Prediction",
"l");
803 leg->AddEntry(hNC,
"NC 3 Flavor Prediction",
"le");
804 leg->AddEntry(hNue,
"#nu_{e} CC Background",
"l");
805 leg->AddEntry(hNumu,
"#nu_{#mu} CC Background",
"l");
806 if(det.compare(
"FD") == 0) {
807 leg->AddEntry(hNutau,
"#nu_{#tau} CC Background",
"l");
808 leg->AddEntry(hCos,
"Cosmic Background",
"l");
810 if(det.compare(
"FD") == 0)
811 hNutau->Draw(
"hist");
814 hNumu->Draw(
"hist same");
815 if(det.compare(
"FD") == 0) { hCos->Draw(
"hist same"); }
816 hAll ->Draw(
"hist same");
819 if(det.compare(
"FD") == 0) {
820 tex->DrawLatex(0.505, yB - 0.045,
"#Deltam^{2}_{41} = 0.5 eV^{2}, ^{}#theta_{24} = 4#circ, ^{}#theta_{34} = 10#circ");
821 tex->DrawLatex(0.505, yB - 0.100,
"#Deltam^{2}_{32} = 2.44x10^{-3} eV^{2}, ^{}#theta_{13} = 8.5#circ, ^{}#theta_{23} = 45#circ");
822 tex->DrawLatex(0.505, yB - 0.155, potStr.c_str());
829 rootOut->WriteTObject(c);
832 TCanvas* cStack =
new TCanvas((name +
"Stack").c_str(), title.c_str(), 800, 500);
838 hNueStack->SetMaximum(maxval*1.1);
839 hNueStack->GetXaxis()->SetNdivisions(-405);
842 if(det.compare(
"ND") == 0) { yB += 0.05; }
843 TLegend* legStack =
new TLegend(xL, yB, xR, yT);
844 legStack->SetBorderSize(0);
845 legStack->SetFillColor(kWhite);
846 legStack->SetFillStyle(0);
847 legStack->SetFillStyle(0);
848 legStack->SetTextFont(42);
849 legStack->SetTextSize(0.037);
850 legStack->AddEntry(hNCStack,
"NC 3 Flavor Prediction",
"le");
851 if(hStrlNC) { legStack->AddEntry(hStrlNC,
"NC 4 Flavor Prediction",
"l"); }
852 legStack->AddEntry(hNueStack,
"#nu_{e} CC Background",
"f");
853 legStack->AddEntry(hNumuStack,
"#nu_{#mu} CC Background",
"f");
854 if(det.compare(
"FD") == 0) {
856 legStack->AddEntry(hCosStack,
"Cosmic Background",
"f");
863 hNueStack ->Draw(
"hist");
865 hNumuStack->Draw(
"hist same");
866 if(det.compare(
"FD") == 0) { hCosStack->Draw(
"hist same"); }
867 hNCStack ->Draw(
"same");
868 if(hStrlNC) { hStrlNC->Draw(
"hist same"); }
870 if(det.compare(
"FD") == 0) {
871 tex->DrawLatex(0.505, yB - 0.045,
"#Deltam^{2}_{41} = 0.5 eV^{2}, ^{}#theta_{24} = 4#circ, ^{}#theta_{34} = 10#circ");
872 tex->DrawLatex(0.505, yB - 0.100,
"#Deltam^{2}_{32} = 2.44x10^{-3} eV^{2}, ^{}#theta_{13} = 8.5#circ, ^{}#theta_{23} = 45#circ");
873 tex->DrawLatex(0.505, yB - 0.155, potStr.c_str());
879 rootOut->WriteTObject(cStack);
904 PlotStack(spectraND, rootOut, textOFS, name, fulltitle, det, POT);
912 TDirectory* rootOut, FILE* textOFS,
929 PlotStack(spectraFD, rootOut, textOFS, name, fulltitle, det, POT, &sterile, &sterileNC);
938 TDirectory* rootOut, FILE* textOFS,
953 TH1* hFDEff = (TH1*)hFDNum->Clone();
954 hFDEff->Divide(hFDEffDen);
956 TH1* hNDEff = (TH1*)hNDNum->Clone();
957 hNDEff->Divide(hNDEffDen);
959 TH1* hFDPur = (TH1*)hFDNum->Clone();
960 hFDPur->Divide(hFDPurDen);
962 TH1* hNDPur = (TH1*)hNDNum->Clone();
963 hNDPur->Divide(hNDPurDen);
965 hFDEff->SetTitle((
";" + title +
";Efficiency, Purity / 0.25 GeV").c_str());
966 hFDPur->SetTitle((
";" + title +
";Efficiency, Purity / 0.25 GeV").c_str());
967 hNDEff->SetTitle((
";" + title +
";Efficiency, Purity / 0.25 GeV").c_str());
968 hNDPur->SetTitle((
";" + title +
";Efficiency, Purity / 0.25 GeV").c_str());
970 hFDEff->SetLineColor(
kBlue);
971 hNDEff->SetLineColor(
kBlue);
973 hFDPur->SetLineColor(
kRed);
974 hNDPur->SetLineColor(
kRed);
976 hNDEff->SetLineStyle(2);
977 hNDPur->SetLineStyle(2);
979 hFDEff->SetMaximum(1.);
980 hFDEff->SetMinimum(0.);
981 hFDEff->GetXaxis()->SetNdivisions(-405);
983 hNDEff->SetMaximum(1.);
984 hNDEff->SetMinimum(0.);
986 hFDPur->SetMaximum(1.);
987 hFDPur->SetMinimum(0.);
989 hNDPur->SetMaximum(1.);
990 hNDPur->SetMinimum(0.);
997 TLegend*
leg =
new TLegend(0.6, 0.35, 0.85, 0.55);
998 leg->AddEntry(hFDEff,
"FD MC Efficiency",
"L");
999 leg->AddEntry(hNDEff,
"ND MC Efficiency",
"L");
1000 leg->AddEntry(hFDPur,
"FD MC Purity",
"L");
1001 leg->AddEntry(hNDPur,
"ND MC Purity",
"L");
1003 TCanvas*
c =
new TCanvas(name.c_str(),
"Purity and Efficiency", 800, 500);
1004 hFDEff->Draw(
"hist");
1005 hNDEff->Draw(
"hist same");
1006 hFDPur->Draw(
"hist same");
1007 hNDPur->Draw(
"hist same");
1013 rootOut->WriteTObject(c);
1021 calc->
SetDm(4, 0.5);
void PlotText(const double xpos, const double start, const double step)
void PlotStack(Spectrum spectra[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string det, double POT, double potEquiv, PlotOptions opt, Spectrum *dataspec)
T max(const caf::Proxy< T > &a, T b)
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.
void SetNFlavors(int nflavors)
std::map< std::string, double > xmax
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
virtual Spectrum AntiNueComponent() const =0
Float_t y1[n_points_granero]
void PlotPurEff(Spectrum pureff[], Spectrum effcyD[], TDirectory *out, std::string name, std::string title)
const Color_t kCosmicBackgroundColor
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.
virtual Spectrum NumuComponent() const =0
A simple Gaussian constraint on an arbitrary IFitVar.
virtual Spectrum Predict(osc::IOscCalc *calc) const =0
void OverridePOT(double newpot)
DO NOT USE UNLESS YOU ARE 110% CERTAIN THERE ISN'T A BETTER WAY!
Float_t x1[n_points_granero]
General interface to oscillation calculators.
static std::unique_ptr< PredictionSterile > LoadFrom(TDirectory *dir, const std::string &name)
void Plot2DSlice(IExperiment *expt1, IExperiment *expt2, 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={})
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)
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
void CenterTitles(TH1 *histo)
const FitTheta24InDegreesSterile kFitTheta24InDegreesSterile
std::unique_ptr< T > LoadFrom(TDirectory *dir, const std::string &label)
const Color_t kNumuBackgroundColor
void Scale(double c)
Multiply this spectrum by a constant c.
static std::unique_ptr< ProportionalDecomp > LoadFrom(TDirectory *dir, const std::string &name)
Representation of a spectrum in any variable, with associated POT.
const Color_t kNueSignalColor
const FitDelta24InPiUnitsSterile kFitDelta24InPiUnitsSterile
Log-likelihood scan across two parameters.
Charged-current interactions.
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
void ResetAngles(osc::OscCalcSterile *calc)
Spectrum FakeData(double pot) const
Synonymous with AsimovData(). Retained for compatibility.
void DrawContour(TH2 *fc, Style_t style, Color_t color, double minchi=-1)
const Color_t kBeamNueBackgroundColor
virtual std::unique_ptr< IFitSummary > Fit(osc::IOscCalcAdjustable *seed, SystShifts &bestSysts=junkShifts, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, Verbosity verb=kVerbose) const
Master fitting method. Depends on FitHelper and FitHelperSeeded.
void PlotNus17Prediction(bool plotSensitivities=false)
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
virtual Spectrum AntiNumuComponent() const =0
void ResetSterileCalcToDefault(osc::OscCalcSterile *calc)
Reset calculator to default assumptions for all parameters.
std::vector< double > POT
static float min(const float a, const float b, const float c)
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={})
TH2 * ToTH2(double minchi=-1) const
Combine multiple component experiments.
void SetAngle(int i, int j, double th)
Splits Data proportionally according to MC.
void SetDm(int i, double dm)
TLegend * MakeLegend(double x1, double y1, double x2, double y2, double textsize=0.03)
virtual Spectrum NCTotalComponent() const
Standard interface to all decomposition techniques.
Base class defining interface for experiments.
Neutral-current interactions.
const FitTheta34InDegreesSterile kFitTheta34InDegreesSterile
Interface definition for fittable variables.
Both neutrinos and antineutrinos.
A prediction object compatible with sterile oscillations.
Standard interface to all prediction techniques.
const Color_t kTotalMCColor
All neutrinos, any flavor.
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
void SigmaLines(double xmin, double xmax)
const Color_t kNCBackgroundColor
double Livetime() const
Seconds. For informational purposes only. No calculations use this.
Compare a data spectrum to MC expectation using only the event count.
virtual Spectrum NueComponent() const =0
TH2 * Gaussian68Percent1D(const FrequentistSurface &s)
Up-value surface for 68% confidence in 1D in gaussian approximation.
void CompareSlices(TH1 *stats, TH1 *systs, std::string angle, TDirectory *rootOut, double xmin, double xmax)
Compare a single data spectrum to the MC + cosmics expectation.
Perform MINUIT fits in one or two dimensions.