Representation of a spectrum in any variable, with associated POT. More...
#include "/cvmfs/nova.opensciencegrid.org/externals/cafanacore/v01.14/src/CAFAna/Core/Spectrum.h"
Public Types | |
enum | ESparse { kDense, kSparse } |
Public Member Functions | |
template<class T > | |
Spectrum (SpectrumLoaderBase &loader, const _HistAxis< _Var< T >> &axis, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
One constructor to rule them all. More... | |
template<class T > | |
Spectrum (const std::string &label, const Binning &bins, SpectrumLoaderBase &loader, const _Var< T > &var, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
template<class T > | |
Spectrum (SpectrumLoaderBase &loader, const _HistAxis< _MultiVar< T >> &axis, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >()) | |
The only MultiVar variant available. More... | |
Spectrum (Eigen::ArrayXd &&h, const LabelsAndBins &axis, double pot, double livetime) | |
Makes a spectrum from an eigen array. More... | |
Spectrum (Eigen::ArrayXstan &&h, const LabelsAndBins &axis, double pot, double livetime) | |
Makes a spectrum from an eigen array of stan vars. More... | |
template<class T > | |
Spectrum (SpectrumLoaderBase &loader, const _HistAxis< _Var< T >> &xAxis, const _HistAxis< _Var< T >> &yAxis, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
2D Spectrum taking 2 HistAxis More... | |
template<class T > | |
Spectrum (const std::string &xLabel, const std::string &yLabel, SpectrumLoaderBase &loader, const Binning &binsx, const _Var< T > &varx, const Binning &binsy, const _Var< T > &vary, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
2D Spectrum of two Vars More... | |
template<class T > | |
Spectrum (SpectrumLoaderBase &loader, const _HistAxis< _Var< T >> &xAxis, const _HistAxis< _Var< T >> &yAxis, const _HistAxis< _Var< T >> &zAxis, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
3D Spectrum taking 3 HistAxis More... | |
template<class T > | |
Spectrum (const std::string &xLabel, const std::string &yLabel, const std::string &zLabel, SpectrumLoaderBase &loader, const Binning &binsx, const _Var< T > &varx, const Binning &binsy, const _Var< T > &vary, const Binning &binsz, const _Var< T > &varz, const _Cut< T > &cut, const SystShifts &shift=kNoShift, const _Var< T > &wei=Unweighted< T >(), ESparse sparse=kDense) | |
3D Spectrum of three Vars More... | |
Spectrum (Hist &&hist, const LabelsAndBins &axis, double pot, double livetime) | |
Expert constructor for ReweightableSpectrum et al. More... | |
virtual | ~Spectrum () |
Spectrum (const Spectrum &rhs) | |
Spectrum (Spectrum &&rhs) | |
Spectrum & | operator= (const Spectrum &rhs) |
Spectrum & | operator= (Spectrum &&rhs) |
void | Fill (double x, double w=1) |
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. More... | |
TH1D * | ToTH1 (double exposure, EExposureType expotype, EBinType bintype=kBinContent) const |
Histogram made from this Spectrum, scaled to some exposure. More... | |
TH2 * | ToTH2 (double exposure, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const |
Spectrum must be 2D to obtain TH2. More... | |
TH3 * | ToTH3 (double exposure, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const |
Spectrum must be 3D to obtain TH3. More... | |
TH1 * | ToTHX (double exposure, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const |
bool | HasStan () const |
const Eigen::ArrayXd & | GetEigen () const |
NB these don't have POT scaling. For expert high performance ops only! More... | |
const Eigen::ArrayXstan & | GetEigenStan () const |
Eigen::ArrayXd | GetEigen (double exposure, EExposureType expotype=kPOT) const |
Eigen::ArrayXstan | GetEigenStan (double exposure, EExposureType expotype=kPOT) const |
double | Integral (double exposure, double *err=0, EExposureType expotype=kPOT) const |
Return total number of events scaled to pot. More... | |
double | Mean () const |
Return mean of 1D histogram. More... | |
Spectrum | MockData (double pot, int seed=0) const |
Mock data is FakeData with Poisson fluctuations applied. More... | |
Spectrum | AsimovData (double pot) const |
Asimov data is a MC spectrum scaled to the POT expected in the data. More... | |
Spectrum | AsimovData (double pot, double livetime) const |
Spectrum | FakeData (double pot) const |
Synonymous with AsimovData(). Retained for compatibility. More... | |
Spectrum | FakeData (double pot, double livetime) const |
Synonymous with AsimovData(). Retained for compatibility. More... | |
double | POT () const |
double | Livetime () const |
Seconds. For informational purposes only. No calculations use this. More... | |
void | OverridePOT (double newpot) |
DO NOT USE UNLESS YOU ARE 110% CERTAIN THERE ISN'T A BETTER WAY! More... | |
void | OverrideLivetime (double newlive) |
DO NOT USE UNLESS YOU ARE 110% CERTAIN THERE ISN'T A BETTER WAY! More... | |
void | Clear () |
void | Scale (double c) |
Multiply this spectrum by a constant c. More... | |
void | Scale (const stan::math::var &v) |
Spectrum & | operator+= (const Spectrum &rhs) |
Spectrum | operator+ (const Spectrum &rhs) const |
Spectrum & | operator-= (const Spectrum &rhs) |
Spectrum | operator- (const Spectrum &rhs) const |
Spectrum & | operator*= (const Ratio &rhs) |
Spectrum | operator* (const Ratio &rhs) const |
Spectrum & | operator/= (const Ratio &rhs) |
Spectrum | operator/ (const Ratio &rhs) const |
void | SaveTo (TDirectory *dir, const std::string &name) const |
unsigned int | NDimensions () const |
const std::vector< std::string > & | GetLabels () const |
const std::vector< Binning > & | GetBinnings () const |
Static Public Member Functions | |
static Spectrum | Uninitialized () |
static std::unique_ptr< Spectrum > | LoadFrom (TDirectory *dir, const std::string &name) |
Protected Member Functions | |
Spectrum () | |
Constructor for Uninitialized() More... | |
Spectrum (const LabelsAndBins &axis, ESparse sparse=kDense) | |
Helper for constructors. More... | |
void | RemoveLoader (Spectrum **) |
void | AddLoader (Spectrum **) |
Spectrum & | PlusEqualsHelper (const Spectrum &rhs, int sign) |
Helper for operator+= and operator-=. More... | |
Protected Attributes | |
Hist | fHist |
double | fPOT |
double | fLivetime |
std::set< Spectrum ** > | fReferences |
Things that point at this Spectrum. Maintained by SpectrumLoader. More... | |
LabelsAndBins | fAxis |
Friends | |
class | SpectrumLoaderBase |
class | SpectrumSink |
class | SpectrumSinkBase< Spectrum > |
class | Ratio |
Representation of a spectrum in any variable, with associated POT.
Definition at line 40 of file Spectrum.h.
Enumerator | |
---|---|
kDense | |
kSparse |
Definition at line 48 of file Spectrum.h.
ana::Spectrum::Spectrum | ( | SpectrumLoaderBase & | loader, |
const _HistAxis< _Var< T >> & | axis, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
One constructor to rule them all.
ana::Spectrum::Spectrum | ( | const std::string & | label, |
const Binning & | bins, | ||
SpectrumLoaderBase & | loader, | ||
const _Var< T > & | var, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
ana::Spectrum::Spectrum | ( | SpectrumLoaderBase & | loader, |
const _HistAxis< _MultiVar< T >> & | axis, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() |
||
) |
The only MultiVar variant available.
ana::Spectrum::Spectrum | ( | Eigen::ArrayXd && | h, |
const LabelsAndBins & | axis, | ||
double | pot, | ||
double | livetime | ||
) |
ana::Spectrum::Spectrum | ( | Eigen::ArrayXstan && | h, |
const LabelsAndBins & | axis, | ||
double | pot, | ||
double | livetime | ||
) |
ana::Spectrum::Spectrum | ( | SpectrumLoaderBase & | loader, |
const _HistAxis< _Var< T >> & | xAxis, | ||
const _HistAxis< _Var< T >> & | yAxis, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
2D Spectrum taking 2 HistAxis
ana::Spectrum::Spectrum | ( | const std::string & | xLabel, |
const std::string & | yLabel, | ||
SpectrumLoaderBase & | loader, | ||
const Binning & | binsx, | ||
const _Var< T > & | varx, | ||
const Binning & | binsy, | ||
const _Var< T > & | vary, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
2D Spectrum of two Vars
ana::Spectrum::Spectrum | ( | SpectrumLoaderBase & | loader, |
const _HistAxis< _Var< T >> & | xAxis, | ||
const _HistAxis< _Var< T >> & | yAxis, | ||
const _HistAxis< _Var< T >> & | zAxis, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
3D Spectrum taking 3 HistAxis
ana::Spectrum::Spectrum | ( | const std::string & | xLabel, |
const std::string & | yLabel, | ||
const std::string & | zLabel, | ||
SpectrumLoaderBase & | loader, | ||
const Binning & | binsx, | ||
const _Var< T > & | varx, | ||
const Binning & | binsy, | ||
const _Var< T > & | vary, | ||
const Binning & | binsz, | ||
const _Var< T > & | varz, | ||
const _Cut< T > & | cut, | ||
const SystShifts & | shift = kNoShift , |
||
const _Var< T > & | wei = Unweighted< T >() , |
||
ESparse | sparse = kDense |
||
) |
3D Spectrum of three Vars
|
inline |
|
virtual |
Definition at line 79 of file Spectrum.cxx.
References fReferences.
Referenced by Uninitialized().
ana::Spectrum::Spectrum | ( | const Spectrum & | rhs | ) |
Definition at line 54 of file Spectrum.cxx.
References ana::assert(), and fReferences.
ana::Spectrum::Spectrum | ( | Spectrum && | rhs | ) |
|
inlineprotected |
Constructor for Uninitialized()
Definition at line 268 of file Spectrum.h.
References AddLoader(), kDense, PlusEqualsHelper(), RemoveLoader(), and canMan::sign().
Referenced by Uninitialized().
|
protected |
Helper for constructors.
Definition at line 24 of file Spectrum.cxx.
References fAxis, fHist, ana::LabelsAndBins::GetBins1D(), kSparse, ana::Binning::NBins(), ana::Hist::Zero(), and ana::Hist::ZeroSparse().
Definition at line 374 of file Spectrum.cxx.
References fReferences.
Referenced by Spectrum().
Spectrum ana::Spectrum::AsimovData | ( | double | pot | ) | const |
Asimov data is a MC spectrum scaled to the POT expected in the data.
Use for sensitivity plots and testing fit convergence
Definition at line 319 of file Spectrum.cxx.
References fHist, fPOT, pot, ana::Hist::ResetErrors(), runNovaSAM::ret, and ana::Hist::Scale().
Referenced by FakeData(), GetEigenStan(), and MakeFakeData().
Spectrum ana::Spectrum::AsimovData | ( | double | pot, |
double | livetime | ||
) | const |
Use for sensitivity plots when fake cosmic data is needed. Fake cosmic spectra can be added to FakeData by desired livetime.
Definition at line 333 of file Spectrum.cxx.
References fHist, fLivetime, fPOT, livetime, pot, ana::Hist::ResetErrors(), runNovaSAM::ret, and ana::Hist::Scale().
Definition at line 362 of file Spectrum.cxx.
References fHist, and ana::Hist::Reset().
Referenced by ana::PredictionExtrap::_PredictComponent(), ana::PredictionExtrapSum::_PredictComponent(), ana::PredictionExtendToPeripheral::_PredictComponent(), ana::PredictionInterp::_PredictComponentSyst(), ana::PredictionExtrapSum::ComponentNC(), ana::PredictionExtrapSum::ComponentNCAnti(), ana::PredictionExtrapSum::ComponentNCTotal(), GetNueCosmics2018(), GetNueCosmics2019(), GetNueCosmicsFuture(), ana::PredictionInterp::InitFits(), make_plots(), OverrideLivetime(), plot_nueFD_Signal_REWvsNOM_pTExtrap_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_RHC(), ana::PlotSpectra(), PlotStack(), ana::PredictionSterile::PredictComponent(), ana::FDPredictionSterile::PredictComponent(), ana::NDPredictionSterile::PredictComponent(), ana::PredictionNoOsc::PredictComponent(), ana::NDPredictionNoOsc::PredictComponent(), and ana::PredictionAddRock::RockComponent().
Spectrum ana::Spectrum::FakeData | ( | double | pot | ) | const |
Synonymous with AsimovData(). Retained for compatibility.
Definition at line 350 of file Spectrum.cxx.
References AsimovData().
Referenced by BlessedPlotsLoad(), cc(), demo_CPT(), ana::FDPredictionSterile::FakeData(), ana::NDPredictionSterile::FakeData(), ana::NDPredictionNoOsc::FakeData(), futureSig_reach_singlePOTcombo_syst(), GenerateFutureData(), ana2019::fakedata::Get2019Prediction(), getContProf_Sensitivity(), GetEigenStan(), GetFakeData(), getSensitivity(), make_plots(), MakeExtrapSurface(), MakeFakeData(), MakeNusPrediction(), makeSystTable(), makeSystTable_reduced(), MichelDecompTest(), MockData(), NDDataMCSystBandAna(), numu_sig_nonmax(), PlotNus17Prediction(), plots(), saveContours_addExpt(), saveContours_complete(), saveContours_oscpar(), saveContours_simple(), saveContours_systs(), SaveSpectrum(), starPlot(), syst_test(), template_basic(), template_GENIE_systs(), template_nonGENIE_systs(), test_ana(), test_stanfit_statsonly(), test_stanfit_systpulls(), test_stanfit_withsysts(), and ana::UnfoldIterative::Truth().
Spectrum ana::Spectrum::FakeData | ( | double | pot, |
double | livetime | ||
) | const |
Synonymous with AsimovData(). Retained for compatibility.
Definition at line 356 of file Spectrum.cxx.
References AsimovData().
void ana::Spectrum::Fill | ( | double | x, |
double | w = 1 |
||
) |
Definition at line 294 of file Spectrum.cxx.
References fAxis, fHist, ana::Hist::Fill(), ana::LabelsAndBins::GetBins1D(), w, and submit_syst::x.
Referenced by ana::SpectrumSink::HandleRecord(), ana::MultiVarSpectrumSink::HandleRecord(), ana::ReweightableSpectrumSink::HandleRecord(), and Uninitialized().
|
inline |
Definition at line 264 of file Spectrum.h.
References fAxis, and ana::LabelsAndBins::GetBinnings().
Referenced by ana::FitInAnaBinsBkgdEstimator::Background(), ana::NumuCC2p2hBkgdEstimator::Background(), ana::TwoSampleDecomp::Decomp(), ana::PredictionExtendToPeripheral::ExtendRecoWeight(), ana::PredictionExtendToPeripheral::ExtendRecoWeightOscillatable(), ana::ModularExtrapComponent::FormSmartRatio(), ana::SpectrumComponents::GetBinnings(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), ana::NumuCCIncAnalysis::LoadFrom(), ana::FluxDecomp::NueEstimate(), ana::BENDecomp::NueEstimate(), ana::FluxDecomp::NueEstimateFromKa(), ana::FluxDecomp::NueEstimateFromPi(), ana::BENDecomp::NueEstimateFromPi(), ana::covmx::CovarianceMatrix::Predict(), ana::PredictionCombinePeriods::PredictComponentSyst(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), SaveTo(), ana::PredictionInterp::ShiftSpectrum(), ToTH2(), ToTH3(), ana::UnfoldSVD::Truth(), and ana::UnfoldTikhonov::Truth().
|
inline |
NB these don't have POT scaling. For expert high performance ops only!
Definition at line 189 of file Spectrum.h.
References fHist, and ana::Hist::GetEigen().
Referenced by ana::FitInAnaBinsBkgdEstimator::Background(), ana::SingleSampleExperiment::ChiSq(), ana::CovMxExperiment::ChiSq(), ana::FluxMultiverseSyst::FindSigmaBoundaries(), ana::ModularExtrapComponent::FormSmartRatio(), GetEigenStan(), ana::SingleSampleExperiment::LogLikelihood(), ana::MichelDecomp::MCToDCMPComp(), ana::PredictionExtendToPeripheral::MergePeripheral(), ana::FluxDecomp::NueEstimate(), ana::BENDecomp::NueEstimate(), ana::SingleSampleExperiment::PredHistIncCosmics(), ana::PredictionCombinePeriods::PredictComponentSyst(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), ana::PredictionInterp::ShiftSpectrum(), and ana::SingleSampleExperiment::SingleSampleExperiment().
Eigen::ArrayXd ana::Spectrum::GetEigen | ( | double | exposure, |
EExposureType | expotype = kPOT |
||
) | const |
Definition at line 220 of file Spectrum.cxx.
References fHist, fLivetime, fPOT, ana::Hist::GetEigen(), and ana::kPOT.
|
inline |
Definition at line 190 of file Spectrum.h.
References AsimovData(), FakeData(), fHist, GetEigen(), ana::Hist::GetEigenStan(), Integral(), ana::kPOT, Mean(), MockData(), and seed.
Referenced by ana::SingleSampleExperiment::PredHistIncCosmics(), and ana::PredictionInterp::ShiftSpectrum().
Eigen::ArrayXstan ana::Spectrum::GetEigenStan | ( | double | exposure, |
EExposureType | expotype = kPOT |
||
) | const |
Definition at line 229 of file Spectrum.cxx.
References fHist, fLivetime, fPOT, ana::Hist::GetEigenStan(), and ana::kPOT.
|
inline |
Definition at line 263 of file Spectrum.h.
References fAxis, and ana::LabelsAndBins::GetLabels().
Referenced by ana::FitInAnaBinsBkgdEstimator::Background(), ana::NumuCC2p2hBkgdEstimator::Background(), ana::TwoSampleDecomp::Decomp(), ana::PredictionExtendToPeripheral::ExtendRecoWeight(), ana::PredictionExtendToPeripheral::ExtendRecoWeightOscillatable(), ana::ModularExtrapComponent::FormSmartRatio(), ana::SpectrumComponents::GetLabels(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), ana::PredictionExtendToPeripheral::MergePeripheral(), ana::FluxDecomp::NueEstimate(), ana::BENDecomp::NueEstimate(), ana::FluxDecomp::NueEstimateFromKa(), ana::FluxDecomp::NueEstimateFromPi(), ana::BENDecomp::NueEstimateFromPi(), ana::CutOptimization::OptimizedSigmaOverSigma(), ana::PredictionCombinePeriods::PredictComponentSyst(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), SaveTo(), ana::PredictionInterp::ShiftSpectrum(), ToTH2(), ToTH3(), ana::UnfoldSVD::Truth(), and ana::UnfoldTikhonov::Truth().
|
inline |
Definition at line 187 of file Spectrum.h.
References fHist, and ana::Hist::HasStan().
Referenced by ana::SingleSampleExperiment::PredHistIncCosmics(), and ana::PredictionInterp::ShiftSpectrum().
double ana::Spectrum::Integral | ( | double | exposure, |
double * | err = 0 , |
||
EExposureType | expotype = kPOT |
||
) | const |
Return total number of events scaled to pot.
exposure | POT/livetime to scale to |
err | The statistical error on this total (optional) |
expotype | What the first parameter represents |
Definition at line 250 of file Spectrum.cxx.
References fHist, fLivetime, fPOT, ana::Hist::GetBinError(), ana::Hist::GetNbinsX(), MECModelEnuComparisons::i, ana::Hist::Integral(), ana::kPOT, PandAna.reco_validation.prod5_pid_validation::ratio(), util::sqr(), and std::sqrt().
Referenced by BicountEllipse_dCP(), ana::CountingExperiment::ChiSq(), ComputeEfficiency(), ana::DataMCAreaNormalizedRatio(), demo_flat(), ana::SpectrumComponents::DrawLegend(), ana::DataMCPair::DrawMCNormSyst(), DataMCPair::DrawMCNormSyst(), FCContour(), ana::FluxMultiverseSyst::FindSigmaBoundaries(), FitParamEffectsAna(), FitSystEffectsAna(), GetEigenStan(), getHists_FNEX(), GetNueCosmics2017(), GetNueCosmics2018(), GetNueCosmics2019(), ana::GetNueCosmics2020(), GetNueCosmicsFuture(), GetNueData2017(), GetNueData2018(), GetNueData2019(), ana::GetNueData2020(), GetNuePrediction2017(), GetNuePrediction2018(), GetNuePrediction2019(), ana::GetNuePrediction2020(), GetNuePredictionFuture(), ana::GetNumuCosmics2020(), ana::GetNumuData2020(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), Integral(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), make_nominal_xs(), make_xs(), MakeHBar(), MakeTable(), MCCompPredictionTable(), ana::GenieMultiverseNormalizedSpectra::NormalizeSpectra(), PeripheralCuts(), ana::PlotWithAreaSystErrorBand(), predEventCountWithSystError(), SpectrumParamEffectsAna(), and ana::UnfoldSVD::Truth().
|
inline |
Seconds. For informational purposes only. No calculations use this.
Definition at line 230 of file Spectrum.h.
References fLivetime.
Referenced by ApplyOscillations(), ana::FitInAnaBinsBkgdEstimator::Background(), ana::NumuCC2p2hBkgdEstimator::Background(), BlessedPlotsLoad(), CalcRWithSystsNus17(), Cumulative(), ana::TwoSampleDecomp::Decomp(), FCContour(), fd_plot(), FitParamEffectsAna(), FitSystEffectsAna(), getBNBPlots(), GetFluxError(), getHists_FNEX(), ana::Multiverse::GetNSigmaShift(), GetNueCosmics2017(), GetNueCosmics2018(), GetNueCosmics2019(), ana::GetNueCosmics2020(), GetNueCosmicsFuture(), GetNueData2017(), GetNueData2018(), GetNueData2019(), ana::GetNueData2020(), ana::GetNumuCosmics2020(), ana::GetNumuData2020(), ana::PredictionInterp::InitFits(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), make_nus17_fc_surfs(), make_nus_fc_surfs(), make_xs(), make_xs_1D(), MakeExtrapSurface(), MakeHBar(), makeMatrixElementSurface(), MakeNusPrediction(), ana::MichelDecomp::MCToDCMPComp(), ana::PredictionExtendToPeripheral::MergePeripheral(), mrbrem_get_reweighted_spectra(), mrbrem_plots(), PlotNus17Prediction(), PlotNus17PredSystsData(), PlotNus18Sideband(), PlotNusSensAna01(), ana::PlotSpectra(), PlotSysts(), ana::SingleSampleExperiment::PredHistIncCosmics(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), selection_story_plots(), ShiftedCosmics(), ana::PredictionInterp::ShiftSpectrum(), ana::SingleSampleExperiment::SingleSampleExperiment(), timingPeak(), ana::UnfoldSVD::Truth(), and ana::UnfoldTikhonov::Truth().
|
static |
Definition at line 536 of file Spectrum.cxx.
References ana::assert(), ana::bins, dir, genie::utils::style::Format(), ana::Hist::FromDirectory(), MECModelEnuComparisons::i, label, PandAna.Demos.pi0_spectra::labels, ana::Binning::LoadFrom(), runNovaSAM::ret, string, cvnie::subdir, and getGoodRuns4SAM::tag.
Referenced by Analyse_GetEfficiency(), Analyse_GetEfficiency_UseNEntries(), bdtstudyplotter(), BlessedPlotsAnaByPeriod(), CalcRWithSysts(), calculateComponentsNumu(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), CalculateXSec(), ana::CompareNDDataMC(), ana::CompareNDDataOneMC(), ana::CompareNDDataTwoMC(), CutTableAna(), CVNphotonHist(), CVNphotonSplitHist(), demo2p5b(), DoThePlots(), doUnfolding(), EHadVisMECpairs(), example_plot(), FDDataMC(), FDDataMCSystBandAna(), FidOptHist(), FillFlavorContainers(), FitParamEffectsAna(), FitSystEffectsAna(), FOMCalc(), GeniePredictionToRoot(), get_data_histogram(), get_numu_data_histogram(), GetCosmics(), Plotter::GetDataPlots(), GetHist(), getHists_FNEX(), GetHistVectors(), Plotter::GetMCPlots(), ana::GetNDComponents(), ana::GetNDMCComponents(), ana::GetNumuCosmics2020(), GetNumuCosmicsFuture(), GetNumuData2017(), GetNumuData2018(), GetNumuData2019(), GetSpectToHist(), ana::InteractionSpectra::InteractionSpectra(), Load1DHistFromSpec(), LoadCosmic(), LoadFakeData(), ana::CountingExperiment::LoadFrom(), jw::TrivialPrediction::LoadFrom(), ana::CheatDecomp::LoadFrom(), ana::FluxReweight::LoadFrom(), ana::NCDecomp::LoadFrom(), ana::NueDecomp::LoadFrom(), ana::SingleSampleExperiment::LoadFrom(), ana::NumuDecomp::LoadFrom(), ana::CrossSectionSpectra::LoadFrom(), ana::TrivialPrediction::LoadFrom(), ana::ProportionalDecomp::LoadFrom(), ana::CutOptimization::LoadFrom(), ana::FakeDecomp::LoadFrom(), ana::TrivialExtrap::LoadFrom(), ana::TrivialCrossSectionAnalysis::LoadFrom(), ana::Multiverse::LoadFrom(), ana::TwoSampleDecomp::LoadFrom(), ana::SpectrumComponents::LoadFrom(), ana::FluxDecomp::LoadFrom(), ana::ModularExtrapSterile::LoadFrom(), ana::BENDecomp::LoadFrom(), ana::DataMCPair::LoadFrom(), ana::RecoReweight::LoadFrom(), ana::LoadFromUpDownSpectra(), LoadMaps(), make_dataMC(), make_eff_plots_areaNorm(), make_estimate_energy(), make_muonid_opt(), make_nominal_xs(), Make_NuMuCC_Inc_XS(), Make_NuMuCC_Inc_XS_v2(), make_vertex_optimiz(), MakeCutFlow(), makeEnergyEstimator(), makeFlatWeight(), MakePlots(), makeResolutionPlots(), MakeSurface(), MakeSurfaceBinningStudy(), MakeThePlots(), makeXSecPlots1D(), makeXSecPlots2D(), makeXSecPlots_TemplateFit(), meanWeight_plot(), mec_nux_tester_2020(), mec_tuning_fitter_2020(), MRDiFStudy_FHC_Step2(), MRDiFStudy_RHC_Step2(), multiverse_efficiency_plot(), MuonCatcherComp_ProdPlots(), nc_bkgd_by_interaction_mode(), NDDataMC(), NDDataMCSystBandAna(), nue_data_mc_validation(), nue_decomp_scales(), nue_fd_mc_validation(), numu_data_mc_validation(), OverrideLivetime(), plot_DataMCComp_numu(), plot_eff_purity(), plot_energy_res(), plot_estimate_energy(), plot_ND_DataMC(), plot_ND_DataMC_energybinning(), plot_nd_spectra_2018(), plot_recoE_numu(), plot_spectra_2dplots(), plot_uncertainty(), plotBinningResolution(), plotHist_SpectrumCVNID(), PlotResolution(), Plotsidebandfittest(), Plotting_Data2DataComp(), Plotting_Data2DataComp_SingleCanvas(), Plotting_DataAndPrediction(), Plotting_DataSpectra_MakeTGraph(), Plotting_OverlayStudies(), ppfx_smooth_weights_make(), preselection_cutflow(), ProduceCompPlots(), ReMIdHist(), resolutionplotter(), ana::ResolutionScan::ResolutionScan(), ShwZOptHist(), Spec2DToHist(), Spec2DtoHist(), SpecToHist(), SpectrumParamEffectsAna(), ana::TrivialPrediction::TrivialPrediction(), twodvtxcontplotter(), Unfold1D(), Unfold3D(), vertexstudyploter(), xsec_tot_uncert_optimization(), and xsec_uncertainty_per_bin().
double ana::Spectrum::Mean | ( | ) | const |
Return mean of 1D histogram.
Definition at line 268 of file Spectrum.cxx.
References ana::bins, om::cout, ana::Binning::Edges(), allTimeWatchdog::endl, fAxis, fHist, ana::Hist::GetBinContent(), ana::LabelsAndBins::GetBins1D(), MECModelEnuComparisons::i, extractScale::mean, ana::Binning::NBins(), w, W, and x1.
Referenced by ana::DataMCPair::CreateSystTable(), and GetEigenStan().
Mock data is FakeData with Poisson fluctuations applied.
Use for low-budget MDCs, or just getting a sense of the expected scale of statistical variation. NB seed = 0 is true random
Definition at line 301 of file Spectrum.cxx.
References FakeData(), fHist, ana::Hist::GetBinContent(), ana::Hist::GetNbinsX(), MECModelEnuComparisons::i, ana::Hist::ResetErrors(), runNovaSAM::ret, generate_hists::rnd, and ana::Hist::SetBinContent().
Referenced by demo4(), demo5(), FCTutorial2020(), fd_plot(), fill_col(), GenerateFutureData(), ana2019::fakedata::Get2019Prediction(), GetEigenStan(), GetMockData(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), make_mockdata_syst_contours(), make_nus17_fc_surfs(), make_nus_fc_surfs(), MakeFakeData(), selection_story_plots(), syst_plot_test(), and test_saloaders().
|
inline |
Definition at line 262 of file Spectrum.h.
References fAxis, and ana::LabelsAndBins::NDimensions().
Referenced by ana::SpectrumComponents::NDimensions(), ana::CutOptimization::OptimizedSigmaOverSigma(), SaveTo(), ana::Multiverse::ToHist(), ana::CutOptimization::ToHist(), ToTH2(), ToTH3(), and ToTHX().
Definition at line 484 of file Spectrum.cxx.
References runNovaSAM::ret.
Referenced by OverrideLivetime().
Definition at line 477 of file Spectrum.cxx.
References ana::Ratio::fHist, fHist, and ana::Hist::Multiply().
Referenced by OverrideLivetime().
Definition at line 455 of file Spectrum.cxx.
References runNovaSAM::ret.
Referenced by OverrideLivetime().
Definition at line 449 of file Spectrum.cxx.
References PlusEqualsHelper().
Referenced by OverrideLivetime().
Definition at line 469 of file Spectrum.cxx.
References runNovaSAM::ret.
Referenced by OverrideLivetime().
Definition at line 463 of file Spectrum.cxx.
References PlusEqualsHelper().
Referenced by OverrideLivetime().
Definition at line 499 of file Spectrum.cxx.
References runNovaSAM::ret.
Referenced by OverrideLivetime().
Definition at line 492 of file Spectrum.cxx.
References ana::Hist::Divide(), ana::Ratio::fHist, and fHist.
Referenced by OverrideLivetime().
Definition at line 64 of file Spectrum.cxx.
References ana::assert(), fAxis, fHist, fLivetime, fPOT, and fReferences.
Referenced by Uninitialized().
|
inline |
DO NOT USE UNLESS YOU ARE 110% CERTAIN THERE ISN'T A BETTER WAY!
Definition at line 236 of file Spectrum.h.
References plot_validation_datamc::c, Clear(), dir, fLivetime, LoadFrom(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), SaveTo(), Scale(), string, and registry_explorer::v.
Referenced by getBNBPlots(), make_fc_nus_surfs_nersc_2019(), MakeFakeData(), MakeSurface(), MakeSurfaceBinningStudy(), SaveSpectrum(), and timingPeak().
|
inline |
DO NOT USE UNLESS YOU ARE 110% CERTAIN THERE ISN'T A BETTER WAY!
Definition at line 233 of file Spectrum.h.
References fPOT.
Referenced by BlessedPlotsLoad(), ana::DataMCAreaNormalizedRatio(), ana::DataMCPair::DrawMCNormSyst(), DataMCPair::DrawMCNormSyst(), ana::FluxMultiverseSyst::FindSigmaBoundaries(), ana2019::fakedata::Get2019Prediction(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), MakeExtrapSurface(), MakeHBar(), MakeNusPrediction(), PlotNus17Prediction(), ana::PlotSpectra(), PlotStack(), PlotSysts(), and SpectrumParamEffectsAna().
Helper for operator+= and operator-=.
Definition at line 380 of file Spectrum.cxx.
References ana::Hist::Add(), ana::AlmostEqual(), om::cout, allTimeWatchdog::endl, fHist, fLivetime, fPOT, ana::Hist::Initialized(), and ana::Hist::Integral().
Referenced by operator+=(), operator-=(), and Spectrum().
|
inline |
Definition at line 227 of file Spectrum.h.
References fPOT.
Referenced by ana::nueccinc::NueCCIncCrossSectionAnalysis::AddEnhancedSample(), ana::DataMCPair::AddExposure(), ApplyOscillations(), CalcChi2(), CalcR(), CalcRWithSystsNus17(), calculateComponentsNumu(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), ana::CountingExperiment::ChiSq(), ana::SingleSampleExperiment::ChiSq(), ana::CovMxExperiment::ChiSq(), CompareMissingLeptons(), ComputeEfficiency(), Cumulative(), ana::DataMCAreaNormalizedRatio(), ana::DataMCComparison(), Plotter::DataMCComparison(), ana::DataMCComparisonAreaNormalized(), ana::DataMCComparisonComponents(), ana::TwoSampleDecomp::Decomp(), demo6(), draw_decomp_plots(), ana::DataMCPair::DrawData(), ana::SpectrumComponents::DrawLegend(), ana::DataMCPair::DrawMCComponents(), ana::DataMCPair::DrawMCNormSyst(), DataMCPair::DrawMCNormSyst(), ana::DataMCPair::DrawMCSyst(), drawPlot(), DrawPreSelectionPlots(), ana::TwoSampleDecomp::DrawSigBkgOverlay(), ana::TwoSampleDecomp::DrawTwoSamplesWithRatios(), EHadVisMECpairs(), example_plot(), FCContour(), fd_plot(), fill_col(), ana::FluxMultiverseSyst::FindSigmaBoundaries(), FitParamEffectsAna(), FitSystEffectsAna(), GetExtrap(), getHists_FNEX(), ana::Multiverse::GetNSigmaShift(), GetNueData2017(), GetNueData2018(), GetNueData2019(), ana::GetNueData2020(), ana::GetNumuData2020(), ana::MichelDecomp::GetSum(), ana::MichelDecomp::GetTemplateContent(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), ana::PredictionInterp::InitFits(), ana::SingleSampleExperiment::LogLikelihood(), Make2DPlot(), make_muonid_opt(), make_nus17_fc_surfs(), make_nus_fc_surfs(), make_plots(), make_vertex_optimiz(), make_xs(), make_xs_1D(), makeEnergyEstimator(), MakeFakeData(), makeFlatWeight(), MakeHBar(), makeMatrixElementSurface(), MakePlot(), MakePlots(), ana::MakeQuantileHistogram(), MakeSelectionPlots(), ana::FluxDecomp::MakeWeightsNumuFromKaon(), ana::BENDecomp::MakeWeightsNumuFromKaon(), ana::FluxDecomp::MakeWeightsNumuFromPion(), ana::BENDecomp::MakeWeightsNumuFromPion(), ana::MichelDecomp::MCToDCMPComp(), mec_nux_tester_2020(), mec_tuning_fitter_2020(), ana::PredictionExtendToPeripheral::MergePeripheral(), MichelDecompTest(), mrbrem_get_reweighted_spectra(), mrbrem_plots(), mre_blessed(), mre_comp_split(), multiverse_efficiency_plot(), multiverse_macro(), ana::GenieMultiverseNormalizedSpectra::NormalizeSpectra(), nue_decomp_scales(), nue_decomp_scales_for_make_decomp(), ana::FluxDecomp::NueEstimate(), ana::BENDecomp::NueEstimate(), ana::FluxDecomp::NueEstimateFromKa(), ana::FluxDecomp::NueEstimateFromPi(), ana::BENDecomp::NueEstimateFromPi(), ana::CutOptimization::OptimizedSigmaOverSigma(), plot(), plot_2d(), plot_2d_vars(), plot_3NDvsFD(), plot_3NDvsFD_FHC(), plot_3NDvsFD_RHC(), plot_datamc_ND_numu(), plot_datamc_ND_numu_REW(), plot_diff(), plot_ND_numu_NOMvsREW(), plot_NDvsFD_REW(), plot_NDvsFD_weights(), plot_NDvsFD_weights_FHC(), plot_NDvsFD_weights_RHC(), plot_predictions(), plot_recoE_numu(), plot_time(), ana::PlotAllSelectionDecomposition(), ana::PlotAllSignalEstimates(), ana::CrossSectionAnalysis::PlotBackgroundEstimate(), ana::NumuCCIncAnalysis::PlotBackgroundEstimate(), ana::SingleNucAnalysis::PlotBackgroundEstimate2D(), ana::NumuCC2p2hAnalysis::PlotBackgroundEstimate2D(), ana::CrossSectionAnalysis::PlotData(), ana::NumuCCIncAnalysis::PlotData(), ana::SingleNucAnalysis::PlotData2D(), ana::NumuCC2p2hAnalysis::PlotData2D(), ana::CutOptimization::PlotDebug(), PlotNueDecompFourBins(), PlotNus17PredSystsData(), PlotNus18Sideband(), PlotNusSensAna01(), ana::CrossSectionAnalysis::PlotRecoToTrueMatrix(), ana::SingleNucAnalysis::PlotRecoToTrueMatrix2D(), ana::NumuCC2p2hAnalysis::PlotRecoToTrueMatrix2D(), ana::CrossSectionAnalysis::PlotSignalEstimate(), ana::SingleNucAnalysis::PlotSignalEstimate2D(), ana::NumuCC2p2hAnalysis::PlotSignalEstimate2D(), ana::PlotSpectra(), PlotStack(), ana::PlotStack(), PlotSyst(), PlotSysts(), ana::CrossSectionAnalysis::PlotUnfoldedSignal(), ana::SingleNucAnalysis::PlotUnfoldedSignal2D(), ana::NumuCC2p2hAnalysis::PlotUnfoldedSignal2D(), PlotVertices(), PlotVisibleEnergy(), ana::SingleSampleExperiment::PredHistIncCosmics(), ana::NDPredictionSterile::Predict(), ana::NDPredictionSterile::PredictComponent(), ana::Ratio::Ratio(), ana::TwoSampleDecomp::RatioCalc(), reco_minus_true_panels(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), ana::CrossSectionAnalysis::Result(), ana::NumuCCIncAnalysis::Result(), ana::NumuCC2p2hAnalysis::Result1DFluxInt(), ana::NumuCC2p2hAnalysis::Result2D(), ana::SingleNucAnalysis::Result2D(), ana::NumuCCIncAnalysis::Result2D(), ana::NumuCCIncAnalysis::ReturnHists(), ana::MichelDecomp::SaveCompPlots(), ana::FluxDecomp::SavePlots(), ana::BENDecomp::SavePlots(), ana::TruthReweight::SavePlots(), ana::RecoReweight::SavePlots(), ana::FluxDecomp::SavePlotsKa(), ana::BENDecomp::SavePlotsKa(), ana::FluxDecomp::SavePlotsPi(), ana::BENDecomp::SavePlotsPi(), saveS(), saveS1(), SaveSpectrum(), ana::MichelDecomp::SaveTempPlots(), selection_story_plots(), ShiftedCosmics(), ana::PredictionInterp::ShiftSpectrum(), ana::SimpleFOM(), SpectrumParamEffectsAna(), TableNueNDComponents(), TableNueNDDataMC(), test_beam_errorband(), test_micheldecomp(), test_sam(), test_sam_project(), test_stanfit_systpulls(), ana::Multiverse::ToHist(), ana::CutOptimization::ToHist(), ana::ICrossSectionAnalysis::ToHist(), ana::UnfoldIterative::Truth(), ana::UnfoldSVD::Truth(), and ana::UnfoldTikhonov::Truth().
Definition at line 368 of file Spectrum.cxx.
References fReferences.
Referenced by Spectrum().
void ana::Spectrum::SaveTo | ( | TDirectory * | dir, |
const std::string & | name | ||
) | const |
Definition at line 507 of file Spectrum.cxx.
References dir, fAxis, fHist, fLivetime, genie::utils::style::Format(), fPOT, GetBinnings(), ana::LabelsAndBins::GetBins1D(), GetLabels(), MECModelEnuComparisons::i, NDimensions(), tmp, and ana::Hist::Write().
Referenced by Ana2017_box_opening_macro(), Ana2017_sb_opening_macro(), Ana2018_box_opening_macro(), angle(), bdtstudyspectrums(), BlessedPlotsLoad(), ccpiinc_mc_studies(), containmentstudy(), CosmicPred(), CutTableLoad(), CVNphoton(), CVNphotonSplit(), datamc_ND_numu_kinematics(), datamc_ND_numu_kinematics_FHC(), datamc_ND_numu_kinematics_FHC_pTBins(), datamc_ND_numu_kinematics_FHC_REW(), datamc_ND_numu_kinematics_FHC_REW_pTBins(), datamc_ND_numu_kinematics_REW(), datamc_ND_numu_kinematics_RHC(), datamc_ND_numu_kinematics_RHC_pTBins(), datamc_ND_numu_kinematics_RHC_REW(), datamc_ND_numu_kinematics_RHC_REW_pTBins(), dataprocess_numuccinc(), energy_resolution(), estimate_energy(), FDDataMCSystBandLoad(), FidOpt(), FidWShwCuts(), FillSpectra(), FitSystEffectsLoad(), get_cosmic_spectra(), get_data_and_cosmic(), get_data_histogram(), get_numi_data_histogram(), getData(), getFlatWeightSpectra(), getSpectra_ForFitting(), getTimePeakTotal(), make_mockdata_syst_contours(), make_pi0_xcheck(), make_pid(), MakeCosmics(), MakeFakeData(), makeFakeDataFluxes(), MakeNus17Prediction(), MakeNus18SidebandPred(), MakeNusPrediction(), makeRealDataFluxes(), makeXSecPlots_TemplateFit(), meanWeight_macro(), mrbrem_get_initial_spectra(), mrbrem_get_reweighted_spectra(), MRDiFStudy_FHC_Step1(), MRDiFStudy_RHC_Step1(), mre_blessed(), mre_comp_split(), ncpi0HistoGrid2(), ND_DataMC(), NDDataMCSystBandLoad(), nue_decomp_scales(), nus17_box_opening(), nus17_fd_cut_tables(), nus17_fd_cut_tables2D(), nus18_box_opening(), nus_ana01_box_opening(), nus_ana01_sideband_box_opening(), OverrideLivetime(), pion_multiverse(), ReMId(), resolutionscript(), resolutionstudy(), saveFDMCHists(), saveSpectraForUnf(), ana::xsec::UnfoldingVariable::SaveSpectrums(), ana::PredictionXSecTuning::SaveTo(), ana::CountingExperiment::SaveTo(), ana::PredictionNoOsc::SaveTo(), ana::FluxReweight::SaveTo(), ana::CheatDecomp::SaveTo(), jw::TrivialPrediction::SaveTo(), ana::FitInAnaBinsBkgdEstimator::SaveTo(), ana::NumuCC2p2hBkgdEstimator::SaveTo(), ana::nueccinc::NueCCIncMRECorrection::SaveTo(), ana::NCDecomp::SaveTo(), ana::NueDecomp::SaveTo(), ana::SingleSampleExperiment::SaveTo(), ana::NumuDecomp::SaveTo(), ana::CrossSectionSpectra::SaveTo(), ana::TrivialPrediction::SaveTo(), ana::PredictionScaleComp::SaveTo(), ana::ProportionalDecomp::SaveTo(), ana::CutOptimization::SaveTo(), ana::TrivialCrossSectionAnalysis::SaveTo(), ana::FakeDecomp::SaveTo(), ana::TrivialExtrap::SaveTo(), ana::CrossSectionAnalysis::SaveTo(), ana::TwoSampleDecomp::SaveTo(), ana::SpectrumComponents::SaveTo(), ana::NumuCCIncAnalysis::SaveTo(), ana::FluxDecomp::SaveTo(), ana::nueccinc::NueCCIncCrossSectionAnalysis::SaveTo(), ana::MichelDecomp::SaveTo(), ana::BENDecomp::SaveTo(), ana::DataMCPair::SaveTo(), ana::RecoReweight::SaveTo(), ana::nueccinc::NueCCIncEnhancedSamples::SaveTo(), mcmc::SaveToFile(), ShwZOpt(), sidebandfittest(), signal_count(), test_beam_errorband(), test_fluxhadr_prod_weights_Flux(), test_genieweights(), test_predictionscalecomp(), ana::TrivialPrediction::TrivialPrediction(), TrueNCSpectrum(), TrueSpectrumFromKaons(), twodstudyvtxcont(), validationscript(), and vertexstudy().
void ana::Spectrum::Scale | ( | double | c | ) |
Multiply this spectrum by a constant c.
Definition at line 238 of file Spectrum.cxx.
References fHist, and ana::Hist::Scale().
Referenced by ana::PredictionAddRock::_PredictComponentSyst(), ComputeEfficiency(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), make_xs(), make_xs_1D(), MakeExtrapSurface(), ana::FluxDecomp::MakeWeightsNumuFromKaon(), ana::BENDecomp::MakeWeightsNumuFromKaon(), ana::GenieMultiverseNormalizedSpectra::NormalizeSpectra(), ana::BENDecomp::NueEstimateFromKa(), OverrideLivetime(), PlotNus17Prediction(), ana::NumuCCIncAnalysis::Result(), and ana::NumuCCIncAnalysis::Result2D().
void ana::Spectrum::Scale | ( | const stan::math::var & | v | ) |
TH1D * ana::Spectrum::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.
exposure | POT or livetime (seconds) |
col | Histogram color (default black) |
style | Histogram line style (default solid) |
expotype | How to interpret exposure (kPOT (default) or kLivetime) |
Definition at line 149 of file Spectrum.cxx.
References runNovaSAM::ret.
Referenced by ana::nueccinc::NueCCIncCrossSectionAnalysis::AddEnhancedSample(), ana::AddErrorInQuadrature(), ana::PredictionSystJoint2018::AddNormSyst(), ana::PredictionSystJointDemo::AddNormSyst(), ana::PredictionSyst3Flavor2020::AddNormSyst(), ana::PredictionSystNue2017::AddNormSysts(), ana::PredictionSystNumu2017::AddNormSysts(), ana::CovMxManager::AddSystematic(), AnalyzeNus18Pred(), ana::NumuCC2p2hBkgdEstimator::Background(), bin_composition_pie_chart(), ana::covmx::CovarianceMatrix::BuildFullCovMx(), calcAlphaBetaEachBin(), CalcChi2(), ana::nueccinc::NueCCIncMRECorrection::CalcEfficiencyCorrection(), CalcR(), CalcRWithSystsNus17(), calculateComponentsNumu(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), cc(), check_predinterp(), check_predinterp_numu(), ana::LikelihoodCovMxExperiment::ChiSq(), ana::OscCovMxExperiment::ChiSq(), Compare(), CompareBinningSchemes(), CompareDecompDataMC(), CompareMCCompPrediction(), CompareMissingLeptons(), ComparePredictions(), ana::ComparePredictions(), ana::ModularExtrapComponent::ComparisonPlot(), Cumulative(), CVNCuts(), ana::DataMCComparison(), Plotter::DataMCComparison(), ana::DataMCComparisonAreaNormalized(), ana::DataMCComparisonComponents(), ana::PredictionInterp::DebugPlot(), ana::TwoSampleDecomp::Decomp(), ana::MichelDecomp::Decompose(), demo1(), demo3(), demo5(), demo6(), demo_flat(), demo_nueNumuSysts(), DrawBackgrounds(), DrawBins(), ana::DataMCPair::DrawData(), drawPlot(), DrawPulls(), DrawSensitivityDip(), ana::TwoSampleDecomp::DrawSigBkgOverlay(), DrawSurface(), DrawSystShifts(), drawSystsShiftingNDdata(), drawSystsShiftingNDdata_updatedAna(), ana::TwoSampleDecomp::DrawTwoSamplesWithRatios(), efficiency(), efficiencySA(), EHadVisMECpairs(), example_plot(), FCContour(), fd_plot(), fill_col(), FitParamEffectsAna(), FitSystEffectsAna(), GenerateFutureData(), GeniePredictionToRoot(), GetBackgroundStatisticalUncertainty(), GetBackgroundSystematicUncertainty(), ana::GetBFSystBands(), GetBG(), ana::GetBG(), getBNBPlots(), getContProf(), getContProf_Sensitivity(), GetDenominator(), ana::nueccinc::NueCCIncMRECorrection::getEfficiency1D(), GetEfficiencyDenominator(), GetEfficiencySystematicUncertainty(), GetExtrap(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getFlux1D(), GetFluxError(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getFullTemplate(), getHists_FNEX(), GetNC(), ana::GetNC(), ana::GetNDComponents(), ana::GetNDCompsFromDecomp(), ana::GetNDDecompsFromDecomp(), ana::Multiverse::GetNSigmaShift(), GetNueCosmics2017(), GetNueCosmics2018(), GetNueCosmics2019(), GetNueCosmicsFuture(), GetNumuCosmicsFuture(), ana::nueccinc::NueCCIncMRECorrection::getPreselected1D(), GetQuantilePredictionHist(), ana::nueccinc::NueCCIncMRECorrection::getSelected1D(), GetSelectedStatisticalUncertainty(), GetSig(), GetSpectra(), ana::GetSpectrum(), ana::GetSystBands(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getTemplateShapeOnly3D(), getTimePeakPlots(), Integral(), make_extrap_figure(), make_fc_nus_surfs_nersc_2018(), make_muonid_opt(), make_nus17_fc_surfs(), make_nus_fc_surfs(), make_plots(), make_vertex_optimiz(), make_xs_1D(), MakeCovMx(), makeEnergyEstimator(), makeFlatWeight(), makeMatrixElementSurface(), MakePeriCutPlot(), MakePlot(), MakePlots(), MakeResultPlot(), MakeSurface(), MakeSurfaceBinningStudy(), MakeTable(), ana::FluxDecomp::MakeWeightsNumuFromKaon(), ana::BENDecomp::MakeWeightsNumuFromKaon(), makeXSecPlots1D(), makeXSecPlots2D(), MatrixDeterminant(), MichelDecompTest(), mrbrem_get_reweighted_spectra(), mrbrem_plots(), mre_blessed(), mre_comp_split(), multiverse_efficiency_plot(), multiverse_macro(), NDHists(), nue_decomp_scales(), nue_decomp_scales_for_make_decomp(), nue_pid_effs(), nue_pid_effs_miniprod(), nue_pid_effs_paper_numu_neweff(), numu_cut_flow(), PeripheralCuts(), pi0_xcheck(), plot(), plot_3NDvsFD(), plot_3NDvsFD_FHC(), plot_3NDvsFD_RHC(), plot_datamc_ND_numu(), plot_datamc_ND_numu_REW(), plot_datamcpred(), plot_diff(), plot_kinematics_cafana(), plot_ND_numu_NOMvsREW(), plot_NDvsFD_REW(), plot_NDvsFD_weights(), plot_NDvsFD_weights_FHC(), plot_NDvsFD_weights_RHC(), plot_nue_xsec_pred(), plot_nueFD_Signal_REWvsNOM_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_RHC(), plot_nueFD_Signal_REWvsNOM_RHC(), plot_pi0_xcheck(), plot_pid(), plot_predictions(), plot_recoE_numu(), plot_time(), ana::PlotAllSelectionDecomposition(), ana::PlotAllSignalEstimates(), ana::CrossSectionAnalysis::PlotBackgroundEstimate(), ana::NumuCCIncAnalysis::PlotBackgroundEstimate(), PlotComp(), ana::CrossSectionAnalysis::PlotData(), ana::NumuCCIncAnalysis::PlotData(), ana::CutOptimization::PlotDebug(), ana::CrossSectionAnalysis::PlotFluxEstimate(), ana::SingleNucAnalysis::PlotFluxEstimate2D(), ana::NumuCC2p2hAnalysis::PlotFluxEstimate2D(), PlotNuePredictionFourBins(), PlotNumuPredData(), PlotNus17PredSystsData(), PlotNus18Sideband(), PlotNusSensAna01(), PlotPionPlots(), PlotPurEff(), ana::PlotPurEff(), plots(), ana::PlotSpectra(), PlotStack(), ana::PlotStack(), PlotSyst(), PlotSysts(), Plotting_DataAndPrediction(), ana::CrossSectionAnalysis::PlotUnfoldedSignal(), PlotVisibleEnergy(), ana::PlotWithSystErrorBand(), ana::PlotWithSystErrorBand_Quant(), ana::PlotWithSystErrorBandTwoPreds(), ana::covmx::CovarianceMatrix::Predict(), PredictCosmic(), ana::SpectrumComponents::Purity(), ana::TwoSampleDecomp::RatioCalc(), reco_minus_true_panels(), resolution2018(), ana::CrossSectionAnalysis::Result(), ana::NumuCCIncAnalysis::Result(), ana::NumuCC2p2hAnalysis::Result1DFluxInt(), ana::NumuCC2p2hAnalysis::Result2D(), ana::SingleNucAnalysis::Result2D(), ana::NumuCCIncAnalysis::Result2D(), ana::NumuCCIncAnalysis::ReturnHists(), Save(), ana::MichelDecomp::SaveCompPlots(), SaveDCMPPlots(), ana::FluxReweight::SavePlots(), ana::FluxDecomp::SavePlots(), ana::BENDecomp::SavePlots(), ana::TruthReweight::SavePlots(), ana::RecoReweight::SavePlots(), ana::FluxDecomp::SavePlotsKa(), ana::BENDecomp::SavePlotsKa(), ana::BENDecomp::SavePlotsPi(), saveS(), SaveSpectrum(), ScaleCovarianceMatrix(), Selection(), Selection_FOM(), Selection_InvMass(), Selection_Lite(), selection_story_plots(), ShiftedCosmics(), signal_count(), ana::SimpleFOM(), SpectrumParamEffectsAna(), sterile_demo(), syst_plot_test(), systematics_summary_from_pred_interp(), TableNuePredictionFourBins(), template_basic(), test_ana(), test_beam_errorband(), test_fluxhadr_prod_weights_Flux(), test_genie_systs(), test_genieweights(), test_micheldecomp(), test_nue2017Prediction(), test_nue2018_fitter(), test_nueextrapsyst(), test_nuwro(), test_saloaders(), test_sam(), test_sam_project(), test_stanfit_systpulls(), TestPred(), timingPeak(), ana::FluxMultiverseSyst::ToAreaNormalizedTH1(), ana::GenieMultiverseSpectra::ToAreaNormalizedTH1(), ana::Multiverse::ToHist(), ana::CutOptimization::ToHist(), ana::ICrossSectionAnalysis::ToHist(), ana::FluxMultiverseSyst::ToTH1(), ana::GenieMultiverseSpectra::ToTH1(), ana::ToTH2(), ana::ToTH3(), ToTHX(), Toy_analyses(), ana::UnfoldSVD::Truth(), ana::UnfoldTikhonov::Truth(), Unfold1D(), Unfold3D(), UnfoldInOut(), and Uninitialized().
TH1D * ana::Spectrum::ToTH1 | ( | double | exposure, |
EExposureType | expotype, | ||
EBinType | bintype = kBinContent |
||
) | const |
Histogram made from this Spectrum, scaled to some exposure.
exposure | POT or livetime (seconds) |
expotype | How to interpret exposure (kPOT (default) or kLivetime) |
Definition at line 86 of file Spectrum.cxx.
References om::cout, allTimeWatchdog::endl, fAxis, fHist, fLivetime, fPOT, ana::LabelsAndBins::GetBins1D(), ana::LabelsAndBins::GetLabel1D(), ana::kBinDensity, ana::kLivetime, ana::kPOT, livetime, pot, runNovaSAM::ret, and ana::Hist::ToTH1().
TH2 * ana::Spectrum::ToTH2 | ( | double | exposure, |
EExposureType | expotype = kPOT , |
||
EBinType | bintype = kBinContent |
||
) | const |
Spectrum must be 2D to obtain TH2.
Definition at line 166 of file Spectrum.cxx.
References om::cout, allTimeWatchdog::endl, GetBinnings(), GetLabels(), ana::kBinDensity, NDimensions(), runNovaSAM::ret, and ana::ToTH2().
Referenced by ana::nueccinc::NueCCIncMRECorrection::CalcEfficiencyCorrection(), demo6(), ana::nueccinc::NueCCIncCrossSectionAnalysis::doUnfolding1D(), ana::nueccinc::NueCCIncCrossSectionAnalysis::doUnfolding2D(), drawLongTerm(), drawTimePlots(), drawVsPOT(), FD_Data_PosComp(), FD_plots(), GetHistsFD(), GetHistsND(), GetSpectra2D(), getTimePeakPlots(), ana::nueccinc::NueCCIncCrossSectionAnalysis::getUnfoldingMatrix(), HadEFit(), Make2DPlot(), make_quantiles_histogram_2020(), makeEnergyEstimator(), MakePlots(), ana::MakeQuantileHistogram(), mec_nux_tester_2020(), mec_tuning(), mec_tuning_fitter_2020(), MichelDecompTest(), MuonFit(), plot_2d(), plot_2d_vars(), plot_pi0_xcheck(), ana::SingleNucAnalysis::PlotBackgroundEstimate2D(), ana::NumuCC2p2hAnalysis::PlotBackgroundEstimate2D(), ana::SingleNucAnalysis::PlotData2D(), ana::NumuCC2p2hAnalysis::PlotData2D(), ana::SingleNucAnalysis::PlotUnfoldedSignal2D(), ana::NumuCC2p2hAnalysis::PlotUnfoldedSignal2D(), PlotVertices(), PositionComparison(), print_tables(), PrintPlot(), Save(), saveS1(), signal_count(), ana::Multiverse::ToHist(), ana::CutOptimization::ToHist(), ana::ICrossSectionAnalysis::ToHist(), ana::GenieMultiverseSpectra::ToTH2(), ToTHX(), and Uninitialized().
TH3 * ana::Spectrum::ToTH3 | ( | double | exposure, |
EExposureType | expotype = kPOT , |
||
EBinType | bintype = kBinContent |
||
) | const |
Spectrum must be 3D to obtain TH3.
Definition at line 188 of file Spectrum.cxx.
References om::cout, allTimeWatchdog::endl, GetBinnings(), GetLabels(), ana::kBinDensity, NDimensions(), runNovaSAM::ret, and ana::ToTH3().
Referenced by ana::FluxDecomp::MakeWeightsNumuFromPion(), ana::BENDecomp::MakeWeightsNumuFromPion(), ana::FluxDecomp::NueEstimateFromPi(), ana::BENDecomp::NueEstimateFromPi(), plot_eff_purity(), Save(), ana::FluxDecomp::SavePlotsPi(), ana::BENDecomp::SavePlotsPi(), ana::Multiverse::ToHist(), ana::CutOptimization::ToHist(), ana::ICrossSectionAnalysis::ToHist(), ToTHX(), and Uninitialized().
TH1 * ana::Spectrum::ToTHX | ( | double | exposure, |
EExposureType | expotype = kPOT , |
||
EBinType | bintype = kBinContent |
||
) | const |
Definition at line 212 of file Spectrum.cxx.
References NDimensions(), ToTH1(), ToTH2(), and ToTH3().
Referenced by Uninitialized().
|
inlinestatic |
The only valid thing to do with such a spectrum is to assign something else into it.
Definition at line 145 of file Spectrum.h.
References col, Fill(), ana::kBinContent, ana::kPOT, operator=(), Spectrum(), ToTH1(), ToTH2(), ToTH3(), ToTHX(), w, submit_syst::x, and ~Spectrum().
Referenced by ana::PredictionAddRock::RockComponent().
|
friend |
Definition at line 46 of file Spectrum.h.
|
friend |
Definition at line 43 of file Spectrum.h.
|
friend |
Definition at line 44 of file Spectrum.h.
|
friend |
Definition at line 45 of file Spectrum.h.
|
protected |
Definition at line 291 of file Spectrum.h.
Referenced by Fill(), GetBinnings(), GetLabels(), Mean(), NDimensions(), operator=(), SaveTo(), Spectrum(), and ToTH1().
|
protected |
Definition at line 284 of file Spectrum.h.
Referenced by AsimovData(), Clear(), Fill(), GetEigen(), GetEigenStan(), HasStan(), Integral(), Mean(), MockData(), operator*=(), operator/=(), operator=(), PlusEqualsHelper(), ana::Ratio::Ratio(), SaveTo(), Scale(), Spectrum(), and ToTH1().
|
protected |
Definition at line 286 of file Spectrum.h.
Referenced by AsimovData(), GetEigen(), GetEigenStan(), Integral(), Livetime(), operator=(), OverrideLivetime(), PlusEqualsHelper(), SaveTo(), and ToTH1().
|
protected |
Definition at line 285 of file Spectrum.h.
Referenced by AsimovData(), GetEigen(), GetEigenStan(), Integral(), operator=(), OverridePOT(), PlusEqualsHelper(), POT(), SaveTo(), and ToTH1().
|
protected |
Things that point at this Spectrum. Maintained by SpectrumLoader.
Definition at line 289 of file Spectrum.h.
Referenced by AddLoader(), operator=(), RemoveLoader(), Spectrum(), and ~Spectrum().