Spectrum with true energy information, allowing it to be oscillated More...
#include <OscillatableSpectrum.h>
Public Member Functions | |
OscillatableSpectrum (const std::string &label, const Binning &bins, SpectrumLoaderBase &loader, const Var &var, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted) | |
OscillatableSpectrum (SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted) | |
OscillatableSpectrum (SpectrumLoaderBase &loader, const HistAxis &axis, const SpillCut &spillcut, const SliceCut &slicecut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted) | |
OscillatableSpectrum (const std::string &label, const Binning &bins) | |
OscillatableSpectrum (const std::string &label, double pot, double livetime, const Binning &bins) | |
OscillatableSpectrum (TH2 *h, const std::vector< std::string > &labels, const std::vector< Binning > &bins, double pot, double livetime) | |
OscillatableSpectrum (std::unique_ptr< TH2D > h, const std::vector< std::string > &labels, const std::vector< Binning > &bins, double pot, double livetime) | |
~OscillatableSpectrum () | |
OscillatableSpectrum (const OscillatableSpectrum &rhs) | |
Copy constructor. More... | |
OscillatableSpectrum (OscillatableSpectrum &&rhs) | |
OscillatableSpectrum & | operator= (const OscillatableSpectrum &rhs) |
Assignment operator. More... | |
OscillatableSpectrum & | operator= (OscillatableSpectrum &&rhs) |
Spectrum | Unoscillated () const |
Spectrum | TrueEnergy () const |
Spectrum | Oscillated (osc::IOscCalc *calc, int from, int to) const |
OscillatableSpectrum & | operator+= (const OscillatableSpectrum &rhs) |
OscillatableSpectrum | operator+ (const OscillatableSpectrum &rhs) const |
OscillatableSpectrum & | operator-= (const OscillatableSpectrum &rhs) |
OscillatableSpectrum | operator- (const OscillatableSpectrum &rhs) const |
void | SaveTo (TDirectory *dir) const |
Public Member Functions inherited from ana::ReweightableSpectrum | |
ReweightableSpectrum (SpectrumLoaderBase &loader, const HistAxis &recoAxis, const HistAxis &trueAxis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted) | |
ReweightableSpectrum (SpectrumLoaderBase &loader, const HistAxis &recoAxis, const HistAxis &trueAxis, const SpillCut &spillcut, const SliceCut &slicecut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted) | |
ReweightableSpectrum (const Var &rwVar, const std::string &xlabel, const std::string &ylabel, double pot, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax) | |
ReweightableSpectrum (const Var &rwVar, TH2 *h, const std::vector< std::string > &labels, const std::vector< Binning > &bins, double pot, double livetime) | |
ReweightableSpectrum (const Var &rwVar, std::unique_ptr< TH2D > h, const std::vector< std::string > &labels, const std::vector< Binning > &bins, double pot, double livetime) | |
virtual | ~ReweightableSpectrum () |
ReweightableSpectrum (const ReweightableSpectrum &rhs) | |
ReweightableSpectrum & | operator= (const ReweightableSpectrum &rhs) |
const Var & | ReweightVar () const |
The variable that will be used to fill the y-axis. More... | |
void | Fill (double x, double y, double w=1) |
TH2D * | ToTH2 (double pot) const |
Spectrum | UnWeighted () const |
Spectrum | WeightingVariable () const |
Spectrum | WeightedBy (const TH1 *weights) const |
void | ReweightToTrueSpectrum (const Spectrum &target) |
Rescale bins so that WeightingVariable will return target. More... | |
void | ReweightToRecoSpectrum (const Spectrum &target) |
Recale bins so that Unweighted will return target. More... | |
void | Clear () |
void | SaveTo (TDirectory *dir) const |
unsigned int | NDimensions () const |
std::vector< std::string > | GetLabels () const |
std::vector< Binning > | GetBinnings () const |
Static Public Member Functions | |
static std::unique_ptr < OscillatableSpectrum > | LoadFrom (TDirectory *dir) |
Static Public Member Functions inherited from ana::ReweightableSpectrum | |
static std::unique_ptr < ReweightableSpectrum > | LoadFrom (TDirectory *dir) |
Protected Member Functions | |
OscillatableSpectrum (const std::vector< std::string > &labels, const std::vector< Binning > &bins, const Var &rwVar) | |
fCachedHash (0) | |
OscillatableSpectrum (const std::string &label, const Binning &bins, const Var &rwVar) | |
fCachedHash (0) | |
Protected Member Functions inherited from ana::ReweightableSpectrum | |
ReweightableSpectrum (const std::vector< std::string > &labels, const std::vector< Binning > &bins, const Var &rwVar) | |
ReweightableSpectrum (const std::string &label, const Binning &bins, const Var &rwVar) | |
ReweightableSpectrum (TH2 *h, const std::vector< std::string > &labels, const std::vector< Binning > &bins, double pot, double livetime) | |
void | RemoveLoader (SpectrumLoaderBase *) |
void | AddLoader (SpectrumLoaderBase *) |
Protected Attributes | |
Spectrum | fCachedOsc |
TMD5 * | fCachedHash |
Protected Attributes inherited from ana::ReweightableSpectrum | |
Var | fRWVar |
What goes on the y axis? More... | |
TH2D * | fHist |
double | fPOT |
double | fLivetime |
std::vector< std::string > | fLabels |
std::vector< Binning > | fBins |
std::string | fTrueLabel |
std::set< SpectrumLoaderBase * > | fLoaderCount |
This count is maintained by SpectrumLoader, as a sanity check. More... | |
Friends | |
class | SpectrumLoaderBase |
class | SpectrumLoader |
class | NullLoader |
Spectrum with true energy information, allowing it to be oscillated
Definition at line 24 of file OscillatableSpectrum.h.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | const std::string & | label, |
const Binning & | bins, | ||
SpectrumLoaderBase & | loader, | ||
const Var & | var, | ||
const Cut & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const Var & | wei = kUnweighted |
||
) |
Definition at line 34 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | SpectrumLoaderBase & | loader, |
const HistAxis & | axis, | ||
const Cut & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const Var & | wei = kUnweighted |
||
) |
Definition at line 54 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | SpectrumLoaderBase & | loader, |
const HistAxis & | axis, | ||
const SpillCut & | spillcut, | ||
const SliceCut & | slicecut, | ||
const SystShifts & | shift = kNoShift , |
||
const Var & | wei = kUnweighted |
||
) |
Definition at line 64 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | const std::string & | label, |
const Binning & | bins | ||
) |
Definition at line 104 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | const std::string & | label, |
double | pot, | ||
double | livetime, | ||
const Binning & | bins | ||
) |
Definition at line 121 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | TH2 * | h, |
const std::vector< std::string > & | labels, | ||
const std::vector< Binning > & | bins, | ||
double | pot, | ||
double | livetime | ||
) |
Definition at line 138 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | std::unique_ptr< TH2D > | h, |
const std::vector< std::string > & | labels, | ||
const std::vector< Binning > & | bins, | ||
double | pot, | ||
double | livetime | ||
) |
Definition at line 150 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::~OscillatableSpectrum | ( | ) |
Definition at line 162 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | const OscillatableSpectrum & | rhs | ) |
Copy constructor.
Definition at line 174 of file OscillatableSpectrum.cxx.
ana::OscillatableSpectrum::OscillatableSpectrum | ( | OscillatableSpectrum && | rhs | ) |
Definition at line 195 of file OscillatableSpectrum.cxx.
|
inlineprotected |
Definition at line 101 of file OscillatableSpectrum.h.
|
inlineprotected |
Definition at line 110 of file OscillatableSpectrum.h.
|
inlineprotected |
Definition at line 106 of file OscillatableSpectrum.h.
|
inlineprotected |
Definition at line 115 of file OscillatableSpectrum.h.
|
static |
Definition at line 385 of file OscillatableSpectrum.cxx.
OscillatableSpectrum ana::OscillatableSpectrum::operator+ | ( | const OscillatableSpectrum & | rhs | ) | const |
Definition at line 328 of file OscillatableSpectrum.cxx.
OscillatableSpectrum & ana::OscillatableSpectrum::operator+= | ( | const OscillatableSpectrum & | rhs | ) |
Definition at line 308 of file OscillatableSpectrum.cxx.
OscillatableSpectrum ana::OscillatableSpectrum::operator- | ( | const OscillatableSpectrum & | rhs | ) | const |
Definition at line 353 of file OscillatableSpectrum.cxx.
OscillatableSpectrum & ana::OscillatableSpectrum::operator-= | ( | const OscillatableSpectrum & | rhs | ) |
Definition at line 336 of file OscillatableSpectrum.cxx.
OscillatableSpectrum & ana::OscillatableSpectrum::operator= | ( | const OscillatableSpectrum & | rhs | ) |
Assignment operator.
Definition at line 218 of file OscillatableSpectrum.cxx.
OscillatableSpectrum & ana::OscillatableSpectrum::operator= | ( | OscillatableSpectrum && | rhs | ) |
Definition at line 244 of file OscillatableSpectrum.cxx.
Spectrum ana::OscillatableSpectrum::Oscillated | ( | osc::IOscCalc * | calc, |
int | from, | ||
int | to | ||
) | const |
Definition at line 272 of file OscillatableSpectrum.cxx.
void ana::OscillatableSpectrum::SaveTo | ( | TDirectory * | dir | ) | const |
Definition at line 361 of file OscillatableSpectrum.cxx.
|
inline |
Definition at line 86 of file OscillatableSpectrum.h.
|
inline |
Definition at line 85 of file OscillatableSpectrum.h.
|
friend |
Definition at line 29 of file OscillatableSpectrum.h.
|
friend |
Definition at line 28 of file OscillatableSpectrum.h.
|
friend |
Definition at line 27 of file OscillatableSpectrum.h.
|
mutableprotected |
Definition at line 120 of file OscillatableSpectrum.h.
|
mutableprotected |
Definition at line 119 of file OscillatableSpectrum.h.