13 #include "CAFAna/Cuts/NueCutsFirstAna.h" 14 #include "CAFAna/Cuts/NueCutsSecondAna.h" 19 #include "CAFAna/Vars/NueVars.h" 21 #include "CAFAna/Cuts/NueCutsSecondAna.h" 39 #include "Utilities/func/MathUtil.h" 59 TLatex*
prelim =
new TLatex(.9, .95,
"NOvA Simulation");
60 prelim->SetTextColor(kGray+1);
62 prelim->SetTextSize(2/30.);
63 prelim->SetTextAlign(32);
70 name =
"plots/SAbless/"+prefix+
"_"+
name;
71 if(!suffix.empty()) name +=
"_"+suffix;
73 gPad->Print((name+
".eps").c_str());
74 gPad->Print((name+
".pdf").c_str());
75 gPad->Print((name+
".png").c_str());
82 if(sr->
mc.
nu.empty())
return 0.;
84 if(!sr->
mc.
nu[0].iscc) ret *= sr->
mc.
nu[0].y;
100 if(sr->
mc.
nu.empty())
return tmp;
101 tmp = sr->
mc.
nu[0].y;
141 void Arrows(TH1* sigId,
double bestCutSoB,
double bestCutSoSB,
double faCut,
bool noarrow =
false)
143 sigId->GetYaxis()->SetRangeUser(0,1.05*sigId->GetMaximum());
145 double maxy = sigId->GetMaximum()/2;
149 TLine* lin =
new TLine(bestCutSoB, 0, bestCutSoB, maxy);
150 lin->SetLineWidth(3);
151 lin->SetLineColor(
kGreen+2);
154 TArrow* arr =
new TArrow(bestCutSoB-0.003, maxy, bestCutSoB+.03, maxy, .02,
"|>");
155 arr->SetLineWidth(3);
156 arr->SetLineColor(
kGreen+2);
157 arr->SetFillColor(
kGreen+2);
164 lin =
new TLine(bestCutSoSB, 0, bestCutSoSB, maxy);
165 lin->SetLineWidth(3);
166 lin->SetLineStyle(2);
167 lin->SetLineColor(
kGreen+3);
171 TArrow* arr =
new TArrow(bestCutSoSB-0.003, maxy, bestCutSoSB+.04, maxy, .02,
"|>");
172 arr->SetLineWidth(3);
173 arr->SetLineColor(
kGreen+3);
174 arr->SetFillColor(
kGreen+3);
179 lin =
new TLine(faCut, 0, faCut, maxy);
180 lin->SetLineWidth(3);
181 lin->SetLineColor(
kRed);
185 TArrow* arr =
new TArrow(faCut, maxy, faCut+.04, maxy, .02,
"|>");
186 arr->SetLineWidth(3);
187 arr->SetLineColor(
kRed);
188 arr->SetFillColor(
kRed);
196 TH1* sig_denom, TH1* bck_denom,
double* bestCuts,
double faCut,
200 std::cout <<
" &\t Cut &\t $s/\\sqrt{b}$ &\t $s/\\sqrt{s+b}$ &\t $\\nu_e$ sig &\t Tot bkg &\t NC &\t $\\nu_\\mu$ CC &\t Beam $\\nu_e$ &\t Beam $\\nu_\\tau$&\t Sig eff &\t Purity\\\\" 203 TH1F*
eff =
new TH1F((
"eff_"+suffix+
"_"+eff_suffix).c_str(),
204 "Efficiency vs Cut Value; ;Efficiency (%)",
205 sig->GetNbinsX(), sig->GetXaxis()->GetBinLowEdge(1),
206 sig->GetXaxis()->GetBinUpEdge(sig->GetNbinsX()));
207 TH1F* effxpur =
new TH1F((
"effxpur_"+suffix+
"_"+eff_suffix).c_str(),
208 "Efficiency*Purity vs Cut Value; ;Efficiency*Purity (%)",
209 sig->GetNbinsX(), sig->GetXaxis()->GetBinLowEdge(1),
210 sig->GetXaxis()->GetBinUpEdge(sig->GetNbinsX()));
211 TH1F*
pur =
new TH1F((
"pur_"+suffix+
"_"+eff_suffix).c_str(),
212 "Purity vs Cut Value; ;Purity (%)",
213 sig->GetNbinsX(), sig->GetXaxis()->GetBinLowEdge(1),
214 sig->GetXaxis()->GetBinUpEdge(sig->GetNbinsX()));
215 TH1F* fomsob =
new TH1F((
"sob_"+suffix+
"_"+eff_suffix).c_str(),
216 "s/#sqrt{b} vs Cut Value; ;s/#sqrt{b}",
217 sig->GetNbinsX(), sig->GetXaxis()->GetBinLowEdge(1),
218 sig->GetXaxis()->GetBinUpEdge(sig->GetNbinsX()));
219 TH1F* fomsosb =
new TH1F((
"sosb_"+suffix+
"_"+eff_suffix).c_str(),
220 "s/#sqrt{s+b} vs Cut Value; ;s/#sqrt{s+b}",
221 sig->GetNbinsX(), sig->GetXaxis()->GetBinLowEdge(1),
222 sig->GetXaxis()->GetBinUpEdge(sig->GetNbinsX()));
224 eff->GetXaxis()->CenterTitle();
225 eff->SetMaximum(100);
226 eff->GetYaxis()->CenterTitle();
227 pur->GetXaxis()->CenterTitle();
228 pur->GetYaxis()->CenterTitle();
229 fomsob->GetXaxis()->CenterTitle();
230 fomsob->GetYaxis()->CenterTitle();
231 fomsosb->GetXaxis()->CenterTitle();
232 fomsosb->GetYaxis()->CenterTitle();
234 eff->GetXaxis()->SetTitle(sig->GetXaxis()->GetTitle());
235 pur->GetXaxis()->SetTitle(sig->GetXaxis()->GetTitle());
237 fomsob->GetXaxis()->SetTitle(sig->GetXaxis()->GetTitle());
238 fomsosb->GetXaxis()->SetTitle(sig->GetXaxis()->GetTitle());
240 for(
int n = 0;
n < sig->GetNbinsX()+2; ++
n){
241 if(bkg->Integral(
n, -1) == 0)
break;
244 TGraph* effpurGraph=
new TGraph (ngpoints);
245 TGraph* rocGraph=
new TGraph (ngpoints);
246 double fompur_SoB=0.;
247 double fomeff_SoB=0.;
248 double fompur_SoSB=0.;
249 double fomeff_SoSB=0.;
252 double bestSoSB = -1;
255 double bestBkgCC = 0;
257 double totsig = sig_denom->Integral(0, -1);
258 double totbck = bck_denom->Integral(0, -1);
259 double fomeff, fompur;
261 for(
int n = 0;
n < sig->GetNbinsX()+2; ++
n){
262 const double nsig = sig->Integral(
n, -1);
263 const double nbkg = bkg->Integral(
n, -1);
264 const double nbkgcc = bkgCC->Integral(
n, -1);
265 const double nbkgbeam = bkgBeam->Integral(
n, -1);
269 double neff = nsig*100/(totsig);
270 double npur = nsig*100/(nsig+nbkg);
272 const double fomSoB = nsig/
sqrt(nbkg);
273 const double fomSoSB = nsig/
sqrt(nsig+nbkg);
277 pur->Fill(sig->GetXaxis()->GetBinCenter(
n), npur);
278 eff->Fill(sig->GetXaxis()->GetBinCenter(
n), neff);
279 effxpur->Fill(sig->GetXaxis()->GetBinCenter(
n), 100*(neff/100)*(npur/100));
280 effpurGraph->SetPoint(
n,neff,npur);
281 rocGraph->SetPoint(
n,nbkg/totbck,nsig/totsig);
282 fomsob->Fill(sig->GetXaxis()->GetBinCenter(
n), fomSoB);
283 fomsosb->Fill(sig->GetXaxis()->GetBinCenter(
n), fomSoSB);
286 if((
metric == 0 && fomSoB > bestSoB) ||
287 (
metric == 1 && fomSoSB > bestSoSB) ||
288 (
metric == 2 && fabs(sig->GetXaxis()->GetBinLowEdge(
n) - faCut) < .01)){
295 bestCuts[
metric] = sig->GetXaxis()->GetBinLowEdge(
n);
305 std::cout << std::fixed << std::setprecision(2);
307 <<
" &\t " << bestSoB <<
" &\t " << bestSoSB
308 <<
" &\t " << bestSig <<
" &\t " << bestBkg
309 <<
" &\t " << bestBkg-bestBkgCC-bestBeam
310 <<
" &\t " << bestBkgCC <<
" &\t " << bestBeam <<
" &\t " 311 <<
" &\t " << fomeff <<
"\\% &\t " << fompur <<
"\\%\\\\"<<
std::endl;
339 eff->GetYaxis()->SetTitle(
"Percentage");
340 eff->SetLineColor(
kRed);
341 pur->SetLineColor(
kBlue);
342 effxpur->SetLineColor(
kGreen+2);
343 eff->SetMaximum(110);
346 effxpur->Draw(
"csame");
360 TH2F* hpx =
new TH2F(
"hpx",
"hpx",100,0,100,100,0,100);
361 hpx->SetStats(kFALSE);
363 hpx->GetXaxis()->SetTitle(
"Efficiency (%)");
364 hpx->GetYaxis()->SetTitle(
"Purity (%)");
365 hpx->GetXaxis()->CenterTitle();
366 hpx->GetYaxis()->CenterTitle();
368 for(
double i = .5;
i < 10;
i += .5){
369 TGraph*
c =
new TGraph;
370 for(
double j = .01;
j < 101;
j += .1){
371 c->SetPoint(c->GetN(),
j, (100*
i*
i)/
j);
374 c->SetLineColor(kGray+1);
380 TMarker* m1 =
new TMarker(fomeff_SoB, fompur_SoB, kFullCircle);
381 m1->SetMarkerSize(1.5*m1->GetMarkerSize());
384 TMarker*
m2 =
new TMarker(fomeff_SoSB, fompur_SoSB, kFullTriangleUp);
385 m2->SetMarkerSize(1.5*m2->GetMarkerSize());
388 effpurGraph->SetLineWidth(2);
389 effpurGraph->Draw(
"C");
390 Print(
"effpurgraph", suffix+
"_"+eff_suffix);
393 TH2F* roch =
new TH2F(
"roch",
"roch",100,0,1,100,0,1);
394 roch->SetStats(kFALSE);
396 roch->GetXaxis()->SetTitle(
"False Positive Rate");
397 roch->GetYaxis()->SetTitle(
"True Positive Rate");
398 roch->GetXaxis()->CenterTitle();
399 roch->GetYaxis()->CenterTitle();
401 TLine* coin =
new TLine(0, 0, 1, 1);
402 coin->SetLineStyle(2);
404 rocGraph->SetLineWidth(2);
406 Print(
"rocGraph", suffix+
"_"+eff_suffix);
408 TFile*
outFile=
new TFile((suffix+
"_"+eff_suffix+
".root").c_str(),
"RECREATE");
409 rocGraph->Write(
"rocGraph");
410 effpurGraph->Write(
"effpurGraph");
415 Arrows(fomsob, bestCuts[0], bestCuts[1], faCut,
true);
416 Print(
"fomsob", suffix);
420 Arrows(fomsosb, bestCuts[0], bestCuts[1], faCut,
true);
421 Print(
"fomsosb", suffix);
428 TH1*& hSig, TH1*& hNC, TH1*& hCC, TH1*& hBeam, TH1*&hTotBkg)
455 hTotBkg = (TH1*)hNC->Clone(
UniqueName().c_str());
466 TH1 *hSig, *hNC, *hCC, *hBeam, *hTotBkg;
467 GetSpectra(pred, calc, hSig, hNC, hCC, hBeam, hTotBkg);
471 double kRealPot=6e20;
472 hSig->GetYaxis()->SetTitle(
TString::Format(
"Events / %.02lf#times10^{20} POT", kRealPot/1e20));
474 hSig->GetXaxis()->CenterTitle();
475 hSig->GetYaxis()->CenterTitle();
477 if(
maxy) hSig->GetYaxis()->SetRangeUser(0,
maxy);
478 hNC->Draw(
"hist same");
479 hCC->Draw(
"hist same");
480 hBeam->Draw(
"hist same");
481 TLegend* leg2 =
new TLegend(.125, .55, .5, .85);
482 leg2->AddEntry(hSig,
"Appeared #nu_{e}",
"l");
483 leg2->AddEntry(hCC,
"Survived #nu_{#mu}",
"l");
484 leg2->AddEntry(hNC,
"NC background",
"l");
485 leg2->AddEntry(hBeam,
"Beam #nu_{e} background",
"l");
486 leg2->SetFillStyle(0);
489 static bool once =
true;
492 TVirtualPad* bak = gPad;
494 TLegend*
leg =
new TLegend(.1, .1, .9, .9);
495 leg->AddEntry(hSig,
"#nu_{e} signal",
"l");
496 leg->AddEntry(hNC,
"NC background",
"l");
497 leg->AddEntry(hCC,
"#nu_{#mu} background",
"l");
498 leg->AddEntry(hBeam,
"Beam #nu_{e} background",
"l");
500 gPad->Print(
"plots/SAbless/eff_leg.pdf");
501 gPad->Print(
"plots/SAbless/eff_leg.eps");
502 gPad->Print(
"plots/SAbless/eff_leg.png");
510 for(
int i = 0;
i < h->GetNbinsX()+2; ++
i){
511 if(h->GetBinCenter(
i) > .75 &&
512 h->GetBinCenter(
i) < 3.5){
525 TH1 *hSigNum, *hNCNum, *hCCNum, *hBeamNum, *hTotBkgNum;
526 GetSpectra(predNum, calc, hSigNum, hNCNum, hCCNum, hBeamNum, hTotBkgNum);
528 TH1 *hSigDenom, *hNCDenom, *hCCDenom, *hBeamDenom, *hTotBkgDenom;
529 GetSpectra(predDenom, calc, hSigDenom, hNCDenom, hCCDenom, hBeamDenom, hTotBkgDenom);
531 hSigDenom->SetLineStyle(2);
532 hNCDenom->SetLineStyle(2);
533 hBeamDenom->SetLineStyle(2);
534 hTotBkgDenom->SetLineStyle(2);
535 hCCDenom->SetLineStyle(2);
539 if( label ==
"mode" ){
540 hNCDenom->GetXaxis()->SetLabelSize(0.06);
541 hNCDenom->GetXaxis()->SetBinLabel(1,
"QE");
542 hNCDenom->GetXaxis()->SetBinLabel(2,
"Res");
543 hNCDenom->GetXaxis()->SetBinLabel(3,
"DIS");
544 hNCDenom->GetXaxis()->SetBinLabel(4,
"Coh");
546 hSigNum->GetXaxis()->SetLabelSize(0.06);
547 hSigNum->GetXaxis()->SetBinLabel(1,
"QE");
548 hSigNum->GetXaxis()->SetBinLabel(2,
"Res");
549 hSigNum->GetXaxis()->SetBinLabel(3,
"DIS");
550 hSigNum->GetXaxis()->SetBinLabel(4,
"Coh");
554 hNCDenom->Draw(
"hist");
555 hCCDenom->Draw(
"hist same");
556 hBeamDenom->Draw(
"hist same");
557 hSigDenom->Draw(
"hist same");
558 Print(label,
id,
"nocut");
561 if(
maxy) hSigNum->GetYaxis()->SetRangeUser(0,
maxy);
563 hSigNum->GetYaxis()->CenterTitle();
564 hSigNum->Draw(
"hist");
565 hNCNum->Draw(
"hist same");
566 hBeamNum->Draw(
"hist same");
567 hCCNum->Draw(
"hist same");
568 Print(label,
id,
"cut");
573 <<
" sig: " << 100*hSigNum->Integral(0, -1)/hSigDenom->Integral(0, -1)
574 <<
" NC: " << 100*hNCNum->Integral(0, -1)/hNCDenom->Integral(0, -1)
575 <<
" CC: " << 100*hCCNum->Integral(0, -1)/hCCDenom->Integral(0, -1)
576 <<
" Beam: " << 100*hBeamNum->Integral(0, -1)/hBeamDenom->Integral(0, -1) <<
std::endl;
578 hSigNum->Divide(hSigDenom);
580 hSigNum->SetTitle(
"");
581 hSigNum->GetYaxis()->SetTitle(
"Efficiency (%)");
582 hSigNum->GetYaxis()->SetRangeUser(0, 100);
584 hSigNum->GetXaxis()->CenterTitle();
585 hSigNum->GetYaxis()->CenterTitle();
586 hSigNum->Draw(
"hist");
590 hNCNum->Divide(hNCDenom);
592 hNCNum->Draw(
"hist same");
596 hCCNum->Divide(hCCDenom);
598 hCCNum->Draw(
"hist same");
602 hBeamNum->Divide(hBeamDenom);
603 hBeamNum->Scale(100);
604 hBeamNum->Draw(
"hist same");
620 TLegend* leg2 =
new TLegend(.125, .6, .425, .85);
621 leg2->AddEntry(hSigNum,
"Signal",
"l");
622 leg2->AddEntry(hCCNum,
"#nu_{#mu} CC",
"l");
623 leg2->AddEntry(hNCNum,
"NC",
"l");
624 leg2->AddEntry(hBeamNum,
"Beam #nu_{e}",
"l");
625 leg2->SetFillStyle(0);
635 if(pidIdx == -1) ret =
"No selection";
636 if(pidIdx == 0) ret =
"LEM";
637 if(pidIdx == 1) ret =
"LID";
638 if(pidIdx == 2) ret =
"CVNe";
640 if(rhc) ret +=
" (RHC)";
else ret +=
" (FHC)";
650 if(pidIdx == -1) ret =
"nosel";
651 if(pidIdx == 0) ret =
"lem";
652 if(pidIdx == 1) ret =
"lid";
653 if(pidIdx == 2) ret =
"cvn";
655 if(rhc) ret +=
"_rhc";
else ret +=
"_fhc";
677 for(
int rhc =
false; rhc <=
true; ++rhc){
683 SpectrumLoader loader(
"/nova/ana/users/atsaris/work.files/cvn_full_chain_test_new/NEW_ERA_NEW_hadd_new/semfe_nonS_big.root");
684 SpectrumLoader loaderSwap(
"/nova/ana/users/atsaris/work.files/cvn_full_chain_test_new/NEW_ERA_NEW_hadd_new/semfe_S_big.root");
690 const int kNumPIDs = 3;
709 "Reconstructed energy (GeV)", kRecoEBinning,
715 "Reconstructed energy (GeV)",
720 "Reconstructed energy (GeV)",
727 "Reconstructed energy (GeV)",
733 "True visible energy (GeV)",
739 "True visible energy (GeV)",
744 "True visible energy (GeV)",
750 "True visible energy (GeV)",
790 "Reconstructed energy (GeV)", kRecoEBinning,
794 "Reconstructed energy (GeV)", kRecoEBinning,
798 "Reconstructed energy (GeV)", kRecoEBinning,
802 "True visible energy (GeV)", kRecoEBinning,
806 "True visible energy (GeV)", kRecoEBinning,
809 "True visible energy (GeV)", kRecoEBinning,
838 "X Vertex", kXvertexBinning,
842 "X Vertex", kXvertexBinning,
847 "X Vertex", kXvertexBinning,
851 "Y Vertex", kYvertexBinning,
855 "Y Vertex", kYvertexBinning,
860 "Y Vertex", kYvertexBinning,
864 "Z Vertex", kZvertexBinning,
868 "Z Vertex", kZvertexBinning,
873 "Z Vertex", kZvertexBinning,
881 for(
int pidIdx = 2; pidIdx < kNumPIDs; ++pidIdx){
882 TH1 *hSig, *hNC, *hCC, *hBeam, *hTotBkg;
883 GetSpectra(preds[pidIdx], &calc, hSig, hNC, hCC, hBeam, hTotBkg);
886 const double faCut = 0.75;
909 double totalSig=sigdenomNoCut->Integral(0, -1);
910 double totalBckNuCuCC=backnumuNoCut->Integral(0, -1);
911 double totalBckNuECC=backnueNoCut->Integral(0, -1);
912 double totalBckNC=backncNoCut->Integral(0, -1);
913 double totalBackground=totalBckNuCuCC+totalBckNuECC+totalBckNC;
914 double totalsob=totalSig/
sqrt(totalBackground);
915 double totalsosb=totalSig/
sqrt(totalSig+totalBackground);
916 double totalefficiency=100;
917 double totalpurity=(totalSig*100)/(totalSig+totalBackground);
919 std::cout << std::fixed << std::setprecision(2);
920 std::cout <<
" &\t " << totalsob <<
" &\t " << totalsosb
921 <<
" &\t " << totalSig <<
" &\t " << totalBackground
922 <<
" &\t " << totalBckNC
923 <<
" &\t " << totalBckNuCuCC <<
" &\t " << totalBckNuECC
924 <<
" &\t " << totalefficiency <<
"\\% &\t " << totalpurity <<
"\\%\\\\"<<
std::endl;
950 double totalPreselSig=sigdenomPresel->Integral(0, -1);
951 double totalPreselBckNuCuCC=backnumuPresel->Integral(0, -1);
952 double totalPreselBckNuECC=backnuePresel->Integral(0, -1);
953 double totalPreselBckNC=backncPresel->Integral(0, -1);
954 double totalPreselBackground=totalPreselBckNuCuCC+totalPreselBckNuECC+totalPreselBckNC;
955 double totalPreselsob=totalPreselSig/
sqrt(totalPreselBackground);
956 double totalPreselsosb=totalPreselSig/
sqrt(totalPreselSig+totalPreselBackground);
957 double totalPreselefficiency=100;
958 double totalPreselpurity=(totalPreselSig*100)/(totalPreselSig+totalPreselBackground);
960 std::cout << std::fixed << std::setprecision(2);
961 std::cout <<
" &\t " << totalPreselsob <<
" &\t " << totalPreselsosb
962 <<
" &\t " << totalPreselSig <<
" &\t " << totalPreselBackground
963 <<
" &\t " << totalPreselBckNC
964 <<
" &\t " << totalPreselBckNuCuCC <<
" &\t " << totalPreselBckNuECC
965 <<
" &\t " << totalPreselefficiency <<
"\\% &\t " << totalPreselpurity <<
"\\%\\\\"<<
std::endl;
968 backnumuPresel->Add(backnuePresel);
969 backnumuPresel->Add(backncPresel);
971 backnumuNoCut->Add(backnueNoCut);
972 backnumuNoCut->Add(backncNoCut);
974 FOMPlot(hSig, hTotBkg, hCC, hBeam, sigdenomNoCut, backnumuNoCut, cuts, faCut,
PIDFileTag(pidIdx, rhc),
"nocut");
const Binning kModeBinning
const Var kXvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.x;})
const Var kMode([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?-1:int(sr->mc.nu[0].mode);})
Neutrino interaction mode.
virtual void SetL(double L)=0
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
void FOMPlot(TH1 *sig, TH1 *bkg, TH1 *bkgCC, TH1 *bkgBeam, TH1 *sig_denom, TH1 *bck_denom, double *bestCuts, double faCut, std::string suffix, std::string eff_suffix)
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
Float_t y1[n_points_granero]
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 void SetDmsq21(const T &dmsq21)=0
Float_t x1[n_points_granero]
caf::Proxy< caf::SRHeader > hdr
Proxy for caf::StandardRecord.
caf::Proxy< std::vector< caf::SRNeutrino > > nu
const Var kTrueEVis([](const caf::SRProxy *sr){if(sr->mc.nu.empty()) return 0.;double ret=sr->mc.nu[0].E;if(!sr->mc.nu[0].iscc) ret *=sr->mc.nu[0].y;return ret;})
virtual void SetTh13(const T &th13)=0
const Var kYvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.y;})
const Cut ISMC([](const caf::SRProxy *sr){if(sr->hdr.ismc) return true;return false;})
const Color_t kNumuBackgroundColor
virtual void SetDmsq32(const T &dmsq32)=0
void PrintEffs(TH1 *h, const char *title)
void PlotEffs(IPrediction *predNum, IPrediction *predDenom, osc::IOscCalc *calc, std::string title, std::string label, std::string id, double maxy=0)
const Var kY([](const caf::SRProxy *sr){float tmp=0.f;if(sr->mc.nu.empty()) return tmp;tmp=sr->mc.nu[0].y;return tmp;})
const Color_t kNueSignalColor
caf::Proxy< caf::SRElastic > elastic
Charged-current interactions.
const Binning kXvertexBinning
const Color_t kBeamNueBackgroundColor
Simple oscillation probability calculator that has no solar term or mass hierarchy or delta so it's s...
const Binning kYvertexBinning
virtual void Go() override
Load all the registered spectra.
const Binning kZvertexBinning
const SystShifts kNoShift
void Print(std::string prefix, std::string name, std::string suffix="")
caf::Proxy< caf::SRTruthBranch > mc
static constexpr Double_t m2
virtual void SetRho(double rho)=0
void GetSpectra(IPrediction *pred, osc::IOscCalc *calc, TH1 *&hSig, TH1 *&hNC, TH1 *&hCC, TH1 *&hBeam, TH1 *&hTotBkg)
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
void resetCalc(osc::IOscCalcAdjustable *calc)
virtual void SetTh23(const T &th23)=0
caf::Proxy< caf::SRVector3D > vtx
Neutral-current interactions.
std::string PIDLongName(int pidIdx, bool rhc)
Both neutrinos and antineutrinos.
Standard interface to all prediction techniques.
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
const Color_t kTotalMCColor
const Binning kRecoEBinning
caf::Proxy< caf::SRVertexBranch > vtx
All neutrinos, any flavor.
void Arrows(TH1 *sigId, double bestCutSoB, double bestCutSoSB, double faCut, bool noarrow=false)
void PlotSpectra(Spectrum spectra[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, std::string det, int POT, std::string option)
const Color_t kNCBackgroundColor
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.
std::string PIDFileTag(int pidIdx, bool rhc)
const Var kZvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.z;})
virtual void SetTh12(const T &th12)=0
virtual void SetdCP(const T &dCP)=0