All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PredictionNoExtrap.h
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
7 namespace ana
8 {
9  class Loaders;
10 
11  /// Prediction that just uses one detector's MC, with no extrapolation
13  {
14  public:
16 
18  SpectrumLoaderBase& loaderNue,
19  SpectrumLoaderBase& loaderNuTau,
20  SpectrumLoaderBase& loaderIntrinsic,
21  const std::string& label,
22  const Binning& bins,
23  const Var& var,
24  const SpillCut& spillcut,
25  const Cut& cut,
26  const SystShifts& shift = kNoShift,
27  const Var& wei = kUnweighted);
28 
30  SpectrumLoaderBase& loaderNue,
31  SpectrumLoaderBase& loaderNuTau,
32  SpectrumLoaderBase& loaderIntrinsic,
33  const HistAxis& axis,
34  const SpillCut& spillcut,
35  const Cut& cut,
36  const SystShifts& shift = kNoShift,
37  const Var& wei = kUnweighted);
38 
39  PredictionNoExtrap(Loaders& loaders,
40  const std::string& label,
41  const Binning& bins,
42  const Var& var,
43  const SpillCut& spillcut,
44  const Cut& cut,
45  const SystShifts& shift = kNoShift,
46  const Var& wei = kUnweighted);
47 
48  PredictionNoExtrap(Loaders& loaders,
49  const HistAxis& axis,
50  const SpillCut& spillcut,
51  const Cut& cut,
52  const SystShifts& shift = kNoShift,
53  const Var& wei = kUnweighted);
54 
55  virtual ~PredictionNoExtrap();
56 
57  static std::unique_ptr<PredictionNoExtrap> LoadFrom(TDirectory* dir);
58  virtual void SaveTo(TDirectory* dir) const override;
59 
60  };
61 
63  {
64  public:
66  : fAxis(axis), fSpillCut(spillcut), fCut(cut), fWei(wei)
67  {
68  }
69 
70  virtual std::unique_ptr<IPrediction>
71  Generate(Loaders& loaders, const SystShifts& shiftMC = kNoShift) const override
72  {
73  return std::unique_ptr<IPrediction>(new PredictionNoExtrap(loaders, fAxis, fSpillCut, fCut, shiftMC, fWei));
74  }
75 
76  protected:
81  };
82 }
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:18
virtual void SaveTo(TDirectory *dir) const override
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:16
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:12
static std::unique_ptr< PredictionNoExtrap > LoadFrom(TDirectory *dir)
process_name opflashCryoW ana
shift
Definition: fcl_checks.sh:26
virtual std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
PredictionNoExtrap(PredictionExtrap *pred)
const SystShifts kNoShift
Definition: SystShifts.h:61
tuple dir
Definition: dropbox.py:28
Base class for the various types of spectrum loader.
const Var kUnweighted([](const caf::SRSliceProxy *){return 1;})
The simplest possible Var, always 1. Used as a default weight.
Prediction that just uses one detector&#39;s MC, with no extrapolation.
Given loaders and an MC shift, Generate() generates an IPrediction.
Take the output of an extrapolation and oscillate it as required.
NoExtrapPredictionGenerator(HistAxis axis, SpillCut spillcut, Cut cut, Var wei=kUnweighted)