NDExtrap.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
7 #include "CAFAna/Core/Cut.h"
13 #include "CAFAna/Decomp/IDecomp.h"
14 #include "CAFAna/Core/Ratio.h"
15 #include "CAFAna/Cuts/Cuts.h"
16 #include "CAFAna/Core/Loaders.h"
17 
18 class TDirectory;
19 
20 namespace ana
21 {
22 
23  class NDExtrap
24  {
25 
26  public:
27 
29  const HistAxis& axis,
30  const Cut& selection,
31  const SystShifts& shiftMC = kNoShift,
32  const Var& weight = kUnweighted);
33 
34  static NDExtrap NDExtrap_c(SpectrumLoaderBase& nonswap,
36  const HistAxis& axis,
37  const Cut& selection,
38  const SystShifts& shiftMC = kNoShift,
39  const Var& weight = kUnweighted);
40 
41  virtual ~NDExtrap(){};
42 
43  NDExtrap(const NDExtrap&) = delete;
44  NDExtrap& operator=(const NDExtrap&) = delete;
45  NDExtrap(NDExtrap&&) = default;
46  NDExtrap& operator=(NDExtrap&&) = default;
47 
56 
61 
62  double GetWeightedPOT();
63 
65 
66  virtual void SaveTo(TDirectory* dir, const std::string& name) const;
67  static std::unique_ptr<NDExtrap> LoadFrom(TDirectory* dir, const std::string& name);
68 
69  double fPOT;
70 
71  protected:
72 
73  NDExtrap(){};
74 
76  SpectrumLoaderBase& swap,
77  const HistAxis& axis,
78  const Cut& selection,
79  const SystShifts& shiftMC = kNoShift,
80  const Var& weight = kUnweighted);
81 
82  std::unique_ptr<NDOscillatableSpectrum> fEEComp;
83  std::unique_ptr<NDOscillatableSpectrum> fAEAEComp;
84  std::unique_ptr<NDOscillatableSpectrum> fEMComp;
85  std::unique_ptr<NDOscillatableSpectrum> fAEAMComp;
86  std::unique_ptr<NDOscillatableSpectrum> fMMComp;
87  std::unique_ptr<NDOscillatableSpectrum> fAMAMComp;
88  std::unique_ptr<NDOscillatableSpectrum> fMEComp;
89  std::unique_ptr<NDOscillatableSpectrum> fAMAEComp;
90 
91  std::unique_ptr<NDOscillatableSpectrum> fENCComp;
92  std::unique_ptr<NDOscillatableSpectrum> fMNCComp;
93  std::unique_ptr<NDOscillatableSpectrum> fAENCComp;
94  std::unique_ptr<NDOscillatableSpectrum> fAMNCComp;
95 
96  std::unique_ptr<Spectrum> fNCCompSpec;
98 
99  }; /// end of NDExtrap
100 
101 } /// end of namespace
const XML_Char * name
Definition: expat.h:151
NDOscillatableSpectrum AntiNueCCSurvComponent()
Definition: NDExtrap.cxx:80
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::unique_ptr< NDOscillatableSpectrum > fAMAMComp
Definition: NDExtrap.h:87
NDOscillatableSpectrum NueCCSurvComponent()
Definition: NDExtrap.cxx:74
const Var weight
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
std::unique_ptr< NDOscillatableSpectrum > fAEAMComp
Definition: NDExtrap.h:85
std::unique_ptr< NDOscillatableSpectrum > fAMNCComp
Definition: NDExtrap.h:94
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
double fPOT
Definition: NDExtrap.h:69
NDOscillatableSpectrum AntiNumuNCComponent()
Definition: NDExtrap.cxx:140
Spectrum NCComponent()
Definition: NDExtrap.cxx:68
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
virtual void SaveTo(TDirectory *dir, const std::string &name) const
Definition: NDExtrap.cxx:172
std::unique_ptr< NDOscillatableSpectrum > fAENCComp
Definition: NDExtrap.h:93
std::unique_ptr< NDOscillatableSpectrum > fEEComp
Definition: NDExtrap.h:82
static NDExtrap NDExtrap_c(Loaders &loaders, const HistAxis &axis, const Cut &selection, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Definition: NDExtrap.cxx:25
static std::unique_ptr< NDExtrap > LoadFrom(TDirectory *dir, const std::string &name)
Definition: NDExtrap.cxx:207
std::unique_ptr< NDOscillatableSpectrum > fEMComp
Definition: NDExtrap.h:84
std::unique_ptr< NDOscillatableSpectrum > fAEAEComp
Definition: NDExtrap.h:83
SpectrumLoaderBase * fSpecLoad
Definition: NDExtrap.h:97
NDOscillatableSpectrum NueCCAppComponent()
Definition: NDExtrap.cxx:110
NDOscillatableSpectrum AntiNueNCComponent()
Definition: NDExtrap.cxx:134
virtual ~NDExtrap()
Definition: NDExtrap.h:41
NDOscillatableSpectrum AntiNumuCCSurvComponent()
Definition: NDExtrap.cxx:104
NDExtrap & operator=(const NDExtrap &)=delete
const SystShifts kNoShift
Definition: SystShifts.cxx:22
Base class for the various types of spectrum loader.
std::unique_ptr< NDOscillatableSpectrum > fMEComp
Definition: NDExtrap.h:88
double GetWeightedPOT()
Definition: NDExtrap.cxx:59
TDirectory * dir
Definition: macro.C:5
std::unique_ptr< NDOscillatableSpectrum > fENCComp
Definition: NDExtrap.h:91
std::vector< Loaders * > loaders
Definition: syst_header.h:386
std::unique_ptr< NDOscillatableSpectrum > fMNCComp
Definition: NDExtrap.h:92
NDOscillatableSpectrum AntiNueCCAppComponent()
Definition: NDExtrap.cxx:116
NDOscillatableSpectrum NumuCCAppComponent()
Definition: NDExtrap.cxx:86
NDOscillatableSpectrum AntiNumuCCAppComponent()
Definition: NDExtrap.cxx:92
NDOscillatableSpectrum NumuCCSurvComponent()
Definition: NDExtrap.cxx:98
NDOscillatableSpectrum NueNCComponent()
Definition: NDExtrap.cxx:122
std::unique_ptr< NDOscillatableSpectrum > fMMComp
Definition: NDExtrap.h:86
std::unique_ptr< Spectrum > fNCCompSpec
Definition: NDExtrap.h:96
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
std::unique_ptr< NDOscillatableSpectrum > fAMAEComp
Definition: NDExtrap.h:89
Spectrum with true L/E information, allowing it to be oscillated
NDOscillatableSpectrum NumuNCComponent()
Definition: NDExtrap.cxx:128
enum BeamMode string