ReactorExperiment.cxx
Go to the documentation of this file.
2 
4 
5 #include "CAFAna/Vars/FitVars.h"
7 
8 #include "Utilities/func/MathUtil.h"
9 
10 #include "TDirectory.h"
11 #include "TH1.h"
12 #include "TObjString.h"
13 
14 #include <cassert>
15 
16 namespace ana
17 {
18  REGISTER_LOADFROM("ReactorExperiment", IExperiment, ReactorExperiment);
19 
20  //----------------------------------------------------------------------
22  const SystShifts& /*syst*/) const
23  {
24  return util::sqr((SSTh13(osc)-fBestFit)/fSigma);
25  }
26 
27  //----------------------------------------------------------------------
29  {
30  return kFitSinSq2Theta13.GetValue(osc);
31  }
32 
33  //----------------------------------------------------------------------
35  {
36  return kFitSinSq2Theta13nu.GetValue(osc);
37  }
38 
39  //----------------------------------------------------------------------
41  {
42  return kFitSinSq2Theta13bar.GetValue(osc);
43  }
44 
45  //----------------------------------------------------------------------
46  void ReactorExperiment::SaveTo(TDirectory* dir, const std::string& name) const
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  }
65 
66  //----------------------------------------------------------------------
67  std::unique_ptr<ReactorExperiment> ReactorExperiment::LoadFrom(TDirectory* dir, const std::string& name)
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  }
88 
89  //----------------------------------------------------------------------
91  {
92  // Daya Bay, Neutrino 2014:
93  // https://indico.fnal.gov/getFile.py/access?contribId=256&sessionId=15&resId=0&materialId=slides&confId=8022
94  return new ReactorExperiment(.084, .005);
95  }
96 
97  //----------------------------------------------------------------------
99  {
100  // Weighted average of
101  // Daya Bay: arXiv:1505.03456
102  // RENO: arXiv:1410.7987
103  // Double Chooz: 1406.7763
104  return new ReactorExperiment(.086, .005);
105  }
106 
107  //----------------------------------------------------------------------
109  {
110  // PDG website as of Jun 2016
111  return new ReactorExperiment(.085, .005);
112  }
113 
114  //----------------------------------------------------------------------
116  {
117  // http://pdg.lbl.gov/2017/tables/rpp2017-sum-leptons.pdf
118  // ssth13=0.021+/-0.0011 -> ss2th13=0.082+/-0.004
119  return new ReactorExperiment(.082, .004);
120  }
121 
122  //----------------------------------------------------------------------
123  // http://www.nu-fit.org/ https://arxiv.org/abs/1811.05487 NuFit 4.0 (2018)
124  // assuming same constraints for neutrinos and antineutrinos
125  // without SK-atm, assign conservative errors
126  // ssth13=0.022+/-0.00065 -> ss2th13=0.086+/-0.002
128  {
129  return new ReactorExperimentNu(.086, .002);
130  }
131 
132  //----------------------------------------------------------------------
134  {
135  return new ReactorExperimentNubar(.086, .002);
136  }
137 
138  //----------------------------------------------------------------------
139 
141  {
142  // http://pdg.lbl.gov/2019/tables/rpp2019-sum-leptons.pdf
143  // ssth13=0.0218+/-0.0007 -> ss2th13=0.085+/-0.003
144  return new ReactorExperiment(.085, .003);
145  }
146 
147 
148 }
static std::unique_ptr< ReactorExperiment > LoadFrom(TDirectory *dir, const std::string &name)
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const ReactorExperiment * ReactorConstraintNuFit2018nu()
Reactor constraint from NuFit 4.0 2018 CPT nu.
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
const ReactorExperiment * WorldReactorConstraint2015()
Weighted average of all experiments as of first nue paper writing.
const FitSinSq2Theta13CPT kFitSinSq2Theta13bar(osc::ENuSign::kNuBar)
Definition: FitVarsCPT.h:216
virtual double SSTh13(osc::IOscCalcAdjustable *osc) const
Float_t tmp
Definition: plot.C:36
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVars.cxx:42
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
virtual double SSTh13(osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVarsCPT.cxx:83
const FitSinSq2Theta13CPT kFitSinSq2Theta13nu(osc::ENuSign::kNu)
Definition: FitVarsCPT.h:215
const ReactorExperiment * ReactorConstraintNuFit2018bar()
Reactor constraint from NuFit 4.0 2018 CPT bar.
const ReactorExperiment * WorldReactorConstraint2016()
Updated value for SecondAna based on the latest PDG.
const ReactorExperiment * WorldReactorConstraint2017()
Reactor constraint from PDG 2017.
Very simple model allowing inclusion of reactor constraints.
Oscillation probability calculators.
Definition: Calcs.h:5
double sigma(TH1F *hist, double percentile)
const ReactorExperiment * DayaBayConstraint2014()
A ReactorExperiment initialized with the Nu2014 Daya Bay constraints.
virtual double SSTh13(osc::IOscCalcAdjustable *osc) const override
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &shift=SystShifts::Nominal()) const override
TDirectory * dir
Definition: macro.C:5
REGISTER_LOADFROM("BENDecomp", IDecomp, BENDecomp)
For use in CPT analysis.
assert(nhit_max >=nhit_nbins)
const ReactorExperiment * WorldReactorConstraint2019()
Reactor constraint from PDG 2019.
void SaveTo(TDirectory *dir, const std::string &name) const override
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13
ReactorExperiment(double bestFit, double sigma)
For use in CPT analysis.
enum BeamMode string