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))
73 std::map<std::string, Loaders*> systematics;
74 systematics[
"NoShift"] = loaders_ll;
79 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
85 std::map<std::string, NDPredictionSterile*> predsND_nominal;
86 std::map<std::string, FDPredictionSterile*> predsFD_nominal;
87 std::map<std::string, PredictionSterile*> predsExtrap_nominal;
88 std::map<std::string, std::map<std::string, std::map<int, NDPredictionSterile*> > > predsND_shifted;
89 std::map<std::string, std::map<std::string, std::map<int, FDPredictionSterile*> > > predsFD_shifted;
90 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsExtrap_shifted;
97 for(
const auto& sample : cut_samples) {
105 *sample.second.second.second, *sample.second.second.first,
117 for (
const auto& syst : systematics) {
118 predsND_shifted[sample.first][syst.first][1]
120 predsFD_shifted[sample.first][syst.first][1]
123 predsExtrap_shifted[sample.first][syst.first][1]
137 std::string fullLocation = folder + filenm +
".root";
138 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
139 SaveMaps(rootF, predsND_nominal, predsND_shifted);
140 SaveMaps(rootF, predsFD_nominal, predsFD_shifted);
142 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.
std::string GetLoaderPath(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap) const
void SetSpillCut(const SpillCut &cut)
Loaders for light level paths/definitions.
_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 Nus18SystsLLMethodLoad(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.
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.