Classes | Functions | Variables
EnergyCont_plot.C File Reference
#include "3FlavorAna/Ana2018/numu/SupportingStudies/EnergyContainment/EnergyCont_help.h"
#include "TCanvas.h"
#include "TFile.h"
#include "TH1D.h"
#include "TLatex.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TSystem.h"
#include "CAFAna/Analysis/Exposures.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
#include <TROOT.h>

Go to the source code of this file.

Classes

struct  MySpectra
 

Functions

TH1D * SpecToHist (TFile *MyF, std::string SpecName, double POT, std::string AxisTitle)
 
TH2 * Spec2DtoHist (TFile *MyF, std::string SpecName, double POT, std::string AxisTitle)
 
void MakeComparisonPlots (std::vector< TH1D * > TheHists, std::string PlotName, std::vector< std::string > Labels)
 
void Print2D (TH2 *hist, std::string PlotName)
 
void Print0binFrac (TH1 *hist, std::string PlotName)
 
void EnergyCont_plot ()
 
void GetPercentages (TH1 *hist, std::string PlotName)
 

Variables

const std::vector< std::stringGENIEStr = { "All" }
 
const unsigned int nGENIE = 1
 
std::vector< std::stringFD_CutNames = { "FD_Contain", "FD_PID2018", "FD_CosRej" }
 
const unsigned int nFD_CutNames = 3
 
std::vector< std::stringND_CutNames = { "ND_Contain", "ND_PID2018" }
 
const unsigned int nND_CutNames = 2
 
unsigned int FCut_FD = nFD_CutNames - 1
 
unsigned int FCut_ND = nND_CutNames - 1
 
std::vector< std::stringQuantNames = { "AllQuant", "Quant1", "Quant2", "Quant3", "Quant4" }
 
const unsigned int nQuantNames = 5
 
std::vector< std::stringHCNames = {"fhc", "rhc"}
 
const unsigned int nHC = 2
 
std::vector< std::stringDetNames = {"ND", "FD"}
 

Function Documentation

void EnergyCont_plot ( )

Definition at line 253 of file EnergyCont_plot.C.

References MySpectra::AllUncontain_FD, MySpectra::AllUncontain_ND, cut, DetNames, MySpectra::ElectronEFrac_FD, MySpectra::ElectronEFrac_ND, MySpectra::ElectronEFracvsTrueE_FD, MySpectra::ElectronEFracvsTrueE_ND, MySpectra::ElectronEnergy_FD, MySpectra::ElectronEnergy_ND, MySpectra::ElecUncontain_FD, MySpectra::ElecUncontain_ND, FCut_FD, FCut_ND, FD_CutNames, compareCafs::files, GENIEStr, HCNames, ana::kAna2018FHCPOT, ana::kAna2018RHCPOT, MySpectra::KaonEFrac_FD, MySpectra::KaonEFrac_ND, MySpectra::KaonEFracvsTrueE_FD, MySpectra::KaonEFracvsTrueE_ND, MySpectra::KaonEnergy_FD, MySpectra::KaonEnergy_ND, MySpectra::KaonUncontain_FD, MySpectra::KaonUncontain_ND, MakeComparisonPlots(), MySpectra::MiscEnergy_FD, MySpectra::MiscEnergy_ND, MySpectra::MiscUncontain_FD, MySpectra::MiscUncontain_ND, MySpectra::MuonEFrac_FD, MySpectra::MuonEFrac_ND, MySpectra::MuonEFracvsTrueE_FD, MySpectra::MuonEFracvsTrueE_ND, MySpectra::MuonEnergy_FD, MySpectra::MuonEnergy_ND, MySpectra::MuonUncontain_FD, MySpectra::MuonUncontain_ND, ND_CutNames, MySpectra::NeutrinoEnergy_FD, MySpectra::NeutrinoEnergy_ND, MySpectra::NeutronEFrac_FD, MySpectra::NeutronEFrac_ND, MySpectra::NeutronEFracvsTrueE_FD, MySpectra::NeutronEFracvsTrueE_ND, MySpectra::NeutronEnergy_FD, MySpectra::NeutronEnergy_ND, MySpectra::NeutUncontain_FD, MySpectra::NeutUncontain_ND, nFD_CutNames, nGENIE, nHC, nND_CutNames, MySpectra::NNeut_FD, MySpectra::NNeut_ND, MySpectra::NPi0s_FD, MySpectra::NPi0s_ND, MySpectra::NPion_FD, MySpectra::NPion_ND, MySpectra::NProt_FD, MySpectra::NProt_ND, nQuantNames, MySpectra::PhotonEFrac_FD, MySpectra::PhotonEFrac_ND, MySpectra::PhotonEFracvsTrueE_FD, MySpectra::PhotonEFracvsTrueE_ND, MySpectra::PhotonEnergy_FD, MySpectra::PhotonEnergy_ND, MySpectra::PhotUncontain_FD, MySpectra::PhotUncontain_ND, MySpectra::Pi0EFrac_FD, MySpectra::Pi0EFrac_ND, MySpectra::Pi0EFracvsTrueE_FD, MySpectra::Pi0EFracvsTrueE_ND, MySpectra::Pi0Energy_FD, MySpectra::Pi0Energy_ND, MySpectra::Pi0sUncontain_FD, MySpectra::Pi0sUncontain_ND, MySpectra::PionEFrac_FD, MySpectra::PionEFrac_ND, MySpectra::PionEFracvsTrueE_FD, MySpectra::PionEFracvsTrueE_ND, MySpectra::PionEnergy_FD, MySpectra::PionEnergy_ND, MySpectra::PionUncontain_FD, MySpectra::PionUncontain_ND, POT, Print2D(), MySpectra::ProtonEFrac_FD, MySpectra::ProtonEFrac_ND, MySpectra::ProtonEFracvsTrueE_FD, MySpectra::ProtonEFracvsTrueE_ND, MySpectra::ProtonEnergy_FD, MySpectra::ProtonEnergy_ND, MySpectra::ProtUncontain_FD, MySpectra::ProtUncontain_ND, QuantNames, Spec2DtoHist(), SpecToHist(), string, MySpectra::UncontElecEF_FD, MySpectra::UncontElecEF_ND, MySpectra::UncontElecEFT_FD, MySpectra::UncontElecEFT_ND, MySpectra::UncontElecEFTvsTrueE_FD, MySpectra::UncontElecEFTvsTrueE_ND, MySpectra::UncontElecEFvsTrueE_FD, MySpectra::UncontElecEFvsTrueE_ND, MySpectra::UncontKaonEF_FD, MySpectra::UncontKaonEF_ND, MySpectra::UncontKaonEFT_FD, MySpectra::UncontKaonEFT_ND, MySpectra::UncontKaonEFTvsTrueE_FD, MySpectra::UncontKaonEFTvsTrueE_ND, MySpectra::UncontKaonEFvsTrueE_FD, MySpectra::UncontKaonEFvsTrueE_ND, MySpectra::UncontMuonEF_FD, MySpectra::UncontMuonEF_ND, MySpectra::UncontMuonEFT_FD, MySpectra::UncontMuonEFT_ND, MySpectra::UncontMuonEFTvsTrueE_FD, MySpectra::UncontMuonEFTvsTrueE_ND, MySpectra::UncontMuonEFvsTrueE_FD, MySpectra::UncontMuonEFvsTrueE_ND, MySpectra::UncontNeutEF_FD, MySpectra::UncontNeutEF_ND, MySpectra::UncontNeutEFT_FD, MySpectra::UncontNeutEFT_ND, MySpectra::UncontNeutEFTvsTrueE_FD, MySpectra::UncontNeutEFTvsTrueE_ND, MySpectra::UncontNeutEFvsTrueE_FD, MySpectra::UncontNeutEFvsTrueE_ND, MySpectra::UncontPhotEF_FD, MySpectra::UncontPhotEF_ND, MySpectra::UncontPhotEFT_FD, MySpectra::UncontPhotEFT_ND, MySpectra::UncontPhotEFTvsTrueE_FD, MySpectra::UncontPhotEFTvsTrueE_ND, MySpectra::UncontPhotEFvsTrueE_FD, MySpectra::UncontPhotEFvsTrueE_ND, MySpectra::UncontPi0sEF_FD, MySpectra::UncontPi0sEF_ND, MySpectra::UncontPi0sEFT_FD, MySpectra::UncontPi0sEFT_ND, MySpectra::UncontPi0sEFTvsTrueE_FD, MySpectra::UncontPi0sEFTvsTrueE_ND, MySpectra::UncontPi0sEFvsTrueE_FD, MySpectra::UncontPi0sEFvsTrueE_ND, MySpectra::UncontPionEF_FD, MySpectra::UncontPionEF_ND, MySpectra::UncontPionEFT_FD, MySpectra::UncontPionEFT_ND, MySpectra::UncontPionEFTvsTrueE_FD, MySpectra::UncontPionEFTvsTrueE_ND, MySpectra::UncontPionEFvsTrueE_FD, MySpectra::UncontPionEFvsTrueE_ND, MySpectra::UncontProtEF_FD, MySpectra::UncontProtEF_ND, MySpectra::UncontProtEFT_FD, MySpectra::UncontProtEFT_ND, MySpectra::UncontProtEFTvsTrueE_FD, MySpectra::UncontProtEFTvsTrueE_ND, MySpectra::UncontProtEFvsTrueE_FD, MySpectra::UncontProtEFvsTrueE_ND, MySpectra::UncontTotEFT_FD, MySpectra::UncontTotEFT_ND, MySpectra::UncontTotEFTvsTrueE_FD, MySpectra::UncontTotEFTvsTrueE_ND, MySpectra::UncontTotEvsX_FD, MySpectra::UncontTotEvsX_ND, MySpectra::UncontTotEvsY_FD, and MySpectra::UncontTotEvsY_ND.

253  {
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 }
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]
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]
TH2 * PhotonEFracvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
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
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]
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]
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]
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]
TH1D * UncontProtEFT_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontElecEFTvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH2 * UncontNeutEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
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]
TH2 * UncontMuonEFvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
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]
std::vector< std::string > ND_CutNames
TH1D * NProt_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
TH1D * NeutUncontain_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontKaonEFTvsTrueE_ND[nGENIE][nND_CutNames][nQuantNames][nHC]
TH2 * UncontNeutEFvsTrueE_FD[nGENIE][nFD_CutNames][nQuantNames][nHC]
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]
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]
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]
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]
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]
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)
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]
void GetPercentages ( TH1 *  hist,
std::string  PlotName 
)

Definition at line 1015 of file EnergyCont_plot.C.

References ana::bins, and MECModelEnuComparisons::i.

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 }
const Binning bins
void MakeComparisonPlots ( std::vector< TH1D * >  TheHists,
std::string  PlotName,
std::vector< std::string Labels 
)

Definition at line 944 of file EnergyCont_plot.C.

References AddEntry(), Draw(), make_mec_shifts_plots::GetMaximum(), GetYaxis(), analysePickle::hist, cet::sqlite::max(), SaveAs(), SetBorderSize(), SetFillStyle(), SetLineColor(), and SetLogy().

Referenced by EnergyCont_plot().

944  {
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 }
tree Draw("slc.nhit")
correl_xv GetYaxis() -> SetDecimals()
ntuple SetFillStyle(1001)
legend SetBorderSize(0)
leg AddEntry(GRdata,"data","p")
hmean SetLineColor(4)
cosmicTree SaveAs("cosmicTree.root")
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
gPad SetLogy()
void Print0binFrac ( TH1 *  hist,
std::string  PlotName 
)

Definition at line 1001 of file EnergyCont_plot.C.

References om::cout, allTimeWatchdog::endl, and MECModelEnuComparisons::i.

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 }
OStream cout
Definition: OStream.cxx:6
void Print2D ( TH2 *  hist,
std::string  PlotName 
)

Definition at line 988 of file EnergyCont_plot.C.

References SaveAs().

Referenced by EnergyCont_plot().

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 }
cosmicTree SaveAs("cosmicTree.root")
TH2 * Spec2DtoHist ( TFile *  MyF,
std::string  SpecName,
double  POT,
std::string  AxisTitle 
)

Definition at line 910 of file EnergyCont_plot.C.

References ana::CenterTitles(), MECModelEnuComparisons::i, febshutoff_auto::integral, calib::j, ana::Spectrum::LoadFrom(), and ana::ToTH2().

Referenced by EnergyCont_plot().

910  {
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 }
TH2 * ToTH2(const TH1 *h, const HistAxis &xaxis, const HistAxis &yaxis)
void CenterTitles(TH1 *histo)
Definition: Plots.cxx:1483
std::unique_ptr< T > LoadFrom(TDirectory *dir, const std::string &label)
Definition: LoadFromFile.h:17
const double j
Definition: BetheBloch.cxx:29
std::vector< double > POT
TH1D * SpecToHist ( TFile *  MyF,
std::string  SpecName,
double  POT,
std::string  AxisTitle 
)

Definition at line 876 of file EnergyCont_plot.C.

References ana::CenterTitles(), and ana::Spectrum::LoadFrom().

Referenced by EnergyCont_plot().

876  {
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 }
void CenterTitles(TH1 *histo)
Definition: Plots.cxx:1483
std::unique_ptr< T > LoadFrom(TDirectory *dir, const std::string &label)
Definition: LoadFromFile.h:17
std::vector< double > POT

Variable Documentation

std::vector<std::string> DetNames = {"ND", "FD"}

Definition at line 45 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

unsigned int FCut_FD = nFD_CutNames - 1

Definition at line 36 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

unsigned int FCut_ND = nND_CutNames - 1

Definition at line 36 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

std::vector<std::string> FD_CutNames = { "FD_Contain", "FD_PID2018", "FD_CosRej" }

Definition at line 34 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

const std::vector<std::string> GENIEStr = { "All" }
std::vector<std::string> HCNames = {"fhc", "rhc"}

Definition at line 42 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

std::vector<std::string> ND_CutNames = { "ND_Contain", "ND_PID2018" }

Definition at line 35 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

const unsigned int nFD_CutNames = 3

Definition at line 34 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

const unsigned int nGENIE = 1

Definition at line 30 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot(), and hyperon_nom_macro().

const unsigned int nHC = 2

Definition at line 42 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

const unsigned int nND_CutNames = 2

Definition at line 35 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

const unsigned int nQuantNames = 5

Definition at line 39 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().

std::vector<std::string> QuantNames = { "AllQuant", "Quant1", "Quant2", "Quant3", "Quant4" }

Definition at line 39 of file EnergyCont_plot.C.

Referenced by EnergyCont_plot().