#include <SBNWeightSysts.h>
Definition at line 33 of file SBNWeightSysts.h.
ana::SBNWeightSyst::SBNWeightSyst |
( |
const std::string & |
systName | ) |
|
Definition at line 47 of file SBNWeightSysts.cxx.
48 :
ISyst(systName, systName),
ISyst(const std::string &shortName, const std::string &latexName, bool applyPenalty=true, double min=-3, double max=+3)
Definition at line 73 of file SBNWeightSysts.cxx.
76 if(it !=
fUnivs.end())
return it->second;
97 u.w0 = (x1-
x)/(x1-x0);
98 u.w1 = (
x-x0)/(x1-x0);
105 if(u.i0 == -1){u.i0 = u.i1; u.w0 = u.w1 = 0.5;}
106 if(u.i1 == -1){u.i1 = u.i0; u.w0 = u.w1 = 0.5;}
process_name opflash particleana ie x
std::unordered_map< double, Univs > fUnivs
static UniverseOracle & Instance()
virtual std::string ShortName() const final
The name printed out to the screen.
unsigned int ClosestShiftIndex(const std::string &name, double shift, ESide side=ESide::kEither, double *trueShift=0) const
Within that entry, which index corresponds most closely to 'shift'?
void ana::SBNWeightSyst::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 54 of file SBNWeightSysts.cxx.
56 if(sr->truth.index < 0)
return;
60 const caf::Proxy<std::vector<caf::SRMultiverse>>& wgts = sr->truth.wgt;
61 if(wgts.empty())
return;
66 if(u.w0 != 0) y += u.w0 * wgts[
fIdx].univ[u.i0];
67 if(u.w1 != 0) y += u.w1 * wgts[
fIdx].univ[u.i1];
unsigned int SystIndex(const std::string &name) const
Which index in the weights array corresponds to the shifting of just this syst (in any parameter set)...
process_name opflash particleana ie x
static UniverseOracle & Instance()
virtual std::string ShortName() const final
The name printed out to the screen.
process_name opflash particleana ie ie y
Univs GetUnivs(double x) const
int ana::SBNWeightSyst::fIdx |
|
mutableprotected |
std::unordered_map<double, Univs> ana::SBNWeightSyst::fUnivs |
|
mutableprotected |
The documentation for this class was generated from the following files: