SystsDecompAna17.C
Go to the documentation of this file.
4 
5 using namespace ana;
6 
7 void BinErrors(TH1* nom, TH1* nc, TH1* numu, TH1* nueup);
8 
9 void PlotComp(IDecomp* nom, IDecomp* shifts,
10  TDirectory* out, FILE* text, strings strs,
11  double POT);
12 
13 void PlotComp(IPrediction* nom, IPrediction* shifts,
14  TDirectory* out, FILE* text, strings strs,
15  double POT);
16 
17 void PlotSysts(TH1* nom, TH1* hNC, TH1* hNM, TH1* hEU,
18  TDirectory* rootOUT, FILE* textOFS,
19  strings strs);
20 
22 {
23  TH1::AddDirectory(0);
24  double NCSCALE=8.85e20;
25  // A map of systematic labels
26  std::map<std::string, std::string> shiftlabels;
27  shiftlabels["NC"] = "Data/MC Diff to NC Component";
28  shiftlabels["Numu"] = "Data/MC Diff to #nu_{#mu} CC Component";
29  shiftlabels["Nue"] = "#nu_{e} CC Component";
30 
31  std::string labelRecoE = "Energy Deposited in Scintillator (GeV)";
32  std::vector<std::string> cut_samples;
33  cut_samples.push_back("Ana01");
34 
35  // Set up maps to the decompositions/predictions (each flavor component)
36  // Nominal maps are indexed purely by sample label
37  // Shifted maps are indexed by sample label, systematic label, then sigma of the shift
38  std::map<std::string, IDecomp*> decomps_nominal;
39  std::map<std::string, std::map<std::string, std::map<int, IDecomp*> > > decomps_shifted;
40  std::map<std::string, PredictionNoExtrap*> predsNE_nominal;
41  std::map<std::string, std::map<std::string, std::map<int, PredictionNoExtrap*> > > predsNE_shifted;
42  std::map<std::string, PredictionSterile*> predsSt_nominal;
43  std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsSt_shifted;
44  std::string folderout= "";
45  std::string folder = "/nova/ana/users/sedayath/CAFAna_work_place/job/NUS17/Syst/";
46  std::string filenm = "SystDecomp";
47 
48  std::string loadLocation = folder + filenm + ".root";
49  std::string saveLocation = folderout + filenm + "Ana.root";
50  std::string textLocation = folderout + filenm + "Ana.txt";
51 
52  TFile* rootL = new TFile(loadLocation.c_str(), "READ");
53  LoadMaps(rootL, &decomps_nominal, &decomps_shifted);
54  LoadMaps(rootL, &predsNE_nominal, &predsNE_shifted);
55  LoadMaps(rootL, &predsSt_nominal, &predsSt_shifted);
56  rootL->Close();
57 
58  TFile* rootF = new TFile(saveLocation.c_str(), "RECREATE");
59  FILE* textF;
60  textF = fopen(textLocation.c_str(), "w");
61 
62  for(const auto& sample : cut_samples) {
63  strings strs;
64  strs.fComponent = "NC";
65  strs.fDet = "ND";
66  strs.fPOT = StringFromDouble(NCSCALE);
67  strs.fSample = sample;
68  strs.fSystType = "Decomp";
69  strs.fXLabel = labelRecoE;
70 
71  InitializeSystText(textF, strs);
72 
73  TH1* hNomNC_decomp = GetNC(decomps_nominal[sample], NCSCALE);
74  TH1* hNomBG_decomp = GetBG(decomps_nominal[sample], NCSCALE);
75 
76  TH1* hNomNC_predNE = GetNC(predsNE_nominal[sample], NCSCALE);
77  TH1* hNomBG_predNE = GetBG(predsNE_nominal[sample], NCSCALE);
78 
79  TH1* hNomNC_predSt = GetNC(predsSt_nominal[sample], NCSCALE);
80  TH1* hNomBG_predSt = GetBG(predsSt_nominal[sample], NCSCALE);
81 
82  for(const auto& shifts : shiftlabels) {
83  strs.fSystS = shifts.first;
84  strs.fSystL = shifts.second;
85 
86  strs.fComponent = "NC";
87  strs.fDet = "ND";
88  PlotSyst(hNomNC_decomp,
89  decomps_shifted[sample][shifts.first][1],
90  rootF, textF, strs, NCSCALE, true, true);
91 
92  strs.fComponent = "BG";
93  PlotSyst(hNomBG_decomp,
94  decomps_shifted[sample][shifts.first][1],
95  rootF, textF, strs, NCSCALE, false, true);
96 
97  PlotComp(decomps_nominal[sample],
98  decomps_shifted[sample][shifts.first][1],
99  rootF, textF, strs, NCSCALE);
100 
101  strs.fComponent = "NC";
102  strs.fDet = "FD";
103  PlotSyst(hNomNC_predNE,
104  predsNE_shifted[sample][shifts.first][1],
105  rootF, textF, strs, NCSCALE, true, true);
106 
107  strs.fComponent = "BG";
108  PlotSyst(hNomBG_predNE,
109  predsNE_shifted[sample][shifts.first][1],
110  rootF, textF, strs, NCSCALE, false, true);
111 
112  PlotComp(predsNE_nominal[sample],
113  predsNE_shifted[sample][shifts.first][1],
114  rootF, textF, strs, NCSCALE);
115 
116  strs.fComponent = "NC";
117  strs.fDet = "EX";
118  PlotSyst(hNomNC_predSt,
119  predsSt_shifted[sample][shifts.first][1],
120  rootF, textF, strs, NCSCALE, true, true);
121 
122  strs.fComponent = "BG";
123  PlotSyst(hNomBG_predSt,
124  predsSt_shifted[sample][shifts.first][1],
125  rootF, textF, strs, NCSCALE, false, true);
126 
127  PlotComp(predsSt_nominal[sample],
128  predsSt_shifted[sample][shifts.first][1],
129  rootF, textF, strs, NCSCALE);
130  }
131 
132  TH1* hSftNC_NCCmp_decomp = GetNC(decomps_shifted[sample]["NC"][1], NCSCALE);
133  TH1* hSftBG_NCCmp_decomp = GetBG(decomps_shifted[sample]["NC"][1], NCSCALE);
134  TH1* hSftNC_NMCmp_decomp = GetNC(decomps_shifted[sample]["Numu"][1], NCSCALE);
135  TH1* hSftBG_NMCmp_decomp = GetBG(decomps_shifted[sample]["Numu"][1], NCSCALE);
136  TH1* hSftNC_NueUp_decomp = GetNC(decomps_shifted[sample]["Nue"][1], NCSCALE);
137  TH1* hSftBG_NueUp_decomp = GetBG(decomps_shifted[sample]["Nue"][1], NCSCALE);
138 
139  TH1* hSftNC_NCCmp_predNE = GetNC(predsNE_shifted[sample]["NC"][1], NCSCALE);
140  TH1* hSftBG_NCCmp_predNE = GetBG(predsNE_shifted[sample]["NC"][1], NCSCALE);
141  TH1* hSftNC_NMCmp_predNE = GetNC(predsNE_shifted[sample]["Numu"][1], NCSCALE);
142  TH1* hSftBG_NMCmp_predNE = GetBG(predsNE_shifted[sample]["Numu"][1], NCSCALE);
143  TH1* hSftNC_NueUp_predNE = GetNC(predsNE_shifted[sample]["Nue"][1], NCSCALE);
144  TH1* hSftBG_NueUp_predNE = GetBG(predsNE_shifted[sample]["Nue"][1], NCSCALE);
145 
146  TH1* hSftNC_NCCmp_predSt = GetNC(predsSt_shifted[sample]["NC"][1], NCSCALE);
147  TH1* hSftBG_NCCmp_predSt = GetBG(predsSt_shifted[sample]["NC"][1], NCSCALE);
148  TH1* hSftNC_NMCmp_predSt = GetNC(predsSt_shifted[sample]["Numu"][1], NCSCALE);
149  TH1* hSftBG_NMCmp_predSt = GetBG(predsSt_shifted[sample]["Numu"][1], NCSCALE);
150  TH1* hSftNC_NueUp_predSt = GetNC(predsSt_shifted[sample]["Nue"][1], NCSCALE);
151  TH1* hSftBG_NueUp_predSt = GetBG(predsSt_shifted[sample]["Nue"][1], NCSCALE);
152 
153  strs.fComponent = "NC";
154  strs.fDet = "ND";
155  PlotSysts(hNomNC_decomp,
156  hSftNC_NCCmp_decomp, hSftNC_NMCmp_decomp,
157  hSftNC_NueUp_decomp,
158  rootF, textF, strs);
159 
160  strs.fComponent = "BG";
161  PlotSysts(hNomBG_decomp,
162  hSftBG_NCCmp_decomp, hSftBG_NMCmp_decomp,
163  hSftBG_NueUp_decomp,
164  rootF, textF, strs);
165 
166  strs.fComponent = "NC";
167  strs.fDet = "FD";
168  PlotSysts(hNomNC_predNE,
169  hSftNC_NCCmp_predNE, hSftNC_NMCmp_predNE,
170  hSftNC_NueUp_predNE,
171  rootF, textF, strs);
172 
173  strs.fComponent = "BG";
174  PlotSysts(hNomBG_predNE,
175  hSftBG_NCCmp_predNE, hSftBG_NMCmp_predNE,
176  hSftBG_NueUp_predNE,
177  rootF, textF, strs);
178 
179  strs.fComponent = "NC";
180  strs.fDet = "EX";
181  PlotSysts(hNomNC_predSt,
182  hSftNC_NCCmp_predSt, hSftNC_NMCmp_predSt,
183  hSftNC_NueUp_predSt,
184  rootF, textF, strs);
185 
186  strs.fComponent = "BG";
187  PlotSysts(hNomBG_predSt,
188  hSftBG_NCCmp_predSt, hSftBG_NMCmp_predSt,
189  hSftBG_NueUp_predSt,
190  rootF, textF, strs);
191  }
192 
193  fclose(textF);
194  rootF->Close();
195 
196  std::cout << "Finished. Ctrl+Z should be safe if the macro didn't quit." << std::endl;
197 }
198 
199 void BinErrors(TH1* nom, TH1* nc, TH1* numu, TH1* nueup)
200 {
201  double nomEvents = nom ->Integral(); std::cout << "Nom: " << nomEvents << std::endl;
202  double ncEvents = nc ->Integral(); std::cout << "NC Comp: " << ncEvents << std::endl;
203  double numuEvents = numu ->Integral(); std::cout << "NuMu Comp: " << numuEvents << std::endl;
204  double nueupEvents = nueup->Integral(); std::cout << "NueUp: " << nueupEvents << std::endl;
205 
206  TH1* hDataMC = (TH1*)nom->Clone();
207  TH1* hNueDif = (TH1*)nom->Clone();
208 
209  if(std::abs(ncEvents - nomEvents) > std::abs(numuEvents - nomEvents)) {
210  std::cout << "NC Comp Greater, ";
211  hDataMC->Add(nc, -1);
212  }
213  else if(std::abs(numuEvents - nomEvents) > std::abs(nueupEvents - nomEvents)) {
214  std::cout << "Numu Comp Greater, ";
215  hDataMC->Add(numu, -1);
216  }
217 
218  else {
219  std::cout << "Nue Greater" << std::endl;
220  hNueDif->Add(nueup, -1);
221  }
222 
223  for(int i = 0, n = nom->GetNbinsX(); i <= n+1; ++i) {
224  double datamc = hDataMC->GetBinContent(i);
225  double nuedif = hNueDif->GetBinContent(i);
226  nom->SetBinError(i, datamc*datamc + nuedif*nuedif);
227  }
228 
229  return;
230 }
231 
232 void PlotComp(IDecomp* nom, IDecomp* shifts,
233  TDirectory* out, FILE* text, strings strs,
234  double POT)
235 {
236  std::vector<TH1*> hNoms;
237  std::vector<TH1*> hSfts;
238  hNoms.push_back(nom ->NCTotalComponent().ToTH1(POT));
239  hSfts.push_back(shifts->NCTotalComponent().ToTH1(POT));
240 
241  Spectrum sNomNue = nom ->NueComponent() + nom ->AntiNueComponent();
242  Spectrum sSftNue = shifts->NueComponent() + shifts->AntiNueComponent();
243  Spectrum sNomNumu = nom ->NumuComponent() + nom ->AntiNumuComponent();
244  Spectrum sSftNumu = shifts->NumuComponent() + shifts->AntiNumuComponent();
245 
246  hNoms.push_back(sNomNue.ToTH1(POT));
247  hSfts.push_back(sSftNue.ToTH1(POT));
248  hNoms.push_back(sNomNumu.ToTH1(POT));
249  hSfts.push_back(sSftNumu.ToTH1(POT));
250 
251  std::string curComp = strs.fComponent;
252 
253  std::vector<std::string> comps;
254  comps.push_back("NCComp");
255  comps.push_back("NueComp");
256  comps.push_back("NumuComp");
257 
258  for(int i = 0, n = 3; i < n; ++i) {
259  strs.fComponent = comps[i];
260  PlotSyst(hNoms[i], hSfts[i], out, text, strs);
261  }
262 
263  strs.fComponent = curComp;
264  return;
265 }
266 
267 void PlotComp(IPrediction* nom, IPrediction* shifts,
268  TDirectory* out, FILE* text, strings strs,
269  double POT)
270 {
272 
273  std::vector<TH1*> hNoms;
274  std::vector<TH1*> hSfts;
275  hNoms.push_back(
276  nom->PredictComponent(
278  ).ToTH1(POT)
279  );
280  hSfts.push_back(
281  shifts->PredictComponent(
283  ).ToTH1(POT)
284  );
285 
286  hNoms.push_back(
287  nom->PredictComponent(
289  ).ToTH1(POT)
290  );
291  hSfts.push_back(
292  shifts->PredictComponent(
294  ).ToTH1(POT)
295  );
296 
297  hNoms.push_back(
298  nom->PredictComponent(
300  ).ToTH1(POT)
301  );
302  hSfts.push_back(
303  shifts->PredictComponent(
305  ).ToTH1(POT)
306  );
307 
308  std::string curComp = strs.fComponent;
309 
310  std::vector<std::string> comps;
311  comps.push_back("NCComp");
312  comps.push_back("NueComp");
313  comps.push_back("NumuComp");
314 
315  for(int i = 0, n = 3; i < n; ++i) {
316  strs.fComponent = comps[i];
317  PlotSyst(hNoms[i], hSfts[i], out, text, strs);
318  }
319 
320  strs.fComponent = curComp;
321  return;
322 }
323 
324 void PlotSysts(TH1* nom, TH1* hNC, TH1* hNM, TH1* hEU,
325  TDirectory* rootOUT, FILE* textOFS,
326  strings strs)
327 {
328  BinErrors(nom, hNC, hNM, hEU);
329 
330  double nNom = nom->Integral();
331  double nNC = hNC->Integral();
332  double nNM = hNM->Integral();
333  double nNEU = hEU->Integral();
334 
335  fprintf(textOFS, "\nEvent counts for %.2s %.2s %s Systs:\n",
336  strs.fDet.c_str(), strs.fComponent.c_str(), strs.fSystType.c_str());
337  fprintf(textOFS, "Nom: %6.2f, NC Shift: %6.2f, NuMu Shift: %6.2f, NuE Up: %6.2f\n",
338  nNom, nNC, nNM, nNEU);
339  fprintf(textOFS, "NC Diff: %6.2f, NuMu Diff: %6.2f, NuE Diff: %6.2f",
340  100.*std::abs(nNC/nNom - 1.), 100.*std::abs(nNM/nNom - 1.));
341  100.*std::abs(nNEU/nNom - 1.);
342 
343  std::string xlabel = strs.fXLabel;
344  std::string ylabel = "Events / " + strs.fPOT + " / 0.25 GeV";
345  std::string title = strs.fDet + " " + strs.fComponent +
346  " Errors for All " + strs.fSystType + " Systematics";
347 // std::string fullTitle = title + ";" + xlabel + ";" + ylabel;
348  std::string fullTitle = ";" + xlabel + ";" + ylabel;
349  std::string name = "c" + strs.fComponent + strs.fDet +
350  strs.fSystType + "SystsAll" + strs.fSample;
351  std::string ylabelRat = "Shifted / Nominal";
352  std::string fullTitleRat = ";" + xlabel + ";" + ylabelRat;
353 
354  TH1* hRat = (TH1*)nom->Clone();
355  TH1* hNCRat = (TH1*)hNC->Clone();
356  TH1* hNMRat = (TH1*)hNM->Clone();
357  TH1* hEURat = (TH1*)hEU->Clone();
358 
359  int nBins = nom->GetNbinsX();
360  for(int i = 0; i <= nBins+1; ++i) {
361  hRat->SetBinContent(i, 1.);
362  }
363  hNCRat->Divide(nom);
364  hNMRat->Divide(nom);
365  hEURat->Divide(nom);
366 
367  double maxval = nom->GetBinContent(nom->GetMaximumBin());
368  maxval = std::max(maxval, hNC->GetBinContent(hNC->GetMaximumBin()));
369  maxval = std::max(maxval, hNM->GetBinContent(hNM->GetMaximumBin()));
370  maxval = std::max(maxval, hEU->GetBinContent(hEU->GetMaximumBin()));
371 
372  double minval = nom->GetBinContent(nom->GetMinimumBin());
373  minval = std::min(minval, hNC->GetBinContent(hNC->GetMinimumBin()));
374  minval = std::min(minval, hNM->GetBinContent(hNM->GetMinimumBin()));
375  minval = std::min(minval, hEU->GetBinContent(hEU->GetMinimumBin()));
376 
377  if(maxval < minval) { std::swap(maxval, minval); }
378 
379  double maxvalRat = hRat->GetBinContent(hRat->GetMaximumBin());
380  maxvalRat = std::max(maxvalRat, hNCRat->GetBinContent(hNCRat->GetMaximumBin()));
381  maxvalRat = std::max(maxvalRat, hNMRat->GetBinContent(hNMRat->GetMaximumBin()));
382  maxvalRat = std::max(maxvalRat, hEURat->GetBinContent(hEURat->GetMaximumBin()));
383 
384  double minvalRat = hRat->GetBinContent(hRat->GetMinimumBin());
385  for(int i = 1; i <= nBins; ++i) {
386  if(hNCRat->GetBinContent(i) > 0.) {
387  minvalRat = std::min(minvalRat, hNCRat->GetBinContent(i));
388  }
389  if(hNMRat->GetBinContent(i) > 0.) {
390  minvalRat = std::min(minvalRat, hNMRat->GetBinContent(i));
391  }
392  if(hEURat->GetBinContent(i) > 0.) {
393  minvalRat = std::min(minvalRat, hEURat->GetBinContent(i));
394  }
395  }
396 
397  if(std::abs(maxvalRat - 1.) > std::abs(1. - minvalRat)) {
398  minvalRat = 1 - std::abs(maxvalRat - 1.);
399  maxvalRat = 1 + std::abs(maxvalRat - 1.);
400  }
401  else {
402  minvalRat = 1 - std::abs(1. - minvalRat);
403  maxvalRat = 1 + std::abs(1. - minvalRat);
404  }
405 
406  CenterTitles(nom);
407  nom->SetLineColor(kBlack);
408  nom->SetMaximum(1.1*maxval);
409  nom->SetMinimum(0);
410  nom->SetTitle(fullTitle.c_str());
411 
412  CenterTitles(hNC);
413  hNC->SetLineColor(kRed);
414  hNC->SetLineStyle(2);
415  hNC->SetMaximum(1.1*maxval);
416  hNC->SetMinimum(0);
417  hNC->SetTitle(fullTitle.c_str());
418 
419  CenterTitles(hNM);
420  hNM->SetLineColor(kBlue);
421  hNM->SetLineStyle(2);
422  hNM->SetMaximum(1.1*maxval);
423  hNM->SetMinimum(0);
424  hNM->SetTitle(fullTitle.c_str());
425 
426  CenterTitles(hEU);
427  hEU->SetLineColor(kGreen+2);
428  hEU->SetLineStyle(2);
429  hEU->SetMaximum(1.1*maxval);
430  hEU->SetMinimum(0);
431  hEU->SetTitle(fullTitle.c_str());
432 
433 
434  CenterTitles(hRat);
435  hRat->SetLineColor(kBlack);
436  hRat->SetMaximum(1.1*maxvalRat);
437  hRat->SetMinimum(0.9*minvalRat);
438  hRat->SetTitle(fullTitleRat.c_str());
439 
440  CenterTitles(hNCRat);
441  hNCRat->SetLineColor(kRed);
442  hNCRat->SetLineStyle(2);
443  hNCRat->SetMaximum(1.1*maxvalRat);
444  hNCRat->SetMinimum(0.9*minvalRat);
445  hNCRat->SetTitle(fullTitleRat.c_str());
446 
447  CenterTitles(hNMRat);
448  hNMRat->SetLineColor(kBlue);
449  hNMRat->SetLineStyle(2);
450  hNMRat->SetMaximum(1.1*maxvalRat);
451  hNMRat->SetMinimum(0.9*minvalRat);
452  hNMRat->SetTitle(fullTitleRat.c_str());
453 
454  CenterTitles(hEURat);
455  hEURat->SetLineColor(kGreen+2);
456  hEURat->SetLineStyle(2);
457  hEURat->SetMaximum(1.1*maxvalRat);
458  hEURat->SetMinimum(0.9*minvalRat);
459  hEURat->SetTitle(fullTitleRat.c_str());
460 
461 
462  double xL = 0.6, xR = 0.85;
463  double yB = 0.6, yT = 0.85;
464  TLegend* leg = new TLegend(xL, yB, xR, yT);
465  leg->AddEntry(nom, "Nominal", "l");
466  leg->AddEntry(hNC, "Data/MC Diff to NC Comp", "l");
467  leg->AddEntry(hNM, "Data/MC Diff to #nu_{#mu} Comp", "l");
468 
469  TCanvas* c = new TCanvas(name.c_str(), title.c_str(), 800, 800);
470  TPad* pSpecs = new TPad("pSpecs", "", 0., 0.375, 1., 1.);
471  TPad* pRatio = new TPad("pRatio", "", 0., 0., 1., 0.375);
472  pSpecs->Draw();
473  pRatio->Draw();
474 
475  pSpecs->cd();
476  nom->Draw("hist");
477  hNC->Draw("hist same");
478  hNM->Draw("hist same");
479  leg->Draw();
480  Simulation();
481 
482  pRatio->cd();
483  hRat->Draw("hist");
484  hNCRat->Draw("hist same");
485  hNMRat->Draw("hist same");
486 
487  c->Update();
488  rootOUT->WriteTObject(c);
489  return;
490 }
void Simulation()
Definition: tools.h:16
T max(const caf::Proxy< T > &a, T b)
const XML_Char * name
Definition: expat.h:151
int nBins
Definition: plotROC.py:16
std::string fDet
Definition: PPFXHelper.h:104
enum BeamMode kRed
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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
std::string fComponent
Definition: PPFXHelper.h:103
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:148
virtual Spectrum NumuComponent() const =0
void BinErrors(TH1 *nom, TH1 *nc, TH1 *numu, TH1 *nueup)
void PlotSysts(TH1 *nom, TH1 *hNC, TH1 *hNM, TH1 *hEU, TDirectory *rootOUT, FILE *textOFS, strings strs)
void PlotSyst(TH1 *h, TH1 *hp1, TH1 *hm1, TH1 *hp2, TH1 *hm2, TDirectory *out, FILE *text, strings strs)
Definition: PPFXHelper.h:662
void CenterTitles(TH1 *histo)
Definition: Plots.cxx:1481
osc::OscCalcDumb calc
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
float abs(float number)
Definition: d0nt_math.hpp:39
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
bool datamc
Definition: fnexvscaf.C:20
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
TH1 * GetNC(IDecomp *specs, double POT)
Definition: PPFXHelper.h:211
fclose(fg1)
Charged-current interactions.
Definition: IPrediction.h:39
void PlotComp(IDecomp *nom, IDecomp *shifts, TDirectory *out, FILE *text, strings strs, double POT)
Optimized version of OscCalcPMNS.
Definition: StanTypedefs.h:31
void InitializeSystText(FILE *text, strings strs)
Print some initial text about a systematic – the systematic type and sample.
Definition: PPFXHelper.h:263
std::string fSystL
Definition: PPFXHelper.h:109
std::vector< std::string > comps
std::string fPOT
Definition: PPFXHelper.h:105
virtual Spectrum AntiNumuComponent() const =0
OStream cout
Definition: OStream.cxx:6
std::vector< double > POT
std::string fXLabel
Definition: PPFXHelper.h:110
virtual Spectrum NCTotalComponent() const
Definition: IDecomp.h:18
std::string fSystType
Definition: PPFXHelper.h:107
Standard interface to all decomposition techniques.
Definition: IDecomp.h:13
Neutral-current interactions.
Definition: IPrediction.h:40
enum BeamMode nc
Both neutrinos and antineutrinos.
Definition: IPrediction.h:52
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
std::string fSystS
Definition: PPFXHelper.h:108
void LoadMaps(TDirectory *dir, std::map< std::string, IDecomp * > *nominal, std::map< std::string, std::map< std::string, std::map< int, IDecomp * > > > *shifted)
Definition: PPFXHelper.h:273
static double NCSCALE
T min(const caf::Proxy< T > &a, T b)
All neutrinos, any flavor.
Definition: IPrediction.h:26
TH1 * GetBG(IDecomp *specs, double POT)
Definition: PPFXHelper.h:236
enum BeamMode kGreen
enum BeamMode kBlue
std::string StringFromDouble(double pot)
Definition: PPFXHelper.h:128
void SystsDecompAna17()
virtual Spectrum NueComponent() const =0
A helper structure to contain a group of string for plotting.
Definition: PPFXHelper.h:101
std::string fSample
Definition: PPFXHelper.h:106
enum BeamMode string