draw_decomp_plots.C
Go to the documentation of this file.
1 #include "OscLib/OscCalcDumb.h"
2 
3 #include "CAFAna/Vars/Vars.h"
6 
7 #include "CAFAna/Cuts/Cuts.h"
10 #include "CAFAna/Cuts/TruthCuts.h"
11 #include "CAFAna/Cuts/NueCutsSecondAna.h"
12 #include "CAFAna/Core/Spectrum.h"
15 
16 #include "CAFAna/Analysis/Style.h"
17 #include "CAFAna/Analysis/SALoaders.h"
27 
28 #include "CAFAna/Systs/Systs.h"
29 #include "CAFAna/Core/SystShifts.h"
30 
31 #include "Utilities/func/MathUtil.h"
32 
33 #include "TROOT.h"
34 #include "TCanvas.h"
35 #include "TH2.h"
36 #include "TFile.h"
37 #include "TLegend.h"
38 #include "TProfile.h"
39 #include "TRandom3.h"
40 #include "THStack.h"
41 #include "TGaxis.h"
42 #include "TLine.h"
43 #include "TStyle.h"
44 #include "TLatex.h"
45 #include "TGraph.h"
46 
47 #include "TColor.h"
48 
49 
50 #include <iostream>
51 #include <cmath>
52 
53 using namespace ana;
54 
56 //Adds "NOvA Preliminary" tag in the top right
57 {
58  TLatex* prelim = new TLatex(.9, .95, "NOvA Preliminary");
59  prelim->SetTextColor(kBlue);
60  prelim->SetNDC();
61  prelim->SetTextSize(2/30.);
62  prelim->SetTextAlign(32);
63  prelim->Draw();
64 }
65 
67 //adds line to divide the canvas in the three PID bins
68 {
69  TGraph * l1 = new TGraph;
70  l1->SetPoint(0, 6, 0);
71  l1->SetPoint(1, 6, 50000);
72  TGraph * l2 = new TGraph;
73  l2->SetPoint(0, 12, 0);
74  l2->SetPoint(1, 12, 50000);
75  for (TGraph* l: {l1,l2}){
76  l->SetLineWidth(1);
77  l->Draw("l same");
78  }
79 }
80 
82 //adds PID and POT labels
83 {
84  gPad->Update();
85  const double y = gPad->GetUymax()*0.94;
86  const ana::Binning * bins =0;
87  if (pid=="LID") bins = & ana::kLIDNLBinning;
88  if (pid=="LEM") bins = & ana::kLEMNLBinning;
89  if (pid=="CVN") bins = & ana::kCVNNLBinning;
90  assert (bins);
91 
92  double firstwidth;
93 
94  for (int i=0; i<3; i++){
95  TLatex* ltx = new TLatex(3+6*i,y,TString::Format("%g < %s < %g",
96  bins->Edges()[i],
97  pid.c_str(),
98  bins->Edges()[i+1]));
99  ltx->SetTextSize(0.035);
100  ltx->SetTextAlign(22);
101  ltx->Draw();
102  if (i==0) firstwidth=ltx->GetXsize();
103  }
104  TLatex* pot = new TLatex(3-firstwidth/2,gPad->GetUymax()*0.84,"3.72#times10^{20} POT");
105  pot->SetTextSize(0.035);
106  pot->SetTextAlign(12);
107  pot->Draw();
108 }
109 
110 void FillWithDimmerColor (TH1* h, float dim=0.65, bool usealpha=false)
111 //like FillWithDimColor, but with slightly more options
112 {
113  if ( usealpha ){
114  h->SetFillColorAlpha(h->GetLineColor(),dim);
115  return;
116  }
117 
118  TColor *color = gROOT->GetColor(h->GetLineColor());
119  float R,G,B,hR,hG,hB,hHue,hSat,hVal;
120 
121  color->GetRGB(hR,hG,hB);
122  color->RGB2HSV(hR,hG,hB,hHue,hSat,hVal);
123  color->HSV2RGB(hHue,dim*hSat,hVal,R,G,B);
124 
125  h->SetFillColor(color->GetColor(R,G,B));
126 }
127 
128 
129 std::vector<TH1*> NDHists(MichelDecomp* mb, std::string s)
130 {
131  std::vector<TH1*> v;
132  double ndpot = 8.09E20;
133  double max = 0;
134  std::cout << ndpot << std::endl;
135  if (s == "cc") {
136  v.push_back((TH1*)(mb->MC_NumuComponent() +
137  mb->MC_AntiNumuComponent()).ToTH1(ndpot));
138  v.push_back((TH1*)(mb->NumuComponent() +
139  mb->AntiNumuComponent()).ToTH1(ndpot));
140  }
141  if (s == "nc") {
142  v.push_back((TH1*)mb->MC_NCTotalComponent().ToTH1(ndpot));
143  v.push_back((TH1*)mb->NCTotalComponent().ToTH1(ndpot));
144  }
145  if (s == "ne") {
146  v.push_back((TH1*)(mb->MC_NueComponent() +
147  mb->MC_AntiNueComponent()).ToTH1(ndpot));
148  v.push_back((TH1*)(mb->NueComponent() +
149  mb->AntiNueComponent()).ToTH1(ndpot));
150  }
151  std::cout << v.size() << std::endl;
152  v.back()->SetLineWidth(2);
153  std::cout << v.back()->Integral() << std::endl;
154  if (v.back()->GetMaximum() > max) max = v.back()->GetMaximum();
155 
156  v[0]->SetMaximum(1.2*max);
157 
158  v[0]->SetLineColor(kRed);
159  v[1]->SetLineColor(kGreen+2);
160 
161  v[0]->Scale(0.001); // Scale to a manageable y-axis range
162  v[1]->Scale(0.001);
163 
164  for (int i = 0; i < 2; i++){
165  v[i]->GetXaxis()->SetTitle("Reconstructed Energy [GeV]");
166  v[i]->GetXaxis()->CenterTitle();
167  v[i]->GetYaxis()->SetTitle("10^{3} Events / 8.09e20");
168  v[i]->GetYaxis()->CenterTitle();
169  v[i]->SetTitle("");
170  }
171  return v;
172 }
173 
174 void PlotComp(std::vector<TH1*> hs, std::string label)
175 {
176  TH1* h1 = (TH1*)hs[1]->Clone("h1");
177  TH1* h2 = (TH1*)hs[2]->Clone("h2");
178  TH1* h3 = (TH1*)hs[3]->Clone("h3");
179 
180  h1->Divide(hs[0]);
181  h2->Divide(hs[0]);
182  h3->Divide(hs[0]);
183 
184  h1->GetYaxis()->SetTitle("Scale Factor");
185 
186  gStyle->SetPadLeftMargin(0.15);
187 
188  NuePlotStyle style(label.c_str());
189  TCanvas* can = style.MakeSACanvas(hs);
190 
191  h1->Draw("same,hist");
192  h2->Draw("same,hist");
193  h3->Draw("same,hist");
194 
195  TLegend *leg = new TLegend(0.28,0.68,0.48,0.88);
196  leg->AddEntry(h1, "Prop / MC", "l");
197  leg->AddEntry(h2, "Michel / MC", "l");
198  leg->AddEntry(h3, "Combo / MC", "l");
199  leg->Draw();
200 
201  can->SaveAs(("MDCMP_rats_"+label+".png").c_str());
202 }
203 
204 void PlotRat(std::vector<TH1*> hs, std::string label)
205 {
206  double max = 0;
207  for (int i = 0; i < (int)hs.size(); i++)
208  if (hs[i]->GetMaximum() > max) max = hs[i]->GetMaximum();
209 
210  hs[0]->GetYaxis()->SetRangeUser(0,1.2*max);
211 
212  gStyle->SetPadLeftMargin(0.15);
213 
214  NuePlotStyle style(label.c_str());
215  TCanvas* can = style.MakeSACanvas(hs);
216 
217  hs[0]->Draw("hist,same");
218  hs[1]->Draw("same,hist");
219  hs[2]->Draw("same,hist");
220  hs[3]->Draw("same,hist");
221 
222  TLegend *leg = new TLegend(0.4,0.68,0.6,0.88);
223  leg->AddEntry(hs[0], "MC", "l");
224  leg->AddEntry(hs[1], "Prop", "l");
225  leg->AddEntry(hs[2], "Michel", "l");
226  leg->AddEntry(hs[3], "Combo", "l");
227  leg->Draw();
228 
229  can->SaveAs(("MDCMP_hist_"+label+".png").c_str());
230 }
231 
232 void DrawRatioAnaBin(TH1 *cc, TH1 *nc, TH1 *ne, int idx)
233 {
234  TH1 *tcc = (TH1F*)cc->Clone(UniqueName().c_str());
235  TH1 *tnc = (TH1F*)nc->Clone(UniqueName().c_str());
236  TH1 *tne = (TH1F*)ne->Clone(UniqueName().c_str());
237 
238  for (int i = 1; i <= 27; i++){
239  if ((i-1)/9 != idx || (i-1)%9 == 0){
240  tcc->SetBinContent(i,-1);
241  tnc->SetBinContent(i,-1);
242  tne->SetBinContent(i,-1);
243  }
244  }
245  tcc->Draw("][,hist,same");
246  tnc->Draw("][,hist,same");
247  tne->Draw("][,hist,same");
248 }
249 
250 void PlotRatio(std::vector<TH1*> ccs,
251  std::vector<TH1*> ncs,
252  std::vector<TH1*> nes)
253 {
254  TH1F* ccratio = (TH1F*) ccs[1]->Clone("ccratio");
255  ccratio->Divide(ccs[0]);
256  ccratio->SetLineColor(kNumuBackgroundColor);
257  ccratio->SetFillStyle(0);
258  ccratio->GetYaxis()->SetTitle("Ratio");
259  TH1F* ncratio = (TH1F*) ncs[1]->Clone("ncratio");
260  ncratio->Divide(ncs[0]);
261  ncratio->SetLineColor(kNCBackgroundColor);
262  ncratio->SetFillStyle(0);
263  TH1F* neratio = (TH1F*) nes[1]->Clone("neratio");
264  neratio->Divide(nes[0]);
265  neratio->SetLineColor(kBeamNueBackgroundColor);
266  neratio->SetFillStyle(0);
267 
268  TLine* one = new TLine(0,1,27,1);
269  one->SetLineStyle(2);
270 
271  TLegend *leg = new TLegend(0.41,0.62,0.61,0.82);
272  leg->SetFillStyle(0);
273  leg->AddEntry(neratio, "Beam #nu_{e} / MC", "l");
274  leg->AddEntry(ccratio, "#nu_{#mu} CC / MC", "l");
275  leg->AddEntry(ncratio, "NC / MC", "l");
276 
277  TCanvas* can = new TCanvas();
278  TH1 *axes = new TH1F(UniqueName().c_str(),"",27,0,27);
279  // Explicitly cut out ratio of 15ish in first bin
280  axes->GetYaxis()->SetRangeUser(0,2.2);
281  axes->GetYaxis()->SetTitle("Decomposition Scale");
282  axes->GetYaxis()->CenterTitle();
283  axes->GetXaxis()->SetTitle("Reconstructed neutrino energy (GeV)");
284  axes->GetXaxis()->CenterTitle();
285  //axes->GetYaxis()->SetTitleOffset(1.2);
286  axes->Draw();
287 
288  Nue2017FourBinLabels(0.98,0.028,kGray+3,false);
289  Nue2017FourBinAxis(axes,true,false);
290  Nue2017FourBinDivisions(kGray+3,3);
291 
292  // The data / MC ratio is about 16 in the first bin.
293  // Since there's no events down there, let's just suppress the histogram
294  // for that bin.
295  DrawRatioAnaBin(ccratio,ncratio,neratio,0);
296  DrawRatioAnaBin(ccratio,ncratio,neratio,1);
297  DrawRatioAnaBin(ccratio,ncratio,neratio,2);
298 
299 
300  //Preliminary(); //uncomment this line if plot is preliminary
301  gPad->SetFillStyle(0);
302  /*
303  ccratio->Draw("][,hist,same");
304  ncratio->Draw("][,hist,same");
305  neratio->Draw("][,hist,same");
306  */
307  one->Draw();
308  leg->Draw();
309 
310  can->SaveAs("Nue2017_MDCMP_ratio.pdf");
311  can->SaveAs("Nue2017_MDCMP_ratio.png");
312  can->SaveAs("Nue2017_MDCMP_ratio.eps");
313  can->SaveAs("Nue2017_MDCMP_ratio.gif");
314 
315 }
316 
317 
318 void PlotStack(std::vector<TH1*> ccs,
319  std::vector<TH1*> ncs,
320  std::vector<TH1*> nes,
321  bool PlotMC=true, bool PlotDecomp=true)
322 {
323 
324  TH1D* test = new TH1D (UniqueName().c_str(),"",10,0,1);
325  test->SetLineStyle(2);
326  test->SetLineColor(kBlack);
327  test->SetLineWidth(2);
328 
329  TH1F * data = (TH1F*)ccs[1]->Clone(UniqueName().c_str());
330  data->Add(ncs[1]);
331  data->Add(nes[1]);
332  data->SetLineColor(kBlack);
333  data->SetMarkerStyle(kFullCircle);
334  data->SetMarkerSize(1);
335 
336 
337 
338  THStack *combostack = new THStack(UniqueName().c_str(),"");
339  nes[1]->SetLineColor(kBeamNueBackgroundColor);
340  nes[1]->SetLineWidth(2);
341  nes[1]->SetFillStyle(1001);
342  FillWithDimmerColor(nes[1],0.65,true);
343  combostack->Add(nes[1]);
344  ccs[1]->SetLineColor(kNumuBackgroundColor);
345  ccs[1]->SetLineWidth(2);
346  ccs[1]->SetFillStyle(1001);
347  FillWithDimmerColor(ccs[1],0.25, true);
348  combostack->Add(ccs[1]);
349  ncs[1]->SetLineColor(kNCBackgroundColor);
350  ncs[1]->SetLineWidth(2);
351  ncs[1]->SetFillStyle(1001);
352  FillWithDimmerColor(ncs[1], 0.10, true);
353  combostack->Add(ncs[1]);
354 
355  THStack *mcstack = new THStack(UniqueName().c_str(),"");
356  nes[0]->SetLineColor(kBeamNueBackgroundColor);
357  nes[0]->SetLineStyle(2);
358  FillWithDimmerColor(nes[0],1e-6,true);
359  if (PlotMC && !PlotDecomp){
360  nes[0]->SetLineStyle(1);
361  FillWithDimmerColor(nes[0],0.65,true);
362  nes[0]->SetFillStyle(1001);
363  }
364  nes[0]->SetLineWidth(2);
365  mcstack->Add(nes[0]);
366  ccs[0]->SetLineColor(kNumuBackgroundColor);
367  ccs[0]->SetLineStyle(2);
368  ccs[0]->SetFillStyle(0);
369  FillWithDimmerColor(ccs[0],1e-6,true);
370  if (PlotMC && !PlotDecomp){
371  ccs[0]->SetLineStyle(1);
372  FillWithDimmerColor(ccs[0],0.25,true);
373  ccs[0]->SetFillStyle(1001);
374  }
375  ccs[0]->SetLineWidth(2);
376  mcstack->Add(ccs[0]);
377  ncs[0]->SetLineColor(kNCBackgroundColor);
378  ncs[0]->SetLineStyle(2);
379  ncs[0]->SetFillStyle(0);
380  FillWithDimmerColor(ncs[0],1e-6,true);
381  if (PlotMC && !PlotDecomp){
382  ncs[0]->SetLineStyle(1);
383  FillWithDimmerColor(ncs[0],0.10,true);
384  ncs[0]->SetFillStyle(1001);
385  }
386  ncs[0]->SetLineWidth(2);
387  mcstack->Add(ncs[0]);
388 
389  TCanvas* can = new TCanvas();
390 
391  TH1 *axes = new TH1F(UniqueName().c_str(),"",27,0,27);
392  // Explicitly cut out ratio of 15ish in first bin
393  double max= std::max(mcstack->GetMaximum(),combostack->GetMaximum());
394  axes->GetYaxis()->SetRangeUser(0,1.5*max);
395  axes->GetYaxis()->SetTitle("10^{3} Events / 8.09#times10^{20}");
396  axes->GetYaxis()->CenterTitle();
397  axes->GetXaxis()->SetTitle("Reconstructed neutrino energy (GeV)");
398  axes->GetXaxis()->CenterTitle();
399  axes->Draw();
400 
401  Nue2017FourBinLabels(0.98,0.028,kGray+3,false);
402  Nue2017FourBinAxis(axes,true,false);
403  Nue2017FourBinDivisions(kGray+3,3);
404 
405 
406  can->SetFrameFillColor(0);
407  can->SetFrameFillStyle(4000);
408  gPad->SetFillStyle(0);
409 
410  if (PlotMC) mcstack->Draw("noclear,hist,same");
411  if (PlotDecomp) combostack->Draw("noclear,hist,same");
412  data->Draw("E1,same");
413 
414  TLegend *leg = new TLegend(0.41,0.53,0.61,0.83);
415  leg->SetTextSize(0.038);
416  leg->AddEntry(data, "ND Data","lep");
417  leg->AddEntry(ncs[1], "NC", "f");
418  leg->AddEntry(ccs[1], "#nu_{#mu} CC", "f");
419  leg->AddEntry(nes[1], "Beam #nu_{e}", "f");
420  if (PlotDecomp && PlotMC) leg->AddEntry(test, "Uncorrected MC", "l");
421  leg->Draw();
422 
423  std::string appen = "";
424  if ( PlotMC && !PlotDecomp) appen = "_MCOnly";
425  if (!PlotMC && PlotDecomp) appen = "_DecompOnly";
426  can->SaveAs(("Nue2017_MDCMP_stack"+appen+".pdf").c_str());
427  can->SaveAs(("Nue2017_MDCMP_stack"+appen+".png").c_str());
428  can->SaveAs(("Nue2017_MDCMP_stack"+appen+".eps").c_str());
429  can->SaveAs(("Nue2017_MDCMP_stack"+appen+".gif").c_str());
430 }
431 
432 void PlotNME(TFile *in)
433 {
434  TCanvas *can = new TCanvas();
435 
436  TH2F *da2D = (TH2F*)in->Get("MichelDecomp_Plots/templates/DataTemplate");
437  TH2F *cc2D = (TH2F*)in->Get("MichelDecomp_Plots/templates/NumuTemplate");
438  TH2F *nc2D = (TH2F*)in->Get("MichelDecomp_Plots/templates/NCTemplate");
439  TH2F *ne2D = (TH2F*)in->Get("MichelDecomp_Plots/templates/NueTemplate");
440 
441  TH1D *da = (TH1D*)da2D->ProjectionY();
442  TH1D *cc = (TH1D*)cc2D->ProjectionY();
443  TH1D *nc = (TH1D*)nc2D->ProjectionY();
444  TH1D *ne = (TH1D*)ne2D->ProjectionY();
445 
446  da->Scale(0.001);
447  cc->Scale(0.001);
448  ne->Scale(0.001);
449  nc->Scale(0.001);
450 
451  THStack *st = new THStack(UniqueName().c_str(),"");
452 
453  ne->SetLineColor(kBeamNueBackgroundColor);
454  ne->SetLineWidth(2);
455  ne->SetFillStyle(1001);
456  FillWithDimmerColor(ne,0.65,true);
457  st->Add(ne);
458 
459  nc->SetLineColor(kNCBackgroundColor);
460  nc->SetLineWidth(2);
461  nc->SetFillStyle(1001);
462  FillWithDimmerColor(nc,0.25,true);
463  st->Add(nc);
464 
465  cc->SetLineColor(kNumuBackgroundColor);
466  cc->SetLineWidth(2);
467  cc->SetFillStyle(1001);
468  FillWithDimmerColor(cc,0.10,true);
469  st->Add(cc);
470 
471 
472  da->GetXaxis()->SetTitle("Number of Michel Electrons");
473  da->GetXaxis()->CenterTitle();
474  da->GetYaxis()->SetTitle("10^{3} Events / 8.09#times10^{20}");
475  da->GetYaxis()->CenterTitle();
476  da->SetMarkerStyle(8);
477  da->GetYaxis()->SetRangeUser(0,27);
478 
479  for (int i = 1; i <= 3; i++)
480  da->SetBinError(i,da->GetBinContent(i)/1000);
481 
482  da->Draw("E1");
483  st->Draw("same");
484 
485  TLegend *leg = new TLegend(0.5,0.54,0.8,0.78);
486  leg->AddEntry(da, "ND Data","lep");
487  leg->AddEntry(nc, "NC", "f");
488  leg->AddEntry(cc, "#nu_{#mu} CC", "f");
489  leg->AddEntry(ne, "Beam #nu_{e}", "f");
490  leg->Draw();
491 
492  can->SaveAs("Nue2017_NME.pdf");
493  can->SaveAs("Nue2017_NME.png");
494  can->SaveAs("Nue2017_NME.eps");
495  can->SaveAs("Nue2017_NME.gif");
496 }
497 
499 {
500  std::vector<TH1*> ccs = NDHists(mb, "cc");
501  std::vector<TH1*> ncs = NDHists(mb, "nc");
502  std::vector<TH1*> nes = NDHists(mb, "ne");
503 
504  PlotRatio(ccs,ncs,nes);
505  //PlotStack(ccs,ncs,nes,true,true); // MC + Decomp
506  //PlotStack(ccs,ncs,nes,true,false); // MC Only
507  //PlotStack(ccs,ncs,nes,false,true); // Decomp Only
508 }
509 
511 {
512 
513  TFile *in = TFile::Open("mdcmp_hists.root");
514 
515  in->cd("decomp");
516  MichelDecomp* mb = MichelDecomp::LoadFrom(gDirectory).release();
517  double ndpot = mb->NueComponent().POT();
518  std::cout << "We see a total of " << ndpot << " POT" << std::endl;
520 
521  MakeDCMPPlots(mb);
522  PlotNME(in);
523 }
void PlotStack(Spectrum spectra[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string det, double POT, double potEquiv, PlotOptions opt, Spectrum *dataspec)
void Nue2017FourBinLabels(const double yNDC, const double textsize, const int color, const bool merged)
T max(const caf::Proxy< T > &a, T b)
void PIDDivisions()
void Nue2017FourBinAxis(TH1 *axes, bool drawLabels, bool merged)
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Spectrum MC_AntiNumuComponent() const override
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:209
const Binning kCVNNLBinning
Definition: Binnings.cxx:20
TH1F * h3
Definition: berger.C:36
void DrawRatioAnaBin(TH1 *cc, TH1 *nc, TH1 *ne, int idx)
void PIDBinLabels(std::string pid)
virtual Spectrum AntiNumuComponent() const override
virtual Spectrum NumuComponent() const override
osc::OscCalcDumb calc
const Color_t kNumuBackgroundColor
Definition: Style.h:30
virtual Spectrum AntiNueComponent() const override
static std::unique_ptr< MichelDecomp > LoadFrom(TDirectory *dir, const std::string &name)
const char * label
const XML_Char const XML_Char * data
Definition: expat.h:268
const XML_Char * s
Definition: expat.h:262
Spectrum MC_NCTotalComponent() const override
const Color_t kBeamNueBackgroundColor
Definition: Style.h:24
void FillWithDimmerColor(TH1 *h, float dim=0.65, bool usealpha=false)
virtual Spectrum NueComponent() const override
#define pot
Simple oscillation probability calculator that has no solar term or mass hierarchy or delta so it&#39;s s...
Definition: OscCalcDumb.h:16
#define R(x)
TLatex * prelim
Definition: Xsec_final.C:133
double POT() const
Definition: Spectrum.h:231
void Preliminary()
const std::vector< double > & Edges() const
Definition: Binning.h:30
OStream cout
Definition: OStream.cxx:6
void PlotRat(std::vector< TH1 * > hs, std::string label)
void PlotNME(TFile *in)
TH1F * h2
Definition: plot.C:45
Spectrum MC_NumuComponent() const override
void draw_decomp_plots()
const Binning bins
Definition: NumuCC_CPiBin.h:8
TH1F * h1
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
ifstream in
Definition: comparison.C:7
void MakeDCMPPlots(MichelDecomp *mb)
const Binning kLIDNLBinning
Definition: Binnings.cxx:19
void cc()
Definition: test_ana.C:28
const Binning kLEMNLBinning
Definition: Binnings.cxx:18
assert(nhit_max >=nhit_nbins)
void PlotRatio(std::vector< TH1 * > ccs, std::vector< TH1 * > ncs, std::vector< TH1 * > nes)
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
Spectrum MC_NueComponent() const override
void Nue2017FourBinDivisions(const int color, const int style)
std::vector< TH1 * > NDHists(MichelDecomp *mb, std::string s)
auto one()
Definition: PMNS.cxx:49
void PlotComp(std::vector< TH1 * > hs, std::string label)
Float_t e
Definition: plot.C:35
Spectrum MC_AntiNueComponent() const override
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
const Color_t kNCBackgroundColor
Definition: Style.h:22
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition: Utilities.cxx:30
virtual Spectrum NCTotalComponent() const override