All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PredictionNoOsc.h
Go to the documentation of this file.
3 
4 namespace ana
5 {
6  class Loaders;
7 
8  /// Prediction that wraps a simple Spectrum
10  {
11  public:
13  const HistAxis& axis,
14  const SpillCut& spillcut,
15  const Cut& cut,
16  const SystShifts& shift = kNoShift,
17  const Var& wei = kUnweighted);
18 
20  const std::string& label,
21  const Binning& bins,
22  const Var& var,
23  const SpillCut& spillcut,
24  const Cut& cut,
25  const SystShifts& shift = kNoShift,
26  const Var& wei = kUnweighted);
27 
28  static std::unique_ptr<PredictionNoOsc> LoadFrom(TDirectory* dir);
29  virtual void SaveTo(TDirectory* dir) const override;
30 
31  virtual Spectrum Predict(osc::IOscCalc* /*calc*/) const override
32  {
33  return fSpectrum;
34  }
35 
37  Flavors::Flavors_t flav,
38  Current::Current_t curr,
39  Sign::Sign_t sign) const override;
40 
41  protected:
43  const Spectrum& sNC,
44  const Spectrum& sNumu, const Spectrum& sNumubar,
45  const Spectrum& sNue, const Spectrum& sNuebar)
46  : fSpectrum(s),
47  fSpectrumNC(sNC),
48  fSpectrumNumu(sNumu), fSpectrumNumubar(sNumubar),
49  fSpectrumNue(sNue), fSpectrumNuebar(sNuebar)
50  {
51  }
52 
54 
60  };
61 
62 
64  {
65  public:
67  HistAxis axis,
68  SpillCut spillcut,
69  Cut cut,
70  Var wei = kUnweighted)
71  : fLoader(loader), fAxis(axis), fSpillCut(spillcut), fCut(cut), fWei(wei)
72  {
73  }
74 
75  virtual std::unique_ptr<IPrediction>
76  Generate(Loaders& loaders, const SystShifts& shiftMC = kNoShift) const override
77  {
78  return std::unique_ptr<IPrediction>(new PredictionNoOsc(fLoader,
79  fAxis,
80  fSpillCut,
81  fCut,
82  shiftMC, fWei));
83  }
84  protected:
90  };
91 
92 }
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:18
SpectrumLoaderBase & fLoader
tuple loader
Definition: demo.py:7
PredictionNoOsc(const Spectrum &s, const Spectrum &sNC, const Spectrum &sNumu, const Spectrum &sNumubar, const Spectrum &sNue, const Spectrum &sNuebar)
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:16
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:12
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
static std::unique_ptr< PredictionNoOsc > LoadFrom(TDirectory *dir)
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
virtual Spectrum Predict(osc::IOscCalc *) const override
NoOscPredictionGenerator(SpectrumLoaderBase &loader, HistAxis axis, SpillCut spillcut, Cut cut, Var wei=kUnweighted)
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
PredictionNoOsc(SpectrumLoaderBase &loader, const HistAxis &axis, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
const Var kUnweighted([](const caf::SRSliceProxy *){return 1;})
The simplest possible Var, always 1. Used as a default weight.
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
Standard interface to all prediction techniques.
Definition: IPrediction.h:58
Given loaders and an MC shift, Generate() generates an IPrediction.
virtual std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
Prediction that wraps a simple Spectrum.