FDExtrap.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include "CAFAna/Core/Cut.h"
10 #include "CAFAna/Core/Ratio.h"
11 #include "CAFAna/Cuts/Cuts.h"
12 #include "CAFAna/Core/Loaders.h"
13 
14 class TDirectory;
15 
16 namespace ana
17 {
18 
19  class FDExtrap
20  {
21 
22  public:
23 
25  const HistAxis& axis,
26  const Cut& selection,
27  const SystShifts& shiftMC = kNoShift,
28  const Var& weight = kUnweighted);
29 
30  static FDExtrap FDExtrap_c(SpectrumLoaderBase& nonswap,
32  const HistAxis& axis,
33  const Cut& selection,
34  const SystShifts& shiftMC = kNoShift,
35  const Var& weight = kUnweighted);
36 
37  virtual ~FDExtrap() {};
38 
39  FDExtrap(const FDExtrap&) = delete;
40  FDExtrap& operator=(const FDExtrap&) = delete;
41  FDExtrap(FDExtrap&&) = default;
42  FDExtrap& operator=(FDExtrap&&) = default;
43 
56 
63 
65 
66  virtual void SaveTo(TDirectory* dir, const std::string& name) const;
67  static std::unique_ptr<FDExtrap> LoadFrom(TDirectory* dir, const std::string& name);
68 
69 
70  protected:
71 
72  FDExtrap(){};
73 
76  const HistAxis& axis,
77  const Cut& selection,
78  const SystShifts& shiftMC = kNoShift,
79  const Var& weight = kUnweighted);
80 
81  std::unique_ptr<OscillatableSpectrum> LoadSpectrum(
82  TDirectory* dir, std::string name);
83 
84  std::unique_ptr<OscillatableSpectrum> fEEComp;
85  std::unique_ptr<OscillatableSpectrum> fAEAEComp;
86  std::unique_ptr<OscillatableSpectrum> fEMComp;
87  std::unique_ptr<OscillatableSpectrum> fAEAMComp;
88  std::unique_ptr<OscillatableSpectrum> fETComp;
89  std::unique_ptr<OscillatableSpectrum> fAEATComp;
90  std::unique_ptr<OscillatableSpectrum> fMEComp;
91  std::unique_ptr<OscillatableSpectrum> fAMAEComp;
92  std::unique_ptr<OscillatableSpectrum> fMMComp;
93  std::unique_ptr<OscillatableSpectrum> fAMAMComp;
94  std::unique_ptr<OscillatableSpectrum> fMTComp;
95  std::unique_ptr<OscillatableSpectrum> fAMATComp;
96 
97  std::unique_ptr<OscillatableSpectrum> fENCComp;
98  std::unique_ptr<OscillatableSpectrum> fMNCComp;
99  std::unique_ptr<OscillatableSpectrum> fTNCComp;
100  std::unique_ptr<OscillatableSpectrum> fAENCComp;
101  std::unique_ptr<OscillatableSpectrum> fAMNCComp;
102  std::unique_ptr<OscillatableSpectrum> fATNCComp;
103  std::unique_ptr<Spectrum> fNCCompSpec;
106  }; /// end of FDExtrap
107 
108 } /// end of namespace
const XML_Char * name
Definition: expat.h:151
OscillatableSpectrum TauNCComponent()
Definition: FDExtrap.cxx:141
Spectrum NCComponent()
Definition: FDExtrap.cxx:59
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::unique_ptr< OscillatableSpectrum > fAEAMComp
Definition: FDExtrap.h:87
std::unique_ptr< OscillatableSpectrum > fETComp
Definition: FDExtrap.h:88
std::unique_ptr< OscillatableSpectrum > fAEATComp
Definition: FDExtrap.h:89
static std::unique_ptr< FDExtrap > LoadFrom(TDirectory *dir, const std::string &name)
Definition: FDExtrap.cxx:245
OscillatableSpectrum AntiTauCCAppComponent()
Definition: FDExtrap.cxx:111
OscillatableSpectrum NueCCSurvComponent()
Definition: FDExtrap.cxx:65
const Var weight
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
OscillatableSpectrum AntiNumuCCAppComponent()
Definition: FDExtrap.cxx:83
std::unique_ptr< OscillatableSpectrum > fTNCComp
Definition: FDExtrap.h:99
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
std::unique_ptr< Spectrum > fNCCompSpec
Definition: FDExtrap.h:103
std::unique_ptr< OscillatableSpectrum > fMTComp
Definition: FDExtrap.h:94
std::unique_ptr< OscillatableSpectrum > fAMATComp
Definition: FDExtrap.h:95
OscillatableSpectrum EAntiTauCCAppComponent()
Definition: FDExtrap.cxx:121
std::unique_ptr< OscillatableSpectrum > fATNCComp
Definition: FDExtrap.h:102
std::unique_ptr< OscillatableSpectrum > fMEComp
Definition: FDExtrap.h:90
OscillatableSpectrum AntiNumuCCSurvComponent()
Definition: FDExtrap.cxx:95
std::unique_ptr< OscillatableSpectrum > fEMComp
Definition: FDExtrap.h:86
std::unique_ptr< OscillatableSpectrum > fMMComp
Definition: FDExtrap.h:92
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
std::unique_ptr< OscillatableSpectrum > fAMAEComp
Definition: FDExtrap.h:91
OscillatableSpectrum AntiNumuNCComponent()
Definition: FDExtrap.cxx:151
std::unique_ptr< OscillatableSpectrum > fAMAMComp
Definition: FDExtrap.h:93
std::unique_ptr< OscillatableSpectrum > fMNCComp
Definition: FDExtrap.h:98
OscillatableSpectrum NumuCCSurvComponent()
Definition: FDExtrap.cxx:89
SpectrumLoaderBase * fSpecLoadt
Definition: FDExtrap.h:105
OscillatableSpectrum TauCCAppComponent()
Definition: FDExtrap.cxx:106
virtual void SaveTo(TDirectory *dir, const std::string &name) const
Definition: FDExtrap.cxx:196
std::unique_ptr< OscillatableSpectrum > fAMNCComp
Definition: FDExtrap.h:101
OscillatableSpectrum NumuCCAppComponent()
Definition: FDExtrap.cxx:77
OscillatableSpectrum AntiNueNCComponent()
Definition: FDExtrap.cxx:146
OscillatableSpectrum AntiNueCCSurvComponent()
Definition: FDExtrap.cxx:71
OscillatableSpectrum NueNCComponent()
Definition: FDExtrap.cxx:131
std::unique_ptr< OscillatableSpectrum > LoadSpectrum(TDirectory *dir, std::string name)
const SystShifts kNoShift
Definition: SystShifts.cxx:22
Base class for the various types of spectrum loader.
virtual ~FDExtrap()
Definition: FDExtrap.h:37
std::unique_ptr< OscillatableSpectrum > fAENCComp
Definition: FDExtrap.h:100
std::unique_ptr< OscillatableSpectrum > fEEComp
Definition: FDExtrap.h:84
TDirectory * dir
Definition: macro.C:5
OscillatableSpectrum ETauCCAppComponent()
Definition: FDExtrap.cxx:116
std::vector< Loaders * > loaders
Definition: syst_header.h:386
OscillatableSpectrum AntiNueCCAppComponent()
Definition: FDExtrap.cxx:126
FDExtrap & operator=(const FDExtrap &)=delete
std::unique_ptr< OscillatableSpectrum > fENCComp
Definition: FDExtrap.h:97
OscillatableSpectrum NueCCAppComponent()
Definition: FDExtrap.cxx:101
Spectrum with true energy information, allowing it to be oscillated
std::unique_ptr< OscillatableSpectrum > fAEAEComp
Definition: FDExtrap.h:85
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
OscillatableSpectrum NumuNCComponent()
Definition: FDExtrap.cxx:136
SpectrumLoaderBase * fSpecLoad
Definition: FDExtrap.h:104
OscillatableSpectrum AntiTauNCComponent()
Definition: FDExtrap.cxx:156
static FDExtrap FDExtrap_c(Loaders &loaders, const HistAxis &axis, const Cut &selection, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Definition: FDExtrap.cxx:23
enum BeamMode string