ReactorExperiment.cxx
Go to the documentation of this file.
2 
3 #include "CAFAna/Vars/FitVars.h"
5 
6 #include "Utilities/func/MathUtil.h"
7 
8 #include "TDirectory.h"
9 #include "TH1.h"
10 #include "TObjString.h"
11 
12 #include <cassert>
13 
14 namespace ana
15 {
16 
17  //----------------------------------------------------------------------
19  const SystShifts& /*syst*/) const
20  {
21  return util::sqr((SSTh13(osc)-fBestFit)/fSigma);
22  }
23 
24  //----------------------------------------------------------------------
26  {
27  return kFitSinSq2Theta13.GetValue(osc);
28  }
29 
30  //----------------------------------------------------------------------
32  {
33  return kFitSinSq2Theta13nu.GetValue(osc);
34  }
35 
36  //----------------------------------------------------------------------
38  {
39  return kFitSinSq2Theta13bar.GetValue(osc);
40  }
41 
42  //----------------------------------------------------------------------
43  void ReactorExperiment::SaveTo(TDirectory* dir, const std::string& name) const
44  {
45  TDirectory* tmp = dir;
46 
47  dir = dir->mkdir(name.c_str()); // switch to subdir
48  dir->cd();
49 
50  TObjString("ReactorExperiment").Write("type");
51 
52  TH1D params("", "", 2, 0, 2);
53  params.SetBinContent(1, fBestFit);
54  params.SetBinContent(2, fSigma);
55  params.Write("params");
56 
57  dir->Write();
58  delete dir;
59 
60  tmp->cd();
61  }
62 
63  //----------------------------------------------------------------------
64  std::unique_ptr<ReactorExperiment> ReactorExperiment::LoadFrom(TDirectory* dir, const std::string& name)
65  {
66  dir = dir->GetDirectory(name.c_str()); // switch to subdir
67  assert(dir);
68 
69  TObjString* tag = (TObjString*)dir->Get("type");
70  assert(tag);
71  assert(tag->GetString() == "ReactorExperiment");
72  delete tag;
73 
74  TH1* params = (TH1*)dir->Get("params");
75  assert(params);
76 
77  const double bestFit = params->GetBinContent(1);
78  const double sigma = params->GetBinContent(2);
79 
80  delete dir;
81 
82  return std::unique_ptr<ReactorExperiment>(new ReactorExperiment(bestFit,
83  sigma));
84  }
85 
86  //----------------------------------------------------------------------
88  {
89  // Daya Bay, Neutrino 2014:
90  // https://indico.fnal.gov/getFile.py/access?contribId=256&sessionId=15&resId=0&materialId=slides&confId=8022
91  return new ReactorExperiment(.084, .005);
92  }
93 
94  //----------------------------------------------------------------------
96  {
97  // Weighted average of
98  // Daya Bay: arXiv:1505.03456
99  // RENO: arXiv:1410.7987
100  // Double Chooz: 1406.7763
101  return new ReactorExperiment(.086, .005);
102  }
103 
104  //----------------------------------------------------------------------
106  {
107  // PDG website as of Jun 2016
108  return new ReactorExperiment(.085, .005);
109  }
110 
111  //----------------------------------------------------------------------
113  {
114  // http://pdg.lbl.gov/2017/tables/rpp2017-sum-leptons.pdf
115  // ssth13=0.021+/-0.0011 -> ss2th13=0.082+/-0.004
116  return new ReactorExperiment(.082, .004);
117  }
118 
119  //----------------------------------------------------------------------
120  // http://www.nu-fit.org/ https://arxiv.org/abs/1811.05487 NuFit 4.0 (2018)
121  // assuming same constraints for neutrinos and antineutrinos
122  // without SK-atm, assign conservative errors
123  // ssth13=0.022+/-0.00065 -> ss2th13=0.086+/-0.002
125  {
126  return new ReactorExperimentNu(.086, .002);
127  }
128 
129  //----------------------------------------------------------------------
131  {
132  return new ReactorExperimentNubar(.086, .002);
133  }
134 
135  //----------------------------------------------------------------------
136 
138  {
139  // http://pdg.lbl.gov/2019/tables/rpp2019-sum-leptons.pdf
140  // ssth13=0.0218+/-0.0007 -> ss2th13=0.085+/-0.003
141  return new ReactorExperiment(.085, .003);
142  }
143 
144 
145 }
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.
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
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
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.