6 #include "CAFAna/Core/Binning.h" 13 #include "CAFAna/Cuts/NueCutsSecondAna.h" 51 #include "TPaveText.h" 52 #include "TGraphErrors.h" 53 #include "TMultiGraph.h" 84 TLatex*
prelim =
new TLatex(.276, .95,
"Antineutrino Beam");
85 prelim->SetTextColor(kBlack);
87 prelim->SetTextSize(1/30.);
88 prelim->SetTextAlign(32);
92 TLatex*
prelim =
new TLatex(.241, .95,
"Neutrino Beam");
93 prelim->SetTextColor(kBlack);
95 prelim->SetTextSize(1/30.);
96 prelim->SetTextAlign(32);
108 bool normalized ,
bool , TMultiGraph* = NULL,
bool draw =
true,
bool tags =
true);
110 void ResolutionBars(std::vector<TH1D*> allResol,
const std::vector<int> idc,
111 const std::vector<TString> idl,
bool resid=
false,
bool isRHC=
false);
113 const std::vector<TString> idl,
double maxy,
bool isResolution=
false,
bool isRHC=
false);
118 TString suffix =
"test",
119 bool unoscillated =
true,
bool useTrue =
true)
122 TString
filename =
"pred_resol_2018_"+suffix+
"_"+epoch+
".root";
125 const HistAxis resAxis (
"Energy Resolution (Reco - True) / True",
129 const HistAxis residAxis (
"Energy Difference (Reco - True)",
147 std::vector <TString> intNames = {
"QE",
"Res",
"DIS",
"Coh",
"DytmanMEC",
"allModes"};
150 std::string fdspecfile =
"/pnfs/nova/persistent/analysis/numu/Ana2018/provisional/quantiles/quantiles__rhc_full__numu2018.root";
152 TH2 *FDSpec2D = (TH2*)inFile->FindObjectAny(
"FDSpec2D" );
153 const int NHadEFracQuantiles = 4;
155 HadEFracQuantCuts.emplace_back( kNoCut );
156 std::vector<TString>
QuantNames = {
"Quant1",
"Quant2",
"Quant3",
"Quant4",
"AllQuant" };
163 std::vector <ShiDef> gshifts;
165 for(
auto idx:{+1,-1}){
166 TString sigs = (
idx>0?
"plus":
"minus");
169 gshifts.push_back({
"NeutronVisEScalePrimariesSyst2018_"+sigs,
210 std::vector <PredictionNoExtrap *> predsNXP;
211 std::vector <CheatDecomp *> decomps;
213 std::vector <TString>
names;
215 if(!suffix.Contains(
"ndonly")){
217 for(
auto cut:intModes){
218 for(
auto quant:HadEFracQuantCuts){
224 for(
auto shift:gshifts){
225 for(
auto quant:HadEFracQuantCuts){
241 for(TString
name:{
"numu_recoE_all",
"numu_resol_all",
242 "numu_resid_all",
"numu_trueE_all"}){
243 for(
auto intN:intNames){
244 for(
auto quantN:QuantNames){
245 names.emplace_back(
name+
"_" + intN +
"_" + quantN);
248 for(
auto shift:gshifts){
249 for(
auto quantN:QuantNames){
250 names.emplace_back(
name+
"_" +
shift.name +
"_" + quantN);
333 TFile *
file =
new TFile(filename,
"recreate");
336 for(
int i=0;
i<(
int)names.size();++
i){
337 if(!suffix.Contains(
"ndonly")){
338 predsNXP[
i]->SaveTo(file,
"pred_nxp_"+names[
i]);
350 TFile *
file =
new TFile(filename,
"read");
355 auto calc = nos.
Copy();
358 if(unoscillated) oscStr =
"_noosc_";
359 if(useTrue) oscStr=
"_true" + oscStr;
361 TString pstr =
"pred_nxp_numu_";
363 for(
int qIdx = 0; qIdx < QuantNames.size(); ++qIdx){
365 pstr+(useTrue?
"trueE":
"recoE") +
"_all_allModes_"+QuantNames[qIdx]);
368 bool normalized =
true;
369 std::vector <TString>
ids = {
"sig",
"bkg",
"tot"};
370 std::vector <int> idc = {
kRed,
kBlue,kBlack};
371 std::vector <TString> idl = {
"#nu_{#mu} CC",
"Bkgd.",
"Total"};
374 auto c1_h =
new TCanvas();
375 TString ps_all = pstr +
"resid_all_allModes_" + QuantNames[qIdx];
377 std::vector <TH1D*> allRes;
378 allRes.emplace_back((resid->ComponentCC(14,14).Oscillated(calc,14,14) +
379 resid->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
380 allRes.emplace_back((resid->Predict(calc) -
381 resid->ComponentCC(14,14).Oscillated(calc,14,14) - resid->ComponentCC(-14,-14).Oscillated(calc,-14,-14))
383 allRes.emplace_back(resid->Predict(calc).ToTH1(fdpot));
387 auto c1_hu =
new TCanvas();
388 std::vector <TH1D*> allResu = {(resid->ComponentCC(14,14).Oscillated(calc,14,14)+resid->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot)};
392 ps_all = pstr +
"resol_all_allModes_"+QuantNames[qIdx];
394 std::vector <TH1D*> allResol;
395 allResol.emplace_back((resol->ComponentCC(14,14).Oscillated(calc,14,14) +
396 resol->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
397 allResol.emplace_back((resol->Predict(calc) -
398 resol->ComponentCC(14,14).Oscillated(calc,14,14) - resol->ComponentCC(-14,-14).Oscillated(calc,-14,-14))
400 allResol.emplace_back(resol->Predict(calc).ToTH1(fdpot));
402 auto c1_h2 =
new TCanvas;
405 auto c1_h2u =
new TCanvas();
406 std::vector <TH1D*> allResolu = {(resol->ComponentCC(14,14).Oscillated(calc,14,14) +
407 resol->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot)};
410 auto c1_mg =
new TCanvas();
413 auto c1_mg2 =
new TCanvas();
421 std::vector <TString> oldN = {
"All",
"DytmanMEC",
"QE",
"Res",
"DIS"};
422 std::vector <TString> interN = {
"All",
"MEC",
"QE",
"RES",
"DIS"};
423 std::vector <int> interC = {kBlack,
kOrange-1,kAzure+7,
kGreen+2,kGray+2};
425 std::vector <TString> cuteLabel;
426 for (
int i =0;
i<5; ++
i){
427 TString tstr; tstr.Form(
"#color[%d]{%s}",interC[
i],interN[i].Data());
428 cuteLabel.emplace_back(tstr);
431 std::vector <TH1D*> allResM;
432 std::vector <TH1D*> allResolM;
434 allResM.emplace_back((resid->ComponentCC(14,14).Oscillated(calc,14,14)+resid->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
435 allResolM.emplace_back((resol->ComponentCC(14,14).Oscillated(calc,14,14)+resol->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
436 for(
int i=1;
i<5;++
i){
437 ps_all = pstr +
"resid_all_"+oldN[
i]+
"_"+QuantNames[qIdx];
439 allResM.emplace_back((residM->ComponentCC(14,14).Oscillated(calc,14,14)+residM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
441 ps_all = pstr +
"resol_all_"+oldN[
i]+
"_"+QuantNames[qIdx];
443 allResolM.emplace_back((resolM->ComponentCC(14,14).Oscillated(calc,14,14)+resolM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
446 auto c2_h =
new TCanvas();
449 auto c2_h2 =
new TCanvas;
452 auto c2_mg =
new TCanvas();
454 auto c2_mg2 =
new TCanvas();
464 std::vector<TString> gOld = {
"NeutronVisEScalePrimariesSyst2018_"};
466 std::vector<TString> gShort = {
"NeutronSyst"};
491 for (
auto part:{1,1}){
492 int ming = 0;
int maxg = 1;
495 std::vector <TString> gOldSig;
496 std::vector <TString> gShortSig;
497 std::vector <int> gColors;
499 for(
int i=ming;
i<maxg;
i++){
500 gOldSig.emplace_back(gOld[
i]+
"plus");
501 gShortSig.emplace_back(gShort[
i]+
" (#plus1#sigma)");
502 gColors.emplace_back(kPink -
i);
504 gOldSig.emplace_back(
"Nominal");
505 gShortSig.emplace_back(
"Nominal");
506 gColors.emplace_back(kBlack);
508 gOldSig.emplace_back(gOld[
i]+
"minus");
509 gShortSig.emplace_back(gShort[
i]+
" (#minus1#sigma)");
510 gColors.emplace_back(kAzure -
i);
513 std::vector <TH1D*> allResG;
514 std::vector <TH1D*> allResolG;
518 for(
int i=0;
i<1;
i++){
520 ps_all = pstr +
"resid_all_"+gOldSig[
i]+
"_"+QuantNames[qIdx];
523 allResG.emplace_back((residM->ComponentCC(14,14).Oscillated(calc,14,14)+residM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
524 ps_all = pstr +
"resol_all_"+gOldSig[
i]+
"_"+QuantNames[qIdx];
526 allResolG.emplace_back((resolM->ComponentCC(14,14).Oscillated(calc,14,14)+resolM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
530 allResG.emplace_back((resid->ComponentCC(14,14).Oscillated(calc,14,14) +
531 resid->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
532 allResolG.emplace_back((resol->ComponentCC(14,14).Oscillated(calc,14,14) +
533 resol->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
535 for(
int i=2;
i<3;
i++){
537 ps_all = pstr +
"resid_all_"+gOldSig[
i]+
"_"+QuantNames[qIdx];
540 allResG.emplace_back((residM->ComponentCC(14,14).Oscillated(calc,14,14)+residM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
541 ps_all = pstr +
"resol_all_"+gOldSig[
i]+
"_"+QuantNames[qIdx];
543 allResolG.emplace_back((resolM->ComponentCC(14,14).Oscillated(calc,14,14)+resolM->ComponentCC(-14,-14).Oscillated(calc,-14,-14)).ToTH1(fdpot));
549 auto c3_h =
new TCanvas();
552 auto c3_h2 =
new TCanvas();
555 auto c3_mg =
new TCanvas();
557 auto c3_mg2 =
new TCanvas();
560 c3_mg->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars_xsec"+
std::to_string(
part)+
"_"+QuantNames[qIdx]+
".pdf");
561 c3_mg2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars2_xsec"+
std::to_string(
part)+
"_"+QuantNames[qIdx]+
".pdf");
562 c3_h->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlay_xsec"+
std::to_string(
part)+
"_"+QuantNames[qIdx]+
".pdf");
563 c3_h2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlayf_xsec"+
std::to_string(
part)+
"_"+QuantNames[qIdx]+
".pdf");
719 c1_mg->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars"+
"_"+QuantNames[qIdx]+
".pdf");
720 c1_mg2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars2"+
"_"+QuantNames[qIdx]+
".pdf");
721 c1_h->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlay"+
"_"+QuantNames[qIdx]+
".pdf");
722 c1_h2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlayf"+
"_"+QuantNames[qIdx]+
".pdf");
723 c1_hu->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlay_numu"+
"_"+QuantNames[qIdx]+
".pdf");
724 c1_h2u->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlayf_numu"+
"_"+QuantNames[qIdx]+
".pdf");
819 c2_mg->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars_mode"+
"_"+QuantNames[qIdx]+
".pdf");
820 c2_mg2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"bars2_mode"+
"_"+QuantNames[qIdx]+
".pdf");
821 c2_h->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlay_mode"+
"_"+QuantNames[qIdx]+
".pdf");
822 c2_h2->Print(
"plot4_resol_2018_"+suffix+
"_"+epoch + oscStr +
"overlayf_mode"+
"_"+QuantNames[qIdx]+
".pdf");
831 TGraph *
ret =
new TGraph();
832 auto ngraphs = multig->GetListOfGraphs()->GetSize();
836 auto gr = (TGraphErrors*) multig->GetListOfGraphs()->At(
idx);
837 auto x = gr->GetX()[0];
838 auto y = gr->GetY()[0];
839 auto erry = gr->GetEY()[0];
840 if(opt==
"bias") ret->SetPoint(ret->GetN(),
x,
y);
841 if(opt==
"error") ret->SetPoint(ret->GetN(),
x,erry);
843 ret->SetLineWidth(3);
844 ret->SetLineColor(color);
845 ret->SetMarkerStyle(kFullCircle);
846 ret->SetMarkerColor(color);
856 hist->SetNdivisions(124);
857 hist->GetXaxis()->SetTitle(xaxis);
858 hist->GetYaxis()->SetTitle(yaxis);
859 hist->GetYaxis()->CenterTitle();
860 hist->GetYaxis()->SetDecimals();
863 hist->GetXaxis()->SetLabelSize(0);
864 hist->GetYaxis()->SetLabelSize(0);
865 hist->GetXaxis()->SetTitleOffset(1.9);
868 hist->GetXaxis()->SetLabelSize(15);
869 hist->GetYaxis()->SetLabelSize(15);
870 hist->GetXaxis()->SetTitleOffset(3);
872 hist->GetYaxis()->SetRangeUser(xmin,xmax);
880 gStyle->SetTitleSize(17,
"xyz");
881 gStyle->SetTitleFont(43,
"xyz");
882 gStyle->SetLabelSize(15,
"xyz");
883 gStyle->SetLabelFont(43,
"xyz");
884 gStyle->SetTitleOffset(0.8,
"x");
885 gStyle->SetTitleOffset(1.4,
"yz");
890 xaxis =
"Reconstructed neutrino energy (GeV)";
891 if(useTrue) xaxis =
"True neutrino energy (GeV)";
892 int npads= labels.size();
896 c =
new TCanvas (cname+
"f",cname,700,550);
898 for(
int i=1;
i<=2;++
i){
900 if(
i==1)
FormatResHist(hist, xaxis,
"Frac. E resolution",
false, 0, 0.18);
901 if(
i==2)
FormatResHist(hist, xaxis,
"Frac. shift in mean",
false, -0.18, 0.18);
903 gPad->SetTopMargin(0.15);
904 gPad->SetBottomMargin(0.18);
905 gPad->SetRightMargin(0.02*5./7.);
906 gPad->SetLeftMargin(0.1 *5./7.);
908 hist->GetXaxis()->SetTitleOffset(2);
909 hist->GetYaxis()->SetTitleOffset(1.2);
913 gPad->SetFillStyle(0);
918 c =
new TCanvas(cname,cname,700,700);
919 double del = 0.66/npads;
920 c->Divide(1,1+npads);
921 c->GetPad(1)->SetPad(0,0.66,1,1);
922 for(
int i=0;
i<npads; ++
i){
923 c->GetPad(2+
i)->SetPad(0,0.66-(
i+1)*del,1,0.66-
i*del);
925 for(
int i=1;
i<= 1+npads ; ++
i){
927 gPad->SetBottomMargin((
i>1?0.18:0.16));
928 gPad->SetRightMargin(0.02);
929 gPad->SetLeftMargin(0.08);
930 if(
i>1) gPad->SetTopMargin(0.05);
931 else gPad->SetTopMargin(0.15);
933 if(
i==1)
FormatResHist(hist, xaxis,
"Events/bin",
false, 0, max1);
934 else FormatResHist(hist,
"Energy difference (True-Reco) (GeV)",
935 "A.U.",
true, 0, 0.77);
938 gPad->SetFillStyle(0);
943 TLatex * ltx =
new TLatex();
944 ltx->SetTextSize(19);
945 ltx->SetTextFont(43);
946 ltx->SetTextAlign(11);
949 gPad->SetFillStyle(0);
952 ltx->DrawLatexNDC(0.13,0.9,
"#splitline{FD MC}{6 #times 10^{20} POT}");
953 for(
int i = 0;
i < npads; ++
i){
955 ltx->DrawLatexNDC(0.13,0.6,
"#bf{"+labels[
i]+
"}");
983 gPad->SetFillStyle(0);
988 if(sigBkg==
"tot") hpred = (*pred).Predict(calc).ToTH1(fdpot,color);
989 else if(sigBkg==
"sig") hpred= ((*pred).ComponentCC(14,14).Oscillated(calc,14,14)+(*pred).ComponentCC(-14,-14).Oscillated(calc,-14,-14)).
991 else if(sigBkg==
"bkg") hpred = ((*pred).Predict(calc)-(*pred).ComponentCC(14,14).Oscillated(calc,14,14)
992 -(*pred).ComponentCC(-14,-14).Oscillated(calc,-14,-14)).
998 if(hpred->Integral()>0.01)
1002 TLatex * ltx =
new TLatex();
1003 ltx->SetTextSize(9);
1004 ltx->SetTextFont(43);
1005 ltx->SetTextSize(1.2*ltx->GetTextSize());
1006 double y, lower1,lower2;
1007 if((
int)((center-0.125)/0.25)%2==0){
1019 (
"#color[%d]{#bf{#splitline{#lower[%.2f]{#mu %.2f}}{#lower[%.2f]{#sigma %.2f}}}}",
1020 color,lower1,hpred->GetMean(),lower2,hpred->GetRMS());
1021 ltx->DrawLatex(center-0.125, y,label);
1024 TGraphErrors * mygraph =
new TGraphErrors();
1025 mygraph->SetPoint(mygraph->GetN(),center, hpred->GetMean()) ;
1026 mygraph->SetPointError(mygraph->GetN()-1, 0, hpred->GetRMS());
1027 mygraph->SetMarkerStyle(kFullCircle);
1028 mygraph->SetLineColor(color);
1029 mygraph->SetFillColor(color);
1030 mygraph->SetMarkerColor(color);
1031 mygraph->SetLineWidth(3);
1032 graph->Add(mygraph,
"lp same");
1036 for(
int i=1;
i<=hpred->GetNbinsX();++
i){
1037 int bin = hist->FindBin(hpred->GetBinCenter(
i)+center);
1038 hist->SetBinContent(bin,hpred->GetBinContent(
i));
1041 hist->SetLineColor(color);
1044 if(draw && hpred->Integral()>0.001){
1045 if(normalized) hist->DrawNormalized(
"hist same");
1046 else hist->DrawCopy(
"hist same");
1055 const std::vector<TString> idl,
double maxy,
bool isResolution,
bool isRHC){
1056 gPad->SetFillStyle(0);
1058 ";Energy difference (Reco - True) (GeV); A.U. (Area normalized)",100,
1060 if(isResolution) haux->GetXaxis()->SetTitle(
"(Reco - True)/True");
1061 haux->GetYaxis()->SetRangeUser(0,maxy);
1062 haux->GetYaxis()->SetLabelSize(0);
1063 haux->GetXaxis()->CenterTitle();
1064 haux->GetYaxis()->CenterTitle();
1066 TLegend*
leg =
new TLegend(0.12,0.2,0.4,0.89);
1067 leg->SetFillStyle(0);
1068 leg->SetTextSize(haux->GetXaxis()->GetTitleSize());
1075 for (
int i=0;
i< (
int)allRes.size();++
i){
1077 allRes[
i]->SetLineColor(idc[
i]);
1078 allRes[
i]->SetLineWidth(3);
1080 allRes[
i]->DrawNormalized(
"hist same");
1081 leg->AddEntry(allRes[i],idl[i],
"l");
1085 leg->SetHeader(
"FD MC");
1088 TLine *
line =
new TLine(0, 0, 0, maxy);
1089 line->SetVertical();
1090 line->SetLineColor(13);
1091 line->SetLineStyle(7);
1100 const std::vector<TString> idl,
bool resid,
bool isRHC){
1101 gPad->SetFillStyle(0);
1102 int nbins = allResol.size();
1103 TH2D* haux2D =
new TH2D(
UniqueName().c_str(),
"; (True-Reco)/True;",1000,-0.5,0.5,
1105 if(resid) haux2D ->GetXaxis()->SetTitle(
"(True-Reco) (GeV)");
1106 haux2D->GetXaxis()->CenterTitle();
1107 auto yaxis = haux2D->GetYaxis();
1108 gPad->SetLeftMargin(.25);
1110 int bin = nbins -
i;
1112 yaxis->SetBinLabel(bin,idl[i]);
1114 yaxis->SetLabelSize(0.07);
1115 haux2D->DrawClone();
1118 int bin = nbins -
i;
1119 auto mygraph =
new TGraphErrors();
1121 allResol[
i]->ResetStats();
1122 mygraph->SetPoint(mygraph->GetN(),allResol[
i]->GetMean(),
yaxis->GetBinCenter(bin)) ;
1123 mygraph->SetPointError(mygraph->GetN()-1, allResol[
i]->GetRMS(),0);
1124 mygraph->SetMarkerStyle(kFullCircle);
1125 mygraph->SetLineColor(color);
1126 mygraph->SetFillColor(color);
1127 mygraph->SetMarkerColor(color);
1128 mygraph->SetLineWidth(4);
1129 mygraph->DrawClone(
"pl");
1131 TLatex * ltx =
new TLatex();
1132 ltx->SetTextAlign(22);
1133 ltx->SetTextSize(0.04);
1135 ltx->DrawLatex(0.3,
yaxis->GetBinCenter(bin),
1136 TString::Format(
"#color[%d]{#splitline{Mean %.1f MeV}{RMS %.1f MeV}}",
1138 allResol[i]->GetMean()*1000, allResol[i]->GetRMS()*1000));
1141 ltx->DrawLatex(0.3,
yaxis->GetBinCenter(bin),
1144 allResol[i]->GetMean()*100, allResol[i]->GetRMS()*100));
TCanvas * ResolutionPanels(TString cname, const std::vector< TString > labels, std::string epoch, bool, double, bool, bool)
Pass neutrinos through unchanged.
Cuts and Vars for the 2020 FD DiF Study.
std::map< std::string, double > xmax
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.
Simple record of shifts applied to systematic parameters.
TGraph * GetBiasErrorLine(TMultiGraph *multig, TString opt, int color)
General interface to oscillation calculators.
const HistAxis kHadEFracAxis("E_{had.} / E_{#nu}", Binning::Simple(200, 0, 1), kHadEFrac)
HistAxis that implements Hadronic Energy fraction binning used by L.Vinton to derive Hadronic Energy ...
void ResolutionBars(std::vector< TH1D * > allResol, const std::vector< int > idc, const std::vector< TString > idl, bool resid=false, bool isRHC=false)
std::string pnfs2xrootd(std::string loc, bool unauth)
const NeutronVisEScaleSyst2018 kNeutronVisEScalePrimariesSyst2018(false)
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
const double kAna2018RHCPOT
void Go()
Call Go() on all the loaders.
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
const Binning kNumuEnergyBinning
void resolution2018(bool createFile=false, bool isRHC=false, std::string epoch="period3", TString suffix="test", bool unoscillated=true, bool useTrue=true)
virtual _IOscCalc< T > * Copy() const override
const std::string QuantNames[NumQuant]
const HistAxis kNumuCCOptimisedAxis("Reconstructed Neutrino Energy (GeV)", kNumuCCEOptimisedBinning, kCCE)
HistAxis that implements optimised numuCCE from L. Vinton. See docdb 16332. This was close to 'custC'...
const SystShifts kNoShift
void DifferenceOverlay(std::vector< TH1D * > allRes, const std::vector< int > idc, const std::vector< TString > idl, double maxy, bool isResolution=false, bool isRHC=false)
std::vector< Cut > QuantileCutsFromTH2(TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool verbose)
: Do the same as the QuantileCuts function but taking in the TH2 instead of making it...
void FormatResHist(TH1D *hist, TString xaxis, TString yaxis, bool choplabel, double xmin, double xmax)
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
const double kAna2018FHCPOT
std::string to_string(ModuleType mt)
For nominal spectra and reweighting systs (xsec/flux)
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
std::string UniqueName()
Return a different string each time, for creating histograms.
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
void DrawResBin(PredictionExtrap *pred, osc::IOscCalc *calc, double fdpot, double center, TString sigBkg, int color, bool normalized, bool, TMultiGraph *=NULL, bool draw=true, bool tags=true)