IPrediction.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "CAFAna/Core/Spectrum.h"
7 
8 class TDirectory;
9 
10 namespace ana
11 {
12  /// Enumeration of neutrino transition modes
13  namespace Flavors{
14  enum Flavors_t{
15  kNuEToNuE = 1<<0, ///< \f$\nu_e\to\nu_e\f$ ('beam \f$\nu_e \f$')
16  kNuEToNuMu = 1<<1, ///< \f$\nu_e\to\nu_\mu\f$ ('\f$\nu_\mu\f$ appearance')
17  kNuEToNuTau = 1<<2, ///< \f$\nu_e\to\nu_\tau\f$
18  kNuMuToNuE = 1<<3, ///< \f$\nu_\mu\to\nu_e\f$ ('\f$\nu_e\f$ appearance')
19  kNuMuToNuMu = 1<<4, ///< \f$\nu_\mu\to\nu_\mu\f$ ('\f$\nu_\mu\f$ survival')
20  kNuMuToNuTau = 1<<5, ///< \f$\nu_\mu\to\nu_\tau\f$
21 
22  kAllNuE = kNuEToNuE | kNuMuToNuE, ///< All \f$\nu_e\f$
23  kAllNuMu = kNuEToNuMu | kNuMuToNuMu, ///< All \f$\nu_\mu\f$
24  kAllNuTau = kNuEToNuTau | kNuMuToNuTau, ///< All \f$\nu_\tau\f$
25 
26  kAll = kAllNuE | kAllNuMu | kAllNuTau ///< All neutrinos, any flavor
27  };
28 
30  {
31  // The default definition returns an int. We don't want that
32  return Flavors_t(int(a) | int(b));
33  }
34  }
35 
36  /// Enumeration for interaction currents (CC/NC)
37  namespace Current{
38  enum Current_t{
39  kCC = 1<<0, ///< Charged-current interactions
40  kNC = 1<<1, ///< Neutral-current interactions
41 
42  kBoth = kCC | kNC ///< Interactions of both types
43  };
44  }
45 
46  /// Enumeration for neutrino sign (neutrino/antineutrino)
47  namespace Sign{
48  enum Sign_t{
49  kNu = 1<<0, ///< Neutrinos-only
50  kAntiNu = 1<<1, ///< Antineutrinos-only
51 
52  kBoth = kNu | kAntiNu ///< Both neutrinos and antineutrinos
53  };
54  }
55 
56  /// Standard interface to all prediction techniques
58  {
59  public:
60  virtual ~IPrediction(){}
61 
62  virtual Spectrum PredictUnoscillated() const;
63  virtual Spectrum Predict(osc::IOscCalc* calc) const = 0;
64  virtual Spectrum Predict(osc::IOscCalcStan* calc) const;
65 
66  virtual Spectrum PredictSyst(osc::IOscCalc* calc, const SystShifts& syst) const;
67  virtual Spectrum PredictSyst(osc::IOscCalcStan* calc, const SystShifts& syst) const;
68 
69  virtual Spectrum PredictComponent(osc::IOscCalc* calc,
70  Flavors::Flavors_t flav,
72  Sign::Sign_t sign) const = 0;
73 
74  virtual Spectrum PredictComponent(osc::IOscCalcStan* calc,
75  Flavors::Flavors_t flav,
76  Current::Current_t curr,
77  Sign::Sign_t sign) const;
78 
79  virtual Spectrum PredictComponentSyst(osc::IOscCalc* calc,
80  const SystShifts& syst,
81  Flavors::Flavors_t flav,
82  Current::Current_t curr,
83  Sign::Sign_t sign) const;
84  virtual Spectrum PredictComponentSyst(osc::IOscCalcStan* calc,
85  const SystShifts& syst,
86  Flavors::Flavors_t flav,
87  Current::Current_t curr,
88  Sign::Sign_t sign) const;
89 
90  virtual OscillatableSpectrum ComponentCC(int from, int to) const;
91  virtual Spectrum ComponentNCTotal() const;
92  virtual Spectrum ComponentNC() const;
93  virtual Spectrum ComponentNCAnti() const;
94 
95  virtual void SaveTo(TDirectory* dir, const std::string& name) const;
96  };
97 }
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Antineutrinos-only.
Definition: IPrediction.h:50
void SaveTo(const osc::IOscCalc &x, TDirectory *dir, const std::string &name)
(&#39; appearance&#39;)
Definition: IPrediction.h:18
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
(&#39;beam &#39;)
Definition: IPrediction.h:15
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
virtual ~IPrediction()
Definition: IPrediction.h:60
osc::OscCalcDumb calc
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
Charged-current interactions.
Definition: IPrediction.h:39
const double a
Neutrinos-only.
Definition: IPrediction.h:49
(&#39; survival&#39;)
Definition: IPrediction.h:19
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
TDirectory * dir
Definition: macro.C:5
Flavors_t operator|(Flavors_t a, Flavors_t b)
Definition: IPrediction.h:29
const hit & b
Definition: hits.cxx:21
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
All neutrinos, any flavor.
Definition: IPrediction.h:26
(&#39; appearance&#39;)
Definition: IPrediction.h:16
Spectrum with true energy information, allowing it to be oscillated
def sign(x)
Definition: canMan.py:197