5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
17 for(
int i = 0; i < 3; ++i)
delete fScale[i];
24 if( slc->truth.initpdg != 14)
return;
27 TFile f((
FindCAFAnaDir() +
"/Systs/booster_flux_shifts.root").c_str());
28 assert(!f.IsZombie());
30 for(
int det = 0; det < 3; ++det){
32 if(det == 0) detStr =
"nd";
33 if(det == 1) detStr =
"ub";
34 if(det == 2) detStr =
"fd";
38 h = (TH1*)f.Get(TString::Format(
"syst%d/%s_numu",
fIdx, detStr.c_str()).
Data());
47 const double L = slc->truth.baseline;
49 else if(L < 500) det = 1;
55 const int bin = h->FindBin(slc->truth.E);
57 if(bin == 0 || bin == h->GetNbinsX()+1)
return;
59 weight *=
exp(sigma*h->GetBinContent(bin));
66 static std::vector<const BoosterFluxHadronSyst*> cache;
68 if(i >= cache.size()) cache.resize(i+1);
79 for(
unsigned int i = 0; i <
N; ++i)
virtual ~BoosterFluxHadronSyst()
const BoosterFluxHadronSyst * GetBoosterFluxHadronSyst(unsigned int i)
void Shift(double sigma, caf::SRSliceProxy *slc, double &weight) const override
Perform the systematic shift.
process_name opflashCryoW ana
std::string FindCAFAnaDir()
caf::Proxy< caf::SRSlice > SRSliceProxy
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
BoosterFluxHadronSystVector GetBoosterFluxHadronSysts(unsigned int N)
process_name largeant stream1 can override from command line with o or output physics producers generator N
std::string UniqueName()
Return a different string each time, for creating histograms.