Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ana::ReactorExperiment Class Reference

Very simple model allowing inclusion of reactor constraints. More...

#include "/cvmfs/"

Inheritance diagram for ana::ReactorExperiment:
ana::IExperiment ana::ReactorExperimentNu ana::ReactorExperimentNubar

Public Member Functions

 ReactorExperiment (double bestFit, double sigma)
virtual double ChiSq (osc::IOscCalcAdjustable *osc, const SystShifts &shift=SystShifts::Nominal()) const override
void SaveTo (TDirectory *dir, const std::string &name) const override
virtual stan::math::var LogLikelihood (osc::IOscCalcAdjustableStan *osc, const SystShifts &syst=kNoShift) const

Static Public Member Functions

static std::unique_ptr< ReactorExperimentLoadFrom (TDirectory *dir, const std::string &name)

Protected Member Functions

virtual double SSTh13 (osc::IOscCalcAdjustable *osc) const

Protected Attributes

double fBestFit
double fSigma

Detailed Description

Very simple model allowing inclusion of reactor constraints.

Definition at line 10 of file ReactorExperiment.h.

Constructor & Destructor Documentation

ana::ReactorExperiment::ReactorExperiment ( double  bestFit,
double  sigma 

Member Function Documentation

double ana::ReactorExperiment::ChiSq ( osc::IOscCalcAdjustable osc,
const SystShifts shift = SystShifts::Nominal() 
) const

Reimplemented from ana::IExperiment.

Definition at line 21 of file ReactorExperiment.cxx.

References fBestFit, fSigma, util::sqr(), and SSTh13().

Referenced by ReactorExperiment().

23  {
24  return util::sqr((SSTh13(osc)-fBestFit)/fSigma);
25  }
virtual double SSTh13(osc::IOscCalcAdjustable *osc) const
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
std::unique_ptr< ReactorExperiment > ana::ReactorExperiment::LoadFrom ( TDirectory *  dir,
const std::string name 

Definition at line 67 of file ReactorExperiment.cxx.

References ana::assert(), dir, ReactorExperiment(), sigma(), and getGoodRuns4SAM::tag.

Referenced by ReactorExperiment().

68  {
69  dir = dir->GetDirectory(name.c_str()); // switch to subdir
70  assert(dir);
72  TObjString* tag = (TObjString*)dir->Get("type");
73  assert(tag);
74  assert(tag->GetString() == "ReactorExperiment");
75  delete tag;
77  TH1* params = (TH1*)dir->Get("params");
78  assert(params);
80  const double bestFit = params->GetBinContent(1);
81  const double sigma = params->GetBinContent(2);
83  delete dir;
85  return std::unique_ptr<ReactorExperiment>(new ReactorExperiment(bestFit,
86  sigma));
87  }
const XML_Char * name
Definition: expat.h:151
double sigma(TH1F *hist, double percentile)
TDirectory * dir
Definition: macro.C:5
assert(nhit_max >=nhit_nbins)
ReactorExperiment(double bestFit, double sigma)
virtual stan::math::var ana::IExperiment::LogLikelihood ( osc::IOscCalcAdjustableStan osc,
const SystShifts syst = kNoShift 
) const

Reimplemented in test::GaussQuadExperiment, ana::SingleSampleExperiment, and ana::MultiExperiment.

Definition at line 25 of file IExperiment.h.

References ana::assert(), dir, ana::IExperiment::SaveTo(), and string.

Referenced by ana::StanFitter::log_prob().

27  {
28  assert(false && "unimplemented");
29  return 0;
30  };
assert(nhit_max >=nhit_nbins)
void ana::ReactorExperiment::SaveTo ( TDirectory *  dir,
const std::string name 
) const

Reimplemented from ana::IExperiment.

Definition at line 46 of file ReactorExperiment.cxx.

References dir, fBestFit, fSigma, and tmp.

Referenced by ReactorExperiment().

47  {
48  TDirectory* tmp = dir;
50  dir = dir->mkdir(name.c_str()); // switch to subdir
51  dir->cd();
53  TObjString("ReactorExperiment").Write("type");
55  TH1D params("", "", 2, 0, 2);
56  params.SetBinContent(1, fBestFit);
57  params.SetBinContent(2, fSigma);
58  params.Write("params");
60  dir->Write();
61  delete dir;
63  tmp->cd();
64  }
const XML_Char * name
Definition: expat.h:151
Float_t tmp
Definition: plot.C:36
TDirectory * dir
Definition: macro.C:5
double ana::ReactorExperiment::SSTh13 ( osc::IOscCalcAdjustable osc) const

Reimplemented in ana::ReactorExperimentNubar, and ana::ReactorExperimentNu.

Definition at line 28 of file ReactorExperiment.cxx.

References ana::FitSinSq2Theta13::GetValue(), and ana::kFitSinSq2Theta13.

Referenced by ChiSq(), ReactorExperiment(), ana::ReactorExperimentNu::ReactorExperimentNu(), and ana::ReactorExperimentNubar::ReactorExperimentNubar().

29  {
30  return kFitSinSq2Theta13.GetValue(osc);
31  }
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVars.cxx:42
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13

Member Data Documentation

double ana::ReactorExperiment::fBestFit

Definition at line 26 of file ReactorExperiment.h.

Referenced by ChiSq(), and SaveTo().

double ana::ReactorExperiment::fSigma

Definition at line 26 of file ReactorExperiment.h.

Referenced by ChiSq(), and SaveTo().

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