54 std::map<std::string, std::vector<const ISyst*> > systmap;
55 systmap[
"Beam"] = std::vector<const ISyst*>();
56 systmap[
"Birks"] = std::vector<const ISyst*>();
57 systmap[
"Calib"] = std::vector<const ISyst*>();
58 systmap[
"DataMC"] = std::vector<const ISyst*>();
59 systmap[
"GENIE"] = std::vector<const ISyst*>();
60 systmap[
"NDCont"] = std::vector<const ISyst*>();
61 systmap[
"NDRock"] = std::vector<const ISyst*>();
62 systmap[
"Norm"] = std::vector<const ISyst*>();
63 systmap[
"OscParam"] = std::vector<const ISyst*>();
64 systmap[
"Stats"] = std::vector<const ISyst*>();
78 systmap[
"OscParam"].push_back(&NusOscParamSyst);
85 std::map<std::string, PredictionInterp*> pred123bs;
86 std::map<std::string, PredictionInterp*> pred3c3ds;
87 std::map<std::string, PredictionCombinePeriods*> preds;
89 for(
const auto& syst : systmap) {
92 pred123bs[axlabel] =
new PredictionInterp(syst.second, calc, gen, loaders123b);
93 pred3c3ds[axlabel] =
new PredictionInterp(syst.second, calc, gen, loaders3c3d);
117 for(
const auto& syst : systmap) {
132 TFile* rootF =
new TFile(outfile.c_str(),
"RECREATE");
135 TDirectory*
tmp = gDirectory;
136 TDirectory* saveDir = gDirectory;
140 for(
const auto& syst : systmap) {
143 dir =
"pred123b" + sep + axlabel;
144 saveDir = rootF->mkdir(dir.c_str());
145 pred123bs[axlabel]->SaveTo(saveDir);
147 dir =
"pred3c3d" + sep + axlabel;
148 saveDir = rootF->mkdir(dir.c_str());
149 pred3c3ds[axlabel]->SaveTo(saveDir);
151 dir =
"pred" + sep + axlabel;
152 saveDir = rootF->mkdir(dir.c_str());
153 preds[axlabel]->SaveTo(saveDir);
157 saveDir = rootF->mkdir(
"pred123b");
158 pred123b->
SaveTo(saveDir);
159 saveDir = rootF->mkdir(
"pred3c3d");
160 pred3c3d->
SaveTo(saveDir);
161 saveDir = rootF->mkdir(
"pred");
162 pred->SaveTo(saveDir);
163 saveDir = rootF->mkdir(
"sCosmic");
165 saveDir = rootF->mkdir(
"sCosOOT");
167 saveDir = rootF->mkdir(
"sData");
Near Detector underground.
Implements systematic errors by interpolation between shifted templates.
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
const double kSecondAnaPeriod2POT
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
const NusFlatSyst kNusNDContSyst("ndcont","ND Containment", 1.0, 0.6)
Collection of SpectrumLoaders for many configurations.
const double kSecondAnaEpoch3dPOT
const double kSecondAnaEpoch3bPOT
Adapt the PMNS_Sterile calculator to standard interface.
const std::vector< std::string > fFDMC_non
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
void SetSpillCut(const SpillCut &cut)
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
const double kSecondAnaPeriod1POT
Generates extrapolated NC predictions using ProportionalDecomp.
const NusSystFromHist kNusCalibFlatSyst(kNusAna01SystFile,"EX","CalFlat","Flat Miscalibration")
Representation of a spectrum in any variable, with associated POT.
void Go()
Call Go() on all the loaders.
const Cut kInTimingSideband([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return(kInTimingSideband_before(sr)|| kInTimingSideband_after(sr));else return(kInTimingSideband_before(sr)|| kInTimingSideband_afterA(sr)|| kInTimingSideband_afterB(sr));}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return(kInTimingSideband_before.Livetime(spill)+ kInTimingSideband_after.Livetime(spill));else return(kInTimingSideband_before.Livetime(spill)+ kInTimingSideband_afterA.Livetime(spill)+ kInTimingSideband_afterB.Livetime(spill));}, [](const caf::SRSpillProxy *spill){return 0;})
const NusSystFromHist kNusBeamSysts(kNusAna01SystFile,"EX","Beam","All Beam")
const std::string fnamenear_concat
void SetSpillCut(const SpillCut &cut)
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
std::vector< const ISyst * > getAllNusSysts()
Get a vector of all the nus group systs.
const std::string fnameneardata_concat
const std::vector< std::string > fFDMC_swp
const std::string fFDMC_non_3c
const NusSystFromHist kNusBirksSyst(kNusAna01SystFile,"EX","Birks","Birks C")
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
const HistAxis kNCAxis("Calorimetric Energy (GeV)", kNCDisappearanceEnergyBinning, kCaloE)
Axes used in Ana01 analysis by nus group.
const NusFlatSyst kNusMCStatsSyst("mcstat","MC Stats", 2.0, 4.8)
std::vector< float > Spectrum
const NusSystFromHist kNusGENIESmallSysts(kNusAna01SystFile,"EX","GENIESm","Summed small GENIE Systs")
const NusSystFromHist kNusNueCCSyst(kNusAna01SystFile,"EX","NueCC","#nu_{e} CC Background")
const SystShifts kNoShift
void SetLoaderFiles(const std::vector< std::string > &files, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via explicit file list.
const std::string fFDMC_tau_3c
const HistAxis kNCBinsNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNCDisappearanceEnergyBinning, kCCE)
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const NusSystFromHist kNusCalibRelSyst(kNusAna01SystFile,"EX","CalRel","Relative Detector Miscalibration")
const std::vector< std::string > fFDMC_tau
const NusFlatSyst kNusNormSyst("normNus","Normalization", 4.9, 4.9)
const std::string fFDMC_swp_3c
const Cut kInBeamSpill([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return kInBeamSpill_main(sr);else return kInBeamSpill_main(sr)||kInBeamSpill_shifted(sr);}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return kInBeamSpill_main.Livetime(spill);else return kInBeamSpill_main.Livetime(spill)+kInBeamSpill_shifted.Livetime(spill);}, [](const caf::SRSpillProxy *spill) -> double{return spill->spillpot;})
Does the event fall inside the window we call the beam spill?
const NusSystFromHist kNusNDRockSyst(kNusAna01SystFile,"EX","NDNDRock","ND Rock")
A prediction object compatible with sterile oscillations.
const double kSecondAnaEpoch3cPOT
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
Sum MC predictions from different periods scaled according to data POT targets.
const NusSystFromHist kNusCalibSlopeXSyst(kNusAna01SystFile,"EX","CalSlopeX","Sloped Miscalibration, X")
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
const NusSystFromHist kNusCalibSlopeYSyst(kNusAna01SystFile,"EX","CalSlopeY","Sloped Miscalibration, Y")
void FitSystEffectsLoad(std::string outfile)
const NusSystFromHist kNusNumuCCSyst(kNusAna01SystFile,"EX","NumuCC","#nu_{#mu} CC Background")
const std::vector< std::string > fnamefardata_unblind(MakeUnblindList())