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))
72 std::map<std::string, std::pair<Loaders*, Loaders*> > systematics;
73 systematics[
"CalFlatDownND"] =
std::make_pair(loaders_down, loaders_nom);
74 systematics[
"CalFlatUpND"] =
std::make_pair(loaders_up, loaders_nom);
75 systematics[
"CalFlatDownFD"] =
std::make_pair(loaders_nom, loaders_down);
76 systematics[
"CalFlatUpFD"] =
std::make_pair(loaders_nom, loaders_up);
81 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
87 std::map<std::string, NDPredictionSterile*> predsND_nominal;
88 std::map<std::string, FDPredictionSterile*> predsFD_nominal;
89 std::map<std::string, PredictionSterile*> predsExtrap_nominal;
90 std::map<std::string, std::map<std::string, std::map<int, NDPredictionSterile*> > > predsND_shifted;
91 std::map<std::string, std::map<std::string, std::map<int, FDPredictionSterile*> > > predsFD_shifted;
92 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsExtrap_shifted;
99 for(
const auto& sample : cut_samples) {
107 *sample.second.second.second, *sample.second.second.first,
119 for (
const auto& syst : systematics) {
120 predsND_shifted[sample.first][syst.first][1]
122 predsFD_shifted[sample.first][syst.first][1]
125 predsExtrap_shifted[sample.first][syst.first][1]
141 std::string fullLocation = folder + filenm +
".root";
142 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
143 SaveMaps(rootF, predsND_nominal, predsND_shifted);
144 SaveMaps(rootF, predsFD_nominal, predsFD_shifted);
146 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
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 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
void Nus18SystsCalibRelLoad(TString opt)
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.