37 using std::ostringstream;
77 if (systs.size() > 0) predInterp =
new PredictionInterp(systs, calc, *gen, loaders);
81 ostringstream outFileName;
82 outFileName <<
"pred_" << sample.GetTag();
83 if (res!=0) outFileName <<
"_res" << (
int)res;
84 outFileName <<
".root";
85 TFile*
outFile = TFile::Open(outFileName.str().c_str(),
"recreate");
86 TDirectory* predDir = outFile->mkdir(sample.GetTag().c_str());
89 pred->SaveTo(predDir,
"pred");
90 if (predInterp) predInterp->
SaveTo(predDir,
"pred_interp");
93 cout <<
endl <<
"Exception occurred! " << e.what() <<
endl;
Implements systematic errors by interpolation between shifted templates.
Cuts and Vars for the 2020 FD DiF Study.
void MakePrediction(TString opt, string systFile="default", double res=0)
vector< const ISyst * > getNusAna2020AllSysts(covmx::Sample &s)
Adapt the PMNS_Sterile calculator to standard interface.
::xsd::cxx::tree::exception< char > exception
void SetCut(covmx::Sample &sample)
covmx::Sample GetSampleFromOptString(TString optString)
Function to take an option TString and return a single associated covmx::Sample.
void Go()
Call Go() on all the loaders.
void SetAxis(TH1 *h, bool visible, int color, int style=1, bool scale=true)
void SetSpillCut(const SpillCut &cut)
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
For nominal spectra and reweighting systs (xsec/flux)
const SystShifts kNoShift
Standard interface to all prediction techniques.
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
Given loaders and an MC shift, Generate() generates an IPrediction.
Prevent histograms being added to the current directory.
Generates Near Detector predictions.