44 if (opt.Contains(
"caf", TString::kIgnoreCase))
46 else if (opt.Contains(
"concat", TString::kIgnoreCase))
52 if (opt.Contains(
"fhc", TString::kIgnoreCase))
54 else if (opt.Contains(
"rhc", TString::kIgnoreCase))
60 if (opt.Contains(
"extrap", TString::kIgnoreCase))
68 const std::vector<int> sigmas{-1, +1};
71 std::map<std::string, std::string> shiftLabels;
72 shiftLabels[
"Tau"] =
"Tau";
77 std::map<std::string, std::map<int, const Var*> > systematics;
78 systematics[
"Tau"][-1] = &kTauM;
79 systematics[
"Tau"][+1] = &kTauP;
84 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
90 std::map<std::string, NDPredictionSterile*> predsND_nominal;
91 std::map<std::string, FDPredictionSterile*> predsFD_nominal;
92 std::map<std::string, PredictionSterile*> predsExtrap_nominal;
93 std::map<std::string, std::map<std::string, std::map<int, NDPredictionSterile*> > > predsND_shifted;
94 std::map<std::string, std::map<std::string, std::map<int, FDPredictionSterile*> > > predsFD_shifted;
95 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsExtrap_shifted;
104 for (
const auto& sample : cut_samples) {
111 *sample.second.second.second, *sample.second.second.first,
126 for(
const auto& shiftLabel : shiftLabels) {
127 for(
const auto& syst : systematics[shiftLabel.first]) {
137 *sample.second.second.second, *sample.second.second.first,
146 predsExtrap_shifted[sample.first][shiftLabel.first][syst.first]
150 delete genExtrap_tau;
162 std::string fullLocation = folder + filenm +
".root";
163 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
167 SaveMaps(rootF, predsExtrap_nominal, predsExtrap_shifted);
Cuts and Vars for the 2020 FD DiF Study.
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
Collection of SpectrumLoaders for many configurations.
void SaveMaps(TDirectory *out, std::map< std::string, IDecomp * > decomps_nominal, std::map< std::string, std::map< std::string, std::map< int, IDecomp * > > > decomps_shifted, std::map< std::string, PredictionNoExtrap * > predsNE_nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionNoExtrap * > > > predsNE_shifted, std::map< std::string, PredictionSterile * > predsSt_nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionSterile * > > > predsSt_shifted)
Save all of the objects in the input maps to the out directory/file.
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Generates extrapolated NC predictions using ProportionalDecomp.
const HistAxis kNus18AxisE("Energy Deposited in Scintillator (GeV)", kNus18EnergyBinning, kNus18Energy)
Axes used in Nus18 analysis by nus group.
void Go()
Call Go() on all the loaders.
void SetSpillCut(const SpillCut &cut)
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
const Cut kNus18ND
Full Nus18 ND analysis selection.
const SystShifts kNoShift
void Nus18SystsTauLoad(TString opt)
Run systematics for Tau scale.
A prediction object compatible with sterile oscillations.
const HistAxis kNus18BinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNus18EnergyBinning, kCCE)
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
For nominal spectra and reweighting systs (xsec/flux)