NDOscillatableSpectrum.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include "CAFAna/Core/Binning.h"
7 #include "CAFAna/Core/HistAxis.h"
8 #include "CAFAna/Core/Spectrum.h"
10 
11 #include <string>
12 
13 #include "TMD5.h"
14 
15 class TH2;
16 class TH2D;
17 
18 #include "CAFAna/Core/FwdDeclare.h"
19 
20 namespace ana
21 {
22  class Binning;
23 
24  /// %Spectrum with true L/E information, allowing it to be oscillated
26  {
27  public:
28  friend class SpectrumLoaderBase;
29  friend class SpectrumLoader;
30  friend class NullLoader;
31 
33  const Binning& bins,
35  const Var& var,
36  const Cut& cut,
37  const SystShifts& shift = kNoShift,
38  const Var& wei = kUnweighted);
39 
41  const HistAxis& axis,
42  const Cut& cut,
43  const SystShifts& shift = kNoShift,
44  const Var& wei = kUnweighted);
45 
46  /// The only valid thing to do with such a spectrum is to assign something
47  /// else into it.
49 
51 
52  /// Copy constructor
55  /// Assignment operator
58 
59  Spectrum Oscillated(osc::IOscCalc* calc, int from, int to) const;
60 
61  void Scale(double x) {fMat *= x;}
62 
63  void SaveTo(TDirectory* dir, const std::string& name) const;
64  static std::unique_ptr<NDOscillatableSpectrum> LoadFrom(TDirectory* dir, const std::string& name);
65 
66  protected:
67 
68  /// Constructor for Uninitialized()
70  {
71  }
72  };
73 }
NDOscillatableSpectrum & operator=(const NDOscillatableSpectrum &rhs)
Assignment operator.
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
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
General interface to oscillation calculators.
Definition: StanTypedefs.h:23
Spectrum with the value of a second variable, allowing for reweighting
var_value< double > var
Definition: StanTypedefs.h:14
static std::unique_ptr< NDOscillatableSpectrum > LoadFrom(TDirectory *dir, const std::string &name)
osc::OscCalcDumb calc
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const char * label
Spectrum Oscillated(osc::IOscCalc *calc, int from, int to) const
void SaveTo(TDirectory *dir, const std::string &name) const
loader
Definition: demo0.py:10
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
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
TDirectory * dir
Definition: macro.C:5
Dummy loader that doesn&#39;t load any files.
NDOscillatableSpectrum()
Constructor for Uninitialized()
static NDOscillatableSpectrum Uninitialized()
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
Spectrum with true L/E information, allowing it to be oscillated
enum BeamMode string