Functions | Variables
genie_syst_pca.C File Reference
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "CAFAna/Analysis/Exposures.h"
#include "CAFAna/pca/genie_diag_utils.h"
#include "CAFAna/pca/genie_plot_utils.h"
#include "TCanvas.h"
#include "TH1.h"
#include "TH1D.h"
#include "TH2.h"
#include "TFile.h"
#include "TLegend.h"
#include "TMatrixD.h"
#include "TMatrixDSymEigen.h"
#include "TMatrixDSym.h"
#include "TColor.h"
#include "TStyle.h"
#include "TLatex.h"
#include "TGaxis.h"
#include <fstream>
#include <iostream>
#include <cmath>
#include <algorithm>

Go to the source code of this file.

Functions

void FillHists (std::string fileName, std::vector< TString > samples)
 
void goFNBasis ()
 
void SuppressND (double sup)
 
void NormalizeHists ()
 
void FillPCAContainers (TMatrixD eigenvectors, TVectorD eigenvalues, TH1D *joint_hist_nom, std::vector< TH1D * > joint_hist_systs)
 
void SavePCAShifts (int ncomponents, TH1D *joint_hist_nom, std::vector< TH1D * > joint_hist_systs)
 
void genie_syst_pca ()
 

Variables

const int nuniverses = 1000
 
std::vector< TH1D * > nom_hist
 
std::vector< TH1D * > shifts_plus
 
std::vector< TH1D * > shifts_minus
 
std::vector< std::vector< TH1D * > > univ_hist
 
std::vector< TH1D * > pc_shifts_plus
 
std::vector< TH1D * > pc_shifts_minus
 
std::vector< std::vector< TH1D * > > pc_projections
 

Function Documentation

void FillHists ( std::string  fileName,
std::vector< TString >  samples 
)

Definition at line 42 of file genie_syst_pca.C.

References ErrorBand(), MECModelEnuComparisons::i, calib::j, ana::kAna2018FHCPOT, ana::kAna2018RHCPOT, nom_hist, nuniverses, pot, runNovaSAM::release, shifts_minus, shifts_plus, string, art::to_string(), and univ_hist.

43 {
44  for(unsigned int i = 0;i < samples.size();++i){
45  // This doesn't actually matter since we'll be normalizing
46  double pot = samples[i].Contains("FHC") ? kAna2018FHCPOT : kAna2018RHCPOT;
47 
48  // Load the spectra
49  std::vector<TH1D*> hUni;
50  for(int j = 0;j < nuniverses;++j)
51  hUni.push_back(LoadFromFile<Spectrum>(fileName,("genieverse_"+(std::string)samples[i]+"/Univ"+std::to_string(j)).c_str()).release()->ToTH1(pot));
52 
53  nom_hist.push_back(hUni[0]);
54 
55  shifts_plus.push_back(ErrorBand(hUni[0],hUni,1));
56  shifts_minus.push_back(ErrorBand(hUni[0],hUni,-1));
57 
58  std::vector<TH1D*> temp_hist;
59  for(unsigned int j = 1;j < hUni.size();++j)
60  temp_hist.push_back(hUni[j]);
61  univ_hist.push_back(temp_hist);
62  }
63 
64 }
std::vector< TH1D * > shifts_minus
fileName
Definition: plotROC.py:78
std::vector< TH1D * > shifts_plus
const double kAna2018RHCPOT
Definition: Exposures.h:208
#define pot
const double j
Definition: BetheBloch.cxx:29
std::vector< TH1D * > nom_hist
std::vector< std::vector< TH1D * > > univ_hist
const double kAna2018FHCPOT
Definition: Exposures.h:207
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
const int nuniverses
TH1D * ErrorBand(TH1D *hNom, std::vector< TH1D * > hUnivs, int nsigmas)
enum BeamMode string
void FillPCAContainers ( TMatrixD  eigenvectors,
TVectorD  eigenvalues,
TH1D *  joint_hist_nom,
std::vector< TH1D * >  joint_hist_systs 
)

Definition at line 128 of file genie_syst_pca.C.

References test_component::component, MECModelEnuComparisons::i, pc_projections, pc_shifts_minus, pc_shifts_plus, runNovaSAM::ret, std::sqrt(), string, art::to_string(), univ_hist, submit_syst::x, and submit_syst::y.

130 {
131  for(int component = 0; component < eigenvalues.GetNrows(); component++){
132 
133  TVectorD x = eigenvectors[component];
134 
135  x *= sqrt(eigenvalues[component]);
136 
137  TH1D* retplus = new TH1D(x);
138  std::string nameplus = "pcplus"+std::to_string(component);
139  retplus->SetName(nameplus.c_str());
140  retplus->Add(joint_hist_nom);
141  pc_shifts_plus.push_back(retplus);
142 
143  x *= -1.;
144 
145  TH1D* retminus = new TH1D(x);
146  std::string nameminus = "pcminus"+std::to_string(component);
147  retminus->SetName(nameminus.c_str());
148  retminus->Add(joint_hist_nom);
149  pc_shifts_minus.push_back(retminus);
150 
151  std::vector<TH1D*> h_proj_univs;
152  // These take /forever/ to calculate with a lot of universes
153  for(unsigned int i = 0; i < univ_hist[0].size(); i+=10){
154 
155  double projection = 0;
156 
157  for(int binIdx = 1; binIdx <= joint_hist_systs[i]->GetNbinsX(); binIdx++)
158  projection += -1.*x[binIdx-1]*(joint_hist_systs[i]->GetBinContent(binIdx)-joint_hist_nom->GetBinContent(binIdx));
159 
160  projection *= 1./(x.Norm2Sqr());
161 
162  TVectorD y = x;
163  y *= projection;
164 
165  TH1D* ret = new TH1D(y);
167  ret->SetName(name.c_str());
168  ret->Add(joint_hist_nom);
169  h_proj_univs.push_back(ret);
170 
171  }
172  pc_projections.push_back(h_proj_univs);
173 
174  }
175 
176 }
const XML_Char * name
Definition: expat.h:151
T sqrt(T number)
Definition: d0nt_math.hpp:156
std::vector< TH1D * > pc_shifts_minus
std::vector< TH1D * > pc_shifts_plus
std::vector< std::vector< TH1D * > > pc_projections
std::vector< std::vector< TH1D * > > univ_hist
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
enum BeamMode string
void genie_syst_pca ( )

Definition at line 212 of file genie_syst_pca.C.

References axis_labels, axis_widths, demo5::c1, demo5::c2, chisquared::c3, chisquared::c4, CombineHistograms(), om::cout, CrossCheckDiag(), drawBinLines(), drawCoverLines(), drawLabels(), E, febshutoff_auto::end, allTimeWatchdog::endl, plotROC::fileName, FillHists(), FillPCAContainers(), genie, GetCovMx(), goFNBasis(), MECModelEnuComparisons::i, calib::j, kRed, submit_hadd::l, nbins, nom_hist, NormalizeHists(), pc_projections, pc_shifts_minus, pc_shifts_plus, QuickUnivRatioPlot(), SavePCAShifts(), SetLineColor(), shifts_minus, shifts_plus, string, sum, suppress, SuppressND(), tex, art::to_string(), and univ_hist.

213 {
214 
215  std::vector<TString> samples = {
216  "FHC_NumuND_numus_QE",
217  "RHC_NumuND_numus_QE",
218  "FHC_NumuND_numus_nonQE",
219  "RHC_NumuND_numus_nonQE",
220  "FHC_NumuND_ncs_All",
221  "RHC_NumuND_ncs_All",
222 
223  "FHC_NueND_nues_QE",
224  "RHC_NueND_nues_QE",
225  "FHC_NueND_nues_nonQE",
226  "RHC_NueND_nues_nonQE",
227  "FHC_NueND_numus_All",
228  "RHC_NueND_numus_All",
229  "FHC_NueND_ncs_All",
230  "RHC_NueND_ncs_All",
231 
232  "FHC_NumuFD_numus_QE",
233  "RHC_NumuFD_numus_QE",
234  "FHC_NumuFD_numus_nonQE",
235  "RHC_NumuFD_numus_nonQE",
236  "FHC_NumuFD_ncs_All",
237  "RHC_NumuFD_ncs_All",
238 
239  "FHC_NueFD_nues_QE",
240  "RHC_NueFD_nues_QE",
241  "FHC_NueFD_nues_nonQE",
242  "RHC_NueFD_nues_nonQE",
243  "FHC_NueFD_numus_All",
244  "RHC_NueFD_numus_All",
245  "FHC_NueFD_ncs_All",
246  "RHC_NueFD_ncs_All",
247  };
248 
249  // input root file
250  std::string fileName = "make_genieverse.root";
251 
252  // load the spectra
253  FillHists(fileName, samples);
254  // Switch to F/N for the relevant spectra
255  goFNBasis();
256  // Normalize importance
257  NormalizeHists();
258  // Suppress ND to improve convergence
260 
261  // flatten spectra
262  TH1D* joint_hist_nom = CombineHistograms(nom_hist);
263  TH1D* joint_hist_plus = CombineHistograms(shifts_plus);
264  TH1D* joint_hist_minus = CombineHistograms(shifts_minus);
265  std::vector <TH1D*> joint_hist_systs;
266  for(unsigned int i = 0;i < univ_hist[0].size();++i){
267  std::vector<TH1D*> temp_hist;
268  for(unsigned int j = 0;j < univ_hist.size();++j) temp_hist.push_back(univ_hist[j][i]);
269  TH1D* joint_hist_univ = CombineHistograms(temp_hist);
270  joint_hist_systs.push_back(joint_hist_univ);
271  }
272 
273  // get number of bins
274  int nbins = nom_hist[0]->GetNbinsX();
275  int joint_nbins = joint_hist_nom->GetNbinsX();
276 
277  // calculate bin-bin covariance
278  const std::vector<TH1D*> genie(joint_hist_systs.begin(), joint_hist_systs.end());
279  std::unique_ptr<TMatrixDSym> covMx = GetCovMx(genie);
280 
281  // diagonalize
282  TMatrixDSymEigen cov(*covMx.get());
283  TMatrixD V = cov.GetEigenVectors();
284  TMatrixD eigenvectors = V;
285  eigenvectors.Transpose(V);
286  TVectorD eigenvalues = cov.GetEigenValues();
287 
288  // Verify that the diagonalisation works as expected
289  CrossCheckDiag(*covMx.get(), V, eigenvectors, eigenvalues);
290 
291  // Get PCA Shifts and Projections
292  FillPCAContainers(eigenvectors, eigenvalues, joint_hist_nom, joint_hist_systs);
293 
294  // Save Shifts
295  int ncomponents = 100;
296  SavePCAShifts(ncomponents, joint_hist_nom, joint_hist_systs);
297 
298  // plotting!
299  // plot the distribution of universes
300  joint_hist_nom->SetMaximum(1.4*joint_hist_nom->GetMaximum());
301  joint_hist_nom->GetXaxis()->CenterTitle();
302  joint_hist_plus->SetLineColor(kAzure);
303  joint_hist_minus->SetLineColor(kRed);
304  std::vector<TH1D*> joints;
305  for(unsigned int i = 0;i < joint_hist_systs.size();++i){
306  joint_hist_systs[i]->SetLineColor(kGray);
307  joints.push_back(joint_hist_systs[i]);
308  }
309  joints.push_back(joint_hist_minus);
310  joints.push_back(joint_hist_plus);
311 
312  TCanvas *c1 = QuickUnivRatioPlot("c1",joint_hist_nom,joints);
313 
314  TLegend *l = new TLegend(0.64,0.69,0.92,0.84);
315  l->SetFillStyle(0);
316  l->AddEntry(joint_hist_nom,"Nominal MC","l");
317  l->AddEntry(joint_hist_plus,"+1#sigma Universe","l");
318  l->AddEntry(joint_hist_minus,"-1#sigma Universe","l");
319  l->AddEntry(joint_hist_systs[0],"Genie Universe","l");
320  l->Draw();
321 
323 
324  c1->cd(1);
326  c1->cd(2);
328 
329  c1->Print("plots/genie_all.pdf");
330 
331  // plot the covariance matrix
332  TH2D *histCov = new TH2D("histCov", "Bin-Bin Covariance", joint_nbins, 0, joint_nbins, joint_nbins, 0, joint_nbins);
333  for(int xbinIdx = 1; xbinIdx <= joint_nbins; xbinIdx++){
334  for(int ybinIdx = 1; ybinIdx <= joint_nbins; ybinIdx++){
335  histCov->Fill(xbinIdx, ybinIdx, (*covMx)[xbinIdx-1][ybinIdx-1]);
336  }
337  }
338 
339  gStyle->SetPalette(kCool);
340 
341  TCanvas *c2 = new TCanvas("c2", "c2");
342  histCov->GetXaxis()->CenterTitle();
343  histCov->GetYaxis()->CenterTitle();
344  histCov->Draw("COLZ");
345  c2->SetLogz();
346  c2->SetRightMargin(0.125);
347  c2->Update();
348 
349  //drawLabels2D(axis_labels);
350 
351  c2->Print("plots/genie_covariance.pdf");
352 
353  for(int i = 0;i < eigenvalues.GetNrows();++i)
354  if(eigenvalues[i] < 10E-15){
355  std::cout<<i-2<<" "<<eigenvalues[i-2]<<std::endl;
356  std::cout<<i-1<<" "<<eigenvalues[i-1]<<std::endl;
357  std::cout<<i <<" "<<eigenvalues[i] <<std::endl;
358  std::cout<<i+1<<" "<<eigenvalues[i+1]<<std::endl;
359  std::cout<<i+2<<" "<<eigenvalues[i+2]<<std::endl;
360  break;
361  }
362 
363  // plot the eigenvalue profile
364  TCanvas *c3 = new TCanvas("c3", "c3");
365  TH1D* histEigen = new TH1D(eigenvalues);
366  histEigen->SetName("pi");
367  histEigen->GetXaxis()->SetTitle("Eigennumber");
368  histEigen->GetYaxis()->SetTitle("Eigenvalue");
369  histEigen->SetMarkerStyle(kFullCircle);
370  histEigen->GetXaxis()->SetRangeUser(0,238);
371  histEigen->GetXaxis()->CenterTitle();
372  histEigen->GetYaxis()->CenterTitle();
373  histEigen->Draw("p");
374  c3->SetLogy();
375 
376  c3->Print("plots/genie_eigen.pdf");
377 
378  // plot the total explained variancee
379  TCanvas *c4 = new TCanvas("c4","c4");
380  TVectorD eigenInt(eigenvalues.GetNrows());
381  double sum=0;
382  for(int i = 0;i < eigenvalues.GetNrows();++i){
383  sum+=eigenvalues[i];
384  eigenInt[i] = sum/eigenvalues.Sum();
385  }
386  TH1D* histEigenInt = new TH1D(eigenInt);
387  histEigenInt->GetXaxis()->SetTitle("N_PC");
388  histEigenInt->GetYaxis()->SetTitle("Total Explained Variance");
389  histEigenInt->SetMarkerStyle(kFullCircle);
390  histEigenInt->GetXaxis()->SetRangeUser(0,238);
391  histEigenInt->GetXaxis()->CenterTitle();
392  histEigenInt->GetYaxis()->CenterTitle();
393  histEigenInt->Draw("p");
394 
395  c4->Update();
396  drawCoverLines(histEigenInt);
397 
398  c4->Print("plots/genie_coverage.pdf");
399 
400  // plot the PC and the universe projections
401  //for(int i = 0;i < eigenvalues.GetNrows();++i){
402  // only like 20 tho... No one will ever look at more than that right?
403  for(int i = 0;i < 20;++i){
404  for(unsigned int j = 0;j < pc_projections[i].size();++j) pc_projections[i][j]->SetLineColor(kGray);
405  pc_shifts_plus[i]->SetLineColor(kAzure);
406  pc_shifts_minus[i]->SetLineColor(kRed);
407  std::vector<TH1D*> hComb(pc_projections[i].begin(),pc_projections[i].end());
408  hComb.push_back(pc_shifts_minus[i]);
409  hComb.push_back(pc_shifts_plus[i]);
410  TCanvas *cproj = QuickUnivRatioPlot("cproj_"+std::to_string(i),joint_hist_nom,hComb);
411 
413 
414  TLegend *lproj = new TLegend(0.64,0.69,0.92,0.84);
415  lproj->SetFillStyle(0);
416  lproj->AddEntry(joint_hist_nom,"Nominal MC","l");
417  lproj->AddEntry(pc_shifts_plus[i],"+1#sigma Shift","l");
418  lproj->AddEntry(pc_shifts_minus[i],"-1#sigma Shift","l");
419  lproj->AddEntry(pc_projections[i][0],"Universes Projections","l");
420  lproj->Draw();
421 
422  cproj->cd(1);
424  cproj->cd(2);
426 
427  cproj->cd();
428  TLatex *tex = new TLatex(0.9,0.93,("PC"+std::to_string(i)+" Explained Variance: "+std::to_string(eigenvalues[i]/eigenvalues.Sum())).c_str());
429  tex->SetTextSize(1./30);
430  tex->SetTextAlign(32);
431  tex->Draw();
432 
433  if(i<10) cproj->Print(("plots/genie_proj_PC00"+std::to_string(i)+".pdf").c_str());
434  else if(i<100) cproj->Print(("plots/genie_proj_PC0"+std::to_string(i)+".pdf").c_str());
435  else std::cout<<"Uh, what?"<<std::endl;
436 
437  }
438 
439 }
TCanvas * QuickUnivRatioPlot(std::string name, TH1D *hNom, std::vector< TH1D * > others)
std::vector< int > axis_widths
std::vector< TH1D * > shifts_minus
fileName
Definition: plotROC.py:78
enum BeamMode kRed
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
std::vector< TH1D * > shifts_plus
void drawBinLines(std::vector< int > width)
TH1D * CombineHistograms(std::vector< TH1D * > hists)
void SavePCAShifts(int ncomponents, TH1D *joint_hist_nom, std::vector< TH1D * > joint_hist_systs)
void goFNBasis()
double suppress
c2
Definition: demo5.py:33
void drawLabels(std::vector< std::string > labels)
const int nbins
Definition: cellShifts.C:15
std::vector< TH1D * > pc_shifts_minus
void FillHists(std::string fileName, std::vector< TString > samples, const int nuniverses)
Float_t E
Definition: plot.C:20
hmean SetLineColor(4)
std::vector< TH1D * > pc_shifts_plus
void FillPCAContainers(TMatrixD eigenvectors, TVectorD eigenvalues, TH1D *joint_hist_nom, std::vector< TH1D * > joint_hist_systs)
const double j
Definition: BetheBloch.cxx:29
OStream cout
Definition: OStream.cxx:6
std::unique_ptr< TMatrixDSym > GetCovMx(const std::vector< TH1D * > &hists)
std::vector< TH1D * > nom_hist
TGraph * genie
Definition: Xsec_final.C:116
std::vector< std::vector< TH1D * > > pc_projections
TLatex * tex
Definition: f2_nu.C:499
c1
Definition: demo5.py:24
std::vector< std::vector< TH1D * > > univ_hist
void NormalizeHists()
void SuppressND(double sup)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
void CrossCheckDiag(TMatrixDSym covMx, TMatrixD V, TMatrixD eigenvectors, TVectorD eigenvalues, double tolerance=1e-14)
Double_t sum
Definition: plot.C:31
std::vector< std::string > axis_labels
void drawCoverLines(TH1D *hist)
enum BeamMode string
void goFNBasis ( )

Definition at line 66 of file genie_syst_pca.C.

References MECModelEnuComparisons::i, calib::j, demo0::length, nom_hist, shifts_minus, shifts_plus, and univ_hist.

66  {
67  unsigned int length = nom_hist.size();
68 
69  // Divide F/N for each component
70  for(unsigned int i = length/2;i < length;++i){
71  // Numu doesn't extrapolate NCs
72  if(i == length/2+4 || i == length/2+5) continue;
73  // Nue signal in the ND is numus
74  if(i == length/2+6 || i == length/2+7 || i == length/2+8 || i == length/2+9){
75  nom_hist[i]->Divide(nom_hist[i-length/2-6]);
76  shifts_plus[i]->Divide(shifts_plus[i-length/2-6]);
77  shifts_minus[i]->Divide(shifts_minus[i-length/2-6]);
78  continue;
79  }
80  // Others are standard ratios
81  nom_hist[i]->Divide(nom_hist[i-length/2]);
82  shifts_plus[i]->Divide(shifts_plus[i-length/2]);
83  shifts_minus[i]->Divide(shifts_minus[i-length/2]);
84  }
85 
86  // Same in each universe
87  for(unsigned int j = 0;j < univ_hist[0].size();++j){
88  for(unsigned int i = length/2;i < length;++i){
89  if(i == length/2+4 || i == length/2+5) continue;
90  if(i == length/2+6 || i == length/2+7 || i == length/2+8 || i == length/2+9){
91  univ_hist[i][j]->Divide(univ_hist[i-length/2-6][j]);
92  continue;
93  }
94  univ_hist[i][j]->Divide(univ_hist[i-length/2][j]);
95  }
96  }
97 
98 }
std::vector< TH1D * > shifts_minus
std::vector< TH1D * > shifts_plus
length
Definition: demo0.py:21
const double j
Definition: BetheBloch.cxx:29
std::vector< TH1D * > nom_hist
std::vector< std::vector< TH1D * > > univ_hist
void NormalizeHists ( )

Definition at line 114 of file genie_syst_pca.C.

References MECModelEnuComparisons::i, calib::j, nom_hist, Scale(), shifts_minus, shifts_plus, and univ_hist.

114  {
115  for(unsigned int i = 0;i < nom_hist.size();++i){
116  double nom_area = nom_hist[i]->Integral();
117  if(nom_area == 0) continue;
118 
119  nom_hist[i]->Scale(1/nom_area);
120  shifts_plus[i]->Scale(1/nom_area);
121  shifts_minus[i]->Scale(1/nom_area);
122 
123  for(unsigned int j = 0;j < univ_hist[i].size();++j)
124  univ_hist[i][j]->Scale(1/nom_area);
125  }
126 }
std::vector< TH1D * > shifts_minus
std::vector< TH1D * > shifts_plus
const double j
Definition: BetheBloch.cxx:29
std::vector< TH1D * > nom_hist
std::vector< std::vector< TH1D * > > univ_hist
simulatedPeak Scale(1/simulationNormalisationFactor)
void SavePCAShifts ( int  ncomponents,
TH1D *  joint_hist_nom,
std::vector< TH1D * >  joint_hist_systs 
)

Definition at line 178 of file genie_syst_pca.C.

References pc_shifts_plus, string, and art::to_string().

180 {
181  TFile* saveHists = new TFile("pc_shifts.root", "RECREATE");
182  TDirectory *nomdir = saveHists->mkdir("nom");
183  nomdir->cd();
184  TH1D* nom_save_hist = (TH1D*)joint_hist_nom->Clone("genie_nom");
185  nom_save_hist->Write();
186  saveHists->cd();
187  int UnivIdx=0;
188  TDirectory *univdir = saveHists->mkdir("univs");
189  univdir->cd();
190  for(auto joint_hist_univ: joint_hist_systs) {
191  std::string name_univ = "genie_univ"+std::to_string(UnivIdx);
192  TH1D* joint_hist_syst_ratio = (TH1D*)joint_hist_univ->Clone(name_univ.c_str());
193  joint_hist_syst_ratio->Write();
194  UnivIdx++;
195  }
196  saveHists->cd();
197  TDirectory *pcdir = saveHists->mkdir("shifts");
198  pcdir->cd();
199  int pcIdx = 0;
200  for(auto pc_shift:pc_shifts_plus) {
201  TH1D* genieplus = (TH1D*)pc_shift->Clone("");
202  std::string nameplus_save = "genie"+std::to_string(pcIdx);
203  genieplus->SetName(nameplus_save.c_str());
204  genieplus->Write();
205  if(pcIdx >= ncomponents) break;
206  pcIdx++;
207  }
208  saveHists->cd();
209  saveHists->Close();
210 }
std::vector< TH1D * > pc_shifts_plus
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
enum BeamMode string
void SuppressND ( double  sup)

Definition at line 100 of file genie_syst_pca.C.

References MECModelEnuComparisons::i, calib::j, demo0::length, nom_hist, Scale(), shifts_minus, shifts_plus, and univ_hist.

100  {
101  unsigned int length = nom_hist.size();
102 
103  for(unsigned int i = 0;i < length/2;++i){
104  nom_hist[i]->Scale(1/sup);
105  shifts_plus[i]->Scale(1/sup);
106  shifts_minus[i]->Scale(1/sup);
107 
108  for(unsigned int j = 0;j < univ_hist[0].size();++j)
109  univ_hist[i][j]->Scale(1/sup);
110  }
111 
112 }
std::vector< TH1D * > shifts_minus
std::vector< TH1D * > shifts_plus
length
Definition: demo0.py:21
const double j
Definition: BetheBloch.cxx:29
std::vector< TH1D * > nom_hist
std::vector< std::vector< TH1D * > > univ_hist
simulatedPeak Scale(1/simulationNormalisationFactor)

Variable Documentation

std::vector<TH1D*> nom_hist

Definition at line 32 of file genie_syst_pca.C.

const int nuniverses = 1000
std::vector<std::vector<TH1D*> > pc_projections

Definition at line 40 of file genie_syst_pca.C.

std::vector<TH1D*> pc_shifts_minus

Definition at line 39 of file genie_syst_pca.C.

std::vector<TH1D*> pc_shifts_plus

Definition at line 38 of file genie_syst_pca.C.

std::vector<TH1D*> shifts_minus

Definition at line 34 of file genie_syst_pca.C.

std::vector<TH1D*> shifts_plus

Definition at line 33 of file genie_syst_pca.C.

std::vector<std::vector<TH1D*> > univ_hist

Definition at line 35 of file genie_syst_pca.C.