Functions | Variables
makeXSecPlots_TemplateFit.C File Reference
#include "NDAna/nuecc_inc/NueCCIncVars.h"
#include "NDAna/nuecc_inc/NueCCIncCuts.h"
#include "NDAna/nuecc_inc/NueCCIncExtra.h"
#include "NDAna/nuecc_inc/NueCCIncTemplateFit.h"
#include "RooUnfoldResponse.h"
#include "RooUnfoldBayes.h"
#include "Utilities/rootlogon.C"
#include "CAFAna/XSec/TargetCount.h"

Go to the source code of this file.

Functions

void PlotSignalBackground (TH3F *sig, TH3F *tot, std::string out)
 
void makeXSecPlots_TemplateFit (std::string pidName="cvne2017", std::string varName="double", std::string dataName="nominal", std::string systName="tot", bool shouldSave=true)
 

Variables

const double pot = 8.09e20
 
const std::string sDir = "/nova/ana/users/mjudah/CrossSection_November2018/"
 
const std::string sTemplates ="fFitTemplates_CovarianceMatrix_newPIDBins_unfolding.root"
 
const std::string sAnalysis ="fCrossSection_Nominal_FakeData_unfolding.root"
 

Function Documentation

void makeXSecPlots_TemplateFit ( std::string  pidName = "cvne2017",
std::string  varName = "double",
std::string  dataName = "nominal",
std::string  systName = "tot",
bool  shouldSave = true 
)

Definition at line 67 of file makeXSecPlots_TemplateFit.C.

References BinByBinTemplateFit(), ana::chns, plot_validation_datamc::Clone(), nuebarccinc::costhetabins, om::cout, dataName, nuebarccinc::eelecbins, allTimeWatchdog::endl, MECModelEnuComparisons::i, makeTrainCVSamples::int, calib::j, ana::kBinContent, ana::nueccinc::kcNumChns, ana::kPOT, ana::Spectrum::LoadFrom(), ana::GenieMultiverseSpectra::LowerSigma(), ana::SelDef::name, confusionMatrixTree::out, outf, outfile, nuebarccinc::pidbins, PlotSignalBackground(), pot, sAnalysis, ana::Spectrum::SaveTo(), sDir, Simulation(), sTemplates, string, ana::ToTH3(), ana::UniqueName(), ana::GenieMultiverseSpectra::UpperSigma(), and febshutoff_auto::val.

72 {
73 
74  TFile* fTemplates = new TFile((sDir+sTemplates).c_str(),"read");
75  TFile* fAnalysis = new TFile((sDir+sAnalysis).c_str(),"read");
76 
77  //////////////////////////////////////////////////////////////////////////
78  /////////////////// Template Fit ///////// /////////////////////////////
79  //////////////////////////////////////////////////////////////////////////
80 
81  ////////////////////////////////////////////////////////////////////
82  ///////////////////////PPFX Multiverse//////////////////////////////
83  ////////////////////////////////////////////////////////////////////
84  std::vector<std::unique_ptr<ana::Spectrum>> ppfx_spects;
85  for(int iuniv = 0; iuniv < 100; iuniv++){
86  char name[50];
87  sprintf(name, "%s_%i_%s_%s", "ppfx", iuniv,
88  pidName.c_str(), varName.c_str());
89  ppfx_spects.push_back(Spectrum::LoadFrom(fTemplates->GetDirectory(name)));
90  }
91 
92 
93  //Just looking for +- 1 sigma band, doesn't matter how we get it so
94  //GenieMultiverseSpectra should be able to do it correctly
95  GenieMultiverseSpectra fluxmulti =
96  GenieMultiverseSpectra(100,ppfx_spects,true);
97 
98  const Spectrum* sPPFX_Upper = fluxmulti.UpperSigma();
99  const Spectrum* sPPFX_Lower = fluxmulti.LowerSigma();
100 
101  TH3F* hPPFXUpper = (TH3F*)ana::ToTH3(*sPPFX_Upper,pot,kPOT,
102  costhetabins,
103  eelecbins,
104  pidbins,
105  kBinContent);
106  TH3F* hPPFXLower = (TH3F*)ana::ToTH3(*sPPFX_Lower,pot,kPOT,
107  costhetabins,
108  eelecbins,
109  pidbins,
110  kBinContent);
111 
112  ////////////////////////////////////////////////////////////////////
113  ///////////////////////GENIE Multiverse/////////////////////////////
114  ////////////////////////////////////////////////////////////////////
115  std::vector<std::unique_ptr<ana::Spectrum>>genie_spects;
116  for(int iuniv = 0; iuniv < 100; iuniv++){
117  char name[50];
118  sprintf(name, "%s_%i_%s_%s", "genie", iuniv,
119  pidName.c_str(), varName.c_str());
120  genie_spects.push_back(Spectrum::LoadFrom(fTemplates->GetDirectory(name)));
121  }
122 
123  GenieMultiverseSpectra geniemulti =
124  GenieMultiverseSpectra(100,genie_spects,true);
125 
126  const Spectrum* sGenie_Upper = geniemulti.UpperSigma();
127  const Spectrum* sGenie_Lower = geniemulti.LowerSigma();
128 
129  TH3F* hGenieUpper = (TH3F*)ana::ToTH3(*sGenie_Upper, pot, kPOT,
130  costhetabins,
131  eelecbins,
132  pidbins,
133  kBinContent);
134  TH3F* hGenieLower = (TH3F*)ana::ToTH3(*sGenie_Lower, pot, kPOT,
135  costhetabins,
136  eelecbins,
137  pidbins,
138  kBinContent);
139 
140  ////////////////////////////////////////////////////////////////////
141  ////////////////////// Systematics /////////////////////////////////
142  ////////////////////////////////////////////////////////////////////
143  std::vector<TH3F*> systs_hists;
144  std::vector<TH3F*> systs_hists_up;
145  std::vector<TH3F*> systs_hists_down;
146 
147  char name[50];
148  sprintf(name,"calibpos_%s_%s_%s", pidName.c_str(),
149  varName.c_str(), chns[0].name.c_str());
150  systs_hists_up.push_back((TH3F*)(Spectrum::LoadFrom
151  (fTemplates->GetDirectory(name)))
152  ->ToTH3(pot));
153 
154  sprintf(name,"lightup_%s_%s_%s", pidName.c_str(),
155  varName.c_str(), chns[0].name.c_str());
156  systs_hists_up.push_back((TH3F*)(Spectrum::LoadFrom
157  (fTemplates->GetDirectory(name)))
158  ->ToTH3(pot));
159  systs_hists_up.push_back(hGenieUpper);
160  systs_hists_up.push_back(hPPFXUpper);
161 
162  sprintf(name,"calibneg_%s_%s_%s", pidName.c_str(),
163  varName.c_str(), chns[0].name.c_str());
164  systs_hists_down.push_back((TH3F*)(Spectrum::LoadFrom
165  (fTemplates->GetDirectory(name)))
166  ->ToTH3(pot));
167 
168  sprintf(name,"lightdown_%s_%s_%s", pidName.c_str(),
169  varName.c_str(), chns[0].name.c_str());
170  systs_hists_down.push_back((TH3F*)(Spectrum::LoadFrom
171  (fTemplates->GetDirectory(name)))
172  ->ToTH3(pot));
173  systs_hists_down.push_back(hGenieLower);
174  systs_hists_down.push_back(hPPFXLower);
175 
176  sprintf(name,"calibshape_%s_%s_%s", pidName.c_str(),
177  varName.c_str(), chns[0].name.c_str());
178  systs_hists.push_back((TH3F*)(Spectrum::LoadFrom
179  (fTemplates->GetDirectory(name)))->ToTH3(pot));
180  sprintf(name,"ckv_%s_%s_%s", pidName.c_str(),
181  varName.c_str(), chns[0].name.c_str());
182  systs_hists.push_back((TH3F*)(Spectrum::LoadFrom
183  (fTemplates->GetDirectory(name)))->ToTH3(pot));
184 
185  std::vector<TH3F*> systs_calibshape = {systs_hists[0]};
186  std::vector<TH3F*> systs_ckv = {systs_hists[1]};
187  std::vector<TH3F*> systs_genie_up = {hGenieUpper};
188  std::vector<TH3F*> systs_genie_down = {hGenieLower};
189  std::vector<TH3F*> systs_ppfx_up = {hPPFXUpper};
190  std::vector<TH3F*> systs_ppfx_down = {hPPFXLower};
191  std::vector<TH3F*> systs_light_up = {systs_hists_up[1]};
192  std::vector<TH3F*> systs_light_down = {systs_hists_down[1]};
193  std::vector<TH3F*> systs_calib_up = {systs_hists_up[0]};
194  std::vector<TH3F*> systs_calib_down = {systs_hists_down[0]};
195 
196  std::vector<TH3F*> systs_onesided;
197  std::vector<TH3F*> systs_upper;
198  std::vector<TH3F*> systs_lower;
199 
200  if(systName == "tot"){
201  systs_onesided = {systs_hists[0],systs_hists[1]};
202  systs_upper = {systs_hists_up[0], systs_hists_up[1],
203  hGenieUpper,hPPFXUpper};
204  systs_lower = {systs_hists_down[0], systs_hists_down[1],
205  hGenieLower,hPPFXLower};
206  }
207  else if(systName == "calibshape"){
208  systs_onesided = {systs_hists[0]};
209  systs_upper = {};
210  systs_lower = {};
211  }
212  else if(systName == "ckv"){
213  systs_onesided = {systs_hists[1]};
214  systs_upper = {};
215  systs_lower = {};
216  }
217  else if(systName == "genie"){
218  systs_onesided = {};
219  systs_upper = {hGenieUpper};
220  systs_lower = {hGenieLower};
221  }
222  else if(systName == "ppfx"){
223  systs_onesided = {};
224  systs_upper = {hPPFXUpper};
225  systs_lower = {hPPFXLower};
226  }
227  else if(systName == "calib"){
228  systs_onesided = {};
229  systs_upper = {systs_hists_down[0]};
230  systs_lower = {systs_hists_down[0]};
231  }
232  else if(systName == "light"){
233  systs_onesided = {};
234  systs_upper = {systs_hists_up[1]};
235  systs_lower = {systs_hists_down[1]};
236  }
237 
238 
239 
240 
241  ////////////////////////////////////////////////////////////////////
242  ////////////////////// Nominal MC //////////////////////////////////
243  ////////////////////////////////////////////////////////////////////
244  std::vector<TH3F*> nominal_hists;
245  for(uint i = 0; i < kcNumChns; i++){
246  sprintf(name, "nominal_%s_%s_%s", pidName.c_str(),
247  varName.c_str(), chns[i].name.c_str());
248  nominal_hists.push_back((TH3F*)(Spectrum::LoadFrom
249  (fTemplates->GetDirectory(name)))
250  ->ToTH3(pot));
251  }
252 
253  TH2F* hPlot2D = (TH2F*)nominal_hists[0]->Project3D("yx");
254  hPlot2D->SetName(ana::UniqueName().c_str());
255  hPlot2D->SetTitle("");
256  hPlot2D->GetYaxis()->SetTitle("Electron Energy, E_{e} (GeV)");
257  hPlot2D->GetXaxis()->SetTitle("cos #theta_{e}");
258  hPlot2D->GetYaxis()->CenterTitle();
259  hPlot2D->GetYaxis()->SetTitleOffset(0.45);
260  hPlot2D->GetZaxis()->SetMaxDigits(3);
261  hPlot2D->GetXaxis()->CenterTitle();
262  hPlot2D->GetZaxis()->SetTitle("Events/8.09 #times 10^{20} POT");
263  hPlot2D->GetZaxis()->CenterTitle();
264  hPlot2D->GetXaxis()->SetRangeUser(0.75,1.00);
265  hPlot2D->GetYaxis()->SetRangeUser(1.0,6.0);
266  TH2F* hPlot2D_sig = (TH2F*)nominal_hists[1]->Project3D("yx");
267  TH2F* hPlot2D_sig_2 = (TH2F*)nominal_hists[7]->Project3D("yx");
268  //hPlot2D_sig->Add(hPlot2D_sig_2);
269  hPlot2D_sig->GetXaxis()->SetRangeUser(0.75,1);
270  hPlot2D_sig->GetYaxis()->SetRangeUser(1.0,10.0);
271  hPlot2D_sig->SetName(ana::UniqueName().c_str());
272  hPlot2D_sig->SetTitle("");
273  hPlot2D_sig->GetYaxis()->SetTitle("Electron Energy, E_{e} (GeV)");
274  hPlot2D_sig->GetXaxis()->SetTitle("cos #theta_{e}");
275  hPlot2D_sig->GetYaxis()->CenterTitle();
276  hPlot2D_sig->GetYaxis()->SetTitleOffset(0.45);
277  hPlot2D_sig->GetZaxis()->SetMaxDigits(3);
278  hPlot2D_sig->GetXaxis()->CenterTitle();
279  hPlot2D_sig->GetZaxis()->SetTitle("Signal Events/8.09 #times 10^{20} POT");
280  hPlot2D_sig->GetZaxis()->CenterTitle();
281  //hPlot2D_sig->GetXaxis()->SetRangeUser(0,1.00);
282  //hPlot2D_sig->GetYaxis()->SetRangeUser(0,10.0);
283 
284  TCanvas* c29 = new TCanvas("c28","c29");
285  c29->SetRightMargin(0.15);
286  hPlot2D_sig->SetMarkerColor(kWhite);
287  gStyle->SetPaintTextFormat("4.0f");
288  hPlot2D_sig->Draw("COLZ TEXT");
289  Simulation();
290  c29->SaveAs("signal_mc_2d.png");
291  c29->Close();
292  delete c29;
293 
294  TH3F* hNominalSignalLike =
295  (TH3F*)nominal_hists[1]->Clone(ana::UniqueName().c_str());
296  hNominalSignalLike->Add(nominal_hists[2]);
297  hNominalSignalLike->Add(nominal_hists[7]);
298 
299  PlotSignalBackground(hNominalSignalLike, nominal_hists[0],
300  "s_b_ratio_signal_region.png");
301 
302 
303  TCanvas *c88 = new TCanvas("c88","c88");
304  c88->SetLogz(1);
305  c88->SetRightMargin(0.15);
306  //c88->SetLeftMargin(0.10);
307  hPlot2D->Draw("COLZ");
308  Simulation();
309  c88->SaveAs("total_mc_2d.png");
310  c88->Close();
311  delete c88;
312 
313  TH2F* hPlot2D_a = (TH2F*)nominal_hists[0]->Project3D("yz");
314  hPlot2D_a->SetName(ana::UniqueName().c_str());
315  hPlot2D_a->SetTitle("");
316  hPlot2D_a->GetYaxis()->SetTitle("Electron Energy, E_{e} (GeV)");
317  hPlot2D_a->GetXaxis()->SetTitle("Event CVNe");
318  hPlot2D_a->GetYaxis()->CenterTitle();
319  hPlot2D_a->GetYaxis()->SetTitleOffset(0.45);
320  hPlot2D_a->GetZaxis()->SetMaxDigits(3);
321  hPlot2D_a->GetXaxis()->CenterTitle();
322  hPlot2D_a->GetZaxis()->SetTitle("Events/8.09 #times 10^{20} POT");
323  hPlot2D_a->GetZaxis()->CenterTitle();
324  hPlot2D_a->GetXaxis()->SetRangeUser(0.,1.00);
325  hPlot2D_a->GetYaxis()->SetRangeUser(1.0,6.0);
326 
327  TCanvas *c89 = new TCanvas("c89","c89");
328  c89->SetLogz(1);
329  c89->SetRightMargin(0.15);
330  //c88->SetLeftMargin(0.10);
331  hPlot2D_a->Draw("COLZ");
332  Simulation();
333  c89->SaveAs("total_mc_2d_electron_pid.png");
334  c89->Close();
335  delete c89;
336 
337  std::vector<int> intvect = {};
338  std::cout << intvect.size() << std::endl;
339 
340 
341  ////////////////////////////////////////////////////////////////////
342  ////////////////////// Fake Data ///////////////////////////////////
343  ////////////////////////////////////////////////////////////////////
344  std::vector<TH3F*> data_hists;
345  if (dataName.find("ppfx") != std::string::npos) {
346  sprintf(name, "mc_%s_%s_%s", dataName.c_str(),
347  "template", "tot");
348  }
349  else if (dataName.find("genie") != std::string::npos) {
350  sprintf(name, "mc_%s_%s_%s", dataName.c_str(),
351  "template", "tot");
352  }
353  else{
354  sprintf(name, "mc_%s_%s_%s", dataName.c_str(),
355  "template", "tot");
356  }
357  data_hists.push_back((TH3F*)(Spectrum::LoadFrom(fAnalysis->
358  GetDirectory(name)))->
359  ToTH3(pot));
360 
361 
362  std::vector<TH3F*> nominal_hists_3d;
363  for(uint i = 0; i < kcNumChns; i++){
364  sprintf(name, "%s_%s_%s_%s", "mc","nominal",
365  "analysis", chns[i].name.c_str());
366  nominal_hists_3d.push_back((TH3F*)(Spectrum::LoadFrom
367  (fAnalysis->
368  GetDirectory(name)))->ToTH3(pot));
369  }
370 
371 
372  ////////////////////////////////////////////////////////////////////
373  ////////////////////// Do Template Fit//////////////////////////////
374  ////////////////////////////////////////////////////////////////////
375 
376  std::string out = dataName + "_" + systName;
377  std::vector<TH3F*> weighted_hists_3d =
378  BinByBinTemplateFit(data_hists[0],nominal_hists, systs_onesided,
379  systs_upper,systs_lower,nominal_hists_3d,
380  pidName,varName,out);
381 
382  ////////////////////////////////////////////////////////////////////
383  ////////////////////////////////////////////////////////////////////
384  ////////////////////// Calculate XSec /////////////////////////////
385  ////////////////////////////////////////////////////////////////////
386  ////////////////////////////////////////////////////////////////////
387  if(weighted_hists_3d.size() < 4){
388  std::cout << "Issue in template fit. Exiting" << std::endl;
389  return;
390  }
391 
392 
393  //std::vector<TH3F*> weighted_hists_3d = ApplyFitResults(nominal_hists_3d,
394  // vTemplateWeights);
395 
396  sprintf(name, "mc_%s_%s_signal_postfit",dataName.c_str(), systName.c_str());
397  TH3F* hSignalOut = (TH3F*)weighted_hists_3d[1]->Clone(name);
398  hSignalOut->SetName(name);
399 
400 
401  //Convert TH3F To TH1F -> Spectrum
402  const int nx = hSignalOut->GetXaxis()->GetNbins();
403  const int ny = hSignalOut->GetYaxis()->GetNbins();
404  const int nz = hSignalOut->GetZaxis()->GetNbins();
405 
406  // Make sure it's compatible with having been made with this binning
407  TH1F* hHolder = new TH1F("hHolder","",nx*ny*nz,0,nx*ny*nz);
408 
409  for(int i = 0; i < hHolder->GetNbinsX(); ++i){
410  const int nynz = ny*nz;
411  const int nmodnynz = i%nynz;
412  const int ix = i/nynz;
413  const int iy = nmodnynz/nz;
414  const int iz = i%nz;
415 
416  const double val = hSignalOut->GetBinContent(ix+1, iy+1, iz+1);
417  const double err = hSignalOut->GetBinError (ix+1, iy+1, iz+1);
418 
419  hHolder->SetBinContent(i+1,val);
420  hHolder->SetBinError(i+1,err);
421  }
422 
423  std::vector<TH1F*> vHolder;
424  for(int j = 0; j < (int)weighted_hists_3d.size();j++){
425  TH1F* hHold = new TH1F(ana::UniqueName().c_str(),"",nx*ny*nz,0,nx*ny*nz);
426 
427  for(int i = 0; i < hHold->GetNbinsX(); ++i){
428  const int nynz = ny*nz;
429  const int nmodnynz = i%nynz;
430  const int ix = i/nynz;
431  const int iy = nmodnynz/nz;
432  const int iz = i%nz;
433 
434  const double val = weighted_hists_3d[j]->GetBinContent(ix+1, iy+1, iz+1);
435  const double err = weighted_hists_3d[j]->GetBinError (ix+1, iy+1, iz+1);
436 
437  hHold->SetBinContent(i+1,val);
438  hHold->SetBinError(i+1,err);
439  }
440  vHolder.push_back(hHold);
441  sprintf(name, "mc_%s_%s_%s_postfit",dataName.c_str(),
442  systName.c_str(),chns[j].name.c_str());
443  vHolder[j]->SetName(name);
444  }
445 
446  if(shouldSave == true){
447  //std::string outfile =
448  //"CrossSection_TemplateFitResults_fakedata_development_stat_prongcvn.root";
450  "CrossSection_TemplateFitResults_fakedata_development_stat.root";
451  TFile *outf = new TFile((sDir+outfile).c_str(), "update");
452  Spectrum sSignalOut(hHolder,pot,0);
453  sprintf(name, "mc_%s_%s_signal_postfit",dataName.c_str(), systName.c_str());
454  sSignalOut.SaveTo(outf->mkdir(name));
455 
456  std::vector<Spectrum*> sHolder;
457  for(int j = 0; j < (int)vHolder.size(); j++){
458  sprintf(name, "mc_%s_%s_%s_postfit",dataName.c_str(),
459  systName.c_str(),chns[j].name.c_str());
460  sHolder.push_back(new Spectrum(vHolder[j],pot,0));
461  sHolder[j]->SaveTo(outf->mkdir(name));
462  }
463  outf->Close();
464  }
465 
466 
467  fTemplates->Close();
468  fAnalysis->Close();
469 
470 }
const double pot
void Simulation()
Definition: tools.h:16
const XML_Char * name
Definition: expat.h:151
const std::string sTemplates
void PlotSignalBackground(TH3F *sig, TH3F *tot, std::string out)
const ana::Binning eelecbins
const SelDef chns[knumchns]
const ana::Binning costhetabins
std::vector< double > Spectrum
Definition: Constants.h:743
std::unique_ptr< T > LoadFrom(TDirectory *dir, const std::string &label)
Definition: LoadFromFile.h:17
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const ana::Binning pidbins
TFile * outf
Definition: testXsec.C:51
const double j
Definition: BetheBloch.cxx:29
Regular histogram.
Definition: UtilsExt.h:30
OStream cout
Definition: OStream.cxx:6
std::vector< TH3F * > BinByBinTemplateFit(TH3F *data, std::vector< TH3F * > templates, std::vector< TH3F * > systs_hists, std::vector< TH3F * > systs_hists_up, std::vector< TH3F * > systs_hists_down, std::vector< TH3F * > analysis_templates, std::string pidName, std::string varName, std::string dataName)
const std::string sAnalysis
const std::string sDir
const int kcNumChns
Definition: NueCCIncCuts.h:293
const Spectrum * UpperSigma(BandOptions opt=kBandFromNominal) const
const Spectrum * LowerSigma(BandOptions opt=kBandFromNominal) const
std::string dataName
std::string name
TH3 * ToTH3(const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, const Binning &binsz, ana::EBinType bintype)
Same as ToTH2, but with 3 dimensions.
Definition: UtilsExt.cxx:162
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition: Utilities.cxx:28
FILE * outfile
Definition: dump_event.C:13
enum BeamMode string
unsigned int uint
void PlotSignalBackground ( TH3F *  sig,
TH3F *  tot,
std::string  out 
)

Definition at line 23 of file makeXSecPlots_TemplateFit.C.

References MECModelEnuComparisons::i, calib::j, Simulation(), and ana::UniqueName().

24 {
25  TH2F* hDD = (TH2F*)sig->Project3D("yx");
26 
27  for(int i = 1; i <= sig->GetXaxis()->GetNbins(); i++){
28  for(int j = 1; j <= sig->GetYaxis()->GetNbins(); j++){
29 
30  TH1F* hSig1D =
31  (TH1F*)sig->ProjectionZ(ana::UniqueName().c_str(),i,i,j,j);
32  TH1F* hBkgd1D =
33  (TH1F*)tot->ProjectionZ(ana::UniqueName().c_str(),i,i,j,j);
34  hBkgd1D->Add(hSig1D,-1);
35  int sigbin = hSig1D->FindBin(0.85);
36 
37  float tot_sig = hSig1D->Integral(sigbin,-1);
38  float tot_bkgd = hBkgd1D->Integral(sigbin,-1);
39 
40  if(tot_bkgd <= 0) hDD->SetBinContent(i,j,0);
41  else hDD->SetBinContent(i,j,tot_sig/tot_bkgd);
42  }
43  }
44 
45  hDD->SetTitle("");
46  hDD->GetZaxis()->SetTitle("Signal/Background (CVNe > 0.85)");
47  hDD->GetXaxis()->SetTitle("cos #theta_{e}");
48  hDD->GetYaxis()->SetTitle("Electron Energy, E_{e} (GeV)");
49  hDD->GetXaxis()->SetRangeUser(0.75,1);
50  hDD->GetYaxis()->SetRangeUser(1.0,10.0);
51  hDD->GetXaxis()->CenterTitle();
52  hDD->GetYaxis()->CenterTitle();
53  hDD->GetZaxis()->CenterTitle();
54  TCanvas* c88 = new TCanvas("c88","c88");
55  c88->SetRightMargin(0.15);
56  c88->SetLeftMargin(0.15);
57  hDD->SetMarkerColor(kWhite);
58  gStyle->SetPaintTextFormat("4.2f");
59  hDD->Draw("COLZ TEXT");
60  Simulation();
61  c88->SaveAs(out.c_str());
62  c88->Close();
63  delete c88;
64 
65 }
void Simulation()
Definition: tools.h:16
const double j
Definition: BetheBloch.cxx:29
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition: Utilities.cxx:28

Variable Documentation

const double pot = 8.09e20

Definition at line 15 of file makeXSecPlots_TemplateFit.C.

const std::string sAnalysis ="fCrossSection_Nominal_FakeData_unfolding.root"

Definition at line 21 of file makeXSecPlots_TemplateFit.C.

const std::string sDir = "/nova/ana/users/mjudah/CrossSection_November2018/"

Definition at line 17 of file makeXSecPlots_TemplateFit.C.

const std::string sTemplates ="fFitTemplates_CovarianceMatrix_newPIDBins_unfolding.root"

Definition at line 19 of file makeXSecPlots_TemplateFit.C.