test_numu_summed_genie_systs.C
Go to the documentation of this file.
1 // Fills spectra to test the summed small genie systs
2 
3 #include "CAFAna/Cuts/Cuts.h"
6 #include "CAFAna/Core/Loaders.h"
7 #include "CAFAna/Core/Binning.h"
10 #include "CAFAna/Systs/Systs.h"
12 #include "CAFAna/Cuts/SpillCuts.h"
13 #include "CAFAna/Analysis/Plots.h"
15 
16 
17 #include "OscLib/IOscCalc.h"
18 #include "OscLib/OscCalcGeneral.h"
19 #include "OscLib/OscCalcPMNS.h"
20 #include "OscLib/OscCalc.h"
21 
22 
23 #include "TCanvas.h"
24 #include "TFile.h"
25 #include "TGraph.h"
26 #include "TH1.h"
27 #include "TH2.h"
28 #include "TMath.h"
29 #include "TGaxis.h"
30 #include "TMultiGraph.h"
31 #include "TLegend.h"
32 #include "TLatex.h"
33 #include "TStyle.h"
34 #include "THStack.h"
35 #include "TPaveText.h"
36 
37 #include <cmath>
38 #include <iostream>
39 #include <vector>
40 #include <sstream>
41 #include <string>
42 #include <fstream>
43 #include <iomanip>
44 
45 
46 
47 using namespace ana;
48 
49 
50 
51 
52 
53 
54 
56 {
57 
58 
60  std::string fnameNDMC("defname: ");
61  fnameNDMC+="rocco_decaf_S15-05-22_nd_genie_fhc_nonswap_genierw_numu_contain";
62  fnameNDMC+=" with limit 200";
63 
64 
65  loaders.SetLoaderPath(fnameNDMC, caf::kFARDET, Loaders::kMC,
67 
68 
70 
71 
72  const HistAxis axisCC("Reconstructed Neutrino Energy (GeV)",
74 
75 
76  NoExtrapGenerator gen(axisCC, kNumuND);
77 
78 
79  std::vector<const ISyst*> systs;
80  systs.push_back(&kNumuSummedSmallGENIESyst);
81  //systs.push_back(new GenieRwgtTableSyst( rwgt::fReweightMaCCQE));
83 
84  //Predictions with extrap
85  PredictionInterp pred(systs,
86  &calc ,
87  gen,
88  loaders);
89 
90 
91 
92  loaders.Go();
93 
94  PlotWithSystErrorBand(&pred,systs,&calc, 1e18);
95 
96 
97 
98 }
Pass neutrinos through unchanged.
Definition: IOscCalc.h:45
Implements systematic errors by interpolation between shifted templates.
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
TGraphAsymmErrors * PlotWithSystErrorBand(IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalc *calc, double pot, int col, int errCol, float headroom, bool newaxis, EBinType bintype, double alpha)
Plot prediction with +/-1sigma error band.
Definition: Plots.cxx:304
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
osc::OscCalcDumb calc
Generates FD-only predictions (no extrapolation)
void Go()
Call Go() on all the loaders.
Definition: Loaders.cxx:162
void test_numu_summed_genie_systs()
void SetSpillCut(const SpillCut &cut)
Definition: Loaders.cxx:121
const Binning kNumuEnergyBinning
Definition: Binnings.cxx:13
const Cut kNumuND
Definition: NumuCuts.h:55
const Var kCCE
Definition: NumuVars.h:21
std::vector< Loaders * > loaders
Definition: syst_header.h:386
const NumuSummedSmallGENIESyst kNumuSummedSmallGENIESyst(FindCAFAnaDir()+"/data/numu/summed_genie_systs_nd.root", FindCAFAnaDir()+"/data/numu/summed_genie_systs_fd.root")
Definition: NumuSysts.h:62
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Definition: Loaders.cxx:25
enum BeamMode string