All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PredictionIncDirt.cxx
Go to the documentation of this file.
2 
4 
5 #include "TDirectory.h"
6 #include "TObjString.h"
7 
8 namespace ana
9 {
10  // --------------------------------------------------------------------------
12  SpectrumLoaderBase& loaderNue,
13  SpectrumLoaderBase& loaderNuTau,
14  SpectrumLoaderBase& loaderIntrinsic,
15  SpectrumLoaderBase& loaderDirt,
16  const HistAxis& axis,
17  const SpillCut& spillcut,
18  const Cut& cut,
19  const SystShifts& shift,
20  const Var& wei)
21  : fDet(loaderNonswap, loaderNue, loaderNuTau, loaderIntrinsic,
22  axis, spillcut, cut, shift, wei),
23  fDirt(loaderDirt, kNullLoader, kNullLoader, kNullLoader,
24  axis, spillcut, cut, shift, wei)
25  {
26  }
27 
28  // --------------------------------------------------------------------------
30  SpectrumLoaderBase& loaderDirt,
31  const HistAxis& axis,
32  const SpillCut& spillcut,
33  const Cut& cut,
34  const SystShifts& shift,
35  const Var& wei)
36  : fDet(loaders, axis, spillcut, cut, shift, wei),
37  fDirt(loaderDirt, kNullLoader, kNullLoader, kNullLoader,
38  axis, spillcut, cut, shift, wei)
39  {
40  }
41 
42  // --------------------------------------------------------------------------
44  {
45  }
46 
47  // --------------------------------------------------------------------------
48  std::unique_ptr<PredictionIncDirt>
50  {
51  assert(dir->GetDirectory("det") && dir->GetDirectory("dirt"));
52 
53  return std::unique_ptr<PredictionIncDirt>(new PredictionIncDirt(ana::LoadFrom<PredictionNoExtrap>(dir->GetDirectory("det")),
54  ana::LoadFrom<PredictionNoExtrap>(dir->GetDirectory("dirt"))));
55  }
56 
57  // --------------------------------------------------------------------------
58  void PredictionIncDirt::SaveTo(TDirectory* dir) const
59  {
60  TDirectory* tmp = gDirectory;
61 
62  dir->cd();
63 
64  TObjString("PredictionIncDirt").Write("type");
65 
66  fDet.SaveTo(dir->mkdir("det"));
67  fDirt.SaveTo(dir->mkdir("dirt"));
68 
69  tmp->cd();
70  }
71 }
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
virtual void SaveTo(TDirectory *dir) const override
static std::unique_ptr< PredictionIncDirt > LoadFrom(TDirectory *dir)
process_name opflashCryoW ana
shift
Definition: fcl_checks.sh:26
tuple dir
Definition: dropbox.py:28
Base class for the various types of spectrum loader.
PredictionNoExtrap fDirt
PredictionNoExtrap fDet
PredictionIncDirt(SpectrumLoaderBase &loaderNonswap, SpectrumLoaderBase &loaderNue, SpectrumLoaderBase &loaderNuTau, SpectrumLoaderBase &loaderIntrinsic, SpectrumLoaderBase &loaderDirt, const HistAxis &axis, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
static NullLoader kNullLoader
Dummy loader that doesn&#39;t load any files.