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

TODO comment. More...

#include <PredictionSBNExtrap.h>

Inheritance diagram for ana::PredictionSBNExtrap:
ana::IPrediction

Public Member Functions

 PredictionSBNExtrap (Loaders &loadersND, Loaders &loadersFD, const HistAxis &axis, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift_mc=kNoShift, const Var &wei_mc=kUnweighted, const SystShifts &shift_data=kNoShift, const Var &wei_data=kUnweighted)
 
virtual ~PredictionSBNExtrap ()
 
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
 
 PredictionSBNExtrap ()=delete
 
- 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
< PredictionSBNExtrap
LoadFrom (TDirectory *dir)
 

Protected Member Functions

 PredictionSBNExtrap (const PredictionNoExtrap &pn, const PredictionNoExtrap &pf, const Spectrum &d)
 

Protected Attributes

PredictionNoExtrap fPredND
 
PredictionNoExtrap fPredFD
 
Spectrum fDataND
 

Detailed Description

TODO comment.

Definition at line 12 of file PredictionSBNExtrap.h.

Constructor & Destructor Documentation

ana::PredictionSBNExtrap::PredictionSBNExtrap ( Loaders loadersND,
Loaders loadersFD,
const HistAxis axis,
const SpillCut spillcut,
const Cut cut,
const SystShifts shift_mc = kNoShift,
const Var wei_mc = kUnweighted,
const SystShifts shift_data = kNoShift,
const Var wei_data = kUnweighted 
)

Definition at line 17 of file PredictionSBNExtrap.cxx.

26  : fPredND(loadersND, axis, spillcut, cut, shift_mc, wei_mc),
27  fPredFD(loadersFD, axis, spillcut, cut, shift_mc, wei_mc),
28  // TODO how on earth do fake ND oscillations get in here?
29  fDataND(loadersND.GetLoader(Loaders::kData), axis, spillcut, cut, shift_data, wei_data)
30  {
31  }
PredictionNoExtrap fPredND
PredictionNoExtrap fPredFD
ana::PredictionSBNExtrap::~PredictionSBNExtrap ( )
virtual

Definition at line 34 of file PredictionSBNExtrap.cxx.

35  {
36  }
ana::PredictionSBNExtrap::PredictionSBNExtrap ( )
delete
ana::PredictionSBNExtrap::PredictionSBNExtrap ( const PredictionNoExtrap pn,
const PredictionNoExtrap pf,
const Spectrum d 
)
inlineprotected

Definition at line 42 of file PredictionSBNExtrap.h.

45  : fPredND(pn), fPredFD(pf), fDataND(d)
46  {
47  }
PredictionNoExtrap fPredND
PredictionNoExtrap fPredFD

Member Function Documentation

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

Reimplemented from ana::IPrediction.

Definition at line 60 of file PredictionSBNExtrap.cxx.

61  {
62  /*
63  if(from == +12 && to == +12) return fSBNExtrap->NueSurvComponent();
64  if(from == -12 && to == -12) return fSBNExtrap->AntiNueSurvComponent();
65 
66  if(from == +12 && to == +14) return fSBNExtrap->NumuAppComponent();
67  if(from == -12 && to == -14) return fSBNExtrap->AntiNumuAppComponent();
68 
69  if(from == +12 && to == +16) return fSBNExtrap->TauFromEComponent();
70  if(from == -12 && to == -16) return fSBNExtrap->AntiTauFromEComponent();
71 
72  if(from == +14 && to == +12) return fSBNExtrap->NueAppComponent();
73  if(from == -14 && to == -12) return fSBNExtrap->AntiNueAppComponent();
74 
75  if(from == +14 && to == +14) return fSBNExtrap->NumuSurvComponent();
76  if(from == -14 && to == -14) return fSBNExtrap->AntiNumuSurvComponent();
77 
78  if(from == +14 && to == +16) return fSBNExtrap->TauFromMuComponent();
79  if(from == -14 && to == -16) return fSBNExtrap->AntiTauFromMuComponent();
80  */
81  assert(0 && "Not reached");
82  }
std::unique_ptr< PredictionSBNExtrap > ana::PredictionSBNExtrap::LoadFrom ( TDirectory *  dir)
static

Definition at line 107 of file PredictionSBNExtrap.cxx.

108  {
109  assert(dir->GetDirectory("predND"));
110  assert(dir->GetDirectory("predFD"));
111  assert(dir->GetDirectory("dataND"));
112 
113  // TODO are these leaks?
114  return std::unique_ptr<PredictionSBNExtrap>(new PredictionSBNExtrap(
115  *ana::LoadFrom<PredictionNoExtrap>(dir->GetDirectory("predND")).release(),
116  *ana::LoadFrom<PredictionNoExtrap>(dir->GetDirectory("predFD")).release(),
117  *ana::LoadFrom<Spectrum>(dir->GetDirectory("dataND")).release()));
118  }
tuple dir
Definition: dropbox.py:28
Spectrum ana::PredictionSBNExtrap::Predict ( osc::IOscCalc calc) const
overridevirtual

Implements ana::IPrediction.

Definition at line 39 of file PredictionSBNExtrap.cxx.

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

Implements ana::IPrediction.

Definition at line 48 of file PredictionSBNExtrap.cxx.

52  {
53  ((osc::IOscCalcAdjustable*)calc)->SetL(kBaselineSBND);
54  const Ratio r = fDataND / fPredND.Predict(calc);
56  return r * fPredFD.PredictComponent(calc, flav, curr, sign);
57  }
PredictionNoExtrap fPredND
const double kBaselineIcarus
Definition: ExpInfo.h:10
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
PredictionNoExtrap fPredFD
int sign(double val)
Definition: UtilFunc.cxx:104
virtual Spectrum Predict(osc::IOscCalc *calc) const override
esac echo uname r
const double kBaselineSBND
Definition: ExpInfo.h:8
void ana::PredictionSBNExtrap::SaveTo ( TDirectory *  dir) const
overridevirtual

Reimplemented from ana::IPrediction.

Definition at line 91 of file PredictionSBNExtrap.cxx.

92  {
93  TDirectory* tmp = gDirectory;
94 
95  dir->cd();
96 
97  TObjString("PredictionSBNExtrap").Write("type");
98 
99  fPredND.SaveTo(dir->mkdir("predND"));
100  fPredFD.SaveTo(dir->mkdir("predFD"));
101  fDataND.SaveTo(dir->mkdir("dataND"));
102 
103  tmp->cd();
104  }
PredictionNoExtrap fPredND
virtual void SaveTo(TDirectory *dir) const override
PredictionNoExtrap fPredFD
tuple dir
Definition: dropbox.py:28
void SaveTo(TDirectory *dir) const

Member Data Documentation

Spectrum ana::PredictionSBNExtrap::fDataND
protected

Definition at line 50 of file PredictionSBNExtrap.h.

PredictionNoExtrap ana::PredictionSBNExtrap::fPredFD
protected

Definition at line 49 of file PredictionSBNExtrap.h.

PredictionNoExtrap ana::PredictionSBNExtrap::fPredND
protected

Definition at line 49 of file PredictionSBNExtrap.h.


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