11 #include "TObjString.h" 24 {-2, -1, 0, +1, +2},
false);
27 {-2, -1, 0, +1, +2},
false);
33 {-2, -1, 0, +1, +2},
false);
36 {-2, -1, 0, +1, +2},
false);
39 {-2, -1, 0, +1, +2},
false);
42 {-2, -1, 0, +1, +2},
false);
45 {-2, -1, 0, +1, +2},
false);
48 {-2, -1, 0, +1, +2},
false);
51 {-2, -1, 0, +1, +2},
false);
54 {-2, -1, 0, +1, +2},
false);
56 "SumSmallXSecJoint2017",
57 {-2, -1, 0, +1, +2},
false);
78 {-2, -1, 0, +1, +2},
false);
81 {-2, -1, 0, +1, +2},
false);
84 {-2, -1, 0, +1, +2},
false);
87 {-2, -1, 0, +1, +2},
false);
90 {-2, -1, 0, +1, +2},
false);
92 "Combined Beam Transport",
93 {-2, -1, 0, +1, +2},
false);
96 "Nue Signal Extrapolation",
97 {-2, -1, 0, +1, +2},
false);
99 "Nue Bkg Extrapolation",
100 {-2, -1, 0, +1, +2},
false);
116 const std::vector<const DummyNue2017Syst*>&
systs,
135 fPredNom = LoadFromFile<IPrediction>
136 (
fname, extrapStr +
"Nominal/noShift" + varname);
137 nom = LoadFromFile<IPrediction>
138 (
fname, extrapStr +
"Nominal/noShift" + varname).
release();
144 (
fname, extrapStr +
"Nominal/noShift" + varname).
release();
146 (
fname,
"pred_nxp_Nominal/noShift" + varname).
release();
147 fPredNom = std::unique_ptr<PredictionExtendToPeripheral>
159 nomLightLevel = LoadFromFile<IPrediction>(
fname, extrapStr +
"Lightlevel/noShift"+
164 (
fname, extrapStr +
"Lightlevel/noShift"+varname).
release();
185 for(
int sigma: syst->Shifts()){
189 if (systName ==
"Lightlevel" || systName ==
"Cherenkov") {
190 std::cout <<
"\tLooking at systName " << systName
191 <<
", so pushing back nomLightLevel " <<
std::endl;
192 sp.
preds.push_back(nomLightLevel);
194 sp.
preds.push_back(nom);
200 if(
sigma == -2) sigmaStr +=
"minusTwo";
201 if(
sigma == -1) sigmaStr +=
"minusOne";
202 if(
sigma == +1) sigmaStr +=
"plusOne";
203 if(
sigma == +2) sigmaStr +=
"plusTwo";
207 auto shCore = LoadFromFile<PredictionExtrap>
208 (
fname, extrapStr + systName + sigmaStr +varname).
release();
209 auto shNoExtrap = LoadFromFile<PredictionNoExtrap>
210 (
fname,
"pred_nxp_" + systName + sigmaStr +varname).
release();
232 const int nBins = h->GetNbinsX();
237 const double normBothSyst = 3.5/100;
238 const double normBkgSyst = 3.5/100;
239 const double normSigSyst = 3.5/100;
243 if(std::count_if(systs.begin(), systs.end(),
244 [](
const ISyst*
s){
return s->ShortName() ==
"nue2017NormBoth";})){
251 for(
int binIdx = 0; binIdx < nBins+2; ++binIdx){
261 if(std::count_if(systs.begin(), systs.end(),
262 [](
const ISyst*
s){
return s->ShortName() ==
"nue2017NueNormBkg";})){
269 for(
int binIdx = 0; binIdx < nBins+2; ++binIdx){
279 if(std::count_if(systs.begin(), systs.end(),
280 [](
const ISyst*
s){
return s->ShortName() ==
"nue2017NueNormSig";})){
287 for(
int binIdx = 0; binIdx < nBins+2; ++binIdx){
299 dir = dir->GetDirectory(name.c_str());
302 TObjString*
tag = (TObjString*)dir->Get(
"type");
305 assert(tag->GetString() ==
"PredictionSystNue2017");
324 TDirectory*
tmp = gDirectory;
326 dir = dir->GetDirectory(name.c_str());
329 TObjString(
"PredictionSystNue2017").Write((name+
"/type").c_str());
const DummyNue2017Syst kNue2017NormSystSig("nue2017NueNormSig","Sig. Norm.",{0,+1}, false)
const DummyNue2017Syst kNue2017CherenkovSyst("nue2017Cherenkov","Cherenkov",{0,+1}, false)
Implements systematic errors by interpolation between shifted templates.
Cuts and Vars for the 2020 FD DiF Study.
const DummyNue2017Syst kNue2017PPFXPC04Syst("nue2017ppfx_pc04","PPFXPC04",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017NormSystBkg("nue2017NueNormBkg","Bkg. Norm.",{0,+1}, false)
std::string systName
What systematic we're interpolating.
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
void AddNormSysts(const std::vector< const DummyNue2017Syst * > &systs)
const DummyNue2017Syst kNue2017MaNCRESSyst("nue2017MaNCRES","MaNCRES",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017ExtrapSigSyst("nue2017extrap_signalkin","Nue Signal Extrapolation",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017MaCCRESSyst("nue2017MaCCRES","MaCCRES",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017ExtrapBkgSyst("nue2017extrap_bkg","Nue Bkg Extrapolation",{-2,-1, 0,+1,+2}, false)
General interface to oscillation calculators.
const DummyNue2017Syst kNue2017BeamTransportSyst("nue2017beamTransportComb","Combined Beam Transport",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017MvCCRESSyst("nue2017MvCCRES","MvCCRES",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017PPFXPC02Syst("nue2017ppfx_pc02","PPFXPC02",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017CalibShapeSyst("nue2017CalibShape","CalibShape",{0,+1}, false)
Encapsulate code to systematically shift a caf::SRProxy.
const DummyNue2017Syst kNue2017NormSystBoth("nue2017NormBoth","Sig+Bkg Norm.",{0,+1}, false)
const DummyNue2017Syst kNue2017RPAShapeRESSyst("nue2017RPAShapeRES","RPAShapeRES",{0,+1,+2}, false)
std::unique_ptr< IPrediction > fPredNom
The nominal prediction.
const DummyNue2017Syst kNue2017RadCorrNueBarSyst("nue2017radcorrnuebar","RadCorrNueBar",{-2,-1, 0,+1,+2}, false)
Loads shifted spectra from files.
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
const DummyNue2017Syst kNue2017LightLevelSyst("nue2017Lightlevel","LightLevel",{-1, 0,+1}, false)
std::vector< double > shifts
Shift values sampled.
virtual ~PredictionSystNue2017()
const DummyNue2017Syst kNue2017DISvnCC1piSyst("nue2017DISvnCC1pi","DISvnCC1pi",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017PPFXPC00Syst("nue2017ppfx_pc00","PPFXPC00Sys",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017AbsCalibSyst("nue2017Calibration","AbsCalib",{-1, 0,+1}, false)
const DummyNue2017Syst kNue2017MECq0ShapeSyst("nue2017MECq0Shape","MECq0Shape",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017PPFXPC01Syst("nue2017ppfx_pc01","PPFXPC01",{-2,-1, 0,+1,+2}, false)
std::vector< IPrediction * > preds
const DummyNue2017Syst kNue2017RelCalibSyst("nue2017RelativeCalib","RelCalib",{-2, 0,+2}, false)
double coeff(double W, int m, int l, bool real)
Oscillation probability calculators.
const DummyNue2017Syst kNue2017SecondClassCurrSyst("nue20172ndclasscurr","SecondClassCurr",{-2,-1, 0,+1,+2}, false)
virtual _IOscCalc * Copy() const =0
const DummyNue2017Syst kNue2017RadCorrNueSyst("nue2017radcorrnue","RadCorrNue",{-2,-1, 0,+1,+2}, false)
Spectrum Predict(osc::IOscCalc *calc) const override
static std::unique_ptr< PredictionSystNue2017 > LoadFrom(TDirectory *dir, const std::string &name)
REGISTER_LOADFROM("BENDecomp", IDecomp, BENDecomp)
void SaveTo(TDirectory *dir, const std::string &name) const override
assert(nhit_max >=nhit_nbins)
const DummyNue2017Syst kNue2017MaCCQE_reducedSyst("nue2017MaCCQE_reduced","MaCCQE_reduced",{-2,-1, 0,+1,+2}, false)
Standard interface to all prediction techniques.
const DummyNue2017Syst kNue2017PPFXPC03Syst("nue2017ppfx_pc03","PPFXPC03",{-2,-1, 0,+1,+2}, false)
std::unordered_map< const ISyst *, ShiftedPreds > fPreds
osc::IOscCalc * fOscOrigin
The oscillation values we assume when evaluating the coefficients.
static void LoadFromBody(TDirectory *dir, PredictionInterp *ret, std::vector< const ISyst * > veto={})
const DummyNue2017Syst kNue2017AllSmallXSecSyst("nue2017SumSmallXSecJoint2017","SumSmallXSecJoint2017",{-2,-1, 0,+1,+2}, false)
const DummyNue2017Syst kNue2017RPAShapeEnhSyst("nue2017RPAShapeenh","RPAShapeEnh",{-2,-1, 0,+1,+2}, false)
std::vector< std::vector< std::vector< Coeffs > > > fits
Indices: [type][histogram bin][shift bin].