11 #include "CAFAna/Extrap/ExtrapSterile.h" 37 std::string fnear=
"defname: prod_caf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1";
38 std::string ffar =
"defname: prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1";
39 std::string fswap=
"defname: prod_caf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1";
40 std::string ftau=
"defname: prod_caf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1";
41 std::string fnameneardata_con=
"defname: prod_caf_R17-03-01-prod3reco.d_nd_numi_fhc_full_v1_goodruns";
53 std::map<std::string, std::string> shiftlabels;
54 shiftlabels[
"NC"] =
"NC";
55 shiftlabels[
"Numu"] =
"Numu";
56 shiftlabels[
"Nue"] =
"Nue";
59 std::map<std::string, std::vector<IDecomp*> > systematics;
64 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
66 cut_samples[
"Ana01"] = std::pair<HistAxis*, std::pair<Cut*, Cut*> >(
75 std::map<std::string, IDecomp*> decomps_nominal;
76 std::map<std::string, std::map<std::string, std::map<int, IDecomp*> > > decomps_shifted;
77 std::map<std::string, PredictionNoExtrap*> predsNE_nominal;
78 std::map<std::string, std::map<std::string, std::map<int, PredictionNoExtrap*> > > predsNE_shifted;
79 std::map<std::string, PredictionSterile*> predsSt_nominal;
80 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsSt_shifted;
89 for(
const auto& sample : cut_samples) {
92 *sample.second.second.second, *sample.second.second.first,
99 &loaders, *sample.second.first, *sample.second.second.first,
"",
104 *FDAxis, *sample.second.second.second,
113 for(
const auto& shiftlabel : shiftlabels) {
114 decomps_shifted[sample.first][shiftlabel.first][1] =
MakeDecomp(
115 &loaders, *sample.second.first, *sample.second.second.first, shiftlabel.first,
119 loaders, *FDAxis, *sample.second.second.second,
124 &loaders, *sample.second.first, *sample.second.second.first, shiftlabel.first,
132 loaders, *decompnc, *decompnm,
134 *sample.second.second.second, *sample.second.second.first,
kNumuND,
137 predsSt_shifted[sample.first][shiftlabel.first][1] =
147 std::string fullLocation = folder + filenm +
".root";
148 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
151 decomps_nominal, decomps_shifted,
152 predsNE_nominal, predsNE_shifted,
153 predsSt_nominal, predsSt_shifted
162 if(shiftlabel.compare(
"NC") == 0) {
169 if(shiftlabel.compare(
"Numu") == 0) {
176 if(shiftlabel.compare(
"Nue") == 0) {
Near Detector underground.
_HistAxis< Var > HistAxis
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
Simple record of shifts applied to systematic parameters.
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.
Generates extrapolated NC predictions using ProportionalDecomp.
void Go()
Call Go() on all the loaders.
Uses MC for CC and CC components, assigns remainder of data to NC.
void SetSpillCut(const SpillCut &cut)
Uses MC for NC and CC components, assigns remainder of data to CC.
Uses MC for CC and NC components, assigns remainder of data to CC.
SpectrumLoaderBase & GetLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Retrieve a specific loader.
const Cut kNus17ND
Full Nus17 ND analysis selection.
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
IDecomp * MakeDecomp(Loaders *loaders, const HistAxis &axis, const Cut &cut, std::string shiftlabel, const SystShifts &kMCShift=kNoShift, const Var &wei=kUnweighted)
const SystShifts kNoShift
const HistAxis kNCBinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNCDisappearanceEnergyBinning, kCCE)
Splits Data proportionally according to MC.
Standard interface to all decomposition techniques.
A prediction object compatible with sterile oscillations.
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
const Binning kNCDisappearanceEnergyBinning
Energy binnings used in Ana01 for nus extrapolation.