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

For use in CPT analysis. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/CAFAna/Experiment/ReactorExperiment.h"

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

Public Member Functions

 ReactorExperimentNubar (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 override
 

Protected Attributes

double fBestFit
 
double fSigma
 

Detailed Description

For use in CPT analysis.

Definition at line 43 of file ReactorExperiment.h.

Constructor & Destructor Documentation

ana::ReactorExperimentNubar::ReactorExperimentNubar ( double  bestFit,
double  sigma 
)
inline

Member Function Documentation

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

Reimplemented from ana::IExperiment.

Definition at line 21 of file ReactorExperiment.cxx.

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

Referenced by ana::ReactorExperiment::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 
)
staticinherited

Definition at line 67 of file ReactorExperiment.cxx.

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

Referenced by ana::ReactorExperiment::ReactorExperiment().

68  {
69  dir = dir->GetDirectory(name.c_str()); // switch to subdir
70  assert(dir);
71 
72  TObjString* tag = (TObjString*)dir->Get("type");
73  assert(tag);
74  assert(tag->GetString() == "ReactorExperiment");
75  delete tag;
76 
77  TH1* params = (TH1*)dir->Get("params");
78  assert(params);
79 
80  const double bestFit = params->GetBinContent(1);
81  const double sigma = params->GetBinContent(2);
82 
83  delete dir;
84 
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
inlinevirtualinherited

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
overridevirtualinherited

Reimplemented from ana::IExperiment.

Definition at line 46 of file ReactorExperiment.cxx.

References dir, ana::ReactorExperiment::fBestFit, ana::ReactorExperiment::fSigma, and tmp.

Referenced by ana::ReactorExperiment::ReactorExperiment().

47  {
48  TDirectory* tmp = dir;
49 
50  dir = dir->mkdir(name.c_str()); // switch to subdir
51  dir->cd();
52 
53  TObjString("ReactorExperiment").Write("type");
54 
55  TH1D params("", "", 2, 0, 2);
56  params.SetBinContent(1, fBestFit);
57  params.SetBinContent(2, fSigma);
58  params.Write("params");
59 
60  dir->Write();
61  delete dir;
62 
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::ReactorExperimentNubar::SSTh13 ( osc::IOscCalcAdjustable osc) const
overrideprotectedvirtual

Reimplemented from ana::ReactorExperiment.

Definition at line 40 of file ReactorExperiment.cxx.

References ana::FitSinSq2Theta13CPT::GetValue(), and ana::kFitSinSq2Theta13bar.

41  {
42  return kFitSinSq2Theta13bar.GetValue(osc);
43  }
const FitSinSq2Theta13CPT kFitSinSq2Theta13bar(osc::ENuSign::kNuBar)
Definition: FitVarsCPT.h:216
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVarsCPT.cxx:83

Member Data Documentation

double ana::ReactorExperiment::fBestFit
protectedinherited
double ana::ReactorExperiment::fSigma
protectedinherited

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