NCDecomp.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include "CAFAna/Core/Loaders.h"
6 
7 namespace ana
8 {
9  /// Uses MC for \f$ \nu_\mu \f$ CC and \f$ \nu_e \f$ CC components, assigns remainder of data to NC
10  class NCDecomp: public IDecomp
11  {
12  public:
13  NCDecomp(SpectrumLoaderBase& loaderMC,
14  SpectrumLoaderBase& loaderData,
15  const std::string& label,
16  const Binning& bins,
17  const Var& var,
18  const Cut& cut,
19  const SystShifts& shiftMC = kNoShift,
20  const SystShifts& shiftData = kNoShift,
21  const Var& wei = kUnweighted);
22 
23  NCDecomp(SpectrumLoaderBase& loaderMC,
24  SpectrumLoaderBase& loaderData,
25  const HistAxis& axis,
26  const Cut& cut,
27  const SystShifts& shiftMC = kNoShift,
28  const SystShifts& shiftData = kNoShift,
29  const Var& wei = kUnweighted);
30 
32  const HistAxis& axis,
33  const Cut& cut,
34  const SystShifts& shiftMC = kNoShift,
35  const SystShifts& shiftData = kNoShift,
36  const Var& wei = kUnweighted);
37 
38  Spectrum NumuComponent() const override {return fNumu;}
39  Spectrum AntiNumuComponent() const override {return fAntiNumu;}
40  Spectrum NCTotalComponent() const override;
41  Spectrum NCComponent() const override;
42  Spectrum NCAntiComponent() const override;
43  Spectrum NueComponent() const override {return fNue;}
44  Spectrum AntiNueComponent() const override {return fAntiNue;}
45  Spectrum Data_Component() const override {return fData;}
46 
47  void SaveTo(TDirectory* dir, const std::string& name) const override;
48  static std::unique_ptr<NCDecomp> LoadFrom(TDirectory* dir, const std::string& name);
49 
50  protected:
52  : fData(Spectrum::Uninitialized()),
53  fNCTot (Spectrum::Uninitialized()),
54  fNue (Spectrum::Uninitialized()),
55  fAntiNue(Spectrum::Uninitialized()),
56  fNumu(Spectrum::Uninitialized()),
57  fAntiNumu(Spectrum::Uninitialized()),
58  fNotNC(Spectrum::Uninitialized())
59  {};
60 
65 
68 
70  };
71 }
Spectrum NCTotalComponent() const override
Definition: NCDecomp.cxx:64
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
static std::unique_ptr< NCDecomp > LoadFrom(TDirectory *dir, const std::string &name)
Definition: NCDecomp.cxx:99
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
Spectrum fData
Definition: NCDecomp.h:59
Spectrum fNumu
Definition: NCDecomp.h:66
Spectrum AntiNueComponent() const override
Definition: NCDecomp.h:44
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
Spectrum NueComponent() const override
Definition: NCDecomp.h:43
Spectrum fAntiNumu
Definition: NCDecomp.h:67
const char * label
Uses MC for CC and CC components, assigns remainder of data to NC.
Definition: NCDecomp.h:10
Spectrum AntiNumuComponent() const override
Definition: NCDecomp.h:39
Spectrum NCComponent() const override
Definition: NCDecomp.cxx:71
const SystShifts kNoShift
Definition: SystShifts.cxx:22
Base class for the various types of spectrum loader.
Spectrum NumuComponent() const override
Definition: NCDecomp.h:38
const Binning bins
Definition: NumuCC_CPiBin.h:8
Spectrum Data_Component() const override
Definition: NCDecomp.h:45
const Cut cut
Definition: exporter_fd.C:30
Spectrum fNotNC
Definition: NCDecomp.h:69
Spectrum fNCTot
Definition: NCDecomp.h:62
TDirectory * dir
Definition: macro.C:5
std::vector< Loaders * > loaders
Definition: syst_header.h:386
void SaveTo(TDirectory *dir, const std::string &name) const override
Definition: NCDecomp.cxx:76
Standard interface to all decomposition techniques.
Definition: IDecomp.h:13
Spectrum NCAntiComponent() const override
Definition: NCDecomp.cxx:72
Spectrum fAntiNue
Definition: NCDecomp.h:64
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
Spectrum fNue
Definition: NCDecomp.h:63
enum BeamMode string