#include <BoosterFluxSysts.h>
Definition at line 11 of file BoosterFluxSysts.h.
ana::BoosterFluxHadronSyst::~BoosterFluxHadronSyst |
( |
| ) |
|
|
virtual |
ana::BoosterFluxHadronSyst::BoosterFluxHadronSyst |
( |
int |
i | ) |
|
|
inlineprotected |
Definition at line 21 of file BoosterFluxSysts.h.
22 :
ISyst(TString::Format(
"booster_%i", i).
Data(),
23 TString::Format(
"Booster flux hadron syst #%i", i).
Data()),
ISyst(const std::string &shortName, const std::string &latexName, bool applyPenalty=true, double min=-3, double max=+3)
void ana::BoosterFluxHadronSyst::Shift |
( |
double |
sigma, |
|
|
caf::SRSliceProxy * |
sr, |
|
|
double & |
weight |
|
) |
| const |
|
overridevirtual |
Perform the systematic shift.
- Parameters
-
sigma | Number of sigma to shift record by |
sr | The record to inspect and alter |
weight | Scale this weight for reweighting systematics |
Implements ana::ISyst.
Definition at line 21 of file BoosterFluxSysts.cxx.
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));
std::string FindCAFAnaDir()
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
std::string UniqueName()
Return a different string each time, for creating histograms.
Definition at line 63 of file BoosterFluxSysts.cxx.
66 static std::vector<const BoosterFluxHadronSyst*> cache;
68 if(i >= cache.size()) cache.resize(i+1);
BoosterFluxHadronSyst(int i)
int ana::BoosterFluxHadronSyst::fIdx |
|
protected |
TH1* ana::BoosterFluxHadronSyst::fScale[3] |
|
mutableprotected |
The documentation for this class was generated from the following files: