All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PredictionScaleComp.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "OscLib/IOscCalc.h"
9 
10 namespace ana
11 {
12  /// \brief Prediction broken down into arbitrary components whose scales can
13  /// be varied independently.
15  {
16  public:
17  /// \param cut Cut applied to all histograms
18  /// \param truthcuts Prediction will be broken down into N components
19  /// following these cuts.
21  const HistAxis& axis,
22  SpillCut spillcut,
23  Cut cut,
24  const std::vector<const SystComponentScale*>& systs,
25  const SystShifts& shift = kNoShift,
26  const Var& wei = kUnweighted);
27  /// Constructor to take two HistAxis's to weight 2D spectra
29  const HistAxis& axis1,
30  const HistAxis& axis2,
31  SpillCut spillcut,
32  Cut cut,
33  const std::vector<const SystComponentScale*>& systs,
34  const SystShifts& shift = kNoShift,
35  const Var& wei = kUnweighted);
36 
37  /// This is for the FD via PredictionNoExtrap
39  SpectrumLoaderBase& loaderNue,
40  SpectrumLoaderBase& loaderNuTau,
41  SpectrumLoaderBase& loaderIntrinsic,
42  const HistAxis& axis,
43  SpillCut spillcut,
44  Cut cut,
45  const std::vector<const SystComponentScale*>& systs,
46  const SystShifts& shift = kNoShift,
47  const Var& wei = kUnweighted);
48 
49  virtual ~PredictionScaleComp();
50 
51  virtual Spectrum Predict(osc::IOscCalc* osc) const override
52  {
53  return fTotal->Predict(osc);
54  }
55 
57  const SystShifts& syst) const override
58  {
59  return PredictComponentSyst(osc, syst,
61  }
62 
64  Flavors::Flavors_t flav,
65  Current::Current_t curr,
66  Sign::Sign_t sign) const override
67  {
68  return fTotal->PredictComponent(calc, flav, curr, sign);
69  }
70 
72  const SystShifts& syst,
73  Flavors::Flavors_t flav,
74  Current::Current_t curr,
75  Sign::Sign_t sign) const override;
76 
78  const SystComponentScale* syst) const;
79 
80  static std::unique_ptr<PredictionScaleComp> LoadFrom(TDirectory* dir);
81  virtual void SaveTo(TDirectory* dir) const override;
82 
83  protected:
84  PredictionScaleComp(const IPrediction* total,
85  const std::vector<const IPrediction*>& preds,
86  const std::vector<const SystComponentScale*>& systs);
87 
88  std::vector<const SystComponentScale*> fSysts;
89  std::vector<const IPrediction*> fPreds;
90 
92  };
93 }
Spectrum PredictCategory(osc::IOscCalc *osc, const SystComponentScale *syst) const
static std::unique_ptr< PredictionScaleComp > LoadFrom(TDirectory *dir)
virtual Spectrum PredictComponentSyst(osc::IOscCalc *calc, const SystShifts &syst, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Uncertainty in the scale of a single component of the spectrum.
virtual Spectrum Predict(osc::IOscCalc *osc) const override
tuple loader
Definition: demo.py:7
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:16
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
PredictionScaleComp(SpectrumLoaderBase &loader, const HistAxis &axis, SpillCut spillcut, Cut cut, const std::vector< const SystComponentScale * > &systs, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
process_name opflashCryoW ana
shift
Definition: fcl_checks.sh:26
virtual void SaveTo(TDirectory *dir) const override
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:30
virtual Spectrum Predict(osc::IOscCalc *calc) const =0
std::vector< const SystComponentScale * > fSysts
Interactions of both types.
Definition: IPrediction.h:41
virtual Spectrum PredictSyst(osc::IOscCalc *osc, const SystShifts &syst) const override
const SystShifts kNoShift
Definition: SystShifts.h:61
tuple dir
Definition: dropbox.py:28
Base class for the various types of spectrum loader.
int sign(double val)
Definition: UtilFunc.cxx:104
const Var kUnweighted([](const caf::SRSliceProxy *){return 1;})
The simplest possible Var, always 1. Used as a default weight.
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
Both neutrinos and antineutrinos.
Definition: IPrediction.h:51
Standard interface to all prediction techniques.
Definition: IPrediction.h:58
All neutrinos, any flavor.
Definition: IPrediction.h:25
const IPrediction * fTotal
std::vector< const IPrediction * > fPreds
Prediction broken down into arbitrary components whose scales can be varied independently.