Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ana::PredictionNoExtrap Class Reference

Prediction that just uses FD MC, with no extrapolation. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-02-16/CAFAna/Prediction/PredictionNoExtrap.h"

Inheritance diagram for ana::PredictionNoExtrap:
ana::PredictionExtrap ana::IPrediction

Public Member Functions

 PredictionNoExtrap (std::unique_ptr< TrivialExtrap > &&extrap)
 
 PredictionNoExtrap (Loaders &loaders, const std::string &label, const Binning &bins, const Var &var, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
 PredictionNoExtrap (Loaders &loaders, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
 PredictionNoExtrap (SpectrumLoaderBase &loader, SpectrumLoaderBase &loaderSwap, SpectrumLoaderBase &loaderTau, const std::string &label, const Binning &bins, const Var &var, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
 PredictionNoExtrap (SpectrumLoaderBase &loader, SpectrumLoaderBase &loaderSwap, SpectrumLoaderBase &loaderTau, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
 PredictionNoExtrap (SpectrumLoaderBase &loader, SpectrumLoaderBase &loaderSwap, const std::string &label, const Binning &bins, const Var &var, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
virtual ~PredictionNoExtrap ()
 
virtual void SaveTo (TDirectory *dir) const override
 
Spectrum Predict (osc::IOscCalculator *calc) const override
 
SpectrumStan Predict (osc::IOscCalculatorStan *calc) const override
 
Spectrum PredictComponent (osc::IOscCalculator *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
 
SpectrumStan PredictComponent (osc::IOscCalculatorStan *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
 
OscillatableSpectrum ComponentCC (int from, int to) const override
 
Spectrum ComponentNCTotal () const override
 
Spectrum ComponentNC () const override
 
Spectrum ComponentNCAnti () const override
 
const IExtrapGetExtrap () const
 
virtual Spectrum PredictUnoscillated () const
 
virtual Spectrum PredictSyst (osc::IOscCalculator *calc, const SystShifts &syst) const
 
virtual SpectrumStan PredictSyst (osc::IOscCalculatorStan *calc, const SystShifts &syst) const
 
virtual Spectrum PredictComponentSyst (osc::IOscCalculator *calc, const SystShifts &syst, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const
 
virtual SpectrumStan PredictComponentSyst (osc::IOscCalculatorStan *calc, const SystShifts &syst, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const
 
virtual void Derivative (osc::IOscCalculator *calc, const SystShifts &shift, double pot, std::unordered_map< const ISyst *, std::vector< double >> &dchi) const
 

Static Public Member Functions

static std::unique_ptr< PredictionNoExtrapLoadFrom (TDirectory *dir)
 

Protected Attributes

std::unique_ptr< IExtrapfExtrap
 

Detailed Description

Prediction that just uses FD MC, with no extrapolation.

Definition at line 17 of file PredictionNoExtrap.h.

Constructor & Destructor Documentation

ana::PredictionNoExtrap::PredictionNoExtrap ( std::unique_ptr< TrivialExtrap > &&  extrap)

Definition at line 8 of file PredictionNoExtrap.cxx.

9  : PredictionExtrap(std::move(extrap))
10  {
11  }
ana::PredictionNoExtrap::PredictionNoExtrap ( Loaders loaders,
const std::string &  label,
const Binning bins,
const Var var,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)

Definition at line 14 of file PredictionNoExtrap.cxx.

22  {
23  }
var
const char * label
PredictionNoExtrap(std::unique_ptr< TrivialExtrap > &&extrap)
const Binning bins
Definition: NumuCC_CPiBin.h:8
const Cut cut
Definition: exporter_fd.C:30
std::vector< Loaders * > loaders
Definition: syst_header.h:385
GenericHistAxis< Var > HistAxis
Definition: HistAxis.h:95
ana::PredictionNoExtrap::PredictionNoExtrap ( Loaders loaders,
const HistAxis axis,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)

Definition at line 26 of file PredictionNoExtrap.cxx.

31  : PredictionExtrap(std::make_unique<TrivialExtrap>(loaders, axis, cut, shift, wei))
32  {
33  }
const Cut cut
Definition: exporter_fd.C:30
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ana::PredictionNoExtrap::PredictionNoExtrap ( SpectrumLoaderBase loader,
SpectrumLoaderBase loaderSwap,
SpectrumLoaderBase loaderTau,
const std::string &  label,
const Binning bins,
const Var var,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)

Definition at line 48 of file PredictionNoExtrap.cxx.

57  : PredictionExtrap(std::make_unique<TrivialExtrap>(loader, loaderSwap, loaderTau,
58  label, bins, var, cut, shift, wei))
59  {
60  }
var
const char * label
loader
Definition: demo0.py:10
const Binning bins
Definition: NumuCC_CPiBin.h:8
const Cut cut
Definition: exporter_fd.C:30
loaderSwap
Definition: demo4.py:9
ana::PredictionNoExtrap::PredictionNoExtrap ( SpectrumLoaderBase loader,
SpectrumLoaderBase loaderSwap,
SpectrumLoaderBase loaderTau,
const HistAxis axis,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)

Definition at line 36 of file PredictionNoExtrap.cxx.

43  : PredictionExtrap(std::make_unique<TrivialExtrap>(loader, loaderSwap, loaderTau, axis, cut, shift, wei))
44  {
45  }
loader
Definition: demo0.py:10
const Cut cut
Definition: exporter_fd.C:30
loaderSwap
Definition: demo4.py:9
ana::PredictionNoExtrap::PredictionNoExtrap ( SpectrumLoaderBase loader,
SpectrumLoaderBase loaderSwap,
const std::string &  label,
const Binning bins,
const Var var,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)

Definition at line 63 of file PredictionNoExtrap.cxx.

72  label, bins, var, cut, shift, wei)
73  {
74  }
var
const char * label
PredictionNoExtrap(std::unique_ptr< TrivialExtrap > &&extrap)
loader
Definition: demo0.py:10
const Binning bins
Definition: NumuCC_CPiBin.h:8
const Cut cut
Definition: exporter_fd.C:30
loaderSwap
Definition: demo4.py:9
static NullLoader kNullLoader
Dummy loader that doesn&#39;t load any files.
ana::PredictionNoExtrap::~PredictionNoExtrap ( )
virtual

Definition at line 100 of file PredictionNoExtrap.cxx.

101  {
102  // We created this in the constructor so it's our responsibility
103  // delete fExtrap;
104  }

Member Function Documentation

OscillatableSpectrum ana::PredictionExtrap::ComponentCC ( int  from,
int  to 
) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 98 of file PredictionExtrap.cxx.

References ana::PredictionExtrap::fExtrap.

Referenced by ana::PredictionAddRock::ComponentCC(), and ana::PredictionExtendToPeripheral::PredictionExtendToPeripheral().

99  {
100  if(from == +12 && to == +12) return fExtrap->NueSurvComponent();
101  if(from == -12 && to == -12) return fExtrap->AntiNueSurvComponent();
102 
103  if(from == +12 && to == +14) return fExtrap->NumuAppComponent();
104  if(from == -12 && to == -14) return fExtrap->AntiNumuAppComponent();
105 
106  if(from == +12 && to == +16) return fExtrap->TauFromEComponent();
107  if(from == -12 && to == -16) return fExtrap->AntiTauFromEComponent();
108 
109  if(from == +14 && to == +12) return fExtrap->NueAppComponent();
110  if(from == -14 && to == -12) return fExtrap->AntiNueAppComponent();
111 
112  if(from == +14 && to == +14) return fExtrap->NumuSurvComponent();
113  if(from == -14 && to == -14) return fExtrap->AntiNumuSurvComponent();
114 
115  if(from == +14 && to == +16) return fExtrap->TauFromMuComponent();
116  if(from == -14 && to == -16) return fExtrap->AntiTauFromMuComponent();
117 
118  assert(0 && "Not reached");
119  }
std::unique_ptr< IExtrap > fExtrap
Spectrum ana::PredictionExtrap::ComponentNC ( ) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 127 of file PredictionExtrap.cxx.

References ana::PredictionExtrap::fExtrap.

Referenced by ana::PredictionAddRock::ComponentNC(), and ana::PredictionExtendToPeripheral::PredictionExtendToPeripheral().

128  {
129  return fExtrap->NCComponent();
130  }
std::unique_ptr< IExtrap > fExtrap
Spectrum ana::PredictionExtrap::ComponentNCAnti ( ) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 131 of file PredictionExtrap.cxx.

References ana::PredictionExtrap::fExtrap.

Referenced by ana::PredictionAddRock::ComponentNCAnti(), and ana::PredictionExtendToPeripheral::PredictionExtendToPeripheral().

132  {
133  return fExtrap->NCAntiComponent();
134  }
std::unique_ptr< IExtrap > fExtrap
Spectrum ana::PredictionExtrap::ComponentNCTotal ( ) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 123 of file PredictionExtrap.cxx.

References ana::PredictionExtrap::fExtrap.

Referenced by ana::PredictionAddRock::ComponentNCTotal(), and ana::PredictionExtendToPeripheral::PredictionExtendToPeripheral().

124  {
125  return fExtrap->NCTotalComponent();
126  }
std::unique_ptr< IExtrap > fExtrap
virtual void ana::IPrediction::Derivative ( osc::IOscCalculator calc,
const SystShifts shift,
double  pot,
std::unordered_map< const ISyst *, std::vector< double >> &  dchi 
) const
inlinevirtualinherited

Reimplemented in ana::PredictionInterp, and ana::PredictionAddRock.

Definition at line 92 of file IPrediction.h.

Referenced by ana::PredictionAddRock::Derivative(), and ana::SingleSampleExperiment::Derivative().

96  {
97  // Implementing this function is optional. If you don't implement it,
98  // this default implementation will be used, which signals to callers
99  // that your Prediction doesn't implement this feature.
100  dchi.clear();
101  }
const IExtrap* ana::PredictionExtrap::GetExtrap ( ) const
inlineinherited
std::unique_ptr< PredictionNoExtrap > ana::PredictionNoExtrap::LoadFrom ( TDirectory *  dir)
static

Definition at line 92 of file PredictionNoExtrap.cxx.

Referenced by ana::ComparePredictionsPeripheralFromVector(), CutTableAna(), FDDataMC(), GetHistVectors(), GetSpectToHist(), ana::LoadFrom< IPrediction >(), make_files_for_decomp_plots(), nue_data_mc_validation(), and nue_fd_mc_validation().

93  {
94  assert(dir->GetDirectory("extrap"));
95  return std::make_unique<PredictionNoExtrap>(ana::LoadFrom<TrivialExtrap>(dir->GetDirectory("extrap")));
96  }
TDirectory * dir
Definition: macro.C:5
Spectrum ana::PredictionExtrap::Predict ( osc::IOscCalculator calc) const
overridevirtualinherited

Implements ana::IPrediction.

Definition at line 20 of file PredictionExtrap.cxx.

References ana::Flavors::kAll, ana::Current::kBoth, ana::Sign::kBoth, and ana::PredictionExtrap::PredictComponent().

Referenced by BackPredict(), BlessedPlotsLoad(), caf_numu_sensitivity(), caf_numu_sensitivity_no_tau(), cc(), ComparePredictions(), CVNCuts(), demo5(), demo_CPT(), demo_flat(), drawPlot(), drawSystsShiftingNDdata_updatedAna(), FD_plots(), GetExtrap(), GetNuePredictionFuture(), getTimePeakPlots(), ana::NumuAnalysis::MakeExperiment(), MakePeriCutPlot(), MichelDecompTest(), modularextrap_demo_nue(), modularextrap_demo_numu(), nue_ana_basic(), numu_demo_split_plot(), numu_sig_nonmax(), PeripheralCuts(), plot_nue_xsec_pred(), PlotNus17Prediction(), ana::PredictionSterile::PredictUnoscillated(), PredRatioToNom(), resolution2018(), rhc_sensitivity(), saveContours_addExpt(), saveContours_simple(), sterile_demo(), template_basic(), test_ana(), test_genie_systs(), test_nueextrapsyst(), and test_saloaders().

21  {
22  return PredictComponent(calc,
25  Sign::kBoth);
26  }
Spectrum PredictComponent(osc::IOscCalculator *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Interactions of both types.
Definition: IPrediction.h:42
Both neutrinos and antineutrinos.
Definition: IPrediction.h:52
All neutrinos, any flavor.
Definition: IPrediction.h:26
SpectrumStan ana::PredictionExtrap::Predict ( osc::IOscCalculatorStan calc) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 29 of file PredictionExtrap.cxx.

References ana::Flavors::kAll, ana::Current::kBoth, ana::Sign::kBoth, and ana::PredictionExtrap::PredictComponent().

30  {
31  return PredictComponent(calc,
34  Sign::kBoth);
35  }
Spectrum PredictComponent(osc::IOscCalculator *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Interactions of both types.
Definition: IPrediction.h:42
Both neutrinos and antineutrinos.
Definition: IPrediction.h:52
All neutrinos, any flavor.
Definition: IPrediction.h:26
Spectrum ana::PredictionExtrap::PredictComponent ( osc::IOscCalculator calc,
Flavors::Flavors_t  flav,
Current::Current_t  curr,
Sign::Sign_t  sign 
) const
overridevirtualinherited
SpectrumStan ana::PredictionExtrap::PredictComponent ( osc::IOscCalculatorStan calc,
Flavors::Flavors_t  flav,
Current::Current_t  curr,
Sign::Sign_t  sign 
) const
overridevirtualinherited

Reimplemented from ana::IPrediction.

Definition at line 89 of file PredictionExtrap.cxx.

References calc, febshutoff_auto::curr, and canMan::sign().

93  {
94  return _PredictComponent<SpectrumStan>(calc, flav, curr, sign);
95  }
osc::OscCalculatorDumb calc
def sign(x)
Definition: canMan.py:204
Spectrum ana::IPrediction::PredictComponentSyst ( osc::IOscCalculator calc,
const SystShifts syst,
Flavors::Flavors_t  flav,
Current::Current_t  curr,
Sign::Sign_t  sign 
) const
virtualinherited

Reimplemented in ana::PredictionInterp, ana::PredictionNumuFAHadE, ana::PredictionCombinePeriods, and ana::PredictionAddRock.

Definition at line 128 of file IPrediction.cxx.

References ana::SystShifts::IsNominal(), and ana::IPrediction::PredictComponent().

Referenced by PlotSysts(), ana::PredictionAddRock::PredictComponentSyst(), ana::PredictionCombinePeriods::PredictComponentSyst(), ana::PredictionNumuFAHadE::PredictComponentSyst(), systematics_extrap_comp_from_pred_interp(), systematics_summary_from_pred_interp(), and systematics_table_from_pred_interp().

133  {
134  assert(syst.IsNominal() && "This Prediction doesn't support PredictSyst(). Did you just mean Predict()?");
135 
136  // Default implementation: no treatment of systematics
137  return PredictComponent(calc, flav, curr, sign);
138  }
virtual Spectrum PredictComponent(osc::IOscCalculator *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
def sign(x)
Definition: canMan.py:204
string syst
Definition: plotSysts.py:176
SpectrumStan ana::IPrediction::PredictComponentSyst ( osc::IOscCalculatorStan calc,
const SystShifts syst,
Flavors::Flavors_t  flav,
Current::Current_t  curr,
Sign::Sign_t  sign 
) const
virtualinherited

Reimplemented in ana::PredictionInterp.

Definition at line 142 of file IPrediction.cxx.

References ana::SystShifts::IsNominal(), and ana::IPrediction::PredictComponent().

147  {
148  assert(syst.IsNominal() && "This Prediction doesn't support PredictSyst(). Did you just mean Predict()?");
149 
150  // Default implementation: no treatment of systematics
151  return PredictComponent(calc, flav, curr, sign);
152  }
virtual Spectrum PredictComponent(osc::IOscCalculator *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
def sign(x)
Definition: canMan.py:204
string syst
Definition: plotSysts.py:176
Spectrum ana::IPrediction::PredictSyst ( osc::IOscCalculator calc,
const SystShifts syst 
) const
virtualinherited
SpectrumStan ana::IPrediction::PredictSyst ( osc::IOscCalculatorStan calc,
const SystShifts syst 
) const
virtualinherited

Reimplemented in ana::PredictionInterp.

Definition at line 108 of file IPrediction.cxx.

References ana::SystShifts::IsNominal(), and ana::IPrediction::Predict().

110  {
111  assert(syst.IsNominal() && "This Prediction doesn't support PredictSyst(). Did you just mean Predict()?");
112 
113  // Default implementation: no treatment of systematics
114  return Predict(calc);
115  }
virtual Spectrum Predict(osc::IOscCalculator *calc) const =0
string syst
Definition: plotSysts.py:176
Spectrum ana::IPrediction::PredictUnoscillated ( ) const
virtualinherited

Reimplemented in ana::PredictionSterile.

Definition at line 82 of file IPrediction.cxx.

References noosc, and ana::IPrediction::Predict().

Referenced by cc(), demo5(), demo::DrawUpDownRatioCanvas(), Efficiency(), efficiency(), efficiencySA(), fa_fd_data_mc_systs(), GetSpectra(), numu_demo_split_plot(), plot_nd_data_mc(), template_basic(), and test_ana().

83  {
84  // Default implementation
86  return Predict(&noosc);
87  }
Pass neutrinos through unchanged.
virtual Spectrum Predict(osc::IOscCalculator *calc) const =0
osc::NoOscillations noosc
Definition: NueSystFuncs.h:44
void ana::PredictionNoExtrap::SaveTo ( TDirectory *  dir) const
overridevirtual

Member Data Documentation

std::unique_ptr<IExtrap> ana::PredictionExtrap::fExtrap
protectedinherited

The documentation for this class was generated from the following files: