EnergyCont_plot.C
Go to the documentation of this file.
1 // A file containing some Vars which I made myself.
3 
4 #include "TCanvas.h"
5 #include "TFile.h"
6 #include "TH1D.h"
7 #include "TLatex.h"
8 #include "TLegend.h"
9 #include "TStyle.h"
10 #include "TSystem.h"
11 
13 #include "CAFAna/Analysis/Plots.h"
14 #include "CAFAna/Core/Spectrum.h"
16 
17 #include <iostream>
18 #include <sstream>
19 #include <fstream>
20 #include <vector>
21 #include <string>
22 #include <TROOT.h>
23 #include <TStyle.h>
24 
25 using namespace ana;
26 
27 // ****************************** Some very broad things ******************************
28 
29 // --- Define the number of GENIE interaction types I'm looking at....
30 const std::vector<std::string> GENIEStr = { "All" }; const unsigned int nGENIE = 1;
31 //const std::vector<std::string> GENIEStr = { "All", "MEC", "DIS", "Resonance", "Coherent", "QuasiElactic" }; const unsigned int nGENIE = 6;
32 
33 // --- Define my broad cuts
34 std::vector<std::string> FD_CutNames = { "FD_Contain", "FD_PID2018", "FD_CosRej" }; const unsigned int nFD_CutNames = 3;
35 std::vector<std::string> ND_CutNames = { "ND_Contain", "ND_PID2018" }; const unsigned int nND_CutNames = 2;
36 unsigned int FCut_FD = nFD_CutNames - 1; unsigned int FCut_ND = nND_CutNames - 1;
37 
38 // --- Am I running quantile boundaries?
39 std::vector<std::string> QuantNames = { "AllQuant", "Quant1", "Quant2", "Quant3", "Quant4" }; const unsigned int nQuantNames = 5;
40 
41 // --- FHC or RHC?
42 std::vector<std::string> HCNames = {"fhc", "rhc"}; const unsigned int nHC = 2;
43 
44 // --- ND or FD? (for labeling)
45 std::vector<std::string> DetNames = {"ND", "FD"};
46 
47 // ****************************** Define a struct ******************************
48 struct MySpectra {
49  // --- Far detector histograms
50  // Multiplicity
51  TH1D* NNeut_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
52  TH1D* NProt_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
53  TH1D* NPion_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
54  TH1D* NPi0s_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
55 
56  // energy
57  TH1D* NeutrinoEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
58  TH1D* MuonEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
59  TH1D* NeutronEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
60  TH1D* ProtonEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
61  TH1D* PionEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
62  TH1D* Pi0Energy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
63  TH1D* PhotonEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
64  TH1D* KaonEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
65  TH1D* ElectronEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
66  TH1D* MiscEnergy_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
67 
68  // uncontained energy
69  TH1D* AllUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
70  TH1D* MuonUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
71  TH1D* NeutUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
72  TH1D* ProtUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
73  TH1D* PionUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
74  TH1D* Pi0sUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
75  TH1D* PhotUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
76  TH1D* KaonUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
77  TH1D* ElecUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
78  TH1D* MiscUncontain_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
79 
80  // energy fraction
81  TH1D* MuonEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
82  TH1D* NeutronEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
83  TH1D* ProtonEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
84  TH1D* PionEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
85  TH1D* Pi0EFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
86  TH1D* PhotonEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
87  TH1D* KaonEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
88  TH1D* ElectronEFrac_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
89 
90  // uncont. E / tot. uncont. E
91  TH1D* UncontMuonEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
92  TH1D* UncontNeutEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
93  TH1D* UncontProtEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
94  TH1D* UncontPionEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
95  TH1D* UncontPi0sEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
96  TH1D* UncontPhotEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
97  TH1D* UncontKaonEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
98  TH1D* UncontElecEF_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
99 
100  // uncont. E / true nu E
101  TH1D* UncontTotEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
102  TH1D* UncontMuonEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
103  TH1D* UncontNeutEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
104  TH1D* UncontProtEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
105  TH1D* UncontPionEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
106  TH1D* UncontPi0sEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
107  TH1D* UncontPhotEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
108  TH1D* UncontKaonEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
109  TH1D* UncontElecEFT_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
110 
111  // energy fraction vs. true nu E
112  TH2* MuonEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
113  TH2* NeutronEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
114  TH2* ProtonEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
115  TH2* PionEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
116  TH2* Pi0EFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
117  TH2* PhotonEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
118  TH2* KaonEFracvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
119  TH2* ElectronEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
120 
121  // uncont. E / tot. uncont. E vs. true nu E
122  TH2* UncontMuonEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
123  TH2* UncontNeutEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
124  TH2* UncontProtEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
125  TH2* UncontPionEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
126  TH2* UncontPi0sEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
127  TH2* UncontPhotEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
128  TH2* UncontKaonEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
129  TH2* UncontElecEFvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
130 
131  // uncont. E / true nu E vs. true nu E
132  TH2* UncontTotEFTvsTrueE_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
133  TH2* UncontMuonEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
134  TH2* UncontNeutEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
135  TH2* UncontProtEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
136  TH2* UncontPionEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
137  TH2* UncontPi0sEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
138  TH2* UncontPhotEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
139  TH2* UncontKaonEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
140  TH2* UncontElecEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC];
141 
142  // uncont. E vs. vertex x, y
143  TH2* UncontTotEvsX_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
144  TH2* UncontTotEvsY_FD [nGENIE][nFD_CutNames][nQuantNames][nHC];
145 
146  // --- Near detector histograms
147  // Multiplicity
148  TH1D* NNeut_ND [nGENIE][nFD_CutNames][nQuantNames][nHC];
149  TH1D* NProt_ND [nGENIE][nFD_CutNames][nQuantNames][nHC];
150  TH1D* NPion_ND [nGENIE][nFD_CutNames][nQuantNames][nHC];
151  TH1D* NPi0s_ND [nGENIE][nFD_CutNames][nQuantNames][nHC];
152 
153  // energy
154  TH1D* NeutrinoEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
155  TH1D* MuonEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
156  TH1D* NeutronEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
157  TH1D* ProtonEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
158  TH1D* PionEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
159  TH1D* Pi0Energy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
160  TH1D* PhotonEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
161  TH1D* KaonEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
162  TH1D* ElectronEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
163  TH1D* MiscEnergy_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
164 
165  // uncontained energy
166  TH1D* AllUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
167  TH1D* MuonUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
168  TH1D* NeutUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
169  TH1D* ProtUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
170  TH1D* PionUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
171  TH1D* Pi0sUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
172  TH1D* PhotUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
173  TH1D* KaonUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
174  TH1D* ElecUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
175  TH1D* MiscUncontain_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
176 
177  // energy fraction
178  TH1D* MuonEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
179  TH1D* NeutronEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
180  TH1D* ProtonEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
181  TH1D* PionEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
182  TH1D* Pi0EFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
183  TH1D* PhotonEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
184  TH1D* KaonEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
185  TH1D* ElectronEFrac_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
186 
187  // uncont. E / tot. uncont. E
188  TH1D* UncontTotEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
189  TH1D* UncontMuonEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
190  TH1D* UncontNeutEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
191  TH1D* UncontProtEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
192  TH1D* UncontPionEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
193  TH1D* UncontPi0sEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
194  TH1D* UncontPhotEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
195  TH1D* UncontKaonEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
196  TH1D* UncontElecEF_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
197 
198  // uncont. E / true nu E
199  TH1D* UncontMuonEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
200  TH1D* UncontNeutEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
201  TH1D* UncontProtEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
202  TH1D* UncontPionEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
203  TH1D* UncontPi0sEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
204  TH1D* UncontPhotEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
205  TH1D* UncontKaonEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
206  TH1D* UncontElecEFT_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
207 
208  // energy fraction vs. true nu E
209  TH2* MuonEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
210  TH2* NeutronEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
211  TH2* ProtonEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
212  TH2* PionEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
213  TH2* Pi0EFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
214  TH2* PhotonEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
215  TH2* KaonEFracvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
216  TH2* ElectronEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
217 
218  // uncont. E / tot. uncont. E vs. true nu E
219  TH2* UncontMuonEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
220  TH2* UncontNeutEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
221  TH2* UncontProtEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
222  TH2* UncontPionEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
223  TH2* UncontPi0sEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
224  TH2* UncontPhotEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
225  TH2* UncontKaonEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
226  TH2* UncontElecEFvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
227 
228  // uncont. E / true nu E vs. true nu E
229  TH2* UncontTotEFTvsTrueE_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
230  TH2* UncontMuonEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
231  TH2* UncontNeutEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
232  TH2* UncontProtEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
233  TH2* UncontPionEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
234  TH2* UncontPi0sEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
235  TH2* UncontPhotEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
236  TH2* UncontKaonEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
237  TH2* UncontElecEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC];
238 
239  // uncont. E vs. vertex x, y
240  TH2* UncontTotEvsX_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
241  TH2* UncontTotEvsY_ND [nGENIE][nND_CutNames][nQuantNames][nHC];
242 
243 };
244 
245 // ****************************** Define functions ******************************
246 TH1D* SpecToHist( TFile* MyF, std::string SpecName, double POT, std::string AxisTitle );
247 TH2* Spec2DtoHist( TFile* MyF, std::string SpecName, double POT, std::string AxisTitle );
248 void MakeComparisonPlots( std::vector<TH1D*> TheHists, std::string PlotName, std::vector<std::string> Labels );
249 void Print2D(TH2* hist, std::string PlotName);
250 void Print0binFrac(TH1* hist, std::string PlotName);
251 
252 // ****************************** Main code block ******************************
254  // ---- First off, lets set the styles...
255  gStyle->SetOptStat(0);
256  gROOT->SetStyle("novaStyle");
257 
258  // --- Make my iteration of MySpectra.
259  MySpectra sp;
260  // --- Loop through my input files...
261  for (unsigned int HC=0; HC<nHC; ++HC) {
262  // --- Open my files.
263 // std::string FDName = "final/SpectrumFiles_FD_"+HCNames[HC]+".root"; TFile *FDFile = TFile::Open( FDName.c_str() );
264 // std::string NDName = "final/SpectrumFiles_ND_"+HCNames[HC]+".root"; TFile *NDFile = TFile::Open( NDName.c_str() );
265 
266  std::string FDName = "SpectrumFiles_FD_"+HCNames[HC]+"_Full_finerbinning.root"; TFile *FDFile = TFile::Open( FDName.c_str() );
267  std::string NDName = "SpectrumFiles_ND_"+HCNames[HC]+"_Full_finerbinning.root"; TFile *NDFile = TFile::Open( NDName.c_str() );
268  std::vector<TFile*> files = {FDFile, NDFile};
269  // --- Determine the POT
270  double POT = kAna2018FHCPOT;
271  if (HCNames[HC] == "rhc") POT = kAna2018RHCPOT;
272  // Loop through GENIE interaction types.
273  for (unsigned int gen=0; gen<nGENIE; ++gen) {
274  // Loop through the quantile cuts.
275  for (unsigned int quant=0; quant<nQuantNames; ++quant) {
276  // --- Loop through the FD cuts first...
277  for(unsigned int cut=0; cut<nFD_CutNames; ++cut) {
278  // Figure out what the end of my spectra names is.
279  std::string Comb = "_"+GENIEStr[gen]+"_"+FD_CutNames[cut]+"_"+QuantNames[quant];
280  // Load my spectra
281  // multiplicity
282  sp.NNeut_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "NumOfNeut"+Comb, POT, ";Num. Neutrons;Events");
283  sp.NProt_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "NumOfProt"+Comb, POT, ";Num. Protons;Events" );
284  sp.NPion_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "NumOfPion"+Comb, POT, ";Num. Pions;Events" );
285  sp.NPi0s_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "NumOfPi0s"+Comb, POT, ";Num. Pi0s;Events" );
286 
287  // energy
288  sp.NeutrinoEnergy_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "NeutrinoE"+Comb, POT, ";True neutrino E (GeV);Events" );
289  sp.MuonEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "MuonE" +Comb, POT, ";Total E in muons (GeV);Events" );
290  sp.NeutronEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "NeutronE" +Comb, POT, ";Total E in neutrons (GeV);Events" );
291  sp.ProtonEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "ProtonE" +Comb, POT, ";Total E in protons (GeV);Events" );
292  sp.PionEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "PionE" +Comb, POT, ";Total E in pions (GeV);Events" );
293  sp.Pi0Energy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "Pi0E" +Comb, POT, ";Total E in pi0s (GeV);Events" );
294  sp.PhotonEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "PhotonE" +Comb, POT, ";Total E in photons (GeV);Events" );
295  sp.KaonEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "KaonE" +Comb, POT, ";Total E in kaons (GeV);Events" );
296  sp.ElectronEnergy_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "ElectronE"+Comb, POT, ";Total E in electrons (GeV);Events");
297  sp.MiscEnergy_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "MiscE" +Comb, POT, ";Total E in misc (GeV);Events" );
298 
299  // uncontained energy
300  sp.AllUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontEn" +Comb, POT, ";Total uncontained E (GeV);Events" );
301  sp.MuonUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontMu" +Comb, POT, ";Uncont. E from muons (GeV);Events" );
302  sp.NeutUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontNeu"+Comb, POT, ";Uncont. E from neutrons (GeV);Events" );
303  sp.ProtUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPro"+Comb, POT, ";Uncont. E from protons (GeV);Events" );
304  sp.PionUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPi" +Comb, POT, ";Uncont. E from pions (GeV);Events" );
305  sp.Pi0sUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPi0"+Comb, POT, ";Uncont. E from pi0s (GeV);Events" );
306  sp.PhotUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPho"+Comb, POT, ";Uncont. E from photons (GeV);Events" );
307  sp.KaonUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontKa" +Comb, POT, ";Uncont. E from kaons (GeV);Events" );
308  sp.ElecUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontEle"+Comb, POT, ";Uncont. E from electrons (GeV);Events");
309  sp.MiscUncontain_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "UncontMis"+Comb, POT, ";Uncont. E from misc. (GeV);Events" );
310 
311  // energy fraction
312  sp.MuonEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "MuonEFrac" +Comb, POT, ";Muon E/true #nu E; Events" );
313  sp.NeutronEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "NeutronEFrac" +Comb, POT, ";Neutron E/true #nu E; Events" );
314  sp.ProtonEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "ProtonEFrac" +Comb, POT, ";Proton E/true #nu E; Events" );
315  sp.PionEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "PionEFrac" +Comb, POT, ";Pion E/true #nu E; Events" );
316  sp.Pi0EFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "Pi0EFrac" +Comb, POT, ";Pi0 E/true #nu E; Events" );
317  sp.PhotonEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "PhotonEFrac" +Comb, POT, ";Photon E/true #nu E; Events" );
318  sp.KaonEFrac_FD [gen][cut][quant][HC] = SpecToHist(FDFile, "KaonEFrac" +Comb, POT, ";Kaon E/true #nu E; Events" );
319  sp.ElectronEFrac_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "ElectronEFrac"+Comb, POT, ";Electon E/true #nu E; Events" );
320 
321  // uncont. E / tot. uncont. E
322  sp.UncontMuonEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontMuonEF"+Comb, POT, ";Uncont. muon E/total uncont. E;Events" );
323  sp.UncontNeutEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontNeutEF"+Comb, POT, ";Uncont. neutron E/total uncont. E;Events" );
324  sp.UncontProtEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontProtEF"+Comb, POT, ";Uncont. proton E/total uncont. E;Events" );
325  sp.UncontPionEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPionEF"+Comb, POT, ";Uncont. pion E/total uncont. E;Events" );
326  sp.UncontPi0sEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPi0sEF"+Comb, POT, ";Uncont. pi0 E/total uncont. E;Events" );
327  sp.UncontPhotEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPhotEF"+Comb, POT, ";Uncont. photon E/total uncont. E;Events" );
328  sp.UncontKaonEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontKaonEF"+Comb, POT, ";Uncont. kaon E/total uncont. E;Events" );
329  sp.UncontElecEF_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontElecEF"+Comb, POT, ";Uncont. electron E/total uncont. E;Events");
330 
331  // uncont. E / true nu E
332  sp.UncontTotEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontTotEFT" +Comb, POT, ";Total uncont. E/true #nu E;Events" );
333  sp.UncontMuonEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontMuonEFT"+Comb, POT, ";Uncont. muon E/true #nu E;Events" );
334  sp.UncontNeutEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontNeutEFT"+Comb, POT, ";Uncont. neutron E/true #nu E;Events" );
335  sp.UncontProtEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontProtEFT"+Comb, POT, ";Uncont. proton E/true #nu E;Events" );
336  sp.UncontPionEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPionEFT"+Comb, POT, ";Uncont. pion E/true #nu E;Events" );
337  sp.UncontPi0sEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPi0sEFT"+Comb, POT, ";Uncont. pi0 E/true #nu E;Events" );
338  sp.UncontPhotEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontPhotEFT"+Comb, POT, ";Uncont. photon E/true #nu E;Events" );
339  sp.UncontKaonEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontKaonEFT"+Comb, POT, ";Uncont. kaon E/true #nu E;Events" );
340  sp.UncontElecEFT_FD[gen][cut][quant][HC] = SpecToHist(FDFile, "UncontElecEFT"+Comb, POT, ";Uncont. electron E/true #nu E;Events");
341 
342  // uncont. E vs. vertex x, y
343  sp.UncontTotEvsX_FD[gen][cut][quant][HC] = Spec2DtoHist(FDFile, "UncontTotEvsX"+Comb, POT, ";x (cm); Uncont. E (GeV)");
344  sp.UncontTotEvsY_FD[gen][cut][quant][HC] = Spec2DtoHist(FDFile, "UncontTotEvsY"+Comb, POT, ";y (cm); Uncont. E (GeV)");
345 
346  // energy fraction vs. true nu E
347  sp.MuonEFracvsTrueE_FD [gen][cut][quant][HC] =
348  Spec2DtoHist(FDFile, "MuonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Muon E/true #nu E" );
349  sp.NeutronEFracvsTrueE_FD [gen][cut][quant][HC] =
350  Spec2DtoHist(FDFile, "NeutronEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Neutron E/true #nu E" );
351  sp.ProtonEFracvsTrueE_FD [gen][cut][quant][HC] =
352  Spec2DtoHist(FDFile, "ProtonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Proton E/true #nu E" );
353  sp.PionEFracvsTrueE_FD [gen][cut][quant][HC] =
354  Spec2DtoHist(FDFile, "PionEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Pion E/true #nu E" );
355  sp.Pi0EFracvsTrueE_FD [gen][cut][quant][HC] =
356  Spec2DtoHist(FDFile, "Pi0EFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Pi0 E/true #nu E" );
357  sp.PhotonEFracvsTrueE_FD [gen][cut][quant][HC] =
358  Spec2DtoHist(FDFile, "PhotonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Photon E/true #nu E" );
359  sp.KaonEFracvsTrueE_FD [gen][cut][quant][HC] =
360  Spec2DtoHist(FDFile, "KaonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Kaon E/true #nu E" );
361  sp.ElectronEFracvsTrueE_FD[gen][cut][quant][HC] =
362  Spec2DtoHist(FDFile, "ElectronEFracvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron E/true #nu E");
363 
364  // uncont. E / tot. uncont. E vs. true nu E
365  sp.UncontMuonEFvsTrueE_FD[gen][cut][quant][HC] =
366  Spec2DtoHist(FDFile, "UncontMuonEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Muon uncont. E/total uncont. E" );
367  sp.UncontNeutEFvsTrueE_FD[gen][cut][quant][HC] =
368  Spec2DtoHist(FDFile, "UncontNeutEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Neutron uncont. E/total uncont. E");
369  sp.UncontProtEFvsTrueE_FD[gen][cut][quant][HC] =
370  Spec2DtoHist(FDFile, "UncontProtEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Proton uncont. E/total uncont. E" );
371  sp.UncontPionEFvsTrueE_FD[gen][cut][quant][HC] =
372  Spec2DtoHist(FDFile, "UncontPionEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Pion uncont. E/total uncont. E" );
373  sp.UncontPi0sEFvsTrueE_FD[gen][cut][quant][HC] =
374  Spec2DtoHist(FDFile, "UncontPi0sEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Pi0 uncont. E/total uncont. E" );
375  sp.UncontPhotEFvsTrueE_FD[gen][cut][quant][HC] =
376  Spec2DtoHist(FDFile, "UncontPhotEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Photon uncont. E/total uncont. E" );
377  sp.UncontKaonEFvsTrueE_FD[gen][cut][quant][HC] =
378  Spec2DtoHist(FDFile, "UncontKaonEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Kaon uncont. E/total uncont. E" );
379  sp.UncontElecEFvsTrueE_FD[gen][cut][quant][HC] =
380  Spec2DtoHist(FDFile, "UncontElecEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron uncont. E/total uncont. E");
381 
382  // uncont. E / true nu E vs. true nu E
383  sp.UncontTotEFTvsTrueE_FD [gen][cut][quant][HC] =
384  Spec2DtoHist(FDFile, "UncontTotEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Total uncont. E/true #nu E" );
385  sp.UncontMuonEFTvsTrueE_FD[gen][cut][quant][HC] =
386  Spec2DtoHist(FDFile, "UncontMuonEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Muon uncont. E/true #nu E" );
387  sp.UncontNeutEFTvsTrueE_FD[gen][cut][quant][HC] =
388  Spec2DtoHist(FDFile, "UncontNeutEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Neutron uncont. E/true #nu E" );
389  sp.UncontProtEFTvsTrueE_FD[gen][cut][quant][HC] =
390  Spec2DtoHist(FDFile, "UncontProtEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Proton uncont. E/true #nu E" );
391  sp.UncontPionEFTvsTrueE_FD[gen][cut][quant][HC] =
392  Spec2DtoHist(FDFile, "UncontPionEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Pion uncont. E/true #nu E" );
393  sp.UncontPi0sEFTvsTrueE_FD[gen][cut][quant][HC] =
394  Spec2DtoHist(FDFile, "UncontPi0sEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Pi0 uncont. E/true #nu E" );
395  sp.UncontPhotEFTvsTrueE_FD[gen][cut][quant][HC] =
396  Spec2DtoHist(FDFile, "UncontPhotEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Photon uncont. E/true #nu E" );
397  sp.UncontKaonEFTvsTrueE_FD[gen][cut][quant][HC] =
398  Spec2DtoHist(FDFile, "UncontKaonEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Kaon uncont. E/true #nu E" );
399  sp.UncontElecEFTvsTrueE_FD[gen][cut][quant][HC] =
400  Spec2DtoHist(FDFile, "UncontElecEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron uncont. E/true #nu E");
401 
402  } // nFD_CutNames
403 
404  // --- Now, loop through my ND cuts...
405  for(unsigned int cut=0; cut<nND_CutNames; ++cut) {
406  // Figure out what the end of my spectra names is.
407  std::string Comb = "_"+GENIEStr[gen]+"_"+ND_CutNames[cut]+"_"+QuantNames[quant];
408  // Load my spectra
409  // Multiplicity
410  sp.NNeut_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "NumOfNeut"+Comb, POT, ";Num. Neutrons;Events");
411  sp.NProt_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "NumOfProt"+Comb, POT, ";Num. Protons;Events" );
412  sp.NPion_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "NumOfPion"+Comb, POT, ";Num. Pions;Events" );
413  sp.NPi0s_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "NumOfPi0s"+Comb, POT, ";Num. Pi0s;Events" );
414 
415  // energy
416  sp.NeutrinoEnergy_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "NeutrinoE"+Comb, POT, ";Recon. neutrino E (GeV);Events" );
417  sp.MuonEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "MuonE" +Comb, POT, ";Total E in muons (GeV);Events" );
418  sp.NeutronEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "NeutronE" +Comb, POT, ";Total E in neutrons (GeV);Events" );
419  sp.ProtonEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "ProtonE" +Comb, POT, ";Total E in protons (GeV);Events" );
420  sp.PionEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "PionE" +Comb, POT, ";Total E in pions (GeV);Events" );
421  sp.Pi0Energy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "Pi0E" +Comb, POT, ";Total E in pi0s (GeV);Events" );
422  sp.PhotonEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "PhotonE" +Comb, POT, ";Total E in photons (GeV);Events" );
423  sp.KaonEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "KaonE" +Comb, POT, ";Total E in kaons (GeV);Events" );
424  sp.ElectronEnergy_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "ElectronE"+Comb, POT, ";Total E in electrons (GeV);Events");
425  sp.MiscEnergy_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "MiscE" +Comb, POT, ";Total E in misc (GeV);Events" );
426 
427  // uncontained energy
428  sp.AllUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontEn" +Comb, POT, ";Total uncontained E (GeV);Events" );
429  sp.MuonUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontMu" +Comb, POT, ";Uncont. E from muons (GeV);Events" );
430  sp.NeutUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontNeu"+Comb, POT, ";Uncont. E from neutrons (GeV);Events" );
431  sp.ProtUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPro"+Comb, POT, ";Uncont. E from protons (GeV);Events" );
432  sp.PionUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPi" +Comb, POT, ";Uncont. E from pions (GeV);Events" );
433  sp.Pi0sUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPi0"+Comb, POT, ";Uncont. E from pi0s (GeV);Events" );
434  sp.PhotUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPho"+Comb, POT, ";Uncont. E from photons (GeV);Events" );
435  sp.KaonUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontKa" +Comb, POT, ";Uncont. E from kaons (GeV);Events" );
436  sp.ElecUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontEle"+Comb, POT, ";Uncont. E from electrons (GeV);Events");
437  sp.MiscUncontain_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "UncontMis"+Comb, POT, ";Uncont. E from misc. (GeV);Events" );
438 
439  // energy fraction
440  sp.MuonEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "MuonEFrac" +Comb, POT, ";Muon E/true #nu E; Events" );
441  sp.NeutronEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "NeutronEFrac" +Comb, POT, ";Neutron E/true #nu E; Events" );
442  sp.ProtonEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "ProtonEFrac" +Comb, POT, ";Proton E/true #nu E; Events" );
443  sp.PionEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "PionEFrac" +Comb, POT, ";Pion E/true #nu E; Events" );
444  sp.Pi0EFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "Pi0EFrac" +Comb, POT, ";Pi0 E/true #nu E; Events" );
445  sp.PhotonEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "PhotonEFrac" +Comb, POT, ";Photon E/true #nu E; Events" );
446  sp.KaonEFrac_ND [gen][cut][quant][HC] = SpecToHist(NDFile, "KaonEFrac" +Comb, POT, ";Kaon E/true #nu E; Events" );
447  sp.ElectronEFrac_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "ElectronEFrac"+Comb, POT, ";Electon E/true #nu E; Events" );
448 
449  // uncont. E / tot. uncont. E
450  sp.UncontMuonEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontMuonEF"+Comb, POT, ";Uncont. muon E/total uncont. E;Events" );
451  sp.UncontNeutEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontNeutEF"+Comb, POT, ";Uncont. neutron E/total uncont. E;Events" );
452  sp.UncontProtEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontProtEF"+Comb, POT, ";Uncont. proton E/total uncont. E;Events" );
453  sp.UncontPionEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPionEF"+Comb, POT, ";Uncont. pion E/total uncont. E;Events" );
454  sp.UncontPi0sEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPi0sEF"+Comb, POT, ";Uncont. pi0 E/total uncont. E;Events" );
455  sp.UncontPhotEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPhotEF"+Comb, POT, ";Uncont. photon E/total uncont. E;Events" );
456  sp.UncontKaonEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontKaonEF"+Comb, POT, ";Uncont. kaon E/total uncont. E;Events" );
457  sp.UncontElecEF_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontElecEF"+Comb, POT, ";Uncont. electron E/total uncont. E;Events");
458 
459  // uncont. E / true nu E
460  sp.UncontTotEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontTotEFT" +Comb, POT, ";Total uncont. E/true #nu E;Events" );
461  sp.UncontMuonEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontMuonEFT"+Comb, POT, ";Uncont. muon E/true #nu E;Events" );
462  sp.UncontNeutEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontNeutEFT"+Comb, POT, ";Uncont. neutron E/true #nu E;Events" );
463  sp.UncontProtEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontProtEFT"+Comb, POT, ";Uncont. proton E/true #nu E;Events" );
464  sp.UncontPionEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPionEFT"+Comb, POT, ";Uncont. pion E/true #nu E;Events" );
465  sp.UncontPi0sEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPi0sEFT"+Comb, POT, ";Uncont. pi0 E/true #nu E;Events" );
466  sp.UncontPhotEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontPhotEFT"+Comb, POT, ";Uncont. photon E/true #nu E;Events" );
467  sp.UncontKaonEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontKaonEFT"+Comb, POT, ";Uncont. kaon E/true #nu E;Events" );
468  sp.UncontElecEFT_ND[gen][cut][quant][HC] = SpecToHist(NDFile, "UncontElecEFT"+Comb, POT, ";Uncont. electron E/true #nu E;Events");
469 
470  // uncont. E vs. vertex x, y
471  sp.UncontTotEvsX_ND[gen][cut][quant][HC] = Spec2DtoHist(NDFile, "UncontTotEvsX"+Comb, POT, ";x (cm); Uncont. E (GeV)");
472  sp.UncontTotEvsY_ND[gen][cut][quant][HC] = Spec2DtoHist(NDFile, "UncontTotEvsY"+Comb, POT, ";y (cm); Uncont. E (GeV)");
473 
474  // energy fraction vs. true nu E
475  sp.MuonEFracvsTrueE_ND [gen][cut][quant][HC] =
476  Spec2DtoHist(NDFile, "MuonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Muon E/true #nu E" );
477  sp.NeutronEFracvsTrueE_ND [gen][cut][quant][HC] =
478  Spec2DtoHist(NDFile, "NeutronEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Neutron E/true #nu E" );
479  sp.ProtonEFracvsTrueE_ND [gen][cut][quant][HC] =
480  Spec2DtoHist(NDFile, "ProtonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Proton E/true #nu E" );
481  sp.PionEFracvsTrueE_ND [gen][cut][quant][HC] =
482  Spec2DtoHist(NDFile, "PionEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Pion E/true #nu E" );
483  sp.Pi0EFracvsTrueE_ND [gen][cut][quant][HC] =
484  Spec2DtoHist(NDFile, "Pi0EFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Pi0 E/true #nu E" );
485  sp.PhotonEFracvsTrueE_ND [gen][cut][quant][HC] =
486  Spec2DtoHist(NDFile, "PhotonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Photon E/true #nu E" );
487  sp.KaonEFracvsTrueE_ND [gen][cut][quant][HC] =
488  Spec2DtoHist(NDFile, "KaonEFracvsTrueE" +Comb, POT, ";True #nu E (GeV);Kaon E/true #nu E" );
489  sp.ElectronEFracvsTrueE_ND[gen][cut][quant][HC] =
490  Spec2DtoHist(NDFile, "ElectronEFracvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron E/true #nu E");
491 
492  // uncont. E / tot. uncont. E vs. true nu E
493  sp.UncontMuonEFvsTrueE_ND[gen][cut][quant][HC] =
494  Spec2DtoHist(NDFile, "UncontMuonEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Muon uncont. E/total uncont. E" );
495  sp.UncontNeutEFvsTrueE_ND[gen][cut][quant][HC] =
496  Spec2DtoHist(NDFile, "UncontNeutEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Neutron uncont. E/total uncont. E");
497  sp.UncontProtEFvsTrueE_ND[gen][cut][quant][HC] =
498  Spec2DtoHist(NDFile, "UncontProtEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Proton uncont. E/total uncont. E" );
499  sp.UncontPionEFvsTrueE_ND[gen][cut][quant][HC] =
500  Spec2DtoHist(NDFile, "UncontPionEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Pion uncont. E/total uncont. E" );
501  sp.UncontPi0sEFvsTrueE_ND[gen][cut][quant][HC] =
502  Spec2DtoHist(NDFile, "UncontPi0sEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Pi0 uncont. E/total uncont. E" );
503  sp.UncontPhotEFvsTrueE_ND[gen][cut][quant][HC] =
504  Spec2DtoHist(NDFile, "UncontPhotEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Photon uncont. E/total uncont. E" );
505  sp.UncontKaonEFvsTrueE_ND[gen][cut][quant][HC] =
506  Spec2DtoHist(NDFile, "UncontKaonEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Kaon uncont. E/total uncont. E" );
507  sp.UncontElecEFvsTrueE_ND[gen][cut][quant][HC] =
508  Spec2DtoHist(NDFile, "UncontElecEFvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron uncont. E/total uncont. E");
509 
510  // uncont. E / true nu E vs. true nu E
511  sp.UncontTotEFTvsTrueE_ND [gen][cut][quant][HC] =
512  Spec2DtoHist(NDFile, "UncontTotEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Total uncont. E/true #nu E" );
513  sp.UncontMuonEFTvsTrueE_ND[gen][cut][quant][HC] =
514  Spec2DtoHist(NDFile, "UncontMuonEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Muon uncont. E/true #nu E" );
515  sp.UncontNeutEFTvsTrueE_ND[gen][cut][quant][HC] =
516  Spec2DtoHist(NDFile, "UncontNeutEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Neutron uncont. E/true #nu E" );
517  sp.UncontProtEFTvsTrueE_ND[gen][cut][quant][HC] =
518  Spec2DtoHist(NDFile, "UncontProtEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Proton uncont. E/true #nu E" );
519  sp.UncontPionEFTvsTrueE_ND[gen][cut][quant][HC] =
520  Spec2DtoHist(NDFile, "UncontPionEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Pion uncont. E/true #nu E" );
521  sp.UncontPi0sEFTvsTrueE_ND[gen][cut][quant][HC] =
522  Spec2DtoHist(NDFile, "UncontPi0sEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Pi0 uncont. E/true #nu E" );
523  sp.UncontPhotEFTvsTrueE_ND[gen][cut][quant][HC] =
524  Spec2DtoHist(NDFile, "UncontPhotEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Photon uncont. E/true #nu E" );
525  sp.UncontKaonEFTvsTrueE_ND[gen][cut][quant][HC] =
526  Spec2DtoHist(NDFile, "UncontKaonEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Kaon uncont. E/true #nu E" );
527  sp.UncontElecEFTvsTrueE_ND[gen][cut][quant][HC] =
528  Spec2DtoHist(NDFile, "UncontElecEFTvsTrueE"+Comb, POT, ";True #nu E (GeV);Electron uncont. E/true #nu E");
529  } // nND_CutNames
530  } // nQuantNames
531  } // nGENIE
532  } // files
533 
534  // ...................................................... Make my combined plots ......................................................
535  // *************** Want to plot {HC + GENIE + Quantile} as a function of Cut Tiers ***************
536  for (unsigned int HC=0; HC<nHC; ++HC){
537  for (unsigned int gen=0; gen<nGENIE; ++gen) {
538  for (unsigned int quant=0; quant<nQuantNames; ++quant) {
539  // --- Now I can make the combination string...
540  std::string Comb = "_"+GENIEStr[gen]+"_"+QuantNames[quant]+"_"+HCNames[HC];
541  // --- FD First.
542  // energy
543  MakeComparisonPlots( {sp.NeutrinoEnergy_FD[gen][0][quant][HC], sp.NeutrinoEnergy_FD[gen][1][quant][HC], sp.NeutrinoEnergy_FD[gen][2][quant][HC]}, "NeutrinoEnergy_FD"+Comb, FD_CutNames );
544  MakeComparisonPlots( {sp.MuonEnergy_FD [gen][0][quant][HC], sp.MuonEnergy_FD [gen][1][quant][HC], sp.MuonEnergy_FD [gen][2][quant][HC]}, "MuonEnergy_FD" +Comb, FD_CutNames );
545  MakeComparisonPlots( {sp.NeutronEnergy_FD [gen][0][quant][HC], sp.NeutronEnergy_FD [gen][1][quant][HC], sp.NeutronEnergy_FD [gen][2][quant][HC]}, "NeutronEnergy_FD" +Comb, FD_CutNames );
546  MakeComparisonPlots( {sp.ProtonEnergy_FD [gen][0][quant][HC], sp.ProtonEnergy_FD [gen][1][quant][HC], sp.ProtonEnergy_FD [gen][2][quant][HC]}, "ProtonEnergy_FD" +Comb, FD_CutNames );
547  MakeComparisonPlots( {sp.PionEnergy_FD [gen][0][quant][HC], sp.PionEnergy_FD [gen][1][quant][HC], sp.PionEnergy_FD [gen][2][quant][HC]}, "PionEnergy_FD" +Comb, FD_CutNames );
548  MakeComparisonPlots( {sp.Pi0Energy_FD [gen][0][quant][HC], sp.Pi0Energy_FD [gen][1][quant][HC], sp.Pi0Energy_FD [gen][2][quant][HC]}, "Pi0Energy_FD" +Comb, FD_CutNames );
549  MakeComparisonPlots( {sp.PhotonEnergy_FD [gen][0][quant][HC], sp.PhotonEnergy_FD [gen][1][quant][HC], sp.PhotonEnergy_FD [gen][2][quant][HC]}, "PhotonEnergy_FD" +Comb, FD_CutNames );
550  MakeComparisonPlots( {sp.KaonEnergy_FD [gen][0][quant][HC], sp.KaonEnergy_FD [gen][1][quant][HC], sp.KaonEnergy_FD [gen][2][quant][HC]}, "KaonEnergy_FD" +Comb, FD_CutNames );
551  MakeComparisonPlots( {sp.ElectronEnergy_FD[gen][0][quant][HC], sp.ElectronEnergy_FD[gen][1][quant][HC], sp.ElectronEnergy_FD[gen][2][quant][HC]}, "ElectronEnergy_FD" +Comb, FD_CutNames );
552  MakeComparisonPlots( {sp.MiscEnergy_FD [gen][0][quant][HC], sp.MiscEnergy_FD [gen][1][quant][HC], sp.MiscEnergy_FD [gen][2][quant][HC]}, "MiscEnergy_FD" +Comb, FD_CutNames );
553 
554  // uncontained energy
555  MakeComparisonPlots( {sp.AllUncontain_FD [gen][0][quant][HC], sp.AllUncontain_FD [gen][1][quant][HC], sp.AllUncontain_FD [gen][2][quant][HC]}, "AllUncontain_FD" +Comb, FD_CutNames );
556  MakeComparisonPlots( {sp.MuonUncontain_FD [gen][0][quant][HC], sp.MuonUncontain_FD [gen][1][quant][HC], sp.MuonUncontain_FD [gen][2][quant][HC]}, "MuonUncontain_FD" +Comb, FD_CutNames );
557  MakeComparisonPlots( {sp.NeutUncontain_FD [gen][0][quant][HC], sp.NeutUncontain_FD [gen][1][quant][HC], sp.NeutUncontain_FD [gen][2][quant][HC]}, "NeutUncontain_FD" +Comb, FD_CutNames );
558  MakeComparisonPlots( {sp.ProtUncontain_FD [gen][0][quant][HC], sp.ProtUncontain_FD [gen][1][quant][HC], sp.ProtUncontain_FD [gen][2][quant][HC]}, "ProtUncontain_FD" +Comb, FD_CutNames );
559  MakeComparisonPlots( {sp.PionUncontain_FD [gen][0][quant][HC], sp.PionUncontain_FD [gen][1][quant][HC], sp.PionUncontain_FD [gen][2][quant][HC]}, "PionUncontain_FD" +Comb, FD_CutNames );
560  MakeComparisonPlots( {sp.Pi0sUncontain_FD [gen][0][quant][HC], sp.Pi0sUncontain_FD [gen][1][quant][HC], sp.Pi0sUncontain_FD [gen][2][quant][HC]}, "Pi0sUncontain_FD" +Comb, FD_CutNames );
561  MakeComparisonPlots( {sp.PhotUncontain_FD [gen][0][quant][HC], sp.PhotUncontain_FD [gen][1][quant][HC], sp.PhotUncontain_FD [gen][2][quant][HC]}, "PhotUncontain_FD" +Comb, FD_CutNames );
562  MakeComparisonPlots( {sp.KaonUncontain_FD [gen][0][quant][HC], sp.KaonUncontain_FD [gen][1][quant][HC], sp.KaonUncontain_FD [gen][2][quant][HC]}, "KaonUncontain_FD" +Comb, FD_CutNames );
563  MakeComparisonPlots( {sp.ElecUncontain_FD [gen][0][quant][HC], sp.ElecUncontain_FD [gen][1][quant][HC], sp.ElecUncontain_FD [gen][2][quant][HC]}, "ElecUncontain_FD" +Comb, FD_CutNames );
564  MakeComparisonPlots( {sp.MiscUncontain_FD [gen][0][quant][HC], sp.MiscUncontain_FD [gen][1][quant][HC], sp.MiscUncontain_FD [gen][2][quant][HC]}, "MiscUncontain_FD" +Comb, FD_CutNames );
565 
566  // energy fraction
567  MakeComparisonPlots( {sp.MuonEFrac_FD [gen][0][quant][HC], sp.MuonEFrac_FD [gen][1][quant][HC], sp.MuonEFrac_FD [gen][2][quant][HC]}, "MuonEFrac_FD" +Comb, FD_CutNames );
568  MakeComparisonPlots( {sp.NeutronEFrac_FD [gen][0][quant][HC], sp.NeutronEFrac_FD [gen][1][quant][HC], sp.NeutronEFrac_FD [gen][2][quant][HC]}, "NeutronEFrac_FD" +Comb, FD_CutNames);
569  MakeComparisonPlots( {sp.ProtonEFrac_FD [gen][0][quant][HC], sp.ProtonEFrac_FD [gen][1][quant][HC], sp.ProtonEFrac_FD [gen][2][quant][HC]}, "ProtonEFrac_FD" +Comb, FD_CutNames );
570  MakeComparisonPlots( {sp.PionEFrac_FD [gen][0][quant][HC], sp.PionEFrac_FD [gen][1][quant][HC], sp.PionEFrac_FD [gen][2][quant][HC]}, "PionEFrac_FD" +Comb, FD_CutNames );
571  MakeComparisonPlots( {sp.Pi0EFrac_FD [gen][0][quant][HC], sp.Pi0EFrac_FD [gen][1][quant][HC], sp.Pi0EFrac_FD [gen][2][quant][HC]}, "Pi0EFrac_FD" +Comb, FD_CutNames );
572  MakeComparisonPlots( {sp.PhotonEFrac_FD [gen][0][quant][HC], sp.PhotonEFrac_FD [gen][1][quant][HC], sp.PhotonEFrac_FD [gen][2][quant][HC]}, "PhotonEFrac_FD" +Comb, FD_CutNames );
573  MakeComparisonPlots( {sp.KaonEFrac_FD [gen][0][quant][HC], sp.KaonEFrac_FD [gen][1][quant][HC], sp.KaonEFrac_FD [gen][2][quant][HC]}, "KaonEFrac_FD" +Comb, FD_CutNames );
574  MakeComparisonPlots( {sp.ElectronEFrac_FD[gen][0][quant][HC], sp.ElectronEFrac_FD[gen][1][quant][HC], sp.ElectronEFrac_FD[gen][2][quant][HC]}, "ElectronEFrac_FD"+Comb, FD_CutNames);
575 
576  // uncont. E / tot. uncont. E
577  MakeComparisonPlots( {sp.UncontMuonEF_FD[gen][0][quant][HC], sp.UncontMuonEF_FD[gen][1][quant][HC], sp.UncontMuonEF_FD[gen][2][quant][HC]}, "UncontMuonEF_FD"+Comb, FD_CutNames);
578  MakeComparisonPlots( {sp.UncontNeutEF_FD[gen][0][quant][HC], sp.UncontNeutEF_FD[gen][1][quant][HC], sp.UncontNeutEF_FD[gen][2][quant][HC]}, "UncontNeutEF_FD"+Comb, FD_CutNames);
579  MakeComparisonPlots( {sp.UncontProtEF_FD[gen][0][quant][HC], sp.UncontProtEF_FD[gen][1][quant][HC], sp.UncontProtEF_FD[gen][2][quant][HC]}, "UncontProtEF_FD"+Comb, FD_CutNames);
580  MakeComparisonPlots( {sp.UncontPionEF_FD[gen][0][quant][HC], sp.UncontPionEF_FD[gen][1][quant][HC], sp.UncontPionEF_FD[gen][2][quant][HC]}, "UncontPionEF_FD"+Comb, FD_CutNames);
581  MakeComparisonPlots( {sp.UncontPi0sEF_FD[gen][0][quant][HC], sp.UncontPi0sEF_FD[gen][1][quant][HC], sp.UncontPi0sEF_FD[gen][2][quant][HC]}, "UncontPi0sEF_FD"+Comb, FD_CutNames);
582  MakeComparisonPlots( {sp.UncontPhotEF_FD[gen][0][quant][HC], sp.UncontPhotEF_FD[gen][1][quant][HC], sp.UncontPhotEF_FD[gen][2][quant][HC]}, "UncontPhotEF_FD"+Comb, FD_CutNames);
583  MakeComparisonPlots( {sp.UncontKaonEF_FD[gen][0][quant][HC], sp.UncontKaonEF_FD[gen][1][quant][HC], sp.UncontKaonEF_FD[gen][2][quant][HC]}, "UncontKaonEF_FD"+Comb, FD_CutNames);
584  MakeComparisonPlots( {sp.UncontElecEF_FD[gen][0][quant][HC], sp.UncontElecEF_FD[gen][1][quant][HC], sp.UncontElecEF_FD[gen][2][quant][HC]}, "UncontElecEF_FD"+Comb, FD_CutNames);
585 
586  // uncont. E / true nu E
587  MakeComparisonPlots( {sp.UncontTotEFT_FD[gen][0][quant][HC], sp.UncontTotEFT_FD[gen][1][quant][HC], sp.UncontTotEFT_FD[gen][2][quant][HC]}, "UncontTotEFT_FD"+Comb, FD_CutNames);
588  MakeComparisonPlots( {sp.UncontMuonEFT_FD[gen][0][quant][HC], sp.UncontMuonEFT_FD[gen][1][quant][HC], sp.UncontMuonEFT_FD[gen][2][quant][HC]}, "UncontMuonEFT_FD"+Comb, FD_CutNames);
589  MakeComparisonPlots( {sp.UncontNeutEFT_FD[gen][0][quant][HC], sp.UncontNeutEFT_FD[gen][1][quant][HC], sp.UncontNeutEFT_FD[gen][2][quant][HC]}, "UncontNeutEFT_FD"+Comb, FD_CutNames);
590  MakeComparisonPlots( {sp.UncontProtEFT_FD[gen][0][quant][HC], sp.UncontProtEFT_FD[gen][1][quant][HC], sp.UncontProtEFT_FD[gen][2][quant][HC]}, "UncontProtEFT_FD"+Comb, FD_CutNames);
591  MakeComparisonPlots( {sp.UncontPionEFT_FD[gen][0][quant][HC], sp.UncontPionEFT_FD[gen][1][quant][HC], sp.UncontPionEFT_FD[gen][2][quant][HC]}, "UncontPionEFT_FD"+Comb, FD_CutNames);
592  MakeComparisonPlots( {sp.UncontPi0sEFT_FD[gen][0][quant][HC], sp.UncontPi0sEFT_FD[gen][1][quant][HC], sp.UncontPi0sEFT_FD[gen][2][quant][HC]}, "UncontPi0sEFT_FD"+Comb, FD_CutNames);
593  MakeComparisonPlots( {sp.UncontPhotEFT_FD[gen][0][quant][HC], sp.UncontPhotEFT_FD[gen][1][quant][HC], sp.UncontPhotEFT_FD[gen][2][quant][HC]}, "UncontPhotEFT_FD"+Comb, FD_CutNames);
594  MakeComparisonPlots( {sp.UncontKaonEFT_FD[gen][0][quant][HC], sp.UncontKaonEFT_FD[gen][1][quant][HC], sp.UncontKaonEFT_FD[gen][2][quant][HC]}, "UncontKaonEFT_FD"+Comb, FD_CutNames);
595  MakeComparisonPlots( {sp.UncontElecEFT_FD[gen][0][quant][HC], sp.UncontElecEFT_FD[gen][1][quant][HC], sp.UncontElecEFT_FD[gen][2][quant][HC]}, "UncontElecEFT_FD"+Comb, FD_CutNames);
596 
597  // --- ND Second.
598  // energy
599  MakeComparisonPlots( {sp.NeutrinoEnergy_ND[gen][0][quant][HC], sp.NeutrinoEnergy_ND[gen][1][quant][HC]}, "NeutrinoEnergy_ND"+Comb, ND_CutNames );
600  MakeComparisonPlots( {sp.MuonEnergy_ND [gen][0][quant][HC], sp.MuonEnergy_ND [gen][1][quant][HC]}, "MuonEnergy_ND" +Comb, ND_CutNames );
601  MakeComparisonPlots( {sp.NeutronEnergy_ND [gen][0][quant][HC], sp.NeutronEnergy_ND [gen][1][quant][HC]}, "NeutronEnergy_ND" +Comb, ND_CutNames );
602  MakeComparisonPlots( {sp.ProtonEnergy_ND [gen][0][quant][HC], sp.ProtonEnergy_ND [gen][1][quant][HC]}, "ProtonEnergy_ND" +Comb, ND_CutNames );
603  MakeComparisonPlots( {sp.PionEnergy_ND [gen][0][quant][HC], sp.PionEnergy_ND [gen][1][quant][HC]}, "PionEnergy_ND" +Comb, ND_CutNames );
604  MakeComparisonPlots( {sp.Pi0Energy_ND [gen][0][quant][HC], sp.Pi0Energy_ND [gen][1][quant][HC]}, "Pi0Energy_ND" +Comb, ND_CutNames );
605  MakeComparisonPlots( {sp.PhotonEnergy_ND [gen][0][quant][HC], sp.PhotonEnergy_ND [gen][1][quant][HC]}, "PhotonEnergy_ND" +Comb, ND_CutNames );
606  MakeComparisonPlots( {sp.KaonEnergy_ND [gen][0][quant][HC], sp.KaonEnergy_ND [gen][1][quant][HC]}, "KaonEnergy_ND" +Comb, ND_CutNames );
607  MakeComparisonPlots( {sp.ElectronEnergy_ND[gen][0][quant][HC], sp.ElectronEnergy_ND[gen][1][quant][HC]}, "ElectronEnergy_ND"+Comb, ND_CutNames );
608  MakeComparisonPlots( {sp.MiscEnergy_ND [gen][0][quant][HC], sp.MiscEnergy_ND [gen][1][quant][HC]}, "MiscEnergy_ND" +Comb, ND_CutNames );
609 
610  // uncontained energy
611  MakeComparisonPlots( {sp.AllUncontain_ND [gen][0][quant][HC], sp.AllUncontain_ND [gen][1][quant][HC]}, "AllUncontain_ND" +Comb, ND_CutNames );
612  MakeComparisonPlots( {sp.MuonUncontain_ND [gen][0][quant][HC], sp.MuonUncontain_ND [gen][1][quant][HC]}, "MuonUncontain_ND" +Comb, ND_CutNames );
613  MakeComparisonPlots( {sp.NeutUncontain_ND [gen][0][quant][HC], sp.NeutUncontain_ND [gen][1][quant][HC]}, "NeutUncontain_ND" +Comb, ND_CutNames );
614  MakeComparisonPlots( {sp.ProtUncontain_ND [gen][0][quant][HC], sp.ProtUncontain_ND [gen][1][quant][HC]}, "ProtUncontain_ND" +Comb, ND_CutNames );
615  MakeComparisonPlots( {sp.PionUncontain_ND [gen][0][quant][HC], sp.PionUncontain_ND [gen][1][quant][HC]}, "PionUncontain_ND" +Comb, ND_CutNames );
616  MakeComparisonPlots( {sp.Pi0sUncontain_ND [gen][0][quant][HC], sp.Pi0sUncontain_ND [gen][1][quant][HC]}, "Pi0sUncontain_ND" +Comb, ND_CutNames );
617  MakeComparisonPlots( {sp.PhotUncontain_ND [gen][0][quant][HC], sp.PhotUncontain_ND [gen][1][quant][HC]}, "PhotUncontain_ND" +Comb, ND_CutNames );
618  MakeComparisonPlots( {sp.KaonUncontain_ND [gen][0][quant][HC], sp.KaonUncontain_ND [gen][1][quant][HC]}, "KaonUncontain_ND" +Comb, ND_CutNames );
619  MakeComparisonPlots( {sp.ElecUncontain_ND [gen][0][quant][HC], sp.ElecUncontain_ND [gen][1][quant][HC]}, "ElecUncontain_ND" +Comb, ND_CutNames );
620  MakeComparisonPlots( {sp.MiscUncontain_ND [gen][0][quant][HC], sp.MiscUncontain_ND [gen][1][quant][HC]}, "MiscUncontain_ND" +Comb, ND_CutNames );
621 
622  // energy fraction
623  MakeComparisonPlots( {sp.MuonEFrac_ND [gen][0][quant][HC], sp.MuonEFrac_ND [gen][1][quant][HC]}, "MuonEFrac_ND" +Comb, ND_CutNames);
624  MakeComparisonPlots( {sp.NeutronEFrac_ND [gen][0][quant][HC], sp.NeutronEFrac_ND [gen][1][quant][HC]}, "NeutronEFrac_ND" +Comb, ND_CutNames);
625  MakeComparisonPlots( {sp.ProtonEFrac_ND [gen][0][quant][HC], sp.ProtonEFrac_ND [gen][1][quant][HC]}, "ProtonEFrac_ND" +Comb, ND_CutNames);
626  MakeComparisonPlots( {sp.PionEFrac_ND [gen][0][quant][HC], sp.PionEFrac_ND [gen][1][quant][HC]}, "PionEFrac_ND" +Comb, ND_CutNames);
627  MakeComparisonPlots( {sp.Pi0EFrac_ND [gen][0][quant][HC], sp.Pi0EFrac_ND [gen][1][quant][HC]}, "Pi0EFrac_ND" +Comb, ND_CutNames);
628  MakeComparisonPlots( {sp.PhotonEFrac_ND [gen][0][quant][HC], sp.PhotonEFrac_ND [gen][1][quant][HC]}, "PhotonEFrac_ND" +Comb, ND_CutNames);
629  MakeComparisonPlots( {sp.KaonEFrac_ND [gen][0][quant][HC], sp.KaonEFrac_ND [gen][1][quant][HC]}, "KaonEFrac_ND" +Comb, ND_CutNames);
630  MakeComparisonPlots( {sp.ElectronEFrac_ND[gen][0][quant][HC], sp.ElectronEFrac_ND[gen][1][quant][HC]}, "ElectronEFrac_ND"+Comb, ND_CutNames);
631 
632  // uncont. E / tot. uncont. E
633  MakeComparisonPlots( {sp.UncontMuonEF_ND[gen][0][quant][HC], sp.UncontMuonEF_ND[gen][1][quant][HC]}, "UncontMuonEF_ND"+Comb, ND_CutNames);
634  MakeComparisonPlots( {sp.UncontNeutEF_ND[gen][0][quant][HC], sp.UncontNeutEF_ND[gen][1][quant][HC]}, "UncontNeutEF_ND"+Comb, ND_CutNames);
635  MakeComparisonPlots( {sp.UncontProtEF_ND[gen][0][quant][HC], sp.UncontProtEF_ND[gen][1][quant][HC]}, "UncontProtEF_ND"+Comb, ND_CutNames);
636  MakeComparisonPlots( {sp.UncontPionEF_ND[gen][0][quant][HC], sp.UncontPionEF_ND[gen][1][quant][HC]}, "UncontPionEF_ND"+Comb, ND_CutNames);
637  MakeComparisonPlots( {sp.UncontPi0sEF_ND[gen][0][quant][HC], sp.UncontPi0sEF_ND[gen][1][quant][HC]}, "UncontPi0sEF_ND"+Comb, ND_CutNames);
638  MakeComparisonPlots( {sp.UncontPhotEF_ND[gen][0][quant][HC], sp.UncontPhotEF_ND[gen][1][quant][HC]}, "UncontPhotEF_ND"+Comb, ND_CutNames);
639  MakeComparisonPlots( {sp.UncontKaonEF_ND[gen][0][quant][HC], sp.UncontKaonEF_ND[gen][1][quant][HC]}, "UncontKaonEF_ND"+Comb, ND_CutNames);
640  MakeComparisonPlots( {sp.UncontElecEF_ND[gen][0][quant][HC], sp.UncontElecEF_ND[gen][1][quant][HC]}, "UncontElecEF_ND"+Comb, ND_CutNames);
641 
642  // uncont. E / true nu E
643  MakeComparisonPlots( {sp.UncontTotEFT_ND [gen][0][quant][HC], sp.UncontTotEFT_ND [gen][1][quant][HC]}, "UncontTotEFT_ND" +Comb, ND_CutNames);
644  MakeComparisonPlots( {sp.UncontMuonEFT_ND[gen][0][quant][HC], sp.UncontMuonEFT_ND[gen][1][quant][HC]}, "UncontMuonEFT_ND"+Comb, ND_CutNames);
645  MakeComparisonPlots( {sp.UncontNeutEFT_ND[gen][0][quant][HC], sp.UncontNeutEFT_ND[gen][1][quant][HC]}, "UncontNeutEFT_ND"+Comb, ND_CutNames);
646  MakeComparisonPlots( {sp.UncontProtEFT_ND[gen][0][quant][HC], sp.UncontProtEFT_ND[gen][1][quant][HC]}, "UncontProtEFT_ND"+Comb, ND_CutNames);
647  MakeComparisonPlots( {sp.UncontPionEFT_ND[gen][0][quant][HC], sp.UncontPionEFT_ND[gen][1][quant][HC]}, "UncontPionEFT_ND"+Comb, ND_CutNames);
648  MakeComparisonPlots( {sp.UncontPi0sEFT_ND[gen][0][quant][HC], sp.UncontPi0sEFT_ND[gen][1][quant][HC]}, "UncontPi0sEFT_ND"+Comb, ND_CutNames);
649  MakeComparisonPlots( {sp.UncontPhotEFT_ND[gen][0][quant][HC], sp.UncontPhotEFT_ND[gen][1][quant][HC]}, "UncontPhotEFT_ND"+Comb, ND_CutNames);
650  MakeComparisonPlots( {sp.UncontKaonEFT_ND[gen][0][quant][HC], sp.UncontKaonEFT_ND[gen][1][quant][HC]}, "UncontKaonEFT_ND"+Comb, ND_CutNames);
651  MakeComparisonPlots( {sp.UncontElecEFT_ND[gen][0][quant][HC], sp.UncontElecEFT_ND[gen][1][quant][HC]}, "UncontElecEFT_ND"+Comb, ND_CutNames);
652 
653  // *************** Now look at plots where we only care about the final selection cut ***************
654  // total uncontained energy vs. vertex position
655  Print2D(sp.UncontTotEvsX_FD[gen][FCut_FD][quant][HC], "UncontTotEvsX_FD"+Comb );
656  Print2D(sp.UncontTotEvsY_FD[gen][FCut_FD][quant][HC], "UncontTotEvsY_FD"+Comb );
657 
658  // EF vs. true nuE
659  Print2D(sp.MuonEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "MuonEFracvsTrueE_FD" +Comb );
660  Print2D(sp.NeutronEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "NeutronEFracvsTrueE_FD" +Comb );
661  Print2D(sp.ProtonEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "ProtonEFracvsTrueE_FD" +Comb );
662  Print2D(sp.PionEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "PionEFracvsTrueE_FD" +Comb );
663  Print2D(sp.Pi0EFracvsTrueE_FD [gen][FCut_FD][quant][HC], "Pi0EFracvsTrueE_FD" +Comb );
664  Print2D(sp.PhotonEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "PhotonEFracvsTrueE_FD" +Comb );
665  Print2D(sp.KaonEFracvsTrueE_FD [gen][FCut_FD][quant][HC], "KaonEFracvsTrueE_FD" +Comb );
666  Print2D(sp.ElectronEFracvsTrueE_FD[gen][FCut_FD][quant][HC], "ElectronEFracvsTrueE_FD"+Comb );
667 
668  // uncont EF vs. true nuE
669  Print2D(sp.UncontMuonEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontMuonEFvsTrueE_FD"+Comb );
670  Print2D(sp.UncontNeutEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontNeutEFvsTrueE_FD"+Comb );
671  Print2D(sp.UncontProtEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontProtEFvsTrueE_FD"+Comb );
672  Print2D(sp.UncontPionEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPionEFvsTrueE_FD"+Comb );
673  Print2D(sp.UncontPi0sEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPi0sEFvsTrueE_FD"+Comb );
674  Print2D(sp.UncontPhotEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPhotEFvsTrueE_FD"+Comb );
675  Print2D(sp.UncontKaonEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontKaonEFvsTrueE_FD"+Comb );
676  Print2D(sp.UncontElecEFvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontElecEFvsTrueE_FD"+Comb );
677 
678  // uncont EFT vs. true nuE
679  Print2D(sp.UncontTotEFTvsTrueE_FD [gen][FCut_FD][quant][HC], "UncontTotEFTvsTrueE_FD"+Comb );
680  Print2D(sp.UncontMuonEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontMuonEFTvsTrueE_FD"+Comb );
681  Print2D(sp.UncontNeutEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontNeutEFTvsTrueE_FD"+Comb );
682  Print2D(sp.UncontProtEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontProtEFTvsTrueE_FD"+Comb );
683  Print2D(sp.UncontPionEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPionEFTvsTrueE_FD"+Comb );
684  Print2D(sp.UncontPi0sEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPi0sEFTvsTrueE_FD"+Comb );
685  Print2D(sp.UncontPhotEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontPhotEFTvsTrueE_FD"+Comb );
686  Print2D(sp.UncontKaonEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontKaonEFTvsTrueE_FD"+Comb );
687  Print2D(sp.UncontElecEFTvsTrueE_FD[gen][FCut_FD][quant][HC], "UncontElecEFTvsTrueE_FD"+Comb );
688 
689 
690  // --- Pull the ND plots.
691  // total uncontained energy vs. vertex position
692  Print2D(sp.UncontTotEvsX_ND[gen][FCut_ND][quant][HC], "UncontTotEvsX_ND"+Comb );
693  Print2D(sp.UncontTotEvsY_ND[gen][FCut_ND][quant][HC], "UncontTotEvsY_ND"+Comb );
694 
695  // EF vs. true nuE
696  Print2D(sp.MuonEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "MuonEFracvsTrueE_ND" +Comb );
697  Print2D(sp.NeutronEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "NeutronEFracvsTrueE_ND" +Comb );
698  Print2D(sp.ProtonEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "ProtonEFracvsTrueE_ND" +Comb );
699  Print2D(sp.PionEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "PionEFracvsTrueE_ND" +Comb );
700  Print2D(sp.Pi0EFracvsTrueE_ND [gen][FCut_ND][quant][HC], "Pi0EFracvsTrueE_ND" +Comb );
701  Print2D(sp.PhotonEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "PhotonEFracvsTrueE_ND" +Comb );
702  Print2D(sp.KaonEFracvsTrueE_ND [gen][FCut_ND][quant][HC], "KaonEFracvsTrueE_ND" +Comb );
703  Print2D(sp.ElectronEFracvsTrueE_ND[gen][FCut_ND][quant][HC], "ElectronEFracvsTrueE_ND"+Comb );
704 
705  // uncont EF vs. true nuE
706  Print2D(sp.UncontMuonEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontMuonEFvsTrueE_ND"+Comb );
707  Print2D(sp.UncontNeutEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontNeutEFvsTrueE_ND"+Comb );
708  Print2D(sp.UncontProtEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontProtEFvsTrueE_ND"+Comb );
709  Print2D(sp.UncontPionEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPionEFvsTrueE_ND"+Comb );
710  Print2D(sp.UncontPi0sEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPi0sEFvsTrueE_ND"+Comb );
711  Print2D(sp.UncontPhotEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPhotEFvsTrueE_ND"+Comb );
712  Print2D(sp.UncontKaonEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontKaonEFvsTrueE_ND"+Comb );
713  Print2D(sp.UncontElecEFvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontElecEFvsTrueE_ND"+Comb );
714 
715  // uncont EFT vs. true nuE
716  Print2D(sp.UncontTotEFTvsTrueE_ND [gen][FCut_ND][quant][HC], "UncontTotEFTvsTrueE_ND"+Comb );
717  Print2D(sp.UncontMuonEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontMuonEFTvsTrueE_ND"+Comb );
718  Print2D(sp.UncontNeutEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontNeutEFTvsTrueE_ND"+Comb );
719  Print2D(sp.UncontProtEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontProtEFTvsTrueE_ND"+Comb );
720  Print2D(sp.UncontPionEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPionEFTvsTrueE_ND"+Comb );
721  Print2D(sp.UncontPi0sEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPi0sEFTvsTrueE_ND"+Comb );
722  Print2D(sp.UncontPhotEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontPhotEFTvsTrueE_ND"+Comb );
723  Print2D(sp.UncontKaonEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontKaonEFTvsTrueE_ND"+Comb );
724  Print2D(sp.UncontElecEFTvsTrueE_ND[gen][FCut_ND][quant][HC], "UncontElecEFTvsTrueE_ND"+Comb );
725 
726  // --- compare ND and FD -- these will only make sense if area normalized
727  // --- uncontained energy
728 
729  MakeComparisonPlots({sp.AllUncontain_ND [gen][FCut_ND][quant][HC], sp.AllUncontain_FD [gen][FCut_FD][quant][HC]}, "AllUncontain_NDFD"+Comb, DetNames);
730  MakeComparisonPlots({sp.MuonUncontain_ND[gen][FCut_ND][quant][HC], sp.MuonUncontain_FD[gen][FCut_FD][quant][HC]}, "MuonUncontain_NDFD"+Comb, DetNames);
731  MakeComparisonPlots({sp.NeutUncontain_ND[gen][FCut_ND][quant][HC], sp.NeutUncontain_FD[gen][FCut_FD][quant][HC]}, "NeutUncontain_NDFD"+Comb, DetNames);
732  MakeComparisonPlots({sp.ProtUncontain_ND[gen][FCut_ND][quant][HC], sp.ProtUncontain_FD[gen][FCut_FD][quant][HC]}, "ProtUncontain_ND[FD"+Comb, DetNames);
733  MakeComparisonPlots({sp.PionUncontain_ND[gen][FCut_ND][quant][HC], sp.PionUncontain_FD[gen][FCut_FD][quant][HC]}, "PionUncontain_NDFD"+Comb, DetNames);
734  MakeComparisonPlots({sp.Pi0sUncontain_ND[gen][FCut_ND][quant][HC], sp.Pi0sUncontain_FD[gen][FCut_FD][quant][HC]}, "Pi0sUncontain_NDFD"+Comb, DetNames);
735  MakeComparisonPlots({sp.PhotUncontain_ND[gen][FCut_ND][quant][HC], sp.PhotUncontain_FD[gen][FCut_FD][quant][HC]}, "PhotUncontain_NDFD"+Comb, DetNames);
736  MakeComparisonPlots({sp.KaonUncontain_ND[gen][FCut_ND][quant][HC], sp.KaonUncontain_FD[gen][FCut_FD][quant][HC]}, "KaonUncontain_NDFD"+Comb, DetNames);
737  MakeComparisonPlots({sp.ElecUncontain_ND[gen][FCut_ND][quant][HC], sp.ElecUncontain_FD[gen][FCut_FD][quant][HC]}, "ElecUncontain_NDFD"+Comb, DetNames);
738  MakeComparisonPlots({sp.MiscUncontain_ND[gen][FCut_ND][quant][HC], sp.MiscUncontain_FD[gen][FCut_FD][quant][HC]}, "MiscUncontain_NDFD"+Comb, DetNames);
739 
740  // --- energy / true neutrino energy
741  MakeComparisonPlots({sp.MuonEFrac_ND [gen][FCut_ND][quant][HC], sp.MuonEFrac_FD [gen][FCut_FD][quant][HC]}, "MuonEFrac_NDFD"+Comb, DetNames);
742  MakeComparisonPlots({sp.NeutronEFrac_ND [gen][FCut_ND][quant][HC], sp.NeutronEFrac_FD [gen][FCut_FD][quant][HC]}, "NeutronEFrac_NDFD"+Comb, DetNames);
743  MakeComparisonPlots({sp.ProtonEFrac_ND [gen][FCut_ND][quant][HC], sp.ProtonEFrac_FD [gen][FCut_FD][quant][HC]}, "ProtonEFrac_NDFD"+Comb, DetNames);
744  MakeComparisonPlots({sp.PionEFrac_ND [gen][FCut_ND][quant][HC], sp.PionEFrac_FD [gen][FCut_FD][quant][HC]}, "PionEFrac_NDFD"+Comb, DetNames);
745  MakeComparisonPlots({sp.Pi0EFrac_ND [gen][FCut_ND][quant][HC], sp.Pi0EFrac_FD [gen][FCut_FD][quant][HC]}, "Pi0EFrac_NDFD"+Comb, DetNames);
746  MakeComparisonPlots({sp.PhotonEFrac_ND [gen][FCut_ND][quant][HC], sp.PhotonEFrac_FD [gen][FCut_FD][quant][HC]}, "PhotonEFrac_NDFD"+Comb, DetNames);
747  MakeComparisonPlots({sp.KaonEFrac_ND [gen][FCut_ND][quant][HC], sp.KaonEFrac_FD [gen][FCut_FD][quant][HC]}, "KaonEFrac_NDFD"+Comb, DetNames);
748  MakeComparisonPlots({sp.ElectronEFrac_ND[gen][FCut_ND][quant][HC], sp.ElectronEFrac_FD[gen][FCut_FD][quant][HC]}, "ElectronEFrac_NDFD"+Comb, DetNames);
749 
750  // --- uncontained energy / true neutrino energy
751  MakeComparisonPlots({sp.UncontTotEFT_ND [gen][FCut_ND][quant][HC], sp.UncontTotEFT_FD [gen][FCut_FD][quant][HC]}, "UncontTotEFT_NDFD"+Comb, DetNames);
752  MakeComparisonPlots({sp.UncontMuonEFT_ND[gen][FCut_ND][quant][HC], sp.UncontMuonEFT_FD[gen][FCut_FD][quant][HC]}, "UncontMuonEFT_NDFD"+Comb, DetNames);
753  MakeComparisonPlots({sp.UncontNeutEFT_ND[gen][FCut_ND][quant][HC], sp.UncontNeutEFT_FD[gen][FCut_FD][quant][HC]}, "UncontNeutEFT_NDFD"+Comb, DetNames);
754  MakeComparisonPlots({sp.UncontProtEFT_ND[gen][FCut_ND][quant][HC], sp.UncontProtEFT_FD[gen][FCut_FD][quant][HC]}, "UncontProtEFT_NDFD"+Comb, DetNames);
755  MakeComparisonPlots({sp.UncontPionEFT_ND[gen][FCut_ND][quant][HC], sp.UncontPionEFT_FD[gen][FCut_FD][quant][HC]}, "UncontPionEFT_NDFD"+Comb, DetNames);
756  MakeComparisonPlots({sp.UncontPi0sEFT_ND[gen][FCut_ND][quant][HC], sp.UncontPi0sEFT_FD[gen][FCut_FD][quant][HC]}, "UncontPi0sEFT_NDFD"+Comb, DetNames);
757  MakeComparisonPlots({sp.UncontPhotEFT_ND[gen][FCut_ND][quant][HC], sp.UncontPhotEFT_FD[gen][FCut_FD][quant][HC]}, "UncontPhotEFT_NDFD"+Comb, DetNames);
758  MakeComparisonPlots({sp.UncontKaonEFT_ND[gen][FCut_ND][quant][HC], sp.UncontKaonEFT_FD[gen][FCut_FD][quant][HC]}, "UncontKaonEFT_NDFD"+Comb, DetNames);
759  MakeComparisonPlots({sp.UncontElecEFT_ND[gen][FCut_ND][quant][HC], sp.UncontElecEFT_FD[gen][FCut_FD][quant][HC]}, "UncontElecEFT_NDFD"+Comb, DetNames);
760 
761  } // Loop over quants.
762  } // Loop through GENIE interaction types.
763  }// FHC/RHC
764 
765  // --- FHC/RHC comparisons
766  for(unsigned int gen=0; gen<nGENIE; ++gen) {
767  for (unsigned int quant=0; quant<nQuantNames; ++quant) {
768  std::string Comb = "_"+GENIEStr[gen]+"_"+QuantNames[quant];
769  // --- FD
770  // --- uncontained energy
771  MakeComparisonPlots({sp.AllUncontain_FD[gen][FCut_FD][quant][0] , sp.AllUncontain_FD[gen][FCut_FD][quant][1]} , "AllUncontain_FD_FHCRHC"+Comb, HCNames);
772  MakeComparisonPlots({sp.MuonUncontain_FD[gen][FCut_FD][quant][0], sp.MuonUncontain_FD[gen][FCut_FD][quant][1]}, "MuonUncontain_FD_FHCRHC"+Comb, HCNames);
773  MakeComparisonPlots({sp.NeutUncontain_FD[gen][FCut_FD][quant][0], sp.NeutUncontain_FD[gen][FCut_FD][quant][1]}, "NeutUncontain_FD_FHCRHC"+Comb, HCNames);
774  MakeComparisonPlots({sp.ProtUncontain_FD[gen][FCut_FD][quant][0], sp.ProtUncontain_FD[gen][FCut_FD][quant][1]}, "ProtUncontain_FD_FHCRHC"+Comb, HCNames);
775  MakeComparisonPlots({sp.PionUncontain_FD[gen][FCut_FD][quant][0], sp.PionUncontain_FD[gen][FCut_FD][quant][1]}, "PionUncontain_FD_FHCRHC"+Comb, HCNames);
776  MakeComparisonPlots({sp.Pi0sUncontain_FD[gen][FCut_FD][quant][0], sp.Pi0sUncontain_FD[gen][FCut_FD][quant][1]}, "Pi0sUncontain_FD_FHCRHC"+Comb, HCNames);
777  MakeComparisonPlots({sp.PhotUncontain_FD[gen][FCut_FD][quant][0], sp.PhotUncontain_FD[gen][FCut_FD][quant][1]}, "PhotUncontain_FD_FHCRHC"+Comb, HCNames);
778  MakeComparisonPlots({sp.KaonUncontain_FD[gen][FCut_FD][quant][0], sp.KaonUncontain_FD[gen][FCut_FD][quant][1]}, "KaonUncontain_FD_FHCRHC"+Comb, HCNames);
779  MakeComparisonPlots({sp.ElecUncontain_FD[gen][FCut_FD][quant][0], sp.ElecUncontain_FD[gen][FCut_FD][quant][1]}, "ElecUncontain_FD_FHCRHC"+Comb, HCNames);
780  MakeComparisonPlots({sp.MiscUncontain_FD[gen][FCut_FD][quant][0], sp.MiscUncontain_FD[gen][FCut_FD][quant][1]}, "MiscUncontain_FD_FHCRHC"+Comb, HCNames);
781 
782  // --- energy / true neutrino energy
783  MakeComparisonPlots({sp.MuonEFrac_FD [gen][FCut_FD][quant][0], sp.MuonEFrac_FD [gen][FCut_FD][quant][1]}, "MuonEFrac_FD_FHCRHC"+Comb, HCNames);
784  MakeComparisonPlots({sp.NeutronEFrac_FD [gen][FCut_FD][quant][0], sp.NeutronEFrac_FD [gen][FCut_FD][quant][1]}, "NeutronEFrac_FD_FHCRHC"+Comb, HCNames);
785  MakeComparisonPlots({sp.ProtonEFrac_FD [gen][FCut_FD][quant][0], sp.ProtonEFrac_FD [gen][FCut_FD][quant][1]}, "ProtonEFrac_FD_FHCRHC"+Comb, HCNames);
786  MakeComparisonPlots({sp.PionEFrac_FD [gen][FCut_FD][quant][0], sp.PionEFrac_FD [gen][FCut_FD][quant][1]}, "PionEFrac_FD_FHCRHC"+Comb, HCNames);
787  MakeComparisonPlots({sp.Pi0EFrac_FD [gen][FCut_FD][quant][0], sp.Pi0EFrac_FD [gen][FCut_FD][quant][1]}, "Pi0EFrac_FD_FHCRHC"+Comb, HCNames);
788  MakeComparisonPlots({sp.PhotonEFrac_FD [gen][FCut_FD][quant][0], sp.PhotonEFrac_FD [gen][FCut_FD][quant][1]}, "PhotonEFrac_FD_FHCRHC"+Comb, HCNames);
789  MakeComparisonPlots({sp.KaonEFrac_FD [gen][FCut_FD][quant][0], sp.KaonEFrac_FD [gen][FCut_FD][quant][1]}, "KaonEFrac_FD_FHCRHC"+Comb, HCNames);
790  MakeComparisonPlots({sp.ElectronEFrac_FD[gen][FCut_FD][quant][0], sp.ElectronEFrac_FD[gen][FCut_FD][quant][1]}, "ElectronEFrac_FD_FHCRHC"+Comb, HCNames);
791 
792  // --- uncontained energy / true neutrino energy
793  MakeComparisonPlots({sp.UncontTotEFT_FD [gen][FCut_FD][quant][0], sp.UncontTotEFT_FD [gen][FCut_FD][quant][1]}, "UncontTotEFT_FD_FHCRHC"+Comb, HCNames);
794  MakeComparisonPlots({sp.UncontMuonEFT_FD[gen][FCut_FD][quant][0], sp.UncontMuonEFT_FD[gen][FCut_FD][quant][1]}, "UncontMuonEFT_FD_FHCRHC"+Comb, HCNames);
795  MakeComparisonPlots({sp.UncontNeutEFT_FD[gen][FCut_FD][quant][0], sp.UncontNeutEFT_FD[gen][FCut_FD][quant][1]}, "UncontNeutEFT_FD_FHCRHC"+Comb, HCNames);
796  MakeComparisonPlots({sp.UncontProtEFT_FD[gen][FCut_FD][quant][0], sp.UncontProtEFT_FD[gen][FCut_FD][quant][1]}, "UncontProtEFT_FD_FHCRHC"+Comb, HCNames);
797  MakeComparisonPlots({sp.UncontPionEFT_FD[gen][FCut_FD][quant][0], sp.UncontPionEFT_FD[gen][FCut_FD][quant][1]}, "UncontPionEFT_FD_FHCRHC"+Comb, HCNames);
798  MakeComparisonPlots({sp.UncontPi0sEFT_FD[gen][FCut_FD][quant][0], sp.UncontPi0sEFT_FD[gen][FCut_FD][quant][1]}, "UncontPi0sEFT_FD_FHCRHC"+Comb, HCNames);
799  MakeComparisonPlots({sp.UncontPhotEFT_FD[gen][FCut_FD][quant][0], sp.UncontPhotEFT_FD[gen][FCut_FD][quant][1]}, "UncontPhotEFT_FD_FHCRHC"+Comb, HCNames);
800  MakeComparisonPlots({sp.UncontKaonEFT_FD[gen][FCut_FD][quant][0], sp.UncontKaonEFT_FD[gen][FCut_FD][quant][1]}, "UncontKaonEFT_FD_FHCRHC"+Comb, HCNames);
801  MakeComparisonPlots({sp.UncontElecEFT_FD[gen][FCut_FD][quant][0], sp.UncontElecEFT_FD[gen][FCut_FD][quant][1]}, "UncontElecEFT_FD_FHCRHC"+Comb, HCNames);
802 
803  // --- ND
804  // --- uncontained energy
805  MakeComparisonPlots({sp.AllUncontain_ND[gen][FCut_ND][quant][0] , sp.AllUncontain_ND[gen][FCut_ND][quant][1]} , "AllUncontain_ND_FHCRHC"+Comb, HCNames);
806  MakeComparisonPlots({sp.MuonUncontain_ND[gen][FCut_ND][quant][0], sp.MuonUncontain_ND[gen][FCut_ND][quant][1]}, "MuonUncontain_ND_FHCRHC"+Comb, HCNames);
807  MakeComparisonPlots({sp.NeutUncontain_ND[gen][FCut_ND][quant][0], sp.NeutUncontain_ND[gen][FCut_ND][quant][1]}, "NeutUncontain_ND_FHCRHC"+Comb, HCNames);
808  MakeComparisonPlots({sp.ProtUncontain_ND[gen][FCut_ND][quant][0], sp.ProtUncontain_ND[gen][FCut_ND][quant][1]}, "ProtUncontain_ND_FHCRHC"+Comb, HCNames);
809  MakeComparisonPlots({sp.PionUncontain_ND[gen][FCut_ND][quant][0], sp.PionUncontain_ND[gen][FCut_ND][quant][1]}, "PionUncontain_ND_FHCRHC"+Comb, HCNames);
810  MakeComparisonPlots({sp.Pi0sUncontain_ND[gen][FCut_ND][quant][0], sp.Pi0sUncontain_ND[gen][FCut_ND][quant][1]}, "Pi0sUncontain_ND_FHCRHC"+Comb, HCNames);
811  MakeComparisonPlots({sp.PhotUncontain_ND[gen][FCut_ND][quant][0], sp.PhotUncontain_ND[gen][FCut_ND][quant][1]}, "PhotUncontain_ND_FHCRHC"+Comb, HCNames);
812  MakeComparisonPlots({sp.KaonUncontain_ND[gen][FCut_ND][quant][0], sp.KaonUncontain_ND[gen][FCut_ND][quant][1]}, "KaonUncontain_ND_FHCRHC"+Comb, HCNames);
813  MakeComparisonPlots({sp.ElecUncontain_ND[gen][FCut_ND][quant][0], sp.ElecUncontain_ND[gen][FCut_ND][quant][1]}, "ElecUncontain_ND_FHCRHC"+Comb, HCNames);
814  MakeComparisonPlots({sp.MiscUncontain_ND[gen][FCut_ND][quant][0], sp.MiscUncontain_ND[gen][FCut_ND][quant][1]}, "MiscUncontain_ND_FHCRHC"+Comb, HCNames);
815 
816  // --- energy / true neutrino energy
817  MakeComparisonPlots({sp.MuonEFrac_ND [gen][FCut_ND][quant][0], sp.MuonEFrac_ND [gen][FCut_ND][quant][1]}, "MuonEFrac_ND_FHCRHC"+Comb, HCNames);
818  MakeComparisonPlots({sp.NeutronEFrac_ND [gen][FCut_ND][quant][0], sp.NeutronEFrac_ND [gen][FCut_ND][quant][1]}, "NeutronEFrac_ND_FHCRHC"+Comb, HCNames);
819  MakeComparisonPlots({sp.ProtonEFrac_ND [gen][FCut_ND][quant][0], sp.ProtonEFrac_ND [gen][FCut_ND][quant][1]}, "ProtonEFrac_ND_FHCRHC"+Comb, HCNames);
820  MakeComparisonPlots({sp.PionEFrac_ND [gen][FCut_ND][quant][0], sp.PionEFrac_ND [gen][FCut_ND][quant][1]}, "PionEFrac_ND_FHCRHC"+Comb, HCNames);
821  MakeComparisonPlots({sp.Pi0EFrac_ND [gen][FCut_ND][quant][0], sp.Pi0EFrac_ND [gen][FCut_ND][quant][1]}, "Pi0EFrac_ND_FHCRHC"+Comb, HCNames);
822  MakeComparisonPlots({sp.PhotonEFrac_ND [gen][FCut_ND][quant][0], sp.PhotonEFrac_ND [gen][FCut_ND][quant][1]}, "PhotonEFrac_ND_FHCRHC"+Comb, HCNames);
823  MakeComparisonPlots({sp.KaonEFrac_ND [gen][FCut_ND][quant][0], sp.KaonEFrac_ND [gen][FCut_ND][quant][1]}, "KaonEFrac_ND_FHCRHC"+Comb, HCNames);
824  MakeComparisonPlots({sp.ElectronEFrac_ND[gen][FCut_ND][quant][0], sp.ElectronEFrac_ND[gen][FCut_ND][quant][1]}, "ElectronEFrac_ND_FHCRHC"+Comb, HCNames);
825 
826  // --- uncontained energy / true neutrino energy
827  MakeComparisonPlots({sp.UncontTotEFT_ND [gen][FCut_ND][quant][0], sp.UncontTotEFT_ND [gen][FCut_ND][quant][1]}, "UncontTotEFT_ND_FHCRHC"+Comb, HCNames);
828  MakeComparisonPlots({sp.UncontMuonEFT_ND[gen][FCut_ND][quant][0], sp.UncontMuonEFT_ND[gen][FCut_ND][quant][1]}, "UncontMuonEFT_ND_FHCRHC"+Comb, HCNames);
829  MakeComparisonPlots({sp.UncontNeutEFT_ND[gen][FCut_ND][quant][0], sp.UncontNeutEFT_ND[gen][FCut_ND][quant][1]}, "UncontNeutEFT_ND_FHCRHC"+Comb, HCNames);
830  MakeComparisonPlots({sp.UncontProtEFT_ND[gen][FCut_ND][quant][0], sp.UncontProtEFT_ND[gen][FCut_ND][quant][1]}, "UncontProtEFT_ND_FHCRHC"+Comb, HCNames);
831  MakeComparisonPlots({sp.UncontPionEFT_ND[gen][FCut_ND][quant][0], sp.UncontPionEFT_ND[gen][FCut_ND][quant][1]}, "UncontPionEFT_ND_FHCRHC"+Comb, HCNames);
832  MakeComparisonPlots({sp.UncontPi0sEFT_ND[gen][FCut_ND][quant][0], sp.UncontPi0sEFT_ND[gen][FCut_ND][quant][1]}, "UncontPi0sEFT_ND_FHCRHC"+Comb, HCNames);
833  MakeComparisonPlots({sp.UncontPhotEFT_ND[gen][FCut_ND][quant][0], sp.UncontPhotEFT_ND[gen][FCut_ND][quant][1]}, "UncontPhotEFT_ND_FHCRHC"+Comb, HCNames);
834  MakeComparisonPlots({sp.UncontKaonEFT_ND[gen][FCut_ND][quant][0], sp.UncontKaonEFT_ND[gen][FCut_ND][quant][1]}, "UncontKaonEFT_ND_FHCRHC"+Comb, HCNames);
835  MakeComparisonPlots({sp.UncontElecEFT_ND[gen][FCut_ND][quant][0], sp.UncontElecEFT_ND[gen][FCut_ND][quant][1]}, "UncontElecEFT_ND_FHCRHC"+Comb, HCNames);
836 
837  } // quant
838  } // GENIE
839 
840 // // print the 0bin fraction last so it doesn't get lost in the billion saved plots
841 // for (unsigned int HC=0; HC<nHC; ++HC) {
842 // // events in 0bin in uncontained energy / true neutrino energy histogram
843 // for(unsigned int gen=0; gen<nGENIE; ++gen) {
844 // // Loop through the quantile cuts.
845 // for (unsigned int quant=0; quant<nQuantNames; ++quant) {
846 // std::string Comb = "_"+GENIEStr[gen]+"_"+QuantNames[quant]+"_"+HCNames[HC];
847 // std::cout<<"FD"<<std::endl;
848 // Print0binFrac(sp.UncontTotEFT_FD [gen][FCut_FD][quant][HC], "UncontTotEFT" +Comb);
849 // Print0binFrac(sp.UncontMuonEFT_FD[gen][FCut_FD][quant][HC], "UncontMuonEFT" +Comb);
850 // Print0binFrac(sp.UncontNeutEFT_FD[gen][FCut_FD][quant][HC], "UncontNeutEFT" +Comb);
851 // Print0binFrac(sp.UncontProtEFT_FD[gen][FCut_FD][quant][HC], "UncontProtEFT" +Comb);
852 // Print0binFrac(sp.UncontPionEFT_FD[gen][FCut_FD][quant][HC], "UncontPionEFT" +Comb);
853 // Print0binFrac(sp.UncontPi0sEFT_FD[gen][FCut_FD][quant][HC], "UncontPi0sEFT" +Comb);
854 // Print0binFrac(sp.UncontPhotEFT_FD[gen][FCut_FD][quant][HC], "UncontPhotEFT" +Comb);
855 // Print0binFrac(sp.UncontKaonEFT_FD[gen][FCut_FD][quant][HC], "UncontKaonEFT" +Comb);
856 // Print0binFrac(sp.UncontElecEFT_FD[gen][FCut_FD][quant][HC], "UncontElecEFT" +Comb);
857 //
858 // std::cout<<"UncontND"<<std::endl;
859 // Print0binFrac(sp.UncontTotEFT_ND [gen][FCut_ND][quant][HC], "UncontTotEFT" +Comb);
860 // Print0binFrac(sp.UncontMuonEFT_ND[gen][FCut_ND][quant][HC], "UncontMuonEFT" +Comb);
861 // Print0binFrac(sp.UncontNeutEFT_ND[gen][FCut_ND][quant][HC], "UncontNeutEFT" +Comb);
862 // Print0binFrac(sp.UncontProtEFT_ND[gen][FCut_ND][quant][HC], "UncontProtEFT" +Comb);
863 // Print0binFrac(sp.UncontPionEFT_ND[gen][FCut_ND][quant][HC], "UncontPionEFT" +Comb);
864 // Print0binFrac(sp.UncontPi0sEFT_ND[gen][FCut_ND][quant][HC], "UncontPi0sEFT" +Comb);
865 // Print0binFrac(sp.UncontPhotEFT_ND[gen][FCut_ND][quant][HC], "UncontPhotEFT" +Comb);
866 // Print0binFrac(sp.UncontKaonEFT_ND[gen][FCut_ND][quant][HC], "UncontKaonEFT" +Comb);
867 // Print0binFrac(sp.UncontElecEFT_ND[gen][FCut_ND][quant][HC], "UncontElecEFT" +Comb);
868 // } // Quant cut
869 // } // GENIE Cuts
870 // } // HC
871 
872  return;
873 }
874 
875 //......................................................
876 TH1D* SpecToHist( TFile* MyF, std::string SpecName, double POT, std::string AxisTitle ) {
877  std::unique_ptr<Spectrum> TempSpec = Spectrum::LoadFrom(MyF, SpecName.c_str() ) ;
878  TH1D* MyHist = TempSpec -> ToTH1( POT );
879  // area norm
880 // MyHist->Scale(1./MyHist->Integral());
881  // artificially set the 0 bin to have no entries AFTER normalization
882  // use only if you want to remove the 0 bin
883  MyHist->SetBinContent(1, 0);
884 
885  ana::CenterTitles ( MyHist);
886  MyHist->SetMinimum( 0 );
887  MyHist->SetMaximum( MyHist->GetMaximum()*1.1 );
888  MyHist->SetTitle ( AxisTitle.c_str() );
889 
890  // I want to check what my maximum bin is...
891  // this is clever but if we're trying to compare two sets of things and one has the zero bin and one doesn't it becomes difficult
892 // int MaxBin = MyHist->GetMaximumBin();
893 // int MaxVal = MyHist->GetMaximum();
894 // int SecBin = MyHist->GetBinContent(2);
895 // if ( MaxBin == 1 && (MaxVal/10 > SecBin) ) {
896 // double NewMax = 0;
897 // for (int bin=2; bin<MyHist->GetNbinsX(); ++bin) {
898 // if (MyHist->GetBinContent(bin) > NewMax) NewMax = 1.1*MyHist->GetBinContent(bin);
899 // }
900 // MyHist->SetMaximum( NewMax );
901 //
902 // }
903 
904 
905 
906  return MyHist;
907 }
908 
909 //......................................................
910 TH2* Spec2DtoHist( TFile* MyF, std::string SpecName, double POT, std::string AxisTitle ) {
911  std::unique_ptr<Spectrum> TempSpec = Spectrum::LoadFrom(MyF, SpecName.c_str() ) ;
912  TH2* MyHist = TempSpec -> ToTH2( POT );
913  ana::CenterTitles ( MyHist);
914  MyHist->SetMinimum( 0 );
915  MyHist->SetMaximum( MyHist->GetMaximum()*1.1 );
916  MyHist->SetTitle ( AxisTitle.c_str() );
917 
918  // borrowed from Michael -- thanks!!
919  // Loop over the histos to normalize them in vertical strips one bin wide.
920  unsigned int NXbins = 0.0;
921  unsigned int NYbins = 0.0;
922 
923  // W0, X0
924  NXbins = MyHist->GetNbinsX();
925  NYbins = MyHist->GetNbinsY();
926 
927  for(unsigned int i = 0; i <= NXbins+1; ++i) {
928  float integral = 0.0;
929  for(unsigned int j = 2; j <= NYbins; ++j) // 0 bin swamping the plot... remove the 0bin
930  integral += MyHist->GetBinContent(i,j);
931  if(integral == 0.0) continue;
932  for(unsigned int j = 0; j <= NYbins+1; ++j)
933  MyHist->SetBinContent(i,j,MyHist->GetBinContent(i,j)/integral);
934  }
935 
936  // the 0 bin is swamping the plot... remove it
937  MyHist->GetYaxis()->SetRange(2,NYbins);
938 
939  // since it's normalized, need to set the z-axis to go from 0-1
940  MyHist->GetZaxis()->SetRangeUser(0.0, 1.0);
941  return MyHist;
942 }
943 //......................................................
944 void MakeComparisonPlots( std::vector<TH1D*> TheHists, std::string PlotName, std::vector<std::string> Labels ) {
945 
946  // --- Make my canvas!
947  TCanvas* ThisCan = new TCanvas( PlotName.c_str(), PlotName.c_str() );
948  // --- Legend time!
949  double HistLeg_X1 = 0.57, HistLeg_Y1 = 0.65, HistLeg_X2 = 0.88, HistLeg_Y2 = 0.88;
950  TLegend* Leg = new TLegend(HistLeg_X1, HistLeg_Y1, HistLeg_X2, HistLeg_Y2 );
951 
952  double max = 0.0;
953  // --- Loop through hists and plot them!
954  for (size_t hist=0; hist<TheHists.size(); ++hist) {
955  TheHists[hist] -> SetLineColor( 1+hist );
956  // ROOT defines the plotting frame with the first histogram
957  // if subsequent histograms have a larger maximum value than the first one, it will be cut off
958  if(TheHists[hist]->GetMaximum() > max) max = TheHists[hist]->GetMaximum();
959 
960  if (hist==0) TheHists[hist] -> Draw("hist");
961  else TheHists[hist] -> Draw("hist same");
962  Leg -> AddEntry( TheHists[hist], Labels[hist].c_str() );
963  }
964  Leg -> SetFillStyle(0);
965  Leg -> SetBorderSize(0);
966  Leg -> Draw();
967 
968  // set the new maximum
969  TheHists[0]->SetMaximum(max*1.1);
970 
971  // --- Do I want to have a log axis?
972  if ( PlotName.find("CompareUncontainEnergies") != std::string::npos) {
973  for (size_t hist=0; hist<TheHists.size(); ++hist) TheHists[hist] -> GetYaxis() -> SetRangeUser( 10, TheHists[0]->GetMaximum() );
974  ThisCan -> SetLogy();
975  }
976 
977 
978  // --- Save the canvas.
979  ThisCan -> SaveAs( TString("Plots/")+TString(ThisCan->GetName())+TString(".pdf") );
980  ThisCan -> SaveAs( TString("Plots/")+TString(ThisCan->GetName())+TString(".png") );
981 
982  // return
983  return;
984 }
985 
986 //......................................................
987 
988 void Print2D(TH2* hist, std::string PlotName)
989 {
990  // --- Make my canvas!
991  TCanvas* ThisCan = new TCanvas( PlotName.c_str(), PlotName.c_str() );
992  hist->Draw("colz");
993  ThisCan -> SaveAs( TString("Plots/")+TString(ThisCan->GetName())+TString(".pdf") );
994  ThisCan -> SaveAs( TString("Plots/")+TString(ThisCan->GetName())+TString(".png") );
995  return;
996 
997 }
998 
999 //......................................................
1000 
1001 void Print0binFrac(TH1* hist, std::string PlotName)
1002 {
1003  double nevts0 = hist->GetBinContent(1);
1004  double nevtsTot = 0;
1005 
1006  for(int i = 1; i < hist->GetNbinsX(); i++) {
1007  nevtsTot += hist->GetBinContent(i);
1008  }
1009 
1010  std::cout<<PlotName<<" | nevts0bin/nevtsTotal " << nevts0<<"/"<<nevtsTot<<"="<<nevts0/nevtsTot << std::endl;
1011 }
1012 
1013 //......................................................
1014 
1015 void GetPercentages(TH1* hist, std::string PlotName)
1016 {
1017 
1018  double pop10 = 0;
1019  double pop50 = 0;
1020  double pop90 = 0;
1021 
1022  int bins = hist->GetNbinsX();
1023  double entriesnot0bin = hist->GetEntries()-hist->GetBinContent(1);
1024  double currentEntries = 0.0;
1025 
1026  // want to loop over all the of the events that are not in the 0 bin
1027  // find the energies at 10% of the events, 50%, 90%
1028 
1029  // skip the first bin
1030  for(int i = 2; i<bins; ++i){
1031  currentEntries += hist->GetBinContent(i);
1032  // 90% of the uncontained events fall below this energy...
1033  if(currentEntries/entriesnot0bin >= 0.90) {
1034  pop90 = hist->GetXaxis()->GetBinCenter(i);
1035  break;
1036  }
1037  // ...and 50% of the uncontained events fall below this energy...
1038  else if(currentEntries/entriesnot0bin >=50){
1039  pop50 = hist->GetXaxis()->GetBinCenter(i);
1040  }
1041 
1042  // ...and 10% of the uncontained events fall below this energy.
1043  else if(currentEntries/entriesnot0bin>10){
1044  pop10 = hist->GetXaxis()->GetBinCenter(i);
1045  }
1046  }
1047 
1048 }
TH2 * UncontProtEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontElecEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const unsigned int nND_CutNames
TH1D * MiscEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
tree Draw("slc.nhit")
TH2 * UncontNeutEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontPionEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NNeut_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPionEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontMuonEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontProtEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
void GetPercentages(TH1 *hist, std::string PlotName)
TH2 * PhotonEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
TH1D * UncontNeutEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontTotEvsX_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * ProtonEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontPhotEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * PionEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPhotEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontMuonEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * NProt_ND[nGENIE][nFD_CutNames][nQuantNames][nHC]
std::vector< std::string > FD_CutNames
correl_xv GetYaxis() -> SetDecimals()
TH1D * MuonEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * Pi0Energy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * NeutronEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontNeutEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * MuonEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ElectronEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPhotEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPhotEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontProtEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontProtEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * Pi0Energy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PionEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPi0sEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
std::vector< std::string > DetNames
unsigned int FCut_ND
TH1D * NeutronEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontTotEvsY_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * KaonUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ElecUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPionEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontElecEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
void Print0binFrac(TH1 *hist, std::string PlotName)
TH1D * ElectronEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ElectronEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPhotEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PhotonEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * PionUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
void CenterTitles(TH1 *histo)
Definition: Plots.cxx:1481
TH1D * UncontPionEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ElecUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ProtUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * NeutrinoEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
ntuple SetFillStyle(1001)
TH1D * NeutUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontNeutEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
const double kAna2018RHCPOT
Definition: Exposures.h:208
std::vector< std::string > QuantNames
TH1D * MiscUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PionEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPhotEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * KaonEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPionEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * Pi0EFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
const unsigned int nFD_CutNames
TH1D * UncontPi0sEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * MuonUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ProtonEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * KaonEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PhotonEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * KaonUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontTotEvsX_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * PionEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
legend SetBorderSize(0)
TH1D * UncontProtEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontElecEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontNeutEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
Definition: Spectrum.cxx:535
const unsigned int nGENIE
TH1D * PionUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * NeutrinoEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const unsigned int nQuantNames
TH2 * UncontElecEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * AllUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
const unsigned int nHC
TH1D * MuonUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
leg AddEntry(GRdata,"data","p")
TH2 * UncontMuonEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
hmean SetLineColor(4)
TH2 * UncontPhotEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PhotonEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPionEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ProtonEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NPi0s_ND[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontTotEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontKaonEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * NeutronEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
const double j
Definition: BetheBloch.cxx:29
TH1D * NProt_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
std::vector< std::string > ND_CutNames
TH1D * NeutUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontKaonEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontNeutEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
void EnergyCont_plot()
TH1D * PhotonEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontProtEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontKaonEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
void Print2D(TH2 *hist, std::string PlotName)
TH2 * UncontMuonEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * MuonEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NPion_ND[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontPi0sEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontProtEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontPi0sEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontTotEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * ElectronEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontPhotEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * PionEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ProtonEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
OStream cout
Definition: OStream.cxx:6
TH1D * KaonEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
std::vector< double > POT
TH2 * ElectronEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * ProtonEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const Binning bins
Definition: NumuCC_CPiBin.h:8
TH2 * UncontPi0sEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * MiscEnergy_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * ProtUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * Spec2DtoHist(TFile *MyF, std::string SpecName, double POT, std::string AxisTitle)
TH2 * KaonEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const Cut cut
Definition: exporter_fd.C:30
TH2 * UncontPionEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * Pi0sUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontNeutEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * PhotUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * NPi0s_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontElecEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontProtEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * MuonEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * Pi0sUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NeutronEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontPionEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontKaonEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * ElectronEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * Pi0EFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * KaonEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontElecEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontMuonEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontPi0sEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const std::vector< std::string > GENIEStr
TH2 * Pi0EFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * UncontNeutEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * KaonEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontElecEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NeutronEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontKaonEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontMuonEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * MuonEFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
const double kAna2018FHCPOT
Definition: Exposures.h:207
TH1D * UncontPi0sEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * AllUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontTotEvsY_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
cosmicTree SaveAs("cosmicTree.root")
TH2 * UncontKaonEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * NeutronEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * Pi0EFrac_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontKaonEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
TH1D * MuonEFrac_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontPi0sEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
unsigned int FCut_FD
TH2 * UncontMuonEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontKaonEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH1D * MiscUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * ToTH2(const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
For use with Var2D.
Definition: UtilsExt.cxx:115
TH1D * NPion_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontElecEF_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontTotEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * ProtonEnergy_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NNeut_ND[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * PionEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
void MakeComparisonPlots(std::vector< TH1D * > TheHists, std::string PlotName, std::vector< std::string > Labels)
gPad SetLogy()
std::vector< std::string > HCNames
TH2 * PhotonEFracvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * SpecToHist(TFile *MyF, std::string SpecName, double POT, std::string AxisTitle)
TH1D * UncontMuonEF_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * UncontTotEFT_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
enum BeamMode string
TH1D * PhotUncontain_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]