PredictionExtrap.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "TH1D.h"
4 
6 
7 namespace ana
8 {
9  class IExtrap;
10 
11  /// Take the output of an extrapolation and oscillate it as required
13  {
14  public:
15  /// Takes ownership of \a extrap
16  PredictionExtrap(std::unique_ptr<IExtrap>&& extrap);
17  PredictionExtrap() = delete;
18 
19  // un-hide inherited method stubs so we don't get warnings from the compiler
21 
22  Spectrum Predict(osc::IOscCalc* calc) const override;
23  Spectrum Predict(osc::IOscCalcStan* calc) const override;
24 
26  Flavors::Flavors_t flav,
28  Sign::Sign_t sign) const override;
30  Flavors::Flavors_t flav,
31  Current::Current_t curr,
32  Sign::Sign_t sign) const override;
33 
34  OscillatableSpectrum ComponentCC(int from, int to) const override;
35  //nc
36  Spectrum ComponentNCTotal() const override;
37  Spectrum ComponentNC() const override;
38  Spectrum ComponentNCAnti() const override;
39  //end nc
40  virtual void SaveTo(TDirectory* dir, const std::string& name) const override;
41  static std::unique_ptr<PredictionExtrap> LoadFrom(TDirectory* dir, const std::string& name);
42 
43  const IExtrap* GetExtrap() const {return fExtrap.get();}
44 
45  protected:
46  /// Templated helper function called by the non-templated versions
47  template<typename T>
49  Flavors::Flavors_t flav,
50  Current::Current_t curr,
51  Sign::Sign_t sign) const;
52 
53  std::unique_ptr<IExtrap> fExtrap;
54  };
55 }
OscillatableSpectrum ComponentCC(int from, int to) const override
Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
const XML_Char * name
Definition: expat.h:151
Spectrum ComponentNC() const override
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Spectrum ComponentNCTotal() const override
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
osc::OscCalcDumb calc
Spectrum _PredictComponent(osc::_IOscCalc< T > *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const
Templated helper function called by the non-templated versions.
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
Spectrum Predict(osc::IOscCalc *calc) const override
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:49
static std::unique_ptr< PredictionExtrap > LoadFrom(TDirectory *dir, const std::string &name)
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
Interface to extrapolation procedures.
Definition: IExtrap.h:8
std::unique_ptr< IExtrap > fExtrap
const IExtrap * GetExtrap() const
TDirectory * dir
Definition: macro.C:5
Spectrum ComponentNCAnti() const override
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
Take the output of an extrapolation and oscillate it as required.
Spectrum with true energy information, allowing it to be oscillated
def sign(x)
Definition: canMan.py:197
enum BeamMode string