18 #include "CAFAna/Extrap/ExtrapSterile.h" 45 if (opt.Contains(
"caf", TString::kIgnoreCase))
47 else if (opt.Contains(
"concat", TString::kIgnoreCase))
53 if (opt.Contains(
"fhc", TString::kIgnoreCase))
55 else if (opt.Contains(
"rhc", TString::kIgnoreCase))
61 if (opt.Contains(
"extrap", TString::kIgnoreCase))
69 std::map<std::string, std::string> shiftLabels;
70 shiftLabels[
"Kaon"] =
"Kaon";
75 std::map<std::string, std::map<int, const Var*> > systematics;
76 systematics[
"Kaon"][-1] = &kKaonM;
77 systematics[
"Kaon"][+1] = &kKaonP;
82 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
88 std::map<std::string, NDPredictionSterile*> predsND_nominal;
89 std::map<std::string, FDPredictionSterile*> predsFD_nominal;
90 std::map<std::string, PredictionSterile*> predsExtrap_nominal;
91 std::map<std::string, std::map<std::string, std::map<int, NDPredictionSterile*> > > predsND_shifted;
92 std::map<std::string, std::map<std::string, std::map<int, FDPredictionSterile*> > > predsFD_shifted;
93 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsExtrap_shifted;
102 for (
const auto& sample : cut_samples) {
109 *sample.second.second.second, *sample.second.second.first,
147 for(
const auto& shiftLabel : shiftLabels) {
148 for(
const auto& syst : systematics[shiftLabel.first]) {
158 *sample.second.second.second, *sample.second.second.first,
189 predsExtrap_shifted[sample.first][shiftLabel.first][syst.first]
206 std::string fullLocation = folder + filenm +
".root";
207 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
211 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
const Var kNus18BeamWeightM
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 Var kNus18BeamWeightP
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.
void Nus18SystsKaonLoad(TString opt)
Run systematics for Kaons.
const Cut kNus18ND
Full Nus18 ND analysis selection.
const SystShifts kNoShift
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)