Functions | Variables
plot_BEN.C File Reference
#include "3FlavorAna/Plotting/NuePlotStyle.h"
#include "CAFAna/Analysis/Style.h"
#include "CAFAna/Analysis/Exposures.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "3FlavorAna/Decomp/BENDecomp.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "CAFAna/Vars/PPFXWeights.h"
#include "CAFAna/Vars/HistAxes.h"
#include "Utilities/rootlogon.C"
#include "TFile.h"
#include "TLine.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "TObject.h"
#include "THStack.h"
#include "TH3.h"
#include "TH2.h"
#include "TH1.h"
#include "TROOT.h"
#include "TGaxis.h"
#include <iomanip>

Go to the source code of this file.

Functions

void SetPaletteS ()
 
void CornerLabels (std::string Str)
 
void PlotPionPlots (BENDecomp *dcmp, std::string ananame)
 
void CompareDecompDataMC (BENDecomp *ben, std::string ana)
 
void plot_BEN (const std::string file)
 for 2018 official uncomment the two lines you see below and comment out the general lines More...
 

Variables

const double pot = 1.10158e+21
 
std::string fname = "nue_dcmp.root"
 
const std::string path = "plots"
 

Function Documentation

void CompareDecompDataMC ( BENDecomp ben,
std::string  ana 
)

Definition at line 209 of file plot_BEN.C.

References ana::BENDecomp::AntiNueComponent(), ana::BENDecomp::AntiNumuComponent(), cc(), ana::CenterTitles(), om::cout, ana::BENDecomp::Data_Component(), APDHVSetting::dummy, allTimeWatchdog::endl, ana::kBeamNueBackgroundColor, ana::kBeamNueBarBackgroundColor, ana::kNCBackgroundColor, ana::kNumuBackgroundColor, ana::kNumuBarBackgroundColor, kRed, MECModelEnuComparisons::leg, ana::BENDecomp::MC_AntiNueComponent(), ana::BENDecomp::MC_AntiNumuComponent(), ana::BENDecomp::MC_NCTotalComponent(), ana::BENDecomp::MC_NueComponent(), ana::BENDecomp::MC_NumuComponent(), nc, ana::BENDecomp::NCTotalComponent(), ana::BENDecomp::NueComponent(), ana::BENDecomp::NumuComponent(), path, pot, Preliminary(), rootlogon(), Simulation(), string, and ana::Spectrum::ToTH1().

209  {
210  const std::string path = "plots";
211 rootlogon();
212 std::cout<<ananame<<": "<< pot<<std::endl;
213 auto data = dcmp->Data_Component().ToTH1(pot);
214 data->SetMarkerStyle(kFullCircle);
215 
216 //uncorrected first
217 auto ccmc = dcmp->MC_NumuComponent().ToTH1(pot);
218 ccmc->SetLineColor(kNumuBackgroundColor);
219 ccmc->SetLineStyle(7);
220 auto ccbarmc=dcmp->MC_AntiNumuComponent().ToTH1(pot);
221 ccbarmc->SetLineColor(kNumuBarBackgroundColor);
222 ccbarmc->SetLineStyle(7);
223 auto nemc = dcmp->MC_NueComponent().ToTH1(pot);
224 nemc->SetLineColor(kBeamNueBackgroundColor);
225 nemc->SetLineStyle(7);
226 auto nebarmc = dcmp->MC_AntiNueComponent().ToTH1(pot);
227 nebarmc->SetLineColor(kBeamNueBarBackgroundColor);
228 nebarmc->SetLineStyle(7);
229 auto ncmc = (dcmp->MC_NCTotalComponent()).ToTH1(pot);
230 ncmc->SetLineColor(kNCBackgroundColor);
231 ncmc->SetLineStyle(7);
232 
233 auto totalmc = ( dcmp->MC_NumuComponent()+dcmp->MC_AntiNumuComponent()+dcmp->MC_NueComponent() +dcmp->MC_AntiNueComponent()+dcmp->MC_NCTotalComponent()).ToTH1(pot,kRed,2);
234 
235 
236 THStack * hsmc = new THStack ("hsmc","");
237 hsmc->Add(nemc, "hist");
238 hsmc->Add(nebarmc,"hist");
239 hsmc->Add(ncmc,"hist");
240 hsmc->Add(ccmc, "hist");
241 hsmc->Add(ccbarmc, "hist");
242 
243 char leg_data[50], leg_tot[50], leg_nemc[50],leg_nebarmc[50],leg_ccmc[50],leg_ccbarmc[50],leg_nc[50];
244 
245 sprintf(leg_data, "Data: Bin1= %.1f, Bin2= %.1f", data->Integral(0,9), data->Integral(10, 18));
246 // sprintf(leg_tot, "Tot MC: Bin1= %.1f, Bin2= %.1f", totalmc->Integral(0,9), totalmc->Integral(10, 18));
247 sprintf(leg_nemc, "#{nu}_{e}: Bin1= %.1f, Bin2= %.1f", nemc->Integral(0,9), nemc->Integral(10, 18));
248 sprintf(leg_nebarmc, "#bar{#nu}_{e}: Bin1= %.1f, Bin2= %.1f", nebarmc->Integral(0,9), nebarmc->Integral(10, 18));
249 sprintf(leg_ccmc, "#{nu}_{#mu}: Bin1= %.1f, Bin2= %.1f", ccmc->Integral(0,9), ccmc->Integral(10, 18));
250 sprintf(leg_ccbarmc, "#bar{#nu}_{#mu}: Bin1= %.1f, Bin2= %.1f", ccbarmc->Integral(0,9), ccbarmc->Integral(10, 18));
251 sprintf(leg_nc, "NC: Bin1= %.1f, Bin2= %.1f", ncmc->Integral(0,9), ncmc->Integral(10, 18));
252 
253 // corrected
254 
255 auto cc = dcmp->NumuComponent().ToTH1(pot);
256 cc->SetLineColor(kNumuBackgroundColor);
257 auto ccbar = dcmp->AntiNumuComponent().ToTH1(pot);
258 ccbar->SetLineColor(kNumuBarBackgroundColor);
259 
260 auto ne = dcmp->NueComponent(). ToTH1(pot);
261 ne->SetLineColor(kBeamNueBackgroundColor );
262 auto nebar = dcmp->AntiNueComponent(). ToTH1(pot);
263 nebar->SetLineColor(kBeamNueBarBackgroundColor );
264 
265 auto nc = (dcmp->NCTotalComponent()).ToTH1(pot);
266 nc->SetLineColor(kNCBackgroundColor);
267 auto totalmcc = ( dcmp->NumuComponent()+dcmp->AntiNumuComponent()+dcmp->NueComponent() +dcmp->AntiNueComponent()+dcmp->NCTotalComponent()).ToTH1(pot,kRed);
268 
269 THStack * hs = new THStack ("hs","");
270 
271 hs->Add(ne, "hist");
272 hs->Add(nebar, "hist");
273 hs->Add(nc,"hist");
274 hs->Add(cc, "hist");
275 hs->Add(ccbar, "hist");
276 
277 char leg_totc[50], leg_ne[50],leg_nebar[50],leg_cc[50],leg_ccbar[50],leg_ncc[50];
278 
279 sprintf(leg_totc, "MC: Bin1= %.1f, Bin2= %.1f", totalmcc->Integral(0,9), totalmcc->Integral(10, 18));
280 sprintf(leg_ne, "#{nu}_{e}: Bin1= %.1f, Bin2= %.1f", ne->Integral(0,9), ne->Integral(10, 18));
281 sprintf(leg_nebar, "#bar{#nu}_{e}: Bin1= %.1f, Bin2= %.1f", nebar->Integral(0,9), nebar->Integral(10, 18));
282 sprintf(leg_cc, "#{nu}_{#mu}: Bin1= %.1f, Bin2= %.1f", cc->Integral(0,9), cc->Integral(10, 18));
283 sprintf(leg_ccbar, "#bar{#nu}_{#mu}: Bin1= %.1f, Bin2= %.1f", ccbar->Integral(0,9), ccbar->Integral(10, 18));
284 sprintf(leg_ncc, "NC: Bin1= %.1f, Bin2= %.1f", nc->Integral(0,9), nc->Integral(10, 18));
285 
286 std::cout<<"\\multirow{2}*{$\\nu_e$} & Uncorrected & "<< nemc->Integral(0,9) <<" & "<< nemc->Integral(10, 18)<<" \\\\"<<std::endl;
287 std::cout<<" & Corrected & "<< ne->Integral(0,9) <<" & "<< ne->Integral(10, 18)<<" \\\\"<<std::endl;
288 std::cout<<"\\multirow{2}*{$\\bar{\\nu}_e$} & Uncorrected & "<< nebarmc->Integral(0,9) <<" & "<< nebarmc->Integral(10, 18)<<" \\\\"<<std::endl;
289 std::cout<<" & Corrected & "<< nebar->Integral(0,9) <<" & "<< nebar->Integral(10, 18)<<" \\\\"<<std::endl;
290 
291 std::cout<<"\\multirow{2}*{$\\nu_\\mu$} & Uncorrected & "<< ccmc->Integral(0,9) <<" & "<< ccmc->Integral(10, 18)<<" \\\\"<<std::endl;
292 std::cout<<" & Corrected & "<< cc->Integral(0,9) <<" & "<< cc->Integral(10, 18)<<" \\\\"<<std::endl;
293 std::cout<<"\\multirow{2}*{$\\bar{\\nu}_\\mu$} & Uncorrected & "<< ccbarmc->Integral(0,9) <<" & "<< ccbarmc->Integral(10, 18)<<" \\\\"<<std::endl;
294 std::cout<<" & Corrected & "<< ccbar->Integral(0,9) <<" & "<< ccbar->Integral(10, 18)<<" \\\\"<<std::endl;
295 
296 std::cout<<"\\multirow{2}*{nc} & Uncorrected & "<< ncmc->Integral(0,9) <<" & "<< ncmc->Integral(10, 18)<<" \\\\"<<std::endl;
297 std::cout<<" & Corrected & "<< nc->Integral(0,9) <<" & "<< nc->Integral(10, 18)<<" \\\\"<<std::endl;
298 
299 
300  new TCanvas;
301  data->Draw();
302  hsmc->Draw("hist same");
303  hs->Draw("hist same");
304  data->Draw("same");
305 
307  Preliminary();
308 
309  TLegend * leg = new TLegend(0.7,0.5,0.89,0.89);
310  leg->AddEntry(data,"ND Data","lep");
311  leg->AddEntry(ne, "Beam #nu_{e}","l");
312  leg->AddEntry(nebar, "Beam #bar{#nu}_{e}","l");
313  leg->AddEntry(cc, "#nu_{#mu} CC","l");
314  leg->AddEntry(ccbar, "#bar{#nu}_{#mu} CC","l");
315  leg->AddEntry(nc, "NC","l");
316 
317  auto dummy = (TH1*) nemc->Clone();
318  dummy->SetLineColor(kBlack);
319  leg->AddEntry(dummy, "Uncorr. MC","l");
320 
321 
322  leg->SetLineColor(4000);
323  leg->SetTextSize(0.03);
324  leg->SetTextFont(42);
325  leg->Draw("same");
326  gPad->Update();
327  gPad->SaveAs((TString)"plots/"+ ananame + "_Data_MC_corrected_uncorrected_stack.pdf");
328 
329  ne->GetYaxis()->SetRangeUser(0,3000);
330  ne->Draw("hist");
331  cc->Draw("hist same");
332  nc->Draw("hist same");
333  ccmc->Draw("hist same");
334  nemc->Draw("hist same");
335  ncmc->Draw("hist same");
336  nebar->Draw("hist same");
337  ccbar->Draw("hist same");
338  ccbarmc->Draw("hist same");
339  nebarmc->Draw("hist same");
340  leg->Draw();
341  rootlogon();
342  ne->SetTitleSize(0);
343  Simulation();
344  gPad->Update();
345  gPad->SaveAs((TString)"plots/"+ ananame + "_Data_MC_corrected_uncorrected.pdf");
346 
347 }
const Color_t kBeamNueBarBackgroundColor
Definition: Style.h:25
void Simulation()
Definition: tools.h:16
enum BeamMode kRed
void rootlogon()
Definition: rootlogon.C:7
const Color_t kNumuBackgroundColor
Definition: Style.h:30
const XML_Char const XML_Char * data
Definition: expat.h:268
void CenterTitles(TH1 *h)
const Color_t kBeamNueBackgroundColor
Definition: Style.h:24
void Preliminary()
OStream cout
Definition: OStream.cxx:6
const std::string path
Definition: plot_BEN.C:43
const double pot
Definition: plot_BEN.C:40
void cc()
Definition: test_ana.C:28
enum BeamMode nc
const Color_t kNumuBarBackgroundColor
Definition: Style.h:31
const Color_t kNCBackgroundColor
Definition: Style.h:22
enum BeamMode string
void CornerLabels ( std::string  Str)

Definition at line 39 of file plot_BEN.C.

Referenced by PlotPionPlots().

39  {
40  TLatex* CornLab = new TLatex(.1, .93, Str.c_str());
41  CornLab->SetTextColor(kGray+1);
42  CornLab->SetNDC();
43  CornLab->SetTextSize (1.5/30.);
44  CornLab->SetTextAlign(11);
45  CornLab->Draw();
46 }
void plot_BEN ( const std::string  file)

for 2018 official uncomment the two lines you see below and comment out the general lines

Definition at line 59 of file plot_BEN.C.

References CompareDecompDataMC(), om::cout, d, allTimeWatchdog::endl, fname, genie::utils::style::Format(), ana::BENDecomp::GetKaonScale(), MECModelEnuComparisons::i, outfile, PlotPionPlots(), pot, runNovaSAM::release, ana::BENDecomp::SavePlots(), ana::BENDecomp::SavePlotsKa(), ana::BENDecomp::SavePlotsPi(), and string.

59  {
60  if (std::strstr(file.c_str(),"official")) {fname = "/nova/ana/nu_e_ana/Ana2018/Predictions/provisional_singles/NueProd4SystematicsOnRealNDData_2018-05-03/pred_allxp_Nue2018Axis_full_FHCAllSyst_nueconcat_realNDData_2018-05-11.root";}
61  //BENDecomp* benD = LoadFromFile<BENDecomp>(fname, TString::Format("pred_xp_combo_Nominal/noShift/nue_pred_Nue2018Axis/extrap/EEextrap/Decomp/NueEstimate").Data()).release();
62 
63  BENDecomp* benD = LoadFromFile<BENDecomp>(fname, TString::Format("nue_decomps/benDCMP" ).Data()).release();
64  std::cout << "2020 kaon scale" << benD->GetKaonScale() << std::endl;
65  //Plot Decomposed data vs MC
66 
67  BENDecomp* ben[1] = {benD};
68  //const std::string bennames[1] = {"pred_xp_combo_Nominal/noShift/nue_pred_Nue2018Axis/extrap/EEextrap/Decomp/NueEstimate"};
69  const std::string bennames[1] = {"nue_decomps/benDCMP"};
70 
71  TFile * outfile = new TFile((TString)file + "BEN_plots.root","recreate");
72 
73  for (int i = 0; i< 1; ++i){
74  TDirectory* d = outfile->mkdir((TString)bennames[i]);
75 
76  const double pot = ben[i] -> Data_Component().POT();
77 
78  CompareDecompDataMC(ben[i], bennames[i]);
79  PlotPionPlots(ben[i], bennames[i]);
80 
81  ben[i]->SavePlotsPi(d);
82  ben[i]->SavePlotsKa(d);
83  ben[i]->SavePlots(d);
84 
85  }
86 }
void SavePlotsPi(TDirectory *dir)
Definition: BENDecomp.cxx:540
std::string fname
Definition: plot_BEN.C:42
double GetKaonScale() const
Definition: BENDecomp.h:113
void PlotPionPlots(BENDecomp *dcmp, std::string ananame)
Definition: plot_BEN.C:75
void CompareDecompDataMC(BENDecomp *ben, std::string ana)
Definition: plot_BEN.C:205
Float_t d
Definition: plot.C:236
OStream cout
Definition: OStream.cxx:6
void SavePlots(TDirectory *dir)
Definition: BENDecomp.cxx:647
void SavePlotsKa(TDirectory *dir)
Definition: BENDecomp.cxx:483
const double pot
Definition: plot_BEN.C:40
TFile * file
Definition: cellShifts.C:17
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
FILE * outfile
Definition: dump_event.C:13
enum BeamMode string
void PlotPionPlots ( BENDecomp dcmp,
std::string  ananame 
)

Definition at line 87 of file plot_BEN.C.

References a, ana::CenterTitles(), CornerLabels(), om::cout, ana::BENDecomp::Data_Component(), allTimeWatchdog::endl, fname, genie::utils::style::Format(), kGreen, MECModelEnuComparisons::leg, make_syst_table_plots::line, ana::BENDecomp::MC_NueComponent(), ana::Nue2018ThreeBinLabels(), ana::BENDecomp::NueComponent(), path, pot, runNovaSAM::release, rootlogon(), Simulation(), gen_hdf5record::size, string, ana::Spectrum::ToTH1(), and ymin.

87  {
88  new TCanvas;
89  rootlogon();
90  gStyle->SetTitleOffset(.82, "xyz");
91  gStyle->SetLabelSize(0.035, "xy");
92  gStyle->SetLabelSize(.035, "z");
93  gStyle->SetTitleSize(0.05, "xyz");
94  const std::string path = "plots";
95 
96  auto data = dcmp->Data_Component().ToTH1(pot);
97 
98  data->SetMarkerStyle(kFullCircle);
99 
100  auto nemc = dcmp->MC_NueComponent().ToTH1(pot);
101  nemc->SetLineStyle(7);
102  nemc->Scale(.001);
103  nemc->Draw("hist");
104  nemc->GetYaxis()->SetTitle("10^{3} Events / 11.0 #times 10^{20} POT");
105  nemc->GetXaxis()->SetTitle("Reconstructed neutrino energy (GeV)");
106  nemc->GetYaxis()->SetRangeUser(0,1.2*nemc->GetMaximum());
107  TGaxis::SetMaxDigits(3);
108  TLine* line = new TLine();
109  line->SetLineStyle(3);
110  const float ymin = nemc->GetMinimum();
111 
112  float size = nemc->GetXaxis()->GetLabelSize();
113  float offs = nemc->GetXaxis()->GetLabelOffset();
114  int font = nemc->GetXaxis()->GetLabelFont();
115  nemc->GetXaxis()->SetRangeUser(0,19);
116  nemc->GetXaxis()->SetNdivisions(1900, kFALSE);
117  TGaxis* gax1 = new TGaxis(0, ymin, 9, ymin, 0.0001, 4.5, 205, "S L");
118  TGaxis* gax2 = new TGaxis(9, ymin, 18, ymin, 0.0001, 4.5, 205, "S L");
119  int numAxes = 2;
120  std::vector <TGaxis*> gaxes = {gax1, gax2};
121  for(int a = 0; a < numAxes; a++){
122  gaxes[a]->SetTickLength(0.);
123  gaxes[a]->SetLabelSize(size);
124  gaxes[a]->SetLabelOffset(offs);
125  gaxes[a]->SetLabelFont(font);
126  gaxes[a]->Draw();
127  }
128  nemc->Draw("hist");
129  //Nue2018ThreeBinDivisions();
130  Nue2018ThreeBinLabels(0.98, 0.04, kGray+3, true);
131  // Nue2018ThreeBinAxis(nemc,true, true, false);
132 
133  auto ne = dcmp->NueComponent(). ToTH1(pot);
134  ne->Scale(.001);
135  ne->Draw("hist same");
136 
137 
138 
139  auto nuepiunwei = LoadFromFile<Spectrum>(fname, TString::Format("%s/nueCC_from_pi",ananame.c_str()).Data()).release();
140  TH1* fnuepiunwei = nuepiunwei->ToTH1(pot,kAzure +4, 7);
141  auto nuekaunwei = LoadFromFile<Spectrum>(fname, TString::Format("%s/nueCC_from_ka",ananame.c_str()).Data()).release();
142  TH1* fnuekaunwei = nuekaunwei->ToTH1(pot,kMagenta -9, 7);
143  auto nueotherunwei = LoadFromFile<Spectrum>(fname, TString::Format("%s/nueCC_from_other",ananame.c_str()).Data()).release();
144  TH1* fnueotherunwei = nueotherunwei->ToTH1(pot,kGreen + 2, 7);
145 
146  fnuepiunwei->Scale(.001);
147  fnuekaunwei->Scale(.001);
148  fnueotherunwei->Scale(.001);
149  fnuepiunwei ->Draw("hist same");
150  fnuekaunwei ->Draw("hist same");
151  fnueotherunwei ->Draw("hist same");
152 
153  TH1* fnuepiweight = dcmp -> NuePiEstimate().ToTH1(pot,kAzure +4);
154  fnuepiweight->Scale(.001);
155  fnuepiweight->Draw("hist same");
156 
157  TH1* fnuekaweight = dcmp -> NueKaEstimate().ToTH1(pot, kMagenta -9);
158  fnuekaweight->Scale(.001);
159  fnuekaweight->Draw("hist same");
160  TH1* fnueotherweight = dcmp ->NueComponent().ToTH1(pot, kGreen+2);
161  fnueotherweight->Scale(.001);
162  fnueotherweight->Add(fnuekaweight, -1);
163  fnueotherweight->Add(fnuepiweight, -1);
164  fnueotherweight->Draw("hist same");
165 
166  Simulation();
167  CenterTitles(nemc);
168  CornerLabels("#nu-beam");
169  TLegend * leg = new TLegend(0.165,0.4,0.39,0.75);
170  gStyle->SetTextSize(0.047);
171  leg->AddEntry(ne, "Total #nu_{e} Corr.", "l");
172  leg->AddEntry(fnuepiweight,"#nu_{e} from #pi^{#pm} Corr.","l");
173  leg->AddEntry(fnuekaweight,"#nu_{e} from K^{#pm} Corr.","l");
174  leg->AddEntry(fnueotherweight,"#nu_{e} from Other Corr.", "l");
175  leg->AddEntry(nemc, "#nu_{e} Uncorr.", "l");
176  leg->Draw("same");
177 
178 
179 // nue table tota/pi/ka/other
180 //
181 std::cout<<"\\multirow{2}*{Total $\\nu_e$} & Uncorrected &"<< nemc->Integral(0,9) <<" & "<< nemc->Integral(10, 18)<<" & "<< nemc->Integral(19, 27)<<" & "<< nemc->Integral()<<" \\\\"<<std::endl;
182 
183 std::cout<<setprecision(4)<<" & Corrected & "<< ne->Integral(0,9) <<"("<<100*(ne->Integral(0,9)-nemc->Integral(0,9))/nemc->Integral(0,9)<<"\\%)" <<" & "<< ne->Integral(10, 18)<<"("<<100*(ne->Integral(10,18)-nemc->Integral(10,18))/nemc->Integral(10,18)<<"\\%)" << " & "<< ne->Integral(19,27) <<"("<<100*(ne->Integral(19,27)-nemc->Integral(19,27))/nemc->Integral(19,27)<<"\\%)" << " & "<< ne->Integral() <<"("<<100*(ne->Integral()-nemc->Integral())/nemc->Integral()<<"\\%)" << " \\\\"<<std::endl;
184 std::cout<<"\\hline"<<std::endl;
185 
186 
187 std::cout<<"\\multirow{2}*{$\\nu_e$ From Pion} & Uncorrected &"<< fnuepiunwei->Integral(0,9) <<" & "<< fnuepiunwei->Integral(10, 18)<<" & "<< fnuepiunwei->Integral(19,27)<<" & "<< fnuepiunwei->Integral()<<" \\\\"<<std::endl;
188 
189 std::cout<<" & Corrected & "<< fnuepiweight->Integral(0,9) <<"("<<100*(fnuepiweight->Integral(0,9)-fnuepiunwei->Integral(0,9))/fnuepiunwei->Integral(0,9)<<"\\%)" <<" & "<< fnuepiweight->Integral(10, 18)<<"("<<100*(fnuepiweight->Integral(10,18)-fnuepiunwei->Integral(10,18))/fnuepiunwei->Integral(10,18)<<"\\%)" << " & "<< fnuepiweight->Integral(19,27)<<"("<<100*(fnuepiweight->Integral(19,27)-fnuepiunwei->Integral(19,27))/fnuepiunwei->Integral(19,27)<<"\\%)" <<" & "<< fnuepiweight->Integral()<<"("<<100*(fnuepiweight->Integral()-fnuepiunwei->Integral())/fnuepiunwei->Integral()<<"\\%)" <<" \\\\"<<std::endl;
190 std::cout<<"\\hline"<<std::endl;
191 
192 std::cout<<"\\multirow{2}*{$\\nu_e$ From Kaon} & Uncorrected &"<< fnuekaunwei->Integral(0,9) <<" & "<< fnuekaunwei->Integral(10, 18)<<" & "<< fnuekaunwei->Integral(19,27)<<" & "<< fnuekaunwei->Integral()<<" \\\\"<<std::endl;
193 std::cout<<" & Corrected & "<< fnuekaweight->Integral(0,9) <<"("<<100*(fnuekaweight->Integral(0,9)-fnuekaunwei->Integral(0,9))/fnuekaunwei->Integral(0,9)<<"\\%)" <<" & "<< fnuekaweight->Integral(10, 18)<<"("<<100*(fnuekaweight->Integral(10,18)-fnuekaunwei->Integral(10,18))/fnuekaunwei->Integral(10,18)<<"\\%)" <<" & "<< fnuekaweight->Integral(19,27)<<"("<<100*(fnuekaweight->Integral(19,27)-fnuekaunwei->Integral(19,27))/fnuekaunwei->Integral(19,27)<<"\\%)" <<" & "<< fnuekaweight->Integral()<<"("<<100*(fnuekaweight->Integral()-fnuekaunwei->Integral())/fnuekaunwei->Integral()<<"\\%)" <<" \\\\"<<std::endl;
194 
195 std::cout<<"\\hline"<<std::endl;
196 
197 std::cout<<"\\multirow{2}*{$\\nu_e$ From Other} & Uncorrected &"<< fnueotherunwei->Integral(0,9) <<" & "<< fnueotherunwei->Integral(10, 18)<<" & "<< fnueotherunwei->Integral(19,27)<<" & "<< fnueotherunwei->Integral()<<" \\\\"<<std::endl;
198 
199 std::cout<<" & Corrected & "<< fnueotherweight->Integral(0,9) <<"("<<100*(fnueotherweight->Integral(0,9)-fnueotherunwei->Integral(0,9))/fnueotherunwei->Integral(0,9)<<"\\%)" <<" & "<< fnueotherweight->Integral(10, 18)<<"("<<100*(fnueotherweight->Integral(10,18)-fnueotherunwei->Integral(10,18))/fnueotherunwei->Integral(10,18)<<"\\%)" <<" & "<< fnueotherweight->Integral(19,27)<<"("<<100*(fnueotherweight->Integral(19,27)-fnueotherunwei->Integral(19,27))/fnueotherunwei->Integral(19,27)<<"\\%)" <<" & "<< fnueotherweight->Integral()<<"("<<100*(fnueotherweight->Integral()-fnueotherunwei->Integral())/fnueotherunwei->Integral()<<"\\%)" <<" \\\\"<<std::endl;
200 
201 std::cout<<"\\hline"<<std::endl;
202 
203  gPad->SaveAs((TString)"plots/"+ ananame + "_nueCC_from_All.pdf");
204 
205 
206 }
void Simulation()
Definition: tools.h:16
void CornerLabels(std::string Str)
Definition: plot_BEN.C:39
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:149
void rootlogon()
Definition: rootlogon.C:7
std::string fname
Definition: plot_BEN.C:42
const XML_Char const XML_Char * data
Definition: expat.h:268
Spectrum NueComponent() const override
Definition: BENDecomp.cxx:370
void CenterTitles(TH1 *h)
const double a
Spectrum MC_NueComponent() const override
Definition: BENDecomp.cxx:727
OStream cout
Definition: OStream.cxx:6
const std::string path
Definition: plot_BEN.C:43
const double pot
Definition: plot_BEN.C:40
void Nue2018ThreeBinLabels(const double yNDC, const double textsize, const int color, const bool nd)
Double_t ymin
Definition: plot.C:24
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
enum BeamMode kGreen
Spectrum Data_Component() const override
Definition: BENDecomp.cxx:742
enum BeamMode string
void SetPaletteS ( )

Definition at line 27 of file plot_BEN.C.

References rootlogon::blue, rootlogon::green, rootlogon::NCont, rootlogon::NRGBs, and rootlogon::stops.

28 {
29 const Int_t NRGBs = 3;
30 const Int_t NCont = 255;
31 Double_t stops[NRGBs] = { 0.0 , 0.5, 1};
32 Double_t red[NRGBs] = { 1 , 0.6, .2};
33 Double_t green[NRGBs] = { 0.8 , 0.2, .0};
34 Double_t blue[NRGBs] = { 0.8 , 0.2, .0};
35 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
36 gStyle->SetNumberContours(NCont);
37 }
int NCont
Definition: rootlogon.py:78
tuple blue
Definition: rootlogon.py:65
int NRGBs
Definition: rootlogon.py:77

Variable Documentation

std::string fname = "nue_dcmp.root"

Definition at line 51 of file plot_BEN.C.

const std::string path = "plots"

Definition at line 52 of file plot_BEN.C.

const double pot = 1.10158e+21

Definition at line 50 of file plot_BEN.C.