18 #include "CAFAna/Extrap/ExtrapSterile.h" 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))
74 std::map<std::string, Loaders*> systematics;
75 systematics[
"CalFlatUp"] = loaders_up;
76 systematics[
"CalFlatDown"] = loaders_down;
77 systematics[
"CalShape"] = loaders_shape;
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;
100 for(
const auto& sample : cut_samples) {
108 *sample.second.second.second, *sample.second.second.first,
120 for (
const auto& syst : systematics) {
121 predsND_shifted[sample.first][syst.first][1]
123 predsFD_shifted[sample.first][syst.first][1]
126 predsExtrap_shifted[sample.first][syst.first][1]
143 std::string fullLocation = folder + filenm +
".root";
144 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
145 SaveMaps(rootF, predsND_nominal, predsND_shifted);
146 SaveMaps(rootF, predsFD_nominal, predsFD_shifted);
148 SaveMaps(rootF, predsExtrap_nominal, predsExtrap_shifted);
void Nus18SystsCalibAbsLoad(TString opt)
Cuts and Vars for the 2020 FD DiF Study.
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
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.
Loaders for calibration shape paths/definitions.
Loaders for absolute calibration paths/definitions.
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.
Take the output of an extrapolation and oscillate it as required.
const SystShifts kNoShift
A prediction object compatible with sterile oscillations.
const HistAxis kNus18BinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNus18EnergyBinning, kCCE)
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
Take the output of an extrapolation and oscillate it as required.
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
For nominal spectra and reweighting systs (xsec/flux)
Generates Near Detector predictions.