9 #include "CAFAna/Decomp/NueDecomp100Dn.h" 10 #include "CAFAna/Decomp/NueDecomp100Up.h" 13 #include "CAFAna/Extrap/ExtrapSterile.h" 46 std::map<std::string, std::string> shiftlabels;
47 shiftlabels[
"NC"] =
"NC";
48 shiftlabels[
"Numu"] =
"Numu";
49 shiftlabels[
"NueUp"] =
"NueUp";
50 shiftlabels[
"NueDn"] =
"NueDn";
53 std::map<std::string, std::vector<IDecomp*> > systematics;
57 std::string labelRecoE =
"Calorimetric Energy (GeV)";
58 std::map<std::string, std::pair<HistAxis*, std::pair<Cut*, Cut*> > > cut_samples;
60 cut_samples[
"Ana01"] = std::pair<HistAxis*, std::pair<Cut*, Cut*> >(
68 std::map<std::string, IDecomp*> decomps_nominal;
69 std::map<std::string, std::map<std::string, std::map<int, IDecomp*> > > decomps_shifted;
70 std::map<std::string, PredictionNoExtrap*> predsNE_nominal;
71 std::map<std::string, std::map<std::string, std::map<int, PredictionNoExtrap*> > > predsNE_shifted;
72 std::map<std::string, PredictionSterile*> predsSt_nominal;
73 std::map<std::string, std::map<std::string, std::map<int, PredictionSterile*> > > predsSt_shifted;
82 for(
const auto& sample : cut_samples) {
85 *sample.second.second.second, *sample.second.second.first,
92 &loaders, *sample.second.first, *sample.second.second.first,
"",
97 *sample.second.first, *sample.second.second.second,
106 for(
const auto& shiftlabel : shiftlabels) {
107 decomps_shifted[sample.first][shiftlabel.first][1] =
MakeDecomp(
108 &loaders, *sample.second.first, *sample.second.second.first, shiftlabel.first,
112 loaders, *sample.second.first, *sample.second.second.second,
117 &loaders, *sample.second.first, *sample.second.second.first, shiftlabel.first,
125 loaders, *decompnc, *decompnm,
127 *sample.second.second.second, *sample.second.second.first,
kNumuND,
130 predsSt_shifted[sample.first][shiftlabel.first][1] =
140 std::string fullLocation = folder + filenm +
".root";
141 TFile* rootF =
new TFile(fullLocation.c_str(),
"RECREATE");
144 decomps_nominal, decomps_shifted,
145 predsNE_nominal, predsNE_shifted,
146 predsSt_nominal, predsSt_shifted
155 if(shiftlabel.compare(
"NC") == 0) {
162 if(shiftlabel.compare(
"Numu") == 0) {
169 if(shiftlabel.compare(
"NueUp") == 0) {
170 return new NueDecomp100Up(
176 if(shiftlabel.compare(
"NueDn") == 0) {
177 return new NueDecomp100Dn(
Near Detector underground.
_HistAxis< Var > HistAxis
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
const std::string fnametau_concat
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.
const SpillCut kOnly14DB([](const caf::SRSpillProxy *spill){if(spill->det!=caf::kFARDET) return true;std::bitset< 14 > binary(spill->dibmask);for(int i=0;i< 14;++i){if(!binary[i]) return false;}return true;})
const std::string fnamenear_concat
void SetSpillCut(const SpillCut &cut)
Uses MC for NC and CC components, assigns remainder of data to CC.
const std::string fnameneardata_concat
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
SpectrumLoaderBase & GetLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Retrieve a specific loader.
_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)
IDecomp * MakeDecomp(Loaders *loaders, const HistAxis &axis, const Cut &cut, std::string shiftlabel, const SystShifts &kMCShift=kNoShift, const Var &wei=kUnweighted)
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.
const std::string fnameswap_concat
const std::string fnamefar_concat
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.