NDPredictionNoOsc.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include "CAFAna/Vars/Vars.h" // for kMeanTime
6 
7 #include "CAFAna/Core/Cut.h"
10 #include "CAFAna/Core/Ratio.h"
11 #include "CAFAna/Cuts/Cuts.h"
12 #include "CAFAna/Core/Loaders.h"
13 
14 namespace ana
15 {
16  /// Take the output of an extrapolation and oscillate it as required
18  {
19  public:
20  NDPredictionNoOsc(std::vector<std::unique_ptr<Spectrum>>& spectra);
21 
22  //--------------------------------------------------------------------
24  const HistAxis& axis,
25  const Cut& selection,
26  const SystShifts& shiftMC = kNoShift,
27  const Var& weight = kUnweighted);
28 
30  //SpectrumLoaderBase& swap,
31  const HistAxis& axis,
32  const Cut& selection,
33  const SystShifts& shiftMC = kNoShift,
34  const Var& weight = kUnweighted);
35 
36  virtual ~NDPredictionNoOsc() {};
37 
38  NDPredictionNoOsc(const NDPredictionNoOsc&) = delete;
42 
43  //------------------------------------------------------------------------
44 
45  // un-hide inherited method stubs so we don't get warnings from the compiler
49 
50  virtual Spectrum Predict(osc::IOscCalc* calc) const override;
51 
53  Flavors::Flavors_t flav,
55  Sign::Sign_t sign) const override;
56 
57  virtual Spectrum FakeData(osc::IOscCalc* calc, double POT);
58 
59  virtual void SaveTo(TDirectory* dir , const std::string& name) const override;
60 
61  static std::unique_ptr<NDPredictionNoOsc> LoadFrom(TDirectory* dir , const std::string& name);
62 
63  double fPOT;
64 
65  //NDPredictionNoOsc() = delete;
66 
67  protected:
69 
70  std::unique_ptr<Spectrum> fSpecCCNuMu;
71  std::unique_ptr<Spectrum> fSpecCCNuE;
72  std::unique_ptr<Spectrum> fSpecCCAntiNuMu;
73  std::unique_ptr<Spectrum> fSpecCCAntiNuE;
74 
75  std::unique_ptr<Spectrum> fSpecNCNuMu;
76  std::unique_ptr<Spectrum> fSpecNCNuE;
77  std::unique_ptr<Spectrum> fSpecNCAntiNuMu;
78  std::unique_ptr<Spectrum> fSpecNCAntiNuE;
79  std::unique_ptr<Spectrum> fNCCompSpec;
80 
81  //---------------------------------------
82  //NDPredictionNoOsc() {};
83 
85  //SpectrumLoaderBase& swap,
86  const HistAxis& axis,
87  const Cut& selection,
88  const SystShifts& shiftMC = kNoShift,
89  const Var& weight = kUnweighted);
90 
91  /*std::unique_ptr<Spectrum> fSpecCCNuMuNuE;
92  std::unique_ptr<Spectrum> fSpecCCNuENuMu;
93  std::unique_ptr<Spectrum> fSpecCCAntiNuMuAntiNuE;
94  std::unique_ptr<Spectrum> fSpecCCAntiNuEAntiNuMu;*/
95 
97 
98  }; // end of NDPredictionNoOsc
99 }
SpectrumLoaderBase * fSpecLoad
NDPredictionNoOsc & operator=(const NDPredictionNoOsc &)=delete
const XML_Char * name
Definition: expat.h:151
std::unique_ptr< Spectrum > fSpecNCAntiNuE
std::unique_ptr< Spectrum > fSpecCCAntiNuE
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
std::unique_ptr< Spectrum > fSpecNCAntiNuMu
const Var weight
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
virtual Spectrum Predict(osc::IOscCalc *calc) const =0
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
Take the output of an extrapolation and oscillate it as required.
std::unique_ptr< Spectrum > fNCCompSpec
osc::OscCalcDumb calc
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:39
std::unique_ptr< Spectrum > fSpecCCNuE
static NDPredictionNoOsc NDPredictionNoOsc_c(Loaders &loaders, const HistAxis &axis, const Cut &selection, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
std::unique_ptr< Spectrum > fSpecNCNuMu
std::unique_ptr< Spectrum > fSpecNCNuE
std::unique_ptr< Spectrum > fSpecCCAntiNuMu
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:49
virtual Spectrum FakeData(osc::IOscCalc *calc, double POT)
const SystShifts kNoShift
Definition: SystShifts.cxx:22
std::vector< double > POT
std::unique_ptr< Spectrum > fSpecCCNuMu
Base class for the various types of spectrum loader.
TDirectory * dir
Definition: macro.C:5
std::vector< Loaders * > loaders
Definition: syst_header.h:386
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
static std::unique_ptr< NDPredictionNoOsc > LoadFrom(TDirectory *dir, const std::string &name)
virtual Spectrum Predict(osc::IOscCalc *calc) const override
const Var kUnweighted
Definition: Var.h:14
def sign(x)
Definition: canMan.py:197
enum BeamMode string