All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ana::PredictionExtrap Class Reference

Take the output of an extrapolation and oscillate it as required. More...

#include <PredictionExtrap.h>

Inheritance diagram for ana::PredictionExtrap:
ana::IPrediction ana::PredictionNoExtrap

Public Member Functions

 PredictionExtrap (IExtrap *extrap)
 Takes ownership of extrap. More...
 
virtual ~PredictionExtrap ()
 
virtual Spectrum Predict (osc::IOscCalc *calc) const override
 
virtual Spectrum PredictComponent (osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
 
OscillatableSpectrum ComponentCC (int from, int to) const override
 
virtual void SaveTo (TDirectory *dir) const override
 
 PredictionExtrap ()=delete
 
IExtrapGetExtrap () const
 
- Public Member Functions inherited from ana::IPrediction
virtual ~IPrediction ()
 
virtual Spectrum PredictUnoscillated () const
 
virtual Spectrum PredictSyst (osc::IOscCalc *calc, const SystShifts &syst) const
 
virtual Spectrum PredictComponentSyst (osc::IOscCalc *calc, const SystShifts &syst, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const
 

Static Public Member Functions

static std::unique_ptr
< PredictionExtrap
LoadFrom (TDirectory *dir)
 

Protected Attributes

IExtrapfExtrap
 

Detailed Description

Take the output of an extrapolation and oscillate it as required.

Definition at line 10 of file PredictionExtrap.h.

Constructor & Destructor Documentation

ana::PredictionExtrap::PredictionExtrap ( IExtrap extrap)

Takes ownership of extrap.

Definition at line 13 of file PredictionExtrap.cxx.

14  : fExtrap(extrap)
15  {
16  }
ana::PredictionExtrap::~PredictionExtrap ( )
virtual

Definition at line 19 of file PredictionExtrap.cxx.

20  {
21  // delete fExtrap;
22  }
ana::PredictionExtrap::PredictionExtrap ( )
delete

Member Function Documentation

OscillatableSpectrum ana::PredictionExtrap::ComponentCC ( int  from,
int  to 
) const
overridevirtual

Reimplemented from ana::IPrediction.

Definition at line 76 of file PredictionExtrap.cxx.

77  {
78  if(from == +12 && to == +12) return fExtrap->NueSurvComponent();
79  if(from == -12 && to == -12) return fExtrap->AntiNueSurvComponent();
80 
81  if(from == +12 && to == +14) return fExtrap->NumuAppComponent();
82  if(from == -12 && to == -14) return fExtrap->AntiNumuAppComponent();
83 
84  if(from == +12 && to == +16) return fExtrap->TauFromEComponent();
85  if(from == -12 && to == -16) return fExtrap->AntiTauFromEComponent();
86 
87  if(from == +14 && to == +12) return fExtrap->NueAppComponent();
88  if(from == -14 && to == -12) return fExtrap->AntiNueAppComponent();
89 
90  if(from == +14 && to == +14) return fExtrap->NumuSurvComponent();
91  if(from == -14 && to == -14) return fExtrap->AntiNumuSurvComponent();
92 
93  if(from == +14 && to == +16) return fExtrap->TauFromMuComponent();
94  if(from == -14 && to == -16) return fExtrap->AntiTauFromMuComponent();
95 
96  assert(0 && "Not reached");
97  }
virtual OscillatableSpectrum AntiNumuAppComponent()=0
Charged current muon antineutrino appearance ( )
virtual OscillatableSpectrum TauFromMuComponent()=0
Charged current tau neutrino appearance from muon neutrino ( )
virtual OscillatableSpectrum NumuAppComponent()=0
Charged current muon neutrino appearance ( )
virtual OscillatableSpectrum AntiNumuSurvComponent()=0
Charged current muon antineutrino survival ( )
virtual OscillatableSpectrum AntiNueSurvComponent()=0
Charged current electron antineutrino survival ( )
virtual OscillatableSpectrum NueSurvComponent()=0
Charged current electron neutrino survival ( )
virtual OscillatableSpectrum AntiNueAppComponent()=0
Charged current electron antineutrino appearance ( )
virtual OscillatableSpectrum TauFromEComponent()=0
Charged current tau neutrino appearance from electron neutrino ( )
virtual OscillatableSpectrum NueAppComponent()=0
Charged current electron neutrino appearance ( )
virtual OscillatableSpectrum AntiTauFromMuComponent()=0
Charged current tau antineutrino appearance from muon antineutrino ( )
virtual OscillatableSpectrum AntiTauFromEComponent()=0
Charged current tau antineutrino appearance from electron antineutrino ( )
virtual OscillatableSpectrum NumuSurvComponent()=0
Charged current muon neutrino survival ( )
IExtrap* ana::PredictionExtrap::GetExtrap ( ) const
inline

Definition at line 32 of file PredictionExtrap.h.

32 {return fExtrap;}
std::unique_ptr< PredictionExtrap > ana::PredictionExtrap::LoadFrom ( TDirectory *  dir)
static

Definition at line 120 of file PredictionExtrap.cxx.

121  {
122  assert(dir->GetDirectory("extrap"));
123  IExtrap* extrap = ana::LoadFrom<IExtrap>(dir->GetDirectory("extrap")).release();
124 
125  return std::unique_ptr<PredictionExtrap>(new PredictionExtrap(extrap));
126  }
std::unique_ptr< IExtrap > LoadFrom< IExtrap >(TDirectory *dir)
Definition: IExtrap.cxx:17
tuple dir
Definition: dropbox.py:28
Spectrum ana::PredictionExtrap::Predict ( osc::IOscCalc calc) const
overridevirtual

Implements ana::IPrediction.

Definition at line 25 of file PredictionExtrap.cxx.

26  {
27  return PredictComponent(calc,
30  Sign::kBoth);
31  }
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Interactions of both types.
Definition: IPrediction.h:41
Both neutrinos and antineutrinos.
Definition: IPrediction.h:51
All neutrinos, any flavor.
Definition: IPrediction.h:25
Spectrum ana::PredictionExtrap::PredictComponent ( osc::IOscCalc calc,
Flavors::Flavors_t  flav,
Current::Current_t  curr,
Sign::Sign_t  sign 
) const
overridevirtual

Implements ana::IPrediction.

Definition at line 34 of file PredictionExtrap.cxx.

38  {
39  // Get binning
40  Spectrum ret = fExtrap->NCComponentFromNumu().Oscillated(calc, 14, 0);
41  ret.Clear();
42 
43  if(curr & Current::kCC){
44  if(flav & Flavors::kNuEToNuE && sign & Sign::kNu) {
45  ret += fExtrap->NueSurvComponent(). Oscillated(calc, +12, +12);
46  }
47  if(flav & Flavors::kNuEToNuE && sign & Sign::kAntiNu) ret += fExtrap->AntiNueSurvComponent().Oscillated(calc, -12, -12);
48 
49  if(flav & Flavors::kNuEToNuMu && sign & Sign::kNu) ret += fExtrap->NumuAppComponent(). Oscillated(calc, +12, +14);
50  if(flav & Flavors::kNuEToNuMu && sign & Sign::kAntiNu) ret += fExtrap->AntiNumuAppComponent().Oscillated(calc, -12, -14);
51 
52  if(flav & Flavors::kNuEToNuTau && sign & Sign::kNu) ret += fExtrap->TauFromEComponent(). Oscillated(calc, +12, +16);
53  if(flav & Flavors::kNuEToNuTau && sign & Sign::kAntiNu) ret += fExtrap->AntiTauFromEComponent().Oscillated(calc, -12, -16);
54 
55  if(flav & Flavors::kNuMuToNuE && sign & Sign::kNu) ret += fExtrap->NueAppComponent(). Oscillated(calc, +14, +12);
56  if(flav & Flavors::kNuMuToNuE && sign & Sign::kAntiNu) ret += fExtrap->AntiNueAppComponent().Oscillated(calc, -14, -12);
57 
58  if(flav & Flavors::kNuMuToNuMu && sign & Sign::kNu) ret += fExtrap->NumuSurvComponent(). Oscillated(calc, +14, +14);
59  if(flav & Flavors::kNuMuToNuMu && sign & Sign::kAntiNu) ret += fExtrap->AntiNumuSurvComponent().Oscillated(calc, -14, -14);
60 
61  if(flav & Flavors::kNuMuToNuTau && sign & Sign::kNu) ret += fExtrap->TauFromMuComponent(). Oscillated(calc, +14, +16);
62  if(flav & Flavors::kNuMuToNuTau && sign & Sign::kAntiNu) ret += fExtrap->AntiTauFromMuComponent().Oscillated(calc, -14, -16);
63  }
64  if(curr & Current::kNC){
65  assert(flav == Flavors::kAll); // Don't know how to calculate anything else
66  assert(sign == Sign::kBoth); // Why would you want to split NCs out by sign?
67 
68  ret += fExtrap->NCComponentFromNumu().Oscillated(calc, 14, 0);
69  ret += fExtrap->NCComponentFromNue().Oscillated(calc, 12, 0);
70  }
71 
72  return ret;
73  }
virtual OscillatableSpectrum AntiNumuAppComponent()=0
Charged current muon antineutrino appearance ( )
virtual OscillatableSpectrum TauFromMuComponent()=0
Charged current tau neutrino appearance from muon neutrino ( )
Antineutrinos-only.
Definition: IPrediction.h:49
(&#39; appearance&#39;)
Definition: IPrediction.h:17
virtual OscillatableSpectrum NumuAppComponent()=0
Charged current muon neutrino appearance ( )
virtual OscillatableSpectrum AntiNumuSurvComponent()=0
Charged current muon antineutrino survival ( )
(&#39;beam &#39;)
Definition: IPrediction.h:14
virtual OscillatableSpectrum AntiNueSurvComponent()=0
Charged current electron antineutrino survival ( )
virtual OscillatableSpectrum NCComponentFromNue()=0
virtual OscillatableSpectrum NueSurvComponent()=0
Charged current electron neutrino survival ( )
Charged-current interactions.
Definition: IPrediction.h:38
virtual OscillatableSpectrum AntiNueAppComponent()=0
Charged current electron antineutrino appearance ( )
virtual OscillatableSpectrum TauFromEComponent()=0
Charged current tau neutrino appearance from electron neutrino ( )
virtual OscillatableSpectrum NueAppComponent()=0
Charged current electron neutrino appearance ( )
Neutrinos-only.
Definition: IPrediction.h:48
(&#39; survival&#39;)
Definition: IPrediction.h:18
int sign(double val)
Definition: UtilFunc.cxx:104
virtual OscillatableSpectrum AntiTauFromMuComponent()=0
Charged current tau antineutrino appearance from muon antineutrino ( )
Spectrum Oscillated(osc::IOscCalc *calc, int from, int to) const
virtual OscillatableSpectrum AntiTauFromEComponent()=0
Charged current tau antineutrino appearance from electron antineutrino ( )
virtual OscillatableSpectrum NCComponentFromNumu()=0
Neutral currents.
Neutral-current interactions.
Definition: IPrediction.h:39
Both neutrinos and antineutrinos.
Definition: IPrediction.h:51
All neutrinos, any flavor.
Definition: IPrediction.h:25
(&#39; appearance&#39;)
Definition: IPrediction.h:15
virtual OscillatableSpectrum NumuSurvComponent()=0
Charged current muon neutrino survival ( )
void ana::PredictionExtrap::SaveTo ( TDirectory *  dir) const
overridevirtual

Reimplemented from ana::IPrediction.

Reimplemented in ana::PredictionNoExtrap.

Definition at line 106 of file PredictionExtrap.cxx.

107  {
108  TDirectory* tmp = gDirectory;
109 
110  dir->cd();
111 
112  TObjString("PredictionExtrap").Write("type");
113 
114  fExtrap->SaveTo(dir->mkdir("extrap"));
115 
116  tmp->cd();
117  }
tuple dir
Definition: dropbox.py:28
virtual void SaveTo(TDirectory *dir) const
Definition: IExtrap.cxx:31

Member Data Documentation

IExtrap* ana::PredictionExtrap::fExtrap
protected

Definition at line 35 of file PredictionExtrap.h.


The documentation for this class was generated from the following files: