plotHist_SpectrumCVNID.C
Go to the documentation of this file.
1 /* Gets ND Data/MC Numu varaibles spectra and converts them into POT normalized histograms.
2  */
3 #ifdef __CINT__
5 {
6  std::cout<<" Sorry, you must run in compiled mode" <<std::endl;
7 }
8 #else
9 #include "TLine.h"
10 #include "Rtypes.h"
11 
12 #include "TCanvas.h"
13 #include "TFile.h"
14 #include "TGraph.h"
15 #include "TH1.h"
16 #include "TH2.h"
17 #include "TMath.h"
18 #include "TGaxis.h"
19 #include "TMultiGraph.h"
20 #include "TLegend.h"
21 #include "TLegendEntry.h"
22 #include "TLatex.h"
23 #include "TStyle.h"
24 #include "THStack.h"
25 #include "TPaveText.h"
26 #include "TList.h"
27 #include "TGaxis.h"
28 #include "TAttLine.h"
29 #include "TAttMarker.h"
30 
31 #include <cmath>
32 #include <iostream>
33 #include <vector>
34 #include <list>
35 #include <sstream>
36 #include <string>
37 #include <sstream>
38 #include <fstream>
39 #include <iomanip>
40 
41 #include "CAFAna/Core/Binning.h"
42 #include "CAFAna/Cuts/Cuts.h"
43 #include "CAFAna/Core/Spectrum.h"
45 #include "CAFAna/Vars/Vars.h"
46 #include "CAFAna/Core/Utilities.h"
47 #include "CAFAna/Analysis/Plots.h"
48 #include "CAFAna/Cuts/SpillCuts.h"
50 #include "CAFAna/Cuts/TruthCuts.h"
53 #include "CAFAna/Analysis/Style.h"
54 #include "TColor.h"
55 #include "Utilities/rootlogon.C"
56 
57 
58 
59 using namespace ana;
61 {
62  TLatex* prelim = new TLatex(.9, .95, "NOvA Simulation");
63  prelim->SetTextColor(kGray+1);
64  prelim->SetNDC();
65  prelim->SetTextSize(2/30.);
66  prelim->SetTextAlign(32);
67  TGaxis::SetMaxDigits(3);
68  prelim->Draw();
69 }
70 
72 {
73  TLatex* prelim = new TLatex(.9, .95, "NOvA Preliminary");
74  prelim->SetTextColor(kBlue);
75  prelim->SetNDC();
76  prelim->SetTextSize(2/30.);
77  prelim->SetTextAlign(32);
78  TGaxis::SetMaxDigits(3);
79  prelim->Draw();
80 }
81 
83 {
84 
85 
86 
87 /*********************************************************************************************************************/
88 
89 ///Read the Spectrum Root file /////
90 
91  TFile *f1= new TFile ("/nova/app/users/acedeno/tag_releasesS18-06-14/NDAna/ncpi0_semi_inc_png_cvn/new2pngvariable_prod4_03GeV_Cuts_1CVN_07_2CVN_09_WITHDATA_GenieLike.root","READ");
92  f1->cd();
93 
94  //////////INVARIANT MASSSS//////////////////////
95 
96  //load w/ "NoCUTS" (only 2 prong) pi0 mass//////
97  auto sndNoCuts=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCuts"));
98  auto sndNoCutCCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCutCCNonPi0"));
99  auto sndNoCutNCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCutNCNonPi0"));
100  auto sndNoCutCCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCutCCPi0"));
101  auto sndNoCutNCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCutNCPi0"));
102  auto sndNoCutNCPi0L=*Spectrum::LoadFrom(f1->GetDirectory("ndNoCutNCPi0L"));
103  auto sndNumiMasssdataNoCuts =*Spectrum::LoadFrom(f1->GetDirectory("ndNumiMassdataNoCuts"));
104 
105 
106 
107  ///load reco mass 2 prong CVN cuts spectrums///// (stacked) /////
108  auto sndMC=*Spectrum::LoadFrom(f1->GetDirectory("ndMC"));
109  auto sndMC3P=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3P"));
110  auto sndNCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0"));
111  auto sndNumiMassdata2CVN=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiMassdata2CVN"));
112  auto sndNCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0"));
113  auto sndCCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0"));
114  auto sndNCPi0L=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0L"));
115  auto sndCCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0"));
116 
117  ///load reco mass 2 prong CVN cuts spectrums///// (Unstacked)/////
118  auto sndMC1=*Spectrum::LoadFrom(f1->GetDirectory("ndMC"));
119  auto sndMC3P1=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3P"));
120  auto sndNCNonPi01=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0"));
121  //auto sndNCMCSig=*Spectrum::LoadFrom(f1->GetDirectory("ndNCMCSig"));
122  auto sndNCPi01=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0"));
123  auto sndCCPi01=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0"));
124  auto sndNCPi0L1=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0L"));
125  auto sndCCNonPi01=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0"));
126  auto sndNumiMassdata2CVN1=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiMassdata2CVN"));
127 
128 
129 
130  ///load reco mass 1 prong CVN cut spectrums///// (stacked)/////
131  auto sndMC1Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndMC1Cut"));
132  auto sndMC3P1Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3P1Cut"));
133  auto sndNCNonPi01Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi01Cut"));
134  //auto sndNCMCSig=*Spectrum::LoadFrom(f1->GetDirectory("ndNCMCSig"));
135  auto sndNCPi01Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi01Cut"));
136  auto sndCCPi01Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi01Cut"));
137  auto sndNCPi0L1Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0L1Cut"));
138  auto sndCCNonPi01Cut=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi01Cut"));
139  auto sndNumiMassdataCVN=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiMassdataCVN"));
140 
141 
142  ///load reco mass 1 prong CVN cut spectrums///// (unstacked) /////
143  auto sndMC1Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndMC1Cut"));
144  auto sndMC3P1Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3P1Cut"));
145  auto sndNCNonPi01Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi01Cut"));
146  //auto sndNCMCSig=*Spectrum::LoadFrom(f1->GetDirectory("ndNCMCSig"));
147  auto sndNCPi01Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi01Cut"));
148  auto sndCCPi01Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi01Cut"));
149  auto sndNCPi0L1Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0L1Cut"));
150  auto sndCCNonPi01Cut2=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi01Cut"));
151  auto sndNumiMassdataCVN2=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiMassdataCVN"));
152 
153 
154 
155 ////////CVN STUDY////////////////
156 
157  //load /w/Prel + remID + Prong 1 CVN cuts & variable (2prongs photonID spectrums////
158 
159  auto sndCVNMC3P=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNMC3P"));
160  auto sndCVNNCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCNonPi0"));
161  auto sndCVNNCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCPi0"));
162  auto sndCVNCCPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNCCPi0"));
163  auto sndCVNNCPi0L=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCPi0L"));
164  auto sndCVNCCNonPi0=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNCCNonPi0"));
165  auto sndNumiCVN2PData=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiCVN2PData"));
166  //load 1 prongCVN variable & Presel + remid cut spectrums////
167 
168  auto sndCVNMC3PR=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNMC3PR"));
169  auto sndCVNNCNonPi0R=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCNonPi0R"));
170  auto sndCVNNCPi0R=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCPi0R"));
171  auto sndCVNCCPi0R=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNCCPi0R"));
172  auto sndCVNNCPi0LR=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNNCPi0LR"));
173  auto sndCVNCCNonPi0R=*Spectrum::LoadFrom(f1->GetDirectory("ndCVNCCNonPi0R"));
174  auto sndNumiCVN2PRData=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiCVN2PRData"));
175 
176  //////2 prong CVN variable & Presel + remid cut ///////////
177  auto snd2CVNMC3PR=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNMC3PR"));
178  auto snd2CVNNCNonPi0R=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNNCNonPi0R"));
179  auto snd2CVNNCPi0R=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNNCPi0R"));
180  auto snd2CVNCCPi0R=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNCCPi0R"));
181  auto snd2CVNNCPi0LR=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNNCPi0LR"));
182  auto snd2CVNCCNonPi0R=*Spectrum::LoadFrom(f1->GetDirectory("nd2CVNCCNonPi0R"));
183  auto sndNumi2CVN2PRData=*Spectrum::LoadFrom(f1->GetDirectory("ndNumi2CVN2PRData"));
184 
185  /// load RemID variable & w/Presel + 2 prong cuts spectrums /////
186 
187  auto sndMC3PRem=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3PRem"));
188  auto sndNCNonPi0Rem=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0Rem"));
189  auto sndNCPi0Rem=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0Rem"));
190  auto sndCCPi0Rem=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0Rem"));
191  auto sndNCPi0LRem=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0LRem"));
192  auto sndCCNonPi0Rem=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0Rem"));
193  auto sndNumiRemIDData=*Spectrum::LoadFrom(f1->GetDirectory("ndNumiRemIDData"));
194 
195  ///////TRUE ENERGY STUDY//////////////////
196 
197  ////True Highest Pi0 Energy w/Prel + 2 Prong//////
198 
199  auto sndMC3PPrel=*Spectrum::LoadFrom(f1->GetDirectory("ndMC3PPrel"));
200  auto sndNCNonPi0Prel=*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0Prel"));
201  auto sndCCPi0Prel=*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0Prel"));
202  auto sndNCPi0Prel=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0Prel"));
203  auto sndNCPi0LPrel=*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0LPrel"));
204  auto sndCCNonPi0Prel=*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0Prel"));
205 
206  ////True Highest Pi0 Energy w/Prel + RemId < 0.36 + 1 Prong CVN Gamma ID > 0.7 + 2 prong //////
207 
208  auto sndMC3PPrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndMC3PPrelCVN"));
209  auto sndNCNonPi0PrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0PrelCVN"));
210  auto sndCCPi0PrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0PrelCVN"));
211  auto sndNCPi0PrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0PrelCVN"));
212  auto sndNCPi0LPrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0LPrelCVN"));
213  auto sndCCNonPi0PrelCVN =*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0PrelCVN"));
214 
215  ////True Highest Pi0 Energy w/Prel + RemId < 0.36 + 1 & 2 Prong CVN Gamma ID > 0.7 + 2 prong //////
216 
217  auto sndMC3PPrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndMC3PPrelCVN2Cuts"));
218  auto sndNCNonPi0PrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0PrelCVN2Cuts"));
219  auto sndCCPi0PrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0PrelCVN2Cuts"));
220  auto sndNCPi0PrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0PrelCVN2Cuts"));
221  auto sndNCPi0LPrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0LPrelCVN2Cuts"));
222  auto sndCCNonPi0PrelCVN2Cuts =*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0PrelCVN2Cuts"));
223 
224  ////True Highest Pi0 Energy w/Prel + RemID + 2 Prong//////
225 
226  auto sndMC3PPrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndMC3PPrelR"));
227  auto sndNCNonPi0PrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndNCNonPi0PrelR"));
228  auto sndCCPi0PrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndCCPi0PrelR"));
229  auto sndNCPi0PrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0PrelR"));
230  auto sndNCPi0LPrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndNCPi0LPrelR"));
231  auto sndCCNonPi0PrelR =*Spectrum::LoadFrom(f1->GetDirectory("ndCCNonPi0PrelR"));
232 
233 
234 
235 
236  // ////2D Plots 2 prong & 3 prong///////
237  auto snd2dplot2prong=*Spectrum::LoadFrom(f1->GetDirectory("nd2dplot2prong"));
238 /*********************************************************************************************************************/
239 
240  ///How to Scale Histogram////
241 
242  // double myPOT=sndMC.POT();
243  const double myPOT = 8.12e20;
244 
245 /*********************************************************************************************************************/
246 
247  //------histograms--------//
248 
249  /////////////////////INVARIANT MASS////////////////////////
250 
251  //load w/ "NoCUTS" (only 2 prong) pi0 mass//////
252  auto hndNoCuts = sndNoCuts.ToTH1(myPOT);
253  auto hndNoCutCCNonPi0 = sndNoCutCCNonPi0.ToTH1(myPOT);
254  auto hndNoCutNCNonPi0 = sndNoCutNCNonPi0.ToTH1(myPOT);
255  auto hndNoCutCCPi0 = sndNoCutCCPi0.ToTH1(myPOT);
256  auto hndNoCutNCPi0 = sndNoCutNCPi0.ToTH1(myPOT);
257  auto hndNoCutNCPi0L = sndNoCutNCPi0L.ToTH1(myPOT);
258  auto hndNumiMasssdataNoCuts = sndNumiMasssdataNoCuts.ToTH1(myPOT);
259 
260  ///load reco mass spectrums 2 prong CVN cuts (stacked) /////
261  auto hndMC = sndMC.ToTH1(myPOT);
262  auto hndMC3P = sndMC3P.ToTH1(myPOT);
263  auto hndNCNonPi0 = sndNCNonPi0.ToTH1(myPOT);
264  auto hndCCPi0 = sndCCPi0.ToTH1(myPOT);
265  auto hndNCPi0 = sndNCPi0.ToTH1(myPOT);
266  auto hndNCPi0L = sndNCPi0L.ToTH1(myPOT);
267  auto hndCCNonPi0 = sndCCNonPi0.ToTH1(myPOT);
268  auto hndNumiMassdata2CVN = sndNumiMassdata2CVN.ToTH1(myPOT);
269 
270  ///load reco mass spectrums 2 prong CVN cuts (unstacked) /////
271  auto hndMC1 = sndMC.ToTH1(myPOT);
272  auto hndMC3P1 = sndMC3P.ToTH1(myPOT);
273  auto hndNCNonPi01 = sndNCNonPi0.ToTH1(myPOT);
274  auto hndCCPi01 = sndCCPi0.ToTH1(myPOT);
275  auto hndNCPi01 = sndNCPi0.ToTH1(myPOT);
276  auto hndNCPi0L1 = sndNCPi0L.ToTH1(myPOT);
277  auto hndCCNonPi01 = sndCCNonPi0.ToTH1(myPOT);
278  auto hndNumiMassdata2CVN1 = sndNumiMassdata2CVN1.ToTH1(myPOT);
279 
280  ///load reco mass spectrums 1 prong CVN cut (Stacked) /////
281  auto hndMC1Cut = sndMC1Cut.ToTH1(myPOT);
282  auto hndMC3P1Cut = sndMC3P1Cut.ToTH1(myPOT);
283  auto hndNCNonPi01Cut = sndNCNonPi01Cut.ToTH1(myPOT);
284  auto hndCCPi01Cut = sndCCPi01Cut.ToTH1(myPOT);
285  auto hndNCPi01Cut = sndNCPi01Cut.ToTH1(myPOT);
286  auto hndNCPi0L1Cut = sndNCPi0L1Cut.ToTH1(myPOT);
287  auto hndCCNonPi01Cut = sndCCNonPi01Cut.ToTH1(myPOT);
288  auto hndNumiMassdataCVN = sndNumiMassdataCVN.ToTH1(myPOT);
289 
290  ///load reco mass spectrums 1 prong CVN cut (Unstacked)/////
291  auto hndMC1Cut2 = sndMC1Cut2.ToTH1(myPOT);
292  auto hndMC3P1Cut2 = sndMC3P1Cut2.ToTH1(myPOT);
293  auto hndNCNonPi01Cut2 = sndNCNonPi01Cut2.ToTH1(myPOT);
294  auto hndCCPi01Cut2 = sndCCPi01Cut2.ToTH1(myPOT);
295  auto hndNCPi01Cut2 = sndNCPi01Cut2.ToTH1(myPOT);
296  auto hndNCPi0L1Cut2 = sndNCPi0L1Cut2.ToTH1(myPOT);
297  auto hndCCNonPi01Cut2 = sndCCNonPi01Cut2.ToTH1(myPOT);
298  auto hndNumiMassdataCVN2 = sndNumiMassdataCVN2.ToTH1(myPOT);
299 ////////CVN STUDY////////////////
300 
301  //load /w/Prel + remID + Prong 1 CVN cuts & 2prong photon ID variable (2prongs photonID spectrums)////
302  auto hndCVNMC3P = sndCVNMC3P.ToTH1(myPOT);
303  auto hndCVNNCNonPi0 = sndCVNNCNonPi0.ToTH1(myPOT);
304  auto hndCVNCCPi0 = sndCVNCCPi0.ToTH1(myPOT);
305  auto hndCVNNCPi0 = sndCVNNCPi0.ToTH1(myPOT);
306  auto hndCVNNCPi0L = sndCVNNCPi0L.ToTH1(myPOT);
307  auto hndCVNCCNonPi0 = sndCVNCCNonPi0.ToTH1(myPOT);
308  auto hndNumiCVN2PData = sndNumiCVN2PData.ToTH1(myPOT);
309 
310  //load 1 prongCVN variable & Presel + remid cut spectrums////
311  auto hndCVNMC3PR = sndCVNMC3PR.ToTH1(myPOT);
312  auto hndCVNNCNonPi0R = sndCVNNCNonPi0R.ToTH1(myPOT);
313  auto hndCVNCCPi0R = sndCVNCCPi0R.ToTH1(myPOT);
314  auto hndCVNNCPi0R = sndCVNNCPi0R.ToTH1(myPOT);
315  auto hndCVNNCPi0LR = sndCVNNCPi0LR.ToTH1(myPOT);
316  auto hndCVNCCNonPi0R = sndCVNCCNonPi0R.ToTH1(myPOT);
317  auto hndNumiCVN2PRData = sndNumiCVN2PRData.ToTH1(myPOT);
318 
319  //////2 prong CVN variable & Presel + remid cut ///////////
320  auto hnd2CVNMC3PR = snd2CVNMC3PR.ToTH1(myPOT);
321  auto hnd2CVNNCNonPi0R = snd2CVNNCNonPi0R.ToTH1(myPOT);
322  auto hnd2CVNCCPi0R = snd2CVNCCPi0R.ToTH1(myPOT);
323  auto hnd2CVNNCPi0R = snd2CVNNCPi0R.ToTH1(myPOT);
324  auto hnd2CVNNCPi0LR = snd2CVNNCPi0LR.ToTH1(myPOT);
325  auto hnd2CVNCCNonPi0R = snd2CVNCCNonPi0R.ToTH1(myPOT);
326  auto hndNumi2CVN2PRData = sndNumi2CVN2PRData.ToTH1(myPOT);
327 
328  ////RemID//////
329 
330  auto hndMC3PRem = sndMC3PRem.ToTH1(myPOT);
331  auto hndNCNonPi0Rem = sndNCNonPi0Rem.ToTH1(myPOT);
332  auto hndCCPi0Rem = sndCCPi0Rem.ToTH1(myPOT);
333  auto hndNCPi0Rem = sndNCPi0Rem.ToTH1(myPOT);
334  auto hndNCPi0LRem = sndNCPi0LRem.ToTH1(myPOT);
335  auto hndCCNonPi0Rem = sndCCNonPi0Rem.ToTH1(myPOT);
336  auto hndNumiRemIDData = sndNumiRemIDData.ToTH1(myPOT);
337 
338  ////True Highest Pi0 Energy w/Prel + 2 Prong//////
339 
340  auto hndMC3PPrel = sndMC3PPrel.ToTH1(myPOT);
341  auto hndNCNonPi0Prel = sndNCNonPi0Prel.ToTH1(myPOT);
342  auto hndCCPi0Prel = sndCCPi0Prel.ToTH1(myPOT);
343  auto hndNCPi0Prel = sndNCPi0Prel.ToTH1(myPOT);
344  auto hndNCPi0LPrel = sndNCPi0LPrel.ToTH1(myPOT);
345  auto hndCCNonPi0Prel = sndCCNonPi0Prel.ToTH1(myPOT);
346 
347  ////True Highest Pi0 Energy w/Prel + RemId < 0.36 + 1 Prong CVN Gamma ID > 0.7 + 2 prong //////
348 
349  auto hndMC3PPrelCVN = sndMC3PPrelCVN.ToTH1(myPOT);
350  auto hndNCNonPi0PrelCVN = sndNCNonPi0PrelCVN.ToTH1(myPOT);
351  auto hndCCPi0PrelCVN = sndCCPi0PrelCVN.ToTH1(myPOT);
352  auto hndNCPi0PrelCVN = sndNCPi0PrelCVN.ToTH1(myPOT);
353  auto hndNCPi0LPrelCVN = sndNCPi0LPrelCVN.ToTH1(myPOT);
354  auto hndCCNonPi0PrelCVN = sndCCNonPi0PrelCVN.ToTH1(myPOT);
355 
356  ////True Highest Pi0 Energy w/Prel + RemId < 0.36 + 1 & 2 Prong CVN Gamma ID > 0.7 + 2 prong //////
357 
358  auto hndMC3PPrelCVN2Cuts = sndMC3PPrelCVN2Cuts.ToTH1(myPOT);
359  auto hndNCNonPi0PrelCVN2Cuts = sndNCNonPi0PrelCVN2Cuts.ToTH1(myPOT);
360  auto hndCCPi0PrelCVN2Cuts = sndCCPi0PrelCVN2Cuts.ToTH1(myPOT);
361  auto hndNCPi0PrelCVN2Cuts = sndNCPi0PrelCVN2Cuts.ToTH1(myPOT);
362  auto hndNCPi0LPrelCVN2Cuts = sndNCPi0LPrelCVN2Cuts.ToTH1(myPOT);
363  auto hndCCNonPi0PrelCVN2Cuts = sndCCNonPi0PrelCVN2Cuts.ToTH1(myPOT);
364 
365  ////True Highest Pi0 Energy w/Prel + RemID + 2 Prong//////
366 
367  auto hndMC3PPrelR = sndMC3PPrelR.ToTH1(myPOT);
368  auto hndNCNonPi0PrelR = sndNCNonPi0PrelR.ToTH1(myPOT);
369  auto hndCCPi0PrelR = sndCCPi0PrelR.ToTH1(myPOT);
370  auto hndNCPi0PrelR = sndNCPi0PrelR.ToTH1(myPOT);
371  auto hndNCPi0LPrelR = sndNCPi0LPrelR.ToTH1(myPOT);
372  auto hndCCNonPi0PrelR = sndCCNonPi0PrelR.ToTH1(myPOT);
373 
374  ////2D Plots 2 prong & 3 prong///////
375 
376  auto hnd2dplot2prong = snd2dplot2prong.ToTH2(myPOT);
377 //****************************Updated Date and string path for saving files **********************************************************///
378  TString outDir2 = "/nova/app/users/acedeno/tag_releasesS18-06-14/NDAna/ncpi0_semi_inc_png_cvn/NewPNGCVAnalysis";
379  //TString outDir2 = "/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/March_PCVN_Analysis/";
380  struct FileUp{
382  };
383  struct DateUp{
385  };
386 
387  const int File =18;
388  const FileUp CurrentFile[File] = {
389  {"/plot1_2Pr_03GeV_Cuts_1CVN_07_2CVN_09_NOCUTS_Pi0Mass"},
390  {"/plot2_2Pr_03GeV_Cuts_1CVN_07_2CVN_09_Selectionection"},
391  {"/plot3_2Pr_03GeV_Cuts_1CVN_07_2CVN_09_StackedInvariantMass2Cuts"},
392  {"/plot3b_2Pr_03GeV_Cuts_1CVN_07_StackedInvariantMass1Cut"},
393  {"/plot4_2Pr_03GeV_Cuts_{RemID+Presel+1CVN_07}-CVN-Analysis-{Var-2P-PhotonID}"},
394  {"/plot5_2Pr_03GeV_Cuts_{RemID+Selection}-CVN-Analysis-{Var-1P-PhotonID}"},
395  {"/plot6_2Pr_03GeV_Cuts_{RemID+Selection}-CVN-Analysis-{Var-2P-PhotonID}"},
396  {"/plot7_2Pr_03GeV_Cuts_{Selection}-CVN-Analysis-{Var-RemID}"},
397  {"/plot8_2Pr_03GeV_Cuts_{Selection}-TrueEnergy-Analysis-{Var-TruePi0En}"},
398  {"/plot9_2Pr_03GeV_Cuts_{RemID+Selection}-TrueEnergy-Analysis-{Var-TruePi0En}"},
399  {"/plot10_2Pr_03GeV_Cuts_{RemID+Selection+1CVN_07}-TrueEnergy-Analysis-{Var-TruePi0En}"},
400  {"/plot10b_2Pr_03GeV_Cuts_{RemID+Selection+1CVN_07+2CVN_09}-TrueEnergy-Analysis-{Var-TruePi0En}"},
401  {"/plot11_2Pr_2dplot_03GeV_Cuts_1CVN_07_2CVN_09"},
402  {"/plot13_2Pr_03GeV_Cuts_1CVN_07_2CVN_09_UnstackedInvariantMass2Cuts"},
403  {"/plot13b_2Pr_03GeV_Cuts_1CVN_07_UnstackedInvariantMass1Cut"},
404  {"/plot11b_2Pr_2dplot_LogVersion_03GeV_Cuts_1CVN_07_2CVN_09"},
405 
406  };
407 
408  const int Date = 1;
409  const DateUp CurrentDate[Date] = {
410  {"_07--18_newPng_GenieLike"},
411  };
412  //newPng1at07Png2at09_flat
413 //------------------------------------------------------------
414 
415 /*********************************************************************************************************************/
416 
417  /// Plot ////
418 
419  TCanvas *c1_ndNoCuts =new TCanvas("c1_ndNoCuts","ndNoCuts",800,500);
420  c1_ndNoCuts->cd();
421 
422  hndNoCuts->SetLineColor(kRed+2);
423  // hndNoCuts->SetLineWidth(3);
424  // hndNoCuts->SetMarkerStyle(21);
425  // hndNoCuts->SetMarkerColor(kBlack);
426 
427  hndNoCutCCPi0->SetLineColor(kMagenta+2);
428  // hndNoCutCCPi0->SetLineWidth(1);
429  //hndNoCutCCPi0->SetMarkerStyle(21);
430  //hndNoCutCCPi0->SetMarkerColor(kMagenta);
431 
432  hndNoCutCCNonPi0->SetLineColor(kAzure+2);
433  // hndNoCutCCNonPi0->SetLineWidth(3);
434  // hndNoCutCCNonPi0->SetMarkerStyle(21);
435  // hndNoCutCCNonPi0->SetMarkerColor(kAzure);
436 
437  hndNoCutNCPi0L->SetLineColor(kOrange+2);
438  // hndNoCutNCPi0L->SetLineWidth(3);
439  // hndNoCutNCPi0L->SetMarkerStyle(21);
440  // hndNoCutNCPi0L->SetMarkerColor(kOrange);
441 
442  hndNoCutNCPi0->SetLineColor(kGreen+2);
443  // hndNoCutNCPi0->SetLineWidth(3);
444  // hndNoCutNCPi0->SetMarkerStyle(21);
445  // hndNoCutNCPi0->SetMarkerColor(kGreen);
446 
447  hndNoCutNCNonPi0->SetLineColor(kCyan-6);
448  // hndNoCutNCNonPi0->SetLineWidth(3);
449  // hndNoCutNCNonPi0->SetMarkerStyle(21);
450  // hndNoCutNCNonPi0->SetMarkerColor(kCyan);
451 
452  // hndNumiMasssdataNoCuts->SetLineColor(kBlack+2);
453  hndNumiMasssdataNoCuts->SetMarkerStyle(2);
454  hndNumiMasssdataNoCuts->SetMarkerSize(3);
455 
456  hndNoCuts->Draw("hist E1");
457  hndNoCutCCPi0->Draw("hist E1 same");
458  hndNoCutCCNonPi0->Draw("hist E1 same");
459  hndNoCutNCPi0L->Draw("hist E1 same");
460  hndNoCutNCPi0->Draw("hist E1 same");
461  hndNoCutNCNonPi0->Draw("hist E1 same");
462  //hndNumiMasssdataNoCuts->Draw("hist E1 same");
463  //hndNoCuts->SetMaximum(300000);
464  hndNoCuts->GetYaxis()->SetTitle("Events/8e20 POT");
465  hndNoCuts->SetTitleOffset(0.95,"Y");
466  // hndNoCuts->SetTitle("2 Prong Events No Cuts");
467 
468  TLegend * leg0 = new TLegend(0.45,0.26,0.55,0.5);
469  leg0->SetTextFont(42);
470  leg0->SetTextSize(0.05);
471  //leg0->AddEntry(hndNumiMasssdataNoCuts,"Data","l");
472  leg0->AddEntry(hndNoCuts,"No Cuts","l");
473  leg0->AddEntry(hndNoCutCCPi0,"CCPi0","l");
474  leg0->AddEntry(hndNoCutCCNonPi0,"CCNonPi0","l");
475  leg0->AddEntry(hndNoCutNCPi0L,"NC w/Pi0 < 0.3 E","l");
476  leg0->AddEntry(hndNoCutNCPi0,"NC w/Pi0 > 0.3 E","l");
477  leg0->AddEntry(hndNoCutNCNonPi0,"NCNonPi0","l");
478 
479  leg0->Draw("same");
480  NDSimulation();
481  //c1_ndNoCuts->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot1_2Pr_0_3_CVN07_11-02-17.pdf");
482  c1_ndNoCuts->SaveAs(outDir2+CurrentFile[0].name.c_str()+CurrentDate[0].date.c_str()+".png");
483 
484 /*********************************************************************************************************************/
485 
486 
487  /// Plot 1 ////
488 
489  TCanvas *c1_ndMC =new TCanvas("c1_ndMC","ndMC",800,500);
490  c1_ndMC->cd();
491 
492  hndMC->SetLineColor(kBlue);
493  // hndMC->SetLineWidth(3);
494  // hndMC->SetMarkerStyle(21);
495  // hndMC->SetMarkerColor(kBlue);
496  hndMC3P->SetLineColor(kRed);
497  // hndMC3P->SetLineWidth(3);
498  //hndMC3P->SetFillColor(kRed);
499  // hndMC3P->SetMarkerStyle(21);
500  // hndMC3P->SetMarkerColor(kRed);
501  hndMC->Draw("hist E1");
502  hndMC3P->Draw("hist E1 same");
503  hndMC->GetYaxis()->SetTitle("Events/8e20 POT");
504  hndMC->SetTitleOffset(0.95,"Y");
505  // hndMC->SetTitle("2 Prong Event Preselection");
506  //gPad->Modified();
507  TLegend * leg = new TLegend(0.55,0.7,0.65,0.8);
508  leg->SetTextFont(42);
509  leg->SetTextSize(0.05);
510  leg->AddEntry(hndMC,"Fid.+ Cont. (PreSel)","l");
511  leg->AddEntry(hndMC3P,"Selection","l");
512  leg->Draw("same");
513  NDSimulation();
514  //c1_ndMC->SaveAs("/nova/app/users/acedeno/tag_releaseS17-05-31/NDAna/ncpi0/PngCVNID/NcPi0Plots/plot2_2Pr_0_3_CVN07__07-29-17.pdf");
515  c1_ndMC->SaveAs(outDir2+CurrentFile[1].name.c_str()+CurrentDate[0].date.c_str()+".png");
516 
517 /*********************************************************************************************************************/
518 
519 /// Plot 2 ///
520 
521  //gStyle->SetTitleY(0.9);
522  TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
523  THStack *hs2 = new THStack("hs2"," ");
524  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
525  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
526  //hXndNumiMassdata->SetLineColor(kBlack);
527  // hndNCMCSig->SetFillColor(kGray);
528  // hndNCMCSig->SetLineWidth(3);
529  // hndNCMCSig->SetMarkerStyle(21);
530  // hndNCMCSig->SetMarkerColor(kGray);
531 
532  // hs2->Add(hndNCMCSig);
533 
534  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
535  hndNCPi0L->SetLineColor(kBlack);
536  hndNCPi0L->SetFillColor(kOrange);
537  hndNCPi0L->SetLineWidth(1);
538  hndNCPi0L->SetMarkerStyle(21);
539  //hndNCPi0L->SetMarkerColor(kOrange);
540  hs2->Add(hndNCPi0L);
541 
542  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
543  hndCCPi0->SetLineColor(kBlack);
544  hndCCPi0->SetFillColor(kMagenta);
545  hndCCPi0->SetLineWidth(1);
546  hndCCPi0->SetMarkerStyle(21);
547  hndCCPi0->SetMarkerColor(kMagenta);
548 
549  hs2->Add(hndCCPi0);
550  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
551  hndCCNonPi0->SetLineColor(kBlack);
552  hndCCNonPi0->SetFillColor(kAzure);
553  hndCCNonPi0->SetLineWidth(1);
554  hndCCNonPi0->SetMarkerStyle(21);
555  hndCCNonPi0->SetMarkerColor(kAzure);
556  hs2->Add(hndCCNonPi0);
557 
558  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
559  hndNCNonPi0->SetLineColor(kBlack);
560  hndNCNonPi0->SetFillColor(kCyan);
561  hndNCNonPi0->SetLineWidth(1);
562  hndNCNonPi0->SetMarkerStyle(21);
563  hndNCNonPi0->SetMarkerColor(kCyan);
564  hs2->Add(hndNCNonPi0);
565 
566  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
567  hndNCPi0->SetLineColor(kBlack);
568  hndNCPi0->SetFillColor(kGreen);
569  hndNCPi0->SetLineWidth(1);
570  hndNCPi0->SetMarkerStyle(21);
571  hndNCPi0->SetMarkerColor(kGreen);
572  hs2->Add(hndNCPi0);
573 
574  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
575  TText T; T.SetTextFont(42); T.SetTextAlign(21);
576  hs2->Draw("hist"); T.DrawTextNDC(.5,.95,"");
577  hs2->GetYaxis()->SetTitle("Events/ 8e20 POT");
578  hs2->GetXaxis()->SetTitle("#pi^{0} Reconstructed Mass [GeV]");
579  //xhs2->SetMaximum(1300);
580  hs2->GetXaxis()->SetRangeUser(0.,0.4);
581  gPad->Modified();
582  cs2->cd();
583  //cs2->SetTopMargin(0.18);
584  hndMC3P->SetLineColor(kRed);
585  hndMC3P->SetLineWidth(3);
586  //hndNumiMassdata2CVN->SetMarkerStyle(2);
587  hndNumiMassdata2CVN->SetMarkerSize(3);
588 
589  hndMC3P->Draw("same");
590  //hndNumiMassdata2CVN->Draw("same");
591  TLegend * leg2 = new TLegend(0.62,0.5,0.73,0.82);
592  //leg2->SetTextAlign(40);
593  leg2->SetTextFont(42);
594  leg2->SetTextSize(0.05);
595  leg2->SetFillStyle(0);
596  //leg2->AddEntry(hndNumiMassdata2CVN,"Data","kFullDotSmall");
597  leg2->AddEntry(hndMC3P,"Selection","kFullDotSmall");
598  leg2->AddEntry(hndCCPi0,"CCPi0","kFullDotSmall");
599  leg2->AddEntry(hndCCNonPi0,"CCNonPi0","kFullDotSmall");
600  leg2->AddEntry(hndNCPi0L,"NC w/Pi0 < 0.3 E","kFullDotSmall");
601  leg2->AddEntry(hndNCPi0,"NC w/Pi0 > 0.3 E","kFullDotSmall");
602  leg2->AddEntry(hndNCNonPi0,"NCNonPi0","kFullDotSmall");
603 
604 
605  leg2->Draw("same");
606  NDSimulation();
607  //cs2->SaveAs("/nova/app/users/acedeno/tag_releas9-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot3_2Pr_0_3_CVN07__11-02-17.pdf");
608  cs2->SaveAs(outDir2+CurrentFile[2].name.c_str()+CurrentDate[0].date.c_str()+".png");
609 
610 /*********************************************************************************************************************/
611 /// Plot 2b ///
612 
613  //gStyle->SetTitleY(0.9);
614  TCanvas *cs2b = new TCanvas("cs2b","cs2b",10,10,855,500);
615  THStack *hs2b = new THStack("hs2b"," ");
616  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
617  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
618  // hndNCMCSig->SetLineColor(kBlack);
619  // hndNCMCSig->SetFillColor(kGray);
620  // hndNCMCSig->SetLineWidth(3);
621  // hndNCMCSig->SetMarkerStyle(21);
622  // hndNCMCSig->SetMarkerColor(kGray);
623 
624  // hs2->Add(hndNCMCSig);
625 
626  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
627  hndNCPi0L1Cut->SetLineColor(kBlack);
628  hndNCPi0L1Cut->SetFillColor(kOrange);
629  hndNCPi0L1Cut->SetLineWidth(1);
630  hndNCPi0L1Cut->SetMarkerStyle(21);
631  hndNCPi0L1Cut->SetMarkerColor(kOrange);
632  hs2b->Add(hndNCPi0L1Cut);
633 
634  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
635  hndCCPi01Cut->SetLineColor(kBlack);
636  hndCCPi01Cut->SetFillColor(kMagenta);
637  hndCCPi01Cut->SetLineWidth(1);
638  hndCCPi01Cut->SetMarkerStyle(21);
639  hndCCPi01Cut->SetMarkerColor(kMagenta);
640 
641  hs2b->Add(hndCCPi01Cut);
642  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
643  hndCCNonPi01Cut->SetLineColor(kBlack);
644  hndCCNonPi01Cut->SetFillColor(kAzure);
645  hndCCNonPi01Cut->SetLineWidth(1);
646  hndCCNonPi01Cut->SetMarkerStyle(21);
647  hndCCNonPi01Cut->SetMarkerColor(kAzure);
648  hs2b->Add(hndCCNonPi01Cut);
649 
650  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
651  hndNCNonPi01Cut->SetLineColor(kBlack);
652  hndNCNonPi01Cut->SetFillColor(kCyan);
653  hndNCNonPi01Cut->SetLineWidth(1);
654  hndNCNonPi01Cut->SetMarkerStyle(21);
655  hndNCNonPi01Cut->SetMarkerColor(kCyan);
656  hs2b->Add(hndNCNonPi01Cut);
657 
658  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
659  hndNCPi01Cut->SetLineColor(kBlack);
660  hndNCPi01Cut->SetFillColor(kGreen);
661  hndNCPi01Cut->SetLineWidth(1);
662  hndNCPi01Cut->SetMarkerStyle(21);
663  hndNCPi01Cut->SetMarkerColor(kGreen);
664  hs2b->Add(hndNCPi01Cut);
665 
666  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
667  TText T99; T99.SetTextFont(42); T99.SetTextAlign(21);
668  hs2b->Draw("hist"); T99.DrawTextNDC(.5,.95,"");
669  hs2b->GetYaxis()->SetTitle("Events/ 8e20 POT");
670  hs2b->GetXaxis()->SetTitle("#pi^{0} Reconstructed Mass [GeV]");
671  hs2b->SetMaximum(2500);
672  hs2b->GetXaxis()->SetRangeUser(0.,0.4);
673  gPad->Modified();
674  cs2b->cd();
675  //cs2->SetTopMargin(0.18);
676  hndMC3P1Cut->SetLineColor(kRed);
677  hndMC3P1Cut->SetLineWidth(3);
678  //hndNumiMassdataCVN->SetMarkerStyle(2);
679  hndNumiMassdataCVN->SetMarkerSize(3);
680 
681  hndMC3P1Cut->Draw("same");
682  //hndNumiMassdataCVN->Draw("same");
683  TLegend * leg2b = new TLegend(0.62,0.5,0.73,0.82);
684  //leg2->SetTextAlign(40);
685  leg2b->SetTextFont(42);
686  leg2b->SetTextSize(0.05);
687  leg2b->SetFillStyle(0);
688  //leg2b->AddEntry(hndNumiMassdataCVN,"Data","kFullStar");
689  leg2b->AddEntry(hndMC3P1Cut,"Selection","kFullDotSmall");
690  leg2b->AddEntry(hndCCPi01Cut,"CCPi0","kFullDotSmall");
691  leg2b->AddEntry(hndCCNonPi01Cut,"CCNonPi0","kFullDotSmall");
692  leg2b->AddEntry(hndNCPi0L1Cut,"NC w/Pi0 < 0.3 E","kFullDotSmall");
693  leg2b->AddEntry(hndNCPi01Cut,"NC w/Pi0 > 0.3 E","kFullDotSmall");
694  leg2b->AddEntry(hndNCNonPi01Cut,"NCNonPi0","kFullDotSmall");
695 
696  leg2b->Draw("same");
697  NDSimulation();
698  //cs2->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot3_2Pr_0_3_CVN07__11-02-17.pdf");
699  cs2b->SaveAs(outDir2+CurrentFile[3].name.c_str()+CurrentDate[0].date.c_str()+".png");
700 
701 /*********************************************************************************************************************/
702 /// Plot 3 ///
703  //gStyle->SetTitleY(0.9);
704  TCanvas *cs3 = new TCanvas("cs3","cs3",10,10,855,500);
705  THStack *hs3 = new THStack("hs3","");
706  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
707  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
708  // hndNCMCSig->SetLineColor(kBlack);
709  // hndNCMCSig->SetFillColor(kGray);
710  // hndNCMCSig->SetLineWidth(3);
711  // hndNCMCSig->SetMarkerStyle(21);
712  // hndNCMCSig->SetMarkerColor(kGray);
713 
714  // hs2->Add(hndNCMCSig);
715 
716  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
717  hndCVNNCPi0L->SetLineColor(kBlack);
718  hndCVNNCPi0L->SetFillColor(kOrange);
719  hndCVNNCPi0L->SetLineWidth(1);;
720  hndCVNNCPi0L->SetMarkerStyle(21);
721  hndCVNNCPi0L->SetMarkerColor(kOrange);
722  hs3->Add(hndCVNNCPi0L);
723 
724  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
725  hndCVNCCPi0->SetLineColor(kBlack);
726  hndCVNCCPi0->SetFillColor(kMagenta);
727  hndCVNCCPi0->SetLineWidth(1);;
728  hndCVNCCPi0->SetMarkerStyle(21);
729  hndCVNCCPi0->SetMarkerColor(kMagenta);
730 
731  hs3->Add(hndCVNCCPi0);
732  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
733  hndCVNCCNonPi0->SetLineColor(kBlack);
734  hndCVNCCNonPi0->SetFillColor(kAzure);
735  hndCVNCCNonPi0->SetLineWidth(1);;
736  hndCVNCCNonPi0->SetMarkerStyle(21);
737  hndCVNCCNonPi0->SetMarkerColor(kAzure);
738  hs3->Add(hndCVNCCNonPi0);
739 
740  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
741  hndCVNNCNonPi0->SetLineColor(kBlack);
742  hndCVNNCNonPi0->SetFillColor(kCyan);
743  hndCVNNCNonPi0->SetLineWidth(1);;
744  hndCVNNCNonPi0->SetMarkerStyle(21);
745  hndCVNNCNonPi0->SetMarkerColor(kCyan);
746  hs3->Add(hndCVNNCNonPi0);
747 
748  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
749  hndCVNNCPi0->SetLineColor(kBlack);
750  hndCVNNCPi0->SetFillColor(kGreen);
751  hndCVNNCPi0->SetLineWidth(1);;
752  hndCVNNCPi0->SetMarkerStyle(21);
753  hndCVNNCPi0->SetMarkerColor(kGreen);
754  hs3->Add(hndCVNNCPi0);
755 
756  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
757  TText T2; T2.SetTextFont(42); T2.SetTextAlign(21);
758  hs3->Draw("hist"); T2.DrawTextNDC(.5,.95,"");
759  hs3->GetYaxis()->SetTitle("Events/ 8e20 POT");
760  hs3->GetXaxis()->SetTitle("Prong 2 CVN Gamma ID");
761  //hs3->SetMaximum(6000);
762  hs3->GetXaxis()->SetRangeUser(0,1);
763  gPad->Modified();
764  cs3->cd();
765  //cs2->SetTopMargin(0.18);
766  hndCVNMC3P->SetLineColor(kRed);
767  hndCVNMC3P->SetLineWidth(3);
768  //hndNumiCVN2PData->SetMarkerStyle(2);
769  hndNumiCVN2PData->SetMarkerSize(3);
770 
771  hndCVNMC3P->Draw("same");
772  //hndNumiCVN2PData->Draw("same");
773  TLegend * leg3 = new TLegend(0.55,0.5,0.65,0.82);
774  //leg2->SetTextAlign(40);
775  leg3->SetTextFont(42);
776  leg3->SetTextSize(0.05);
777  leg3->SetFillStyle(0);
778  //leg3->AddEntry(hndNumiCVN2PData,"Data","kFullDotSmall");
779  leg3->AddEntry(hndCVNMC3P,"Selection","kFullDotSmall");
780  leg3->AddEntry(hndCVNCCPi0,"CCPi0","kFullDotSmall");
781  leg3->AddEntry(hndCVNCCNonPi0,"CCNonPi0","kFullDotSmall");
782  leg3->AddEntry(hndCVNNCPi0L,"NC w/Pi0 < 0.3 E","kFullDotSmall");
783  leg3->AddEntry(hndCVNNCPi0,"NC w/Pi0 > 0.3 E","kFullDotSmall");
784  leg3->AddEntry(hndCVNNCNonPi0,"NCNonPi0","kFullDotSmall");
785 
786  leg3->Draw("same");
787  NDSimulation();
788  //cs3->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot4_2Pr_0_3_CVN07__11-02-17.pdf");
789  cs3->SaveAs(outDir2+CurrentFile[4].name.c_str()+CurrentDate[0].date.c_str()+".png");
790 
791 /*********************************************************************************************************************/
792 
793 /// Plot 4 ///
794  //gStyle->SetTitleY(0.9);
795  TCanvas *cs4 = new TCanvas("cs4","cs4",10,10,855,500);
796  THStack *hs4 = new THStack("hs4","");
797  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
798  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
799  // hndNCMCSig->SetLineColor(kBlack);
800  // hndNCMCSig->SetFillColor(kGray);
801  // hndNCMCSig->SetLineWidth(3);
802  // hndNCMCSig->SetMarkerStyle(21);
803  // hndNCMCSig->SetMarkerColor(kGray);
804 
805  // hs2->Add(hndNCMCSig);
806 
807  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
808  hndCVNNCPi0LR->SetLineColor(kBlack);
809  hndCVNNCPi0LR->SetFillColor(kOrange);
810  hndCVNNCPi0LR->SetLineWidth(1);;
811  hndCVNNCPi0LR->SetMarkerStyle(21);
812  hndCVNNCPi0LR->SetMarkerColor(kOrange);
813  hs4->Add(hndCVNNCPi0LR);
814 
815  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
816  hndCVNCCPi0R->SetLineColor(kBlack);
817  hndCVNCCPi0R->SetFillColor(kMagenta);
818  hndCVNCCPi0R->SetLineWidth(1);;
819  hndCVNCCPi0R->SetMarkerStyle(21);
820  hndCVNCCPi0R->SetMarkerColor(kMagenta);
821 
822  hs4->Add(hndCVNCCPi0R);
823  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
824  hndCVNCCNonPi0R->SetLineColor(kBlack);
825  hndCVNCCNonPi0R->SetFillColor(kAzure);
826  hndCVNCCNonPi0R->SetLineWidth(1);;
827  hndCVNCCNonPi0R->SetMarkerStyle(21);
828  hndCVNCCNonPi0R->SetMarkerColor(kAzure);
829  hs4->Add(hndCVNCCNonPi0R);
830 
831  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
832  hndCVNNCNonPi0R->SetLineColor(kBlack);
833  hndCVNNCNonPi0R->SetFillColor(kCyan);
834  hndCVNNCNonPi0R->SetLineWidth(1);;
835  hndCVNNCNonPi0R->SetMarkerStyle(21);
836  hndCVNNCNonPi0R->SetMarkerColor(kCyan);
837  hs4->Add(hndCVNNCNonPi0R);
838 
839  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
840  hndCVNNCPi0R->SetLineColor(kBlack);
841  hndCVNNCPi0R->SetFillColor(kGreen);
842  hndCVNNCPi0R->SetLineWidth(1);;
843  hndCVNNCPi0R->SetMarkerStyle(21);
844  hndCVNNCPi0R->SetMarkerColor(kGreen);
845  hs4->Add(hndCVNNCPi0R);
846 
847  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
848  TText T4; T4.SetTextFont(42); T4.SetTextAlign(21);
849  hs4->Draw("hist"); T4.DrawTextNDC(.5,.95,"");
850  hs4->GetYaxis()->SetTitle("Events/ 8e20 POT");
851  hs4->GetXaxis()->SetTitle("Prong CVN Gamma ID");
852  hs4->SetMaximum(10000);
853  hs4->GetXaxis()->SetRangeUser(0,1);
854  gPad->Modified();
855  cs4->cd();
856  //cs2->SetTopMargin(0.18);
857  hndCVNMC3PR->SetLineColor(kRed);
858  hndCVNMC3PR->SetLineWidth(3);
859  //hndNumiCVN2PRData->SetMarkerStyle(2);
860  hndNumiCVN2PRData->SetMarkerSize(3);
861 
862 
863  hndCVNMC3PR->Draw("same");
864  //hndNumiCVN2PRData->Draw("same");
865  TLegend * leg4 = new TLegend(0.55,0.5,0.65,0.82);
866  //leg2->SetTextAlign(40);
867  leg4->SetTextFont(42);
868  leg4->SetTextSize(0.05);
869  leg4->SetFillStyle(0);
870  //leg4->AddEntry(hndNumiCVN2PRData,"Data","kFullDotSmall");
871  leg4->AddEntry(hndCVNMC3PR,"Selection","kFullDotSmall");
872  leg4->AddEntry(hndCVNCCPi0R,"CCPi0","kFullDotSmall");
873  leg4->AddEntry(hndCVNCCNonPi0R,"CCNonPi0","kFullDotSmall");
874  leg4->AddEntry(hndCVNNCPi0LR,"NC w/Pi0 < 0.3 E","kFullDotSmall");
875  leg4->AddEntry(hndCVNNCPi0R,"NC w/Pi0 > 0.3 E","kFullDotSmall");
876  leg4->AddEntry(hndCVNNCNonPi0R,"NCNonPi0","kFullDotSmall");
877 
878  leg4->Draw("same");
879  NDSimulation();
880  //cs4->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot5_2Pr_0_3_CVN07__11-02-17.pdf");
881  cs4->SaveAs(outDir2+CurrentFile[5].name.c_str()+CurrentDate[0].date.c_str()+".png");
882 
883 
884 /*********************************************************************************************************************/
885 
886 /// Plot 5 ///
887  //gStyle->SetTitleY(0.9);
888  TCanvas *cs5 = new TCanvas("cs5","cs5",10,10,855,500);
889  THStack *hs5 = new THStack("hs5","");
890  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
891  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
892  // hndNCMCSig->SetLineColor(kBlack);
893  // hndNCMCSig->SetFillColor(kGray);
894  // hndNCMCSig->SetLineWidth(3);
895  // hndNCMCSig->SetMarkerStyle(21);
896  // hndNCMCSig->SetMarkerColor(kGray);
897 
898  // hs2->Add(hndNCMCSig);
899 
900  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
901  hnd2CVNNCPi0LR->SetLineColor(kBlack);
902  hnd2CVNNCPi0LR->SetFillColor(kOrange);
903  hnd2CVNNCPi0LR->SetLineWidth(1);;
904  hnd2CVNNCPi0LR->SetMarkerStyle(21);
905  hnd2CVNNCPi0LR->SetMarkerColor(kOrange);
906  hs5->Add(hnd2CVNNCPi0LR);
907 
908  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
909  hnd2CVNCCPi0R->SetLineColor(kBlack);
910  hnd2CVNCCPi0R->SetFillColor(kMagenta);
911  hnd2CVNCCPi0R->SetLineWidth(1);;
912  hnd2CVNCCPi0R->SetMarkerStyle(21);
913  hnd2CVNCCPi0R->SetMarkerColor(kMagenta);
914 
915  hs5->Add(hnd2CVNCCPi0R);
916  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
917  hnd2CVNCCNonPi0R->SetLineColor(kBlack);
918  hnd2CVNCCNonPi0R->SetFillColor(kAzure);
919  hnd2CVNCCNonPi0R->SetLineWidth(1);;
920  hnd2CVNCCNonPi0R->SetMarkerStyle(21);
921  hnd2CVNCCNonPi0R->SetMarkerColor(kAzure);
922  hs5->Add(hnd2CVNCCNonPi0R);
923 
924  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
925  hnd2CVNNCNonPi0R->SetLineColor(kBlack);
926  hnd2CVNNCNonPi0R->SetFillColor(kCyan);
927  hnd2CVNNCNonPi0R->SetLineWidth(1);;
928  hnd2CVNNCNonPi0R->SetMarkerStyle(21);
929  hnd2CVNNCNonPi0R->SetMarkerColor(kCyan);
930  hs5->Add(hnd2CVNNCNonPi0R);
931 
932  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
933  hnd2CVNNCPi0R->SetLineColor(kBlack);
934  hnd2CVNNCPi0R->SetFillColor(kGreen);
935  hnd2CVNNCPi0R->SetLineWidth(1);;
936  hnd2CVNNCPi0R->SetMarkerStyle(21);
937  hnd2CVNNCPi0R->SetMarkerColor(kGreen);
938  hs5->Add(hnd2CVNNCPi0R);
939 
940  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
941  TText T5; T5.SetTextFont(42); T5.SetTextAlign(21);
942  hs5->Draw("hist"); T5.DrawTextNDC(.5,.95,"");
943  hs5->GetYaxis()->SetTitle("Events/ 8e20 POT");
944  hs5->GetXaxis()->SetTitle("Prong 2 CVN Gamma ID");
945  hs5->SetMaximum(14500);
946  hs5->GetXaxis()->SetRangeUser(0,1);
947  gPad->Modified();
948  cs5->cd();
949  //cs2->SetTopMargin(0.18);
950  hnd2CVNMC3PR->SetLineColor(kRed);
951  hnd2CVNMC3PR->SetLineWidth(3);
952  //hndNumi2CVN2PRData->SetMarkerStyle(2);
953  hndNumi2CVN2PRData->SetMarkerSize(3);
954 
955  hnd2CVNMC3PR->Draw("same");
956  //hndNumi2CVN2PRData->Draw("same");
957  TLegend * leg5 = new TLegend(0.55,0.5,0.65,0.82);
958  //leg2->SetTextAlign(40);
959  leg5->SetTextFont(42);
960  leg5->SetTextSize(0.05);
961  leg5->SetFillStyle(0);
962  //leg5->AddEntry(hndNumi2CVN2PRData,"Data","kFullDotSmall");
963  leg5->AddEntry(hnd2CVNMC3PR,"Selection","kFullDotSmall");
964  leg5->AddEntry(hnd2CVNCCPi0R,"CCPi0","kFullDotSmall");
965  leg5->AddEntry(hnd2CVNCCNonPi0R,"CCNonPi0","kFullDotSmall");
966  leg5->AddEntry(hnd2CVNNCPi0LR,"NC w/Pi0 < 0.3 E","kFullDotSmall");
967  leg5->AddEntry(hnd2CVNNCPi0R,"NC w/Pi0 > 0.3 E","kFullDotSmall");
968  leg5->AddEntry(hnd2CVNNCNonPi0R,"NCNonPi0","kFullDotSmall");
969 
970  leg5->Draw("same");
971  NDSimulation();
972  //cs5->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot6_2Pr_0_3_CVN07__11-02-17.pdf");
973  cs5->SaveAs(outDir2+CurrentFile[6].name.c_str()+CurrentDate[0].date.c_str()+".png");
974 
975 
976 /*********************************************************************************************************************/
977 
978 /// Plot 6 ///
979  //gStyle->SetTitleY(0.9);
980  TCanvas *cs6 = new TCanvas("cs6","cs6",10,10,855,500);
981  THStack *hs6 = new THStack("hs6","");
982  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
983  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
984  // hndNCMCSig->SetLineColor(kBlack);
985  // hndNCMCSig->SetFillColor(kGray);
986  // hndNCMCSig->SetLineWidth(3);
987  // hndNCMCSig->SetMarkerStyle(21);
988  // hndNCMCSig->SetMarkerColor(kGray);
989 
990  // hs2->Add(hndNCMCSig);
991 
992  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
993  hndNCPi0LRem->SetLineColor(kBlack);
994  hndNCPi0LRem->SetFillColor(kOrange);
995  hndNCPi0LRem->SetLineWidth(1);;
996  hndNCPi0LRem->SetMarkerStyle(21);
997  hndNCPi0LRem->SetMarkerColor(kOrange);
998  hs6->Add(hndNCPi0LRem);
999 
1000  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
1001  hndCCPi0Rem->SetLineColor(kBlack);
1002  hndCCPi0Rem->SetFillColor(kMagenta);
1003  hndCCPi0Rem->SetLineWidth(1);;
1004  hndCCPi0Rem->SetMarkerStyle(21);
1005  hndCCPi0Rem->SetMarkerColor(kMagenta);
1006 
1007  hs6->Add(hndCCPi0Rem);
1008  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
1009  hndCCNonPi0Rem->SetLineColor(kBlack);
1010  hndCCNonPi0Rem->SetFillColor(kAzure);
1011  hndCCNonPi0Rem->SetLineWidth(1);;
1012  hndCCNonPi0Rem->SetMarkerStyle(21);
1013  hndCCNonPi0Rem->SetMarkerColor(kAzure);
1014  hs6->Add(hndCCNonPi0Rem);
1015 
1016  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
1017  hndNCNonPi0Rem->SetLineColor(kBlack);
1018  hndNCNonPi0Rem->SetFillColor(kCyan);
1019  hndNCNonPi0Rem->SetLineWidth(1);;
1020  hndNCNonPi0Rem->SetMarkerStyle(21);
1021  hndNCNonPi0Rem->SetMarkerColor(kCyan);
1022  hs6->Add(hndNCNonPi0Rem);
1023 
1024  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
1025  hndNCPi0Rem->SetLineColor(kBlack);
1026  hndNCPi0Rem->SetFillColor(kGreen);
1027  hndNCPi0Rem->SetLineWidth(1);;
1028  hndNCPi0Rem->SetMarkerStyle(21);
1029  hndNCPi0Rem->SetMarkerColor(kGreen);
1030  hs6->Add(hndNCPi0Rem);
1031 
1032  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
1033  TText T6; T6.SetTextFont(42); T6.SetTextAlign(21);
1034  hs6->Draw("hist"); T.DrawTextNDC(.5,.95,"");
1035  hs6->GetYaxis()->SetTitle("Events/ 8e20 POT");
1036  hs6->GetXaxis()->SetTitle("RemID");
1037  hs6->SetMaximum(17000);
1038  hs6->GetXaxis()->SetRangeUser(0,1);
1039  gPad->Modified();
1040  cs6->cd();
1041  //cs2->SetTopMargin(0.18);
1042  hndMC3PRem->SetLineColor(kRed);
1043  hndMC3PRem->SetLineWidth(3);
1044  //hndNumiRemIDData->SetMarkerStyle(2);
1045  hndNumiRemIDData->SetMarkerSize(10);
1046 
1047 
1048  hndMC3PRem->Draw("same");
1049  //hndNumiRemIDData->Draw("same");
1050  TLegend * leg6 = new TLegend(0.55,0.5,0.65,0.82);
1051  //leg2->SetTextAlign(40);
1052  leg6->SetTextFont(42);
1053  leg6->SetTextSize(0.05);
1054  leg6->SetFillStyle(0);
1055  //leg6->AddEntry(hndNumiRemIDData,"Data","kFullDotSmall");
1056  leg6->AddEntry(hndMC3PRem,"Selection","kFullDotSmall");
1057  leg6->AddEntry(hndCCPi0Rem,"CCPi0","kFullDotSmall");
1058  leg6->AddEntry(hndCCNonPi0Rem,"CCNonPi0","kFullDotSmall");
1059  leg6->AddEntry(hndNCPi0LRem,"NC w/Pi0 < 0.3 E","kFullDotSmall");
1060  leg6->AddEntry(hndNCPi0Rem,"NC w/Pi0 > 0.3 E","kFullDotSmall");
1061  leg6->AddEntry(hndNCNonPi0Rem,"NCNonPi0","kFullDotSmall");
1062 
1063  leg6->Draw("same");
1064  NDSimulation();
1065  //cs6->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot7_2Pr_0_3_CVN07__RemID_11-02-17.pdf");
1066  cs6->SaveAs(outDir2+CurrentFile[7].name.c_str()+CurrentDate[0].date.c_str()+".png");
1067 
1068  /*********************************************************************************************************************/
1069 
1070 /// Plot 12 ///
1071  //gStyle->SetTitleY(0.9);
1072  TCanvas *cs7 = new TCanvas("cs7","cs7",10,10,855,500);
1073  THStack *hs7 = new THStack("hs7","");
1074  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
1075  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
1076  // hndNCMCSig->SetLineColor(kBlack);
1077  // hndNCMCSig->SetFillColor(kGray);
1078  // hndNCMCSig->SetLineWidth(1);;
1079  // hndNCMCSig->SetMarkerStyle(21);
1080  // hndNCMCSig->SetMarkerColor(kGray);
1081 
1082  // hs2->Add(hndNCMCSig);
1083 
1084  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
1085  hndNCPi0Prel->SetLineColor(kBlack);
1086  hndNCPi0Prel->SetFillColor(kGreen);
1087  hndNCPi0Prel->SetLineWidth(1);;
1088  hndNCPi0Prel->SetMarkerStyle(21);
1089  hndNCPi0Prel->SetMarkerColor(kGreen);
1090  hs7->Add(hndNCPi0Prel);
1091 
1092  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
1093  hndNCPi0LPrel->SetLineColor(kBlack);
1094  hndNCPi0LPrel->SetFillColor(kOrange);
1095  hndNCPi0LPrel->SetLineWidth(1);;
1096  hndNCPi0LPrel->SetMarkerStyle(21);
1097  hndNCPi0LPrel->SetMarkerColor(kOrange);
1098  hs7->Add(hndNCPi0LPrel);
1099 
1100 
1101  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
1102  hndNCNonPi0Prel->SetLineColor(kBlack);
1103  hndNCNonPi0Prel->SetFillColor(kCyan);
1104  hndNCNonPi0Prel->SetLineWidth(1);;
1105  hndNCNonPi0Prel->SetMarkerStyle(21);
1106  hndNCNonPi0Prel->SetMarkerColor(kCyan);
1107  hs7->Add(hndNCNonPi0Prel);
1108 
1109  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
1110  hndCCPi0Prel->SetLineColor(kBlack);
1111  hndCCPi0Prel->SetFillColor(kMagenta);
1112  hndCCPi0Prel->SetLineWidth(1);;
1113  hndCCPi0Prel->SetMarkerStyle(21);
1114  hndCCPi0Prel->SetMarkerColor(kMagenta);
1115 
1116  hs7->Add(hndCCPi0Prel);
1117 
1118  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
1119  hndCCNonPi0Prel->SetLineColor(kBlack);
1120  hndCCNonPi0Prel->SetFillColor(kAzure);
1121  hndCCNonPi0Prel->SetLineWidth(1);;
1122  hndCCNonPi0Prel->SetMarkerStyle(21);
1123  hndCCNonPi0Prel->SetMarkerColor(kAzure);
1124  hs7->Add(hndCCNonPi0Prel);
1125 
1126  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
1127  TText T7; T7.SetTextFont(42); T7.SetTextAlign(21);
1128  hs7->Draw("hist"); T7.DrawTextNDC(.5,.95,"");
1129  hs7->GetYaxis()->SetTitle("Events/ 8e20 POT");
1130  hs7->GetXaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1131  hs7->SetMaximum(12000);
1132  // hs6->GetXaxis()->SetRangeUser(0.,0.3);
1133  gPad->Modified();
1134  cs7->cd();
1135  //cs2->SetTopMargin(0.18);
1136  hndMC3PPrel->SetLineColor(kRed);
1137  hndMC3PPrel->SetLineWidth(3);
1138  hndMC3PPrel->Draw("same");
1139  TLegend * leg7 = new TLegend(0.55,0.5,0.65,0.82);
1140  //leg2->SetTextAlign(40);
1141  leg7->SetTextFont(42);
1142  leg7->SetTextSize(0.05);
1143  leg7->SetFillStyle(0);
1144  leg7->AddEntry(hndMC3PPrel,"Selection","kFullDotSmall");
1145  // leg2->AddEntry(hndNCMCSig,"Signal","kFullDotSmall");
1146 
1147 
1148  leg7->AddEntry(hndNCPi0Prel,"NC w/Pi0 > 0.3 E","kFullDotSmall");
1149  leg7->AddEntry(hndNCPi0LPrel,"NC w/Pi0 < 0.3 E","kFullDotSmall");
1150  leg7->AddEntry(hndNCNonPi0Prel,"NCNonPi0","kFullDotSmall");
1151  leg7->AddEntry(hndCCPi0Prel,"CCPi0","kFullDotSmall");
1152  leg7->AddEntry(hndCCNonPi0Prel,"CCNonPi0","kFullDotSmall");
1153 
1154  leg7->Draw("same");
1155  NDSimulation();
1156  //cs7->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot8_2Pr_0_3_CVN07__TruthEn_11-02-17.pdf");
1157  cs7->SaveAs(outDir2+CurrentFile[8].name.c_str()+CurrentDate[0].date.c_str()+".png");
1158 
1159 
1160  /*********************************************************************************************************************/
1161 
1162 /// Plot 13 ///
1163  //gStyle->SetTitleY(0.9);
1164  TCanvas *cs8 = new TCanvas("cs8","cs8",10,10,855,500);
1165  THStack *hs8 = new THStack("hs8","");
1166  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
1167  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
1168  // hndNCMCSig->SetLineColor(kBlack);
1169  // hndNCMCSig->SetFillColor(kGray);
1170  // hndNCMCSig->SetLineWidth(3);
1171  // hndNCMCSig->SetMarkerStyle(21);
1172  // hndNCMCSig->SetMarkerColor(kGray);
1173 
1174  // hs2->Add(hndNCMCSig);
1175 
1176  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
1177  hndNCPi0PrelR->SetLineColor(kBlack);
1178  hndNCPi0PrelR->SetFillColor(kGreen);
1179  hndNCPi0PrelR->SetLineWidth(1);;
1180  hndNCPi0PrelR->SetMarkerStyle(21);
1181  hndNCPi0PrelR->SetMarkerColor(kGreen);
1182  hs8->Add(hndNCPi0PrelR);
1183 
1184  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
1185  hndNCPi0LPrelR->SetLineColor(kBlack);
1186  hndNCPi0LPrelR->SetFillColor(kOrange);
1187  hndNCPi0LPrelR->SetLineWidth(1);;
1188  hndNCPi0LPrelR->SetMarkerStyle(21);
1189  hndNCPi0LPrelR->SetMarkerColor(kOrange);
1190  hs8->Add(hndNCPi0LPrelR);
1191 
1192 
1193  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
1194  hndNCNonPi0PrelR->SetLineColor(kBlack);
1195  hndNCNonPi0PrelR->SetFillColor(kCyan);
1196  hndNCNonPi0PrelR->SetLineWidth(1);;
1197  hndNCNonPi0PrelR->SetMarkerStyle(21);
1198  hndNCNonPi0PrelR->SetMarkerColor(kCyan);
1199  hs8->Add(hndNCNonPi0PrelR);
1200 
1201  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
1202  hndCCPi0PrelR->SetLineColor(kBlack);
1203  hndCCPi0PrelR->SetFillColor(kMagenta);
1204  hndCCPi0PrelR->SetLineWidth(1);;
1205  hndCCPi0PrelR->SetMarkerStyle(21);
1206  hndCCPi0PrelR->SetMarkerColor(kMagenta);
1207 
1208  hs8->Add(hndCCPi0PrelR);
1209 
1210  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
1211  hndCCNonPi0PrelR->SetLineColor(kBlack);
1212  hndCCNonPi0PrelR->SetFillColor(kAzure);
1213  hndCCNonPi0PrelR->SetLineWidth(1);;
1214  hndCCNonPi0PrelR->SetMarkerStyle(21);
1215  hndCCNonPi0PrelR->SetMarkerColor(kAzure);
1216  hs8->Add(hndCCNonPi0PrelR);
1217 
1218  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
1219  TText T8; T8.SetTextFont(42); T8.SetTextAlign(21);
1220  hs8->Draw("hist"); T8.DrawTextNDC(.5,.95,"");
1221  hs8->GetYaxis()->SetTitle("Events/ 8e20 POT");
1222  hs8->GetXaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1223  hs8->SetMaximum(9800);
1224  // hs6->GetXaxis()->SetRangeUser(0.,0.3);
1225  gPad->Modified();
1226  cs8->cd();
1227  //cs2->SetTopMargin(0.18);
1228  hndMC3PPrelR->SetLineColor(kRed);
1229  hndMC3PPrelR->SetLineWidth(1);;
1230  hndMC3PPrelR->Draw("same");
1231  TLegend * leg8 = new TLegend(0.55,0.5,0.65,0.82);
1232  //leg2->SetTextAlign(40);
1233  leg8->SetTextFont(42);
1234  leg8->SetTextSize(0.05);
1235  leg8->SetFillStyle(0);
1236  leg8->AddEntry(hndMC3PPrel,"Selection","kFullDotSmall");
1237  // leg2->AddEntry(hndNCMCSig,"Signal","kFullDotSmall");
1238 
1239 
1240  leg8->AddEntry(hndNCPi0PrelR,"NC w/Pi0 > 0.3 E","kFullDotSmall");
1241  leg8->AddEntry(hndNCPi0LPrelR,"NC w/Pi0 < 0.3 E","kFullDotSmall");
1242  leg8->AddEntry(hndNCNonPi0PrelR,"NCNonPi0","kFullDotSmall");
1243  leg8->AddEntry(hndCCPi0PrelR,"CCPi0","kFullDotSmall");
1244  leg8->AddEntry(hndCCNonPi0PrelR,"CCNonPi0","kFullDotSmall");
1245 
1246  leg8->Draw("same");
1247  NDSimulation();
1248  //cs8->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot9_2Pr_0_3_CVN07__TruthEnR_11-02-17.pdf");
1249  cs8->SaveAs(outDir2+CurrentFile[9].name.c_str()+CurrentDate[0].date.c_str()+".png");
1250 
1251 /*********************************************************************************************************************/
1252 
1253 /// Plot 14 ///
1254  //gStyle->SetTitleY(0.9);
1255  TCanvas *cs9 = new TCanvas("cs9","cs9",10,10,855,500);
1256  THStack *hs9 = new THStack("hs9","");
1257  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
1258  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
1259  // hndNCMCSig->SetLineColor(kBlack);
1260  // hndNCMCSig->SetFillColor(kGray);
1261  // hndNCMCSig->SetLineWidth(3);
1262  // hndNCMCSig->SetMarkerStyle(21);
1263  // hndNCMCSig->SetMarkerColor(kGray);
1264 
1265  // hs2->Add(hndNCMCSig);
1266 
1267  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
1268  hndNCPi0PrelCVN->SetLineColor(kBlack);
1269  hndNCPi0PrelCVN->SetFillColor(kGreen);
1270  hndNCPi0PrelCVN->SetLineWidth(1);;
1271  hndNCPi0PrelCVN->SetMarkerStyle(21);
1272  hndNCPi0PrelCVN->SetMarkerColor(kGreen);
1273  hs9->Add(hndNCPi0PrelCVN);
1274 
1275  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
1276  hndNCPi0LPrelCVN->SetLineColor(kBlack);
1277  hndNCPi0LPrelCVN->SetFillColor(kOrange);
1278  hndNCPi0LPrelCVN->SetLineWidth(1);;
1279  hndNCPi0LPrelCVN->SetMarkerStyle(21);
1280  hndNCPi0LPrelCVN->SetMarkerColor(kOrange);
1281  hs9->Add(hndNCPi0LPrelCVN);
1282 
1283 
1284  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
1285  hndNCNonPi0PrelCVN->SetLineColor(kBlack);
1286  hndNCNonPi0PrelCVN->SetFillColor(kCyan);
1287  hndNCNonPi0PrelCVN->SetLineWidth(1);;
1288  hndNCNonPi0PrelCVN->SetMarkerStyle(21);
1289  hndNCNonPi0PrelCVN->SetMarkerColor(kCyan);
1290  hs9->Add(hndNCNonPi0PrelCVN);
1291 
1292  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
1293  hndCCPi0PrelCVN->SetLineColor(kBlack);
1294  hndCCPi0PrelCVN->SetFillColor(kMagenta);
1295  hndCCPi0PrelCVN->SetLineWidth(1);;
1296  hndCCPi0PrelCVN->SetMarkerStyle(21);
1297  hndCCPi0PrelCVN->SetMarkerColor(kMagenta);
1298 
1299  hs9->Add(hndCCPi0PrelCVN);
1300 
1301  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
1302  hndCCNonPi0PrelCVN->SetLineColor(kBlack);
1303  hndCCNonPi0PrelCVN->SetFillColor(kAzure);
1304  hndCCNonPi0PrelCVN->SetLineWidth(1);;
1305  hndCCNonPi0PrelCVN->SetMarkerStyle(21);
1306  hndCCNonPi0PrelCVN->SetMarkerColor(kAzure);
1307  hs9->Add(hndCCNonPi0PrelCVN);
1308 
1309  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
1310  TText T9; T9.SetTextFont(42); T9.SetTextAlign(21);
1311  hs9->Draw("hist"); T9.DrawTextNDC(.5,.95,"");
1312  hs9->GetYaxis()->SetTitle("Events/ 8e20 POT");
1313  hs9->GetXaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1314  hs9->SetMaximum(4000);
1315  // hs6->GetXaxis()->SetRangeUser(0.,0.3);
1316  gPad->Modified();
1317  cs9->cd();
1318  //cs2->SetTopMargin(0.18);
1319  hndMC3PPrelCVN->SetLineColor(kRed);
1320  hndMC3PPrelCVN->SetLineWidth(3);
1321  hndMC3PPrelCVN->Draw("same");
1322  TLegend * leg9 = new TLegend(0.55,0.5,0.65,0.82);
1323  //leg2->SetTextAlign(40);
1324  leg9->SetTextFont(42);
1325  leg9->SetTextSize(0.05);
1326  leg9->SetFillStyle(0);
1327  leg9->AddEntry(hndMC3PPrelCVN,"Selection","kFullDotSmall");
1328  // leg2->AddEntry(hndNCMCSig,"Signal","kFullDotSmall");
1329 
1330 
1331  leg9->AddEntry(hndNCPi0PrelCVN,"NC w/Pi0 > 0.3 E","kFullDotSmall");
1332  leg9->AddEntry(hndNCPi0LPrelCVN,"NC w/Pi0 < 0.3 E","kFullDotSmall");
1333  leg9->AddEntry(hndNCNonPi0PrelCVN,"NCNonPi0","kFullDotSmall");
1334  leg9->AddEntry(hndCCPi0PrelCVN,"CCPi0","kFullDotSmall");
1335  leg9->AddEntry(hndCCNonPi0PrelCVN,"CCNonPi0","kFullDotSmall");
1336 
1337  leg9->Draw("same");
1338  NDSimulation();
1339  //cs9->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot10_2Pr_0_3_CVN07__TruthEnCVN_11-02-17.pdf");
1340  cs9->SaveAs(outDir2+CurrentFile[10].name.c_str()+CurrentDate[0].date.c_str()+".png");
1341 
1342  /*********************************************************************************************************************/
1343 /// Plot 14 ///
1344  //gStyle->SetTitleY(0.9);
1345  TCanvas *cs9b = new TCanvas("cs9b","cs9b",10,10,855,500);
1346  THStack *hs9b = new THStack("hs9b","");
1347  //TCanvas *c2_ndMC =new TCanvas("c2_ndMC","ndMC",800,500);
1348  //TH1D *c2_ndNCMCSig = new TH1D("c2_ndNCMCSig","ndNCMCSig",100,-4,4);
1349  // hndNCMCSig->SetLineColor(kBlack);
1350  // hndNCMCSig->SetFillColor(kGray);
1351  // hndNCMCSig->SetLineWidth(3);
1352  // hndNCMCSig->SetMarkerStyle(21);
1353  // hndNCMCSig->SetMarkerColor(kGray);
1354 
1355  // hs2->Add(hndNCMCSig);
1356 
1357  //TH1D *c2_hndNCPi0L = new TH1D("c2_ndNCPi0L","ndNCPi0L",100,-4,4);
1358  hndNCPi0PrelCVN2Cuts->SetLineColor(kBlack);
1359  hndNCPi0PrelCVN2Cuts->SetFillColor(kGreen);
1360  hndNCPi0PrelCVN2Cuts->SetLineWidth(1);;
1361  hndNCPi0PrelCVN2Cuts->SetMarkerStyle(21);
1362  hndNCPi0PrelCVN2Cuts->SetMarkerColor(kGreen);
1363  hs9b->Add(hndNCPi0PrelCVN2Cuts);
1364 
1365  //TH1D *c2_ndCCMCSig = new TH1D("c2_ndCCMCSig","ndCCMCSig",100,-4,4);
1366  hndNCPi0LPrelCVN2Cuts->SetLineColor(kBlack);
1367  hndNCPi0LPrelCVN2Cuts->SetFillColor(kOrange);
1368  hndNCPi0LPrelCVN2Cuts->SetLineWidth(1);;
1369  hndNCPi0LPrelCVN2Cuts->SetMarkerStyle(21);
1370  hndNCPi0LPrelCVN2Cuts->SetMarkerColor(kOrange);
1371  hs9b->Add(hndNCPi0LPrelCVN2Cuts);
1372 
1373 
1374  //TH1D *c2_hndNCPi0 = new TH1D("c2_ndNCPi0","ndNCPi0",100,-4,4);
1375  hndNCNonPi0PrelCVN2Cuts->SetLineColor(kBlack);
1376  hndNCNonPi0PrelCVN2Cuts->SetFillColor(kCyan);
1377  hndNCNonPi0PrelCVN2Cuts->SetLineWidth(1);;
1378  hndNCNonPi0PrelCVN2Cuts->SetMarkerStyle(21);
1379  hndNCNonPi0PrelCVN2Cuts->SetMarkerColor(kCyan);
1380  hs9b->Add(hndNCNonPi0PrelCVN2Cuts);
1381 
1382  //TH1D *c2_hndCCPi0 = new TH1D("c2_ndCCPi0","ndCCPi0",100,-4,4);
1383  hndCCPi0PrelCVN2Cuts->SetLineColor(kBlack);
1384  hndCCPi0PrelCVN2Cuts->SetFillColor(kMagenta);
1385  hndCCPi0PrelCVN2Cuts->SetLineWidth(1);;
1386  hndCCPi0PrelCVN2Cuts->SetMarkerStyle(21);
1387  hndCCPi0PrelCVN2Cuts->SetMarkerColor(kMagenta);
1388 
1389  hs9b->Add(hndCCPi0PrelCVN2Cuts);
1390 
1391  //TH1D *c2_hndCCNonPi0 = new TH1D("c2_hndCCNonPi0","hndCCNonPi0",100,-4,4);
1392  hndCCNonPi0PrelCVN2Cuts->SetLineColor(kBlack);
1393  hndCCNonPi0PrelCVN2Cuts->SetFillColor(kAzure);
1394  hndCCNonPi0PrelCVN2Cuts->SetLineWidth(1);;
1395  hndCCNonPi0PrelCVN2Cuts->SetMarkerStyle(21);
1396  hndCCNonPi0PrelCVN2Cuts->SetMarkerColor(kAzure);
1397  hs9b->Add(hndCCNonPi0PrelCVN2Cuts);
1398 
1399  //TCanvas *cs2 = new TCanvas("cs2","cs2",10,10,855,500);
1400  TText T91; T91.SetTextFont(42); T91.SetTextAlign(21);
1401  hs9b->Draw("hist"); T9.DrawTextNDC(.5,.95,"");
1402  hs9b->GetYaxis()->SetTitle("Events/ 8e20 POT");
1403  hs9b->GetXaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1404  hs9b->SetMaximum(1100);
1405  // hs6->GetXaxis()->SetRangeUser(0.,0.3);
1406  gPad->Modified();
1407  cs9b->cd();
1408  //cs2->SetTopMargin(0.18);
1409  hndMC3PPrelCVN2Cuts->SetLineColor(kRed);
1410  hndMC3PPrelCVN2Cuts->SetLineWidth(3);
1411  //hndMC3PPrelCVN2Cuts->SetMarkerStyle(2);
1412  hndMC3PPrelCVN2Cuts->Draw("same");
1413  TLegend * leg9b = new TLegend(0.55,0.5,0.65,0.82);
1414  //leg2->SetTextAlign(40);
1415  leg9b->SetTextFont(42);
1416  leg9b->SetTextSize(0.05);
1417  leg9b->SetFillStyle(0);
1418  leg9b->AddEntry(hndMC3PPrelCVN2Cuts,"Selection","kFullDotSmall");
1419  // leg2->AddEntry(hndNCMCSig,"Signal","kFullDotSmall");
1420 
1421 
1422  leg9b->AddEntry(hndNCPi0PrelCVN2Cuts,"NC w/Pi0 > 0.3 E","kFullDotSmall");
1423  leg9b->AddEntry(hndNCPi0LPrelCVN2Cuts,"NC w/Pi0 < 0.3 E","kFullDotSmall");
1424  leg9b->AddEntry(hndNCNonPi0PrelCVN2Cuts,"NCNonPi0","kFullDotSmall");
1425  leg9b->AddEntry(hndCCPi0PrelCVN2Cuts,"CCPi0","kFullDotSmall");
1426  leg9b->AddEntry(hndCCNonPi0PrelCVN2Cuts,"CCNonPi0","kFullDotSmall");
1427 
1428  leg9b->Draw("same");
1429  NDSimulation();
1430  //cs9->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot10_2Pr_0_3_CVN07__TruthEnCVN_11-02-17.pdf");
1431  cs9b->SaveAs(outDir2+CurrentFile[11].name.c_str()+CurrentDate[0].date.c_str()+".png");
1432 
1433  /*********************************************************************************************************************/
1434  /// Plot 16 ///
1435  TCanvas *cs10 = new TCanvas("cs14","cs14",10,10,855,500);
1436  cs10->cd();
1437  hnd2dplot2prong->Draw("colz");
1438  hnd2dplot2prong->GetYaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1439  hnd2dplot2prong->GetXaxis()->SetTitle("#pi^{0} Reconstructed Mass [GeV]");
1440  hnd2dplot2prong->SetTitleOffset(0.9,"Y");
1441  // hnd2dplot2prong->SetTitle("2 Prong Event Preselection + RemID < 0.36 + Prong 1 & 2 CVN Gamma ID > 0.7 Cut");
1442  NDSimulation();
1443  // cs10->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot11_2Pr_2dplot_0_3_CVN07__11-02-17.pdf");
1444  cs10->SaveAs(outDir2+CurrentFile[12].name.c_str()+CurrentDate[0].date.c_str()+".png");
1445 
1446 // /*********************************************************************************************************************/
1447 /*********************************************************************************************************************/
1448  /// Plot 18 ///
1449  TCanvas *cs10b = new TCanvas("cs10b","cs10b",10,10,855,500);
1450  cs10b->cd();
1451  gPad->SetLogz(1);
1452  hnd2dplot2prong->Draw("colz");
1453  hnd2dplot2prong->GetYaxis()->SetTitle("#pi^{0} True Energy [GeV]");
1454  hnd2dplot2prong->GetXaxis()->SetTitle("#pi^{0} Reconstructed Mass [GeV]");
1455  hnd2dplot2prong->SetTitleOffset(0.9,"Y");
1456  // hnd2dplot2prong->SetTitle("2 Prong Event Preselection + RemID < 0.36 + Prong 1 & 2 CVN Gamma ID > 0.7 Cut");
1457  NDSimulation();
1458  // cs10->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot11_2Pr_2dplot_0_3_CVN07__11-02-17.pdf");
1459  cs10b->SaveAs(outDir2+CurrentFile[15].name.c_str()+CurrentDate[0].date.c_str()+".png");
1460 
1461 // /*********************************************************************************************************************/
1462 /// Plot 2 ///
1463 
1464  //gStyle->SetTitleY(0.9);
1465  TCanvas *cs13 = new TCanvas("cs13","cs13",10,10,855,500);
1466  cs13->cd();
1467 
1468  hndMC3P1->SetLineColor(kRed);
1469  //hndMC3P1->SetLineWidth(3);
1470  // hndMC3P1->SetMarkerStyle(21);
1471  //hndMC3P1->SetMarkerColor(kRed);
1472 
1473  hndCCPi01->SetLineColor(kMagenta+2);
1474  //hndCCPi01->SetLineWidth(3);
1475  // hndCCPi01->SetMarkerStyle(21);
1476  // hndCCPi01->SetMarkerColor(kMagenta);
1477 
1478  hndCCNonPi01->SetLineColor(kAzure+2);
1479  //hndCCNonPi01->SetLineWidth(3);
1480  // hndCCNonPi01->SetMarkerStyle(21);
1481  //hndCCNonPi01->SetMarkerColor(kAzure);
1482 
1483  hndNCPi0L1->SetLineColor(kOrange+2);
1484  //hndNCPi0L1->SetLineWidth(3);
1485  // hndNCPi0L1->SetMarkerStyle(21);
1486  //hndNCPi0L1->SetMarkerColor(kOrange);
1487 
1488  hndNCPi01->SetLineColor(kGreen+2);
1489  //hndNCPi01->SetLineWidth(3);
1490  // hndNCPi01->SetMarkerStyle(21);
1491  //hndNCPi01->SetMarkerColor(kGreen);
1492 
1493 
1494  hndNCNonPi01->SetLineColor(kCyan-6);
1495  //hndNCNonPi01->SetLineWidth(3);
1496  // hndNCNonPi01->SetMarkerStyle(21);
1497  //hndNCNonPi01->SetMarkerColor(kCyan);
1498  //hndNumiMassdata2CVN1->SetMarkerStyle(2);
1499  hndNumiMassdata2CVN1->SetMarkerSize(10);
1500 
1501 
1502  hndMC3P1->Draw("hist E1");
1503  //hndNumiMassdata2CVN1->Draw("hist E1 same");
1504  hndCCPi01->Draw("hist E1 same");
1505  hndCCNonPi01->Draw("hist E1 same");
1506  hndNCPi0L1->Draw("hist E1 same");
1507  hndNCPi01->Draw("hist E1 same");
1508  hndNCNonPi01->Draw("hist E1 same");
1509  hndMC3P1->GetYaxis()->SetTitle("Events/8e20 POT");
1510  hndMC3P1->GetXaxis()->SetRangeUser(0.,0.4);
1511  hndMC3P1->SetTitleOffset(0.95,"Y");
1512  // hndMC3P1->SetTitle("2 Prong Event Preselection + RemID < 0.36 + Prong 1 & 2 CVN Gamma ID > 0.7 ");
1513 
1514  TLegend * leg13 = new TLegend(0.62,0.5,0.73,0.82);
1515  leg13->SetTextFont(42);
1516  leg13->SetTextSize(0.05);
1517  //leg13->AddEntry(hndNumiMassdata2CVN1,"Data","l");
1518  leg13->AddEntry(hndMC3P1,"Selection","l");
1519  leg13->AddEntry(hndCCPi01,"CCPi0","l");
1520  leg13->AddEntry(hndCCNonPi01,"CCNonPi0","l");
1521  leg13->AddEntry(hndNCPi0L1,"NC w/Pi0 < 0.3 E","l");
1522  leg13->AddEntry(hndNCPi01,"NC w/Pi0 > 0.3 E","l");
1523  leg13->AddEntry(hndNCNonPi01,"NCNonPi0","l");
1524 
1525  leg13->Draw("same");
1526  NDSimulation();
1527  //cs13->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot13_2Pr_0_3_CVN07__11-02-17.pdf");
1528  cs13->SaveAs(outDir2+CurrentFile[13].name.c_str()+CurrentDate[0].date.c_str()+".png");
1529 
1530 /*********************************************************************************************************************/
1531 /// Plot 2 ///
1532 
1533  //gStyle->SetTitleY(0.9);
1534  TCanvas *cs13b = new TCanvas("cs13b","cs13b",10,10,855,500);
1535  cs13b->cd();
1536 
1537  hndMC3P1Cut2->SetLineColor(kRed);
1538  //hndMC3P1Cut2->SetLineWidth(3);
1539  // hndMC3P1->SetMarkerStyle(21);
1540  //hndMC3P1->SetMarkerColor(kRed);
1541 
1542  hndCCPi01Cut2->SetLineColor(kMagenta+2);
1543  //hndCCPi01Cut2->SetLineWidth(3);
1544  // hndCCPi01->SetMarkerStyle(21);
1545  // hndCCPi01->SetMarkerColor(kMagenta);
1546 
1547  hndCCNonPi01Cut2->SetLineColor(kAzure+2);
1548  //hndCCNonPi01Cut2->SetLineWidth(3);
1549  // hndCCNonPi01->SetMarkerStyle(21);
1550  //hndCCNonPi01->SetMarkerColor(kAzure);
1551 
1552  hndNCPi0L1Cut2->SetLineColor(kOrange+2);
1553  //hndNCPi0L1Cut2->SetLineWidth(3);
1554  // hndNCPi0L1->SetMarkerStyle(21);
1555  //hndNCPi0L1->SetMarkerColor(kOrange);
1556 
1557  hndNCPi01Cut2->SetLineColor(kGreen+2);
1558  //hndNCPi01Cut2->SetLineWidth(3);
1559  // hndNCPi01->SetMarkerStyle(21);
1560  //hndNCPi01->SetMarkerColor(kGreen);
1561 
1562 
1563  hndNCNonPi01Cut2->SetLineColor(kCyan-6);
1564  //hndNCNonPi01Cut2->SetLineWidth(3);
1565  // hndNCNonPi01->SetMarkerStyle(21);
1566  //hndNCNonPi01->SetMarkerColor(kCyan);
1567  //hndNumiMassdataCVN2->SetMarkerStyle(2);
1568  hndNumiMassdataCVN2->SetMarkerSize(3);
1569 
1570 
1571  hndMC3P1Cut2->Draw("hist E1");
1572  //hndNumiMassdataCVN2->Draw("hist E1 same");
1573  hndCCPi01Cut2->Draw("hist E1 same");
1574  hndCCNonPi01Cut2->Draw("hist E1 same");
1575  hndNCPi0L1Cut2->Draw("hist E1 same");
1576  hndNCPi01Cut2->Draw("hist E1 same");
1577  hndNCNonPi01Cut2->Draw("hist E1 same");
1578  hndMC3P1Cut2->GetYaxis()->SetTitle("Events/8e20 POT");
1579  hndMC3P1Cut2->GetXaxis()->SetRangeUser(0.,0.4);
1580  hndMC3P1Cut2->SetTitleOffset(0.95,"Y");
1581  // hndMC3P1->SetTitle("2 Prong Event Preselection + RemID < 0.36 + Prong 1 & 2 CVN Gamma ID > 0.7 ");
1582 
1583  TLegend * leg13b = new TLegend(0.62,0.5,0.73,0.82);
1584  leg13b->SetTextFont(42);
1585  leg13b->SetTextSize(0.05);
1586  //leg13b->AddEntry(hndNumiMassdataCVN2,"Data","l");
1587  leg13b->AddEntry(hndMC3P1Cut2,"Selection","l");
1588  leg13b->AddEntry(hndCCPi01Cut2,"CCPi0","l");
1589  leg13b->AddEntry(hndCCNonPi01Cut2,"CCNonPi0","l");
1590  leg13b->AddEntry(hndNCPi0L1Cut2,"NC w/Pi0 < 0.3 E","l");
1591  leg13b->AddEntry(hndNCPi01Cut2,"NC w/Pi0 > 0.3 E","l");
1592  leg13b->AddEntry(hndNCNonPi01Cut2,"NCNonPi0","l");
1593 
1594  leg13b->Draw("same");
1595  NDSimulation();
1596  //cs13->SaveAs("/nova/app/users/acedeno/tag_releaseS17-09-24/NDAna/ncpi0_Systematics/NcPi0Plots/plot13_2Pr_0_3_CVN07__11-02-17.pdf");
1597  cs13b->SaveAs(outDir2+CurrentFile[14].name.c_str()+CurrentDate[0].date.c_str()+".png");
1598 /*********************************************************************************************************************/
1599  f1->Close();
1600 
1601 }
1602 #endif
const XML_Char * name
Definition: expat.h:151
enum BeamMode kOrange
void plotHist_SpectrumCVNID()
::xsd::cxx::tree::date< char, simple_type > date
Definition: Database.h:186
enum BeamMode kRed
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const DateUp CurrentDate[Date]
const int Date
const FileUp CurrentFile[File]
void NDSimulation()
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
Definition: Spectrum.cxx:563
Float_t f1
TLatex * prelim
Definition: Xsec_final.C:133
std::string date
OStream cout
Definition: OStream.cxx:6
TString outDir2
void NDSimulation1()
const int File
double T
Definition: Xdiff_gwt.C:5
enum BeamMode kGreen
enum BeamMode kBlue
enum BeamMode string