CheatDecomp.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 class TDirectory;
6 
7 namespace ana
8 {
9  /// Just return the ND truth spectra as the decomposition
10  class CheatDecomp: public IDecomp
11  {
12  public:
15  const Binning& bins,
16  const Var& var,
17  const Cut& cut,
18  const SystShifts& shift = kNoShift,
19  const Var& wei = kUnweighted);
20 
22  const HistAxis& axis,
23  const Cut& cut,
24  const SystShifts& shift = kNoShift,
25  const Var& wei = kUnweighted);
26  //nc
27  Spectrum NCTotalComponent() const override {return fNCTot;}
28  Spectrum NCComponent() const override {return fNC;}
29  Spectrum NCAntiComponent() const override {return fNCAnti;}
30  //end nc
31  Spectrum NumuComponent() const override {return fNumu;}
32  Spectrum NueComponent() const override {return fNue;}
33  Spectrum AntiNumuComponent() const override {return fAntiNumu;}
34  Spectrum AntiNueComponent() const override {return fAntiNue;}
36 
37  void SaveTo(TDirectory* dir, const std::string& name) const override;
38  static std::unique_ptr<CheatDecomp> LoadFrom(TDirectory* dir, const std::string& name);
39 
40  protected:
42  :
43  //nc
44  fNCTot (Spectrum::Uninitialized()),
45  fNC (Spectrum::Uninitialized()),
46  fNCAnti (Spectrum::Uninitialized()),
47  //end nc
48  fNumu (Spectrum::Uninitialized()),
49  fNue (Spectrum::Uninitialized()),
50  fAntiNumu(Spectrum::Uninitialized()),
51  fAntiNue (Spectrum::Uninitialized())
52  {};
53 
54  //nc
58  //end nc
63  };
64 }
void SaveTo(TDirectory *dir, const std::string &name) const override
Definition: CheatDecomp.cxx:47
const XML_Char * name
Definition: expat.h:151
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Spectrum NCTotalComponent() const override
Definition: CheatDecomp.h:27
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Spectrum NCComponent() const override
Definition: CheatDecomp.h:28
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const char * label
static std::unique_ptr< CheatDecomp > LoadFrom(TDirectory *dir, const std::string &name)
Definition: CheatDecomp.cxx:73
Spectrum NueComponent() const override
Definition: CheatDecomp.h:32
Spectrum fNumu
Definition: CheatDecomp.h:59
Spectrum AntiNumuComponent() const override
Definition: CheatDecomp.h:33
Spectrum fNCAnti
Definition: CheatDecomp.h:57
Spectrum fAntiNumu
Definition: CheatDecomp.h:61
loader
Definition: demo0.py:10
Spectrum NumuComponent() const override
Definition: CheatDecomp.h:31
const SystShifts kNoShift
Definition: SystShifts.cxx:22
Base class for the various types of spectrum loader.
const Binning bins
Definition: NumuCC_CPiBin.h:8
const Cut cut
Definition: exporter_fd.C:30
TDirectory * dir
Definition: macro.C:5
Spectrum fNCTot
Definition: CheatDecomp.h:52
Standard interface to all decomposition techniques.
Definition: IDecomp.h:13
Spectrum TotalMC()
Definition: CheatDecomp.h:35
Just return the ND truth spectra as the decomposition.
Definition: CheatDecomp.h:10
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
Spectrum fAntiNue
Definition: CheatDecomp.h:62
Spectrum NCAntiComponent() const override
Definition: CheatDecomp.h:29
Spectrum AntiNueComponent() const override
Definition: CheatDecomp.h:34
enum BeamMode string