9 #include "CAFAna/Extrap/ExtrapSterile.h" 36 std::string fnear=
"prod_caf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1";
37 std::string ffar =
"prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1";
38 std::string fswap=
"prod_caf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1";
39 std::string ftau=
"prod_caf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1";
40 std::string fnameneardata_con=
"prod_caf_R17-03-01-prod3reco.d_nd_numi_fhc_full_v1_goodruns";
54 std::map<std::string, std::string> shiftlabels;
55 shiftlabels[
"ND1"] =
"ND1";
56 shiftlabels[
"ND2"] =
"ND2";
57 shiftlabels[
"ND3"] =
"ND3";
58 shiftlabels[
"ND4"] =
"ND4";
60 const Cut kNDFirstBlock(
73 const Cut kNDSecondBlock(
86 const Cut kNDThirdBlock(
99 const Cut kNDFourthBlock(
115 std::map<std::string, Cut*> systematics;
116 systematics[
"ND1"] =
new Cut(kNDFirstBlock);
117 systematics[
"ND2"] =
new Cut(kNDSecondBlock);
118 systematics[
"ND3"] =
new Cut(kNDThirdBlock);
119 systematics[
"ND4"] =
new Cut(kNDFourthBlock);
125 std::string labelRecoE =
"Energy Deposited in Scintillator (GeV)";
126 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
128 cut_samples[
"Ana01"] = std::pair<HistAxis*, std::pair<Cut*, Cut*> >(
137 std::map<std::string, IDecomp*> decomps_nominal;
138 std::map<std::string, std::map<std::string, std::map<int, IDecomp*> > > decomps_shifted;
139 std::map<std::string, PredictionNoExtrap*> predsNE_nominal;
140 std::map<std::string, std::map<std::string, std::map<int, PredictionNoExtrap*> > > predsNE_shifted;
141 std::map<std::string, PredictionSterile*> predsSt_nominal;
142 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsSt_shifted;
151 for(
const auto& sample : cut_samples) {
154 *sample.second.second.second, *sample.second.second.first,
162 *sample.second.first, *sample.second.second.first,
167 *FDAxis, *sample.second.second.second,
176 for(
const auto& shiftlabel : shiftlabels) {
177 decomps_shifted[sample.first][shiftlabel.first][1] =
new CheatDecomp(
179 *sample.second.first, *sample.second.second.first && *systematics[shiftlabel.first],
184 *FDAxis, *sample.second.second.second,
190 *sample.second.second.second,
191 *sample.second.second.first && *systematics[shiftlabel.first],
192 kNumuND && *systematics[shiftlabel.first],
195 predsSt_shifted[sample.first][shiftlabel.first][1] =
205 std::string fullLocation = folder + filenm +
".root";
206 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
209 decomps_nominal, decomps_shifted,
210 predsNE_nominal, predsNE_shifted,
211 predsSt_nominal, predsSt_shifted
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
Proxy for caf::StandardRecord.
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.
caf::Proxy< caf::SRElastic > elastic
void SetSpillCut(const SpillCut &cut)
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.
const SystShifts kNoShift
const HistAxis kNCBinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNCDisappearanceEnergyBinning, kCCE)
caf::Proxy< bool > IsValid
caf::Proxy< caf::SRVector3D > vtx
A prediction object compatible with sterile oscillations.
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
caf::Proxy< caf::SRVertexBranch > vtx
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Just return the ND truth spectra as the decomposition.
void SystsAcceptanceLoad17()
const Binning kNCDisappearanceEnergyBinning
Energy binnings used in Ana01 for nus extrapolation.