MakeNus17PredictionSysts.C
Go to the documentation of this file.
4 #include "CAFAna/Core/Loaders.h"
7 #include "NuXAna/Cuts/NusCuts.h"
10 #include "CAFAna/Cuts/TimingCuts.h"
12 #include "CAFAna/Extrap/ExtrapSterile.h"
20 #include "CAFAna/Vars/HistAxes.h"
22 #include "OscLib/OscCalcSterile.h"
25 #include "NuXAna/Vars/HistAxes.h"
26 
27 #include <utility>
28 
29 using namespace ana;
30 
32 {
33  TH1::AddDirectory(0);
34 
35  const Var kReweight = kXSecCVWgt2017*kPPFXFluxCVWgt;
36 
37  // Set up some calculators:
38  // Set up oscillation calculator that uses default 3 flavor parameters
40 
48 
49  std::vector<const ISyst*> systs = getAllNusFDSysts();
50 
51  // Set up the sterile prediction
52  const SterileGenerator genNus17(
55  kNoShift, kReweight
56  );
57 
58  PredictionInterp predInterp(systs, calc3f, genNus17, loaders);
59 
60  loaders.Go();
61 
62  // Set up output filename
63  TFile* rootF = new TFile(outfile.c_str(), "RECREATE");
64 
65  TDirectory* tmp = gDirectory;
66  TDirectory* saveDir = gDirectory;
67 
68  // Save all of the objects
69  saveDir = rootF->mkdir("nus17_predI");
70  predInterp.SaveTo(saveDir);
71 
72  tmp->cd();
73  rootF->Close(); // Close the file
74 }
Near Detector underground.
Definition: SREnums.h:10
const std::string fNDdataDECAF
Definition: NusLoadProd3.h:63
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
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
const std::string fFDtauDECAF
Definition: NusLoadProd3.h:47
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
Adapt the PMNS_Sterile calculator to standard interface.
Float_t tmp
Definition: plot.C:36
Generates extrapolated NC predictions using ProportionalDecomp.
const std::string fNDmcDECAF
Definition: NusLoadProd3.h:66
void Go()
Call Go() on all the loaders.
Definition: Loaders.cxx:162
void SetSpillCut(const SpillCut &cut)
Definition: Loaders.cxx:121
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
Definition: Calcs.cxx:97
const Cut kNumuND
Definition: NumuCuts.h:55
const Cut kNus17ND
Full Nus17 ND analysis selection.
Definition: NusCuts17.h:120
const HistAxis kNus17Axis("Visible Energy (GeV)", kNus17EnergyBinning, kNus17Energy)
Axes used in Nus17 analysis by nus group.
Definition: HistAxes.h:12
void MakeNus17PredictionSysts(std::string outfile)
const SystShifts kNoShift
Definition: SystShifts.cxx:21
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
const std::string fFDmcDECAF
Definition: NusLoadProd3.h:43
std::vector< Loaders * > loaders
Definition: syst_header.h:386
const Cut kNus17FDAlt
Definition: NusCuts17.h:92
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const Var kXSecCVWgt2017
Definition: XsecTunes.h:37
const HistAxis kNus17BinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNus17EnergyBinning, kCCE)
Definition: HistAxes.h:13
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
const std::string fFDswapDECAF
Definition: NusLoadProd3.h:45
FILE * outfile
Definition: dump_event.C:13