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

Constraints on the parameters $ \Delta m^2_{21} $ and $ \sin^22\theta_{12} $ from solar experiments. More...

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

Inheritance diagram for ana::SolarConstraints:
ana::IExperiment ana::SolarConstraintsNu ana::SolarConstraintsNubar

Public Member Functions

 SolarConstraints ()
 
 SolarConstraints (const double dmsq, const double errorDmsq, const double ss2th, const double errorSs2th)
 
virtual double ChiSq (osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
 
virtual 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< SolarConstraintsLoadFrom (TDirectory *dir, const std::string &name)
 

Protected Member Functions

virtual double Dmsq21 (osc::IOscCalcAdjustable *calc) const
 
virtual double Th12 (osc::IOscCalcAdjustable *calc) const
 

Protected Attributes

double fCentralDmsq
 
double fErrorDmsq
 
double fCentralAngle
 
double fErrorAngle
 

Detailed Description

Constraints on the parameters $ \Delta m^2_{21} $ and $ \sin^22\theta_{12} $ from solar experiments.

Definition at line 11 of file SolarConstraints.h.

Constructor & Destructor Documentation

ana::SolarConstraints::SolarConstraints ( )

Definition at line 35 of file SolarConstraints.cxx.

References om::cerr, allTimeWatchdog::endl, fCentralAngle, fCentralDmsq, fErrorAngle, and fErrorDmsq.

36  {
37  // These value are from the 2014 PDG
38  // http://pdg.lbl.gov/2014/tables/rpp2014-sum-leptons.pdf
39  std::cerr << "WARNING: Using 2014 Solar constraints."
40  << "Are you sure you don't want kSolarConstraintsPDG2017 ?"
41  << std::endl;
42 
43  fCentralDmsq = 7.53e-5;
44  fErrorDmsq = 0.18e-5;
45 
46  fCentralAngle = 0.846;
47  fErrorAngle = 0.021;
48  }
OStream cerr
Definition: OStream.cxx:7
ana::SolarConstraints::SolarConstraints ( const double  dmsq,
const double  errorDmsq,
const double  ss2th,
const double  errorSs2th 
)

Definition at line 51 of file SolarConstraints.cxx.

53  :fCentralDmsq (dmsq), fErrorDmsq (errorDmsq),
54  fCentralAngle(ss2th), fErrorAngle(errorSs2th)
55  { }

Member Function Documentation

double ana::SolarConstraints::ChiSq ( osc::IOscCalcAdjustable osc,
const SystShifts syst = SystShifts::Nominal() 
) const
overridevirtual

Reimplemented from ana::IExperiment.

Definition at line 58 of file SolarConstraints.cxx.

References Dmsq21(), fCentralAngle, fCentralDmsq, fErrorAngle, fErrorDmsq, runNovaSAM::ret, std::sin(), util::sqr(), and Th12().

60  {
61  double ret = 0;
62 
63  ret += util::sqr((Dmsq21(osc) - fCentralDmsq)/fErrorDmsq);
64  const double ss2th12 = util::sqr(sin(2*Th12(osc)));
65  ret += util::sqr((ss2th12 - fCentralAngle)/fErrorAngle);
66 
67  return ret;
68  }
virtual double Dmsq21(osc::IOscCalcAdjustable *calc) const
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
virtual double Th12(osc::IOscCalcAdjustable *calc) const
T sin(T number)
Definition: d0nt_math.hpp:132
double ana::SolarConstraints::Dmsq21 ( osc::IOscCalcAdjustable calc) const
protectedvirtual

Reimplemented in ana::SolarConstraintsNubar, and ana::SolarConstraintsNu.

Definition at line 71 of file SolarConstraints.cxx.

References osc::_IOscCalcAdjustable< T >::GetDmsq21().

Referenced by ChiSq().

72  {
73  return osc->GetDmsq21();
74  }
Oscillation probability calculators.
Definition: Calcs.h:5
std::unique_ptr< SolarConstraints > ana::SolarConstraints::LoadFrom ( TDirectory *  dir,
const std::string name 
)
static

Definition at line 144 of file SolarConstraints.cxx.

References ana::assert(), dir, runNovaSAM::ret, and getGoodRuns4SAM::tag.

145  {
146  dir = dir->GetDirectory(name.c_str()); // switch to subdir
147  assert(dir);
148 
149  TObjString* tag = (TObjString*)dir->Get("type");
150  assert(tag);
151  assert(tag->GetString() == "SolarConstraints");
152  delete tag;
153 
154  std::unique_ptr<SolarConstraints> ret(new SolarConstraints);
155 
156  TH1* params = (TH1*)dir->Get("params");
157  assert(params);
158 
159  ret->fCentralDmsq = params->GetBinContent(1);
160  ret->fErrorDmsq = params->GetBinContent(2);
161  ret->fCentralAngle = params->GetBinContent(3);
162  ret->fErrorAngle = params->GetBinContent(4);
163 
164  delete dir;
165 
166  return ret;
167  }
const XML_Char * name
Definition: expat.h:151
TDirectory * dir
Definition: macro.C:5
assert(nhit_max >=nhit_nbins)
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::SolarConstraints::SaveTo ( TDirectory *  dir,
const std::string name 
) const
overridevirtual

Reimplemented from ana::IExperiment.

Definition at line 121 of file SolarConstraints.cxx.

References dir, fCentralAngle, fCentralDmsq, fErrorAngle, fErrorDmsq, and tmp.

122  {
123  TDirectory* tmp = dir;
124 
125  dir = dir->mkdir(name.c_str()); // switch to subdir
126  dir->cd();
127 
128  TObjString("SolarConstraints").Write("type");
129 
130  TH1D params("", "", 4, 0, 4);
131  params.SetBinContent(1, fCentralDmsq);
132  params.SetBinContent(2, fErrorDmsq);
133  params.SetBinContent(3, fCentralAngle);
134  params.SetBinContent(4, fErrorAngle);
135  params.Write("params");
136 
137  dir->Write();
138  delete dir;
139 
140  tmp->cd();
141  }
const XML_Char * name
Definition: expat.h:151
Float_t tmp
Definition: plot.C:36
TDirectory * dir
Definition: macro.C:5
double ana::SolarConstraints::Th12 ( osc::IOscCalcAdjustable calc) const
protectedvirtual

Reimplemented in ana::SolarConstraintsNubar, and ana::SolarConstraintsNu.

Definition at line 103 of file SolarConstraints.cxx.

References osc::_IOscCalcAdjustable< T >::GetTh12().

Referenced by ChiSq().

104  {
105  return osc->GetTh12();
106  }
Oscillation probability calculators.
Definition: Calcs.h:5

Member Data Documentation

double ana::SolarConstraints::fCentralAngle
protected

Definition at line 29 of file SolarConstraints.h.

Referenced by ChiSq(), SaveTo(), and SolarConstraints().

double ana::SolarConstraints::fCentralDmsq
protected

Definition at line 28 of file SolarConstraints.h.

Referenced by ChiSq(), SaveTo(), and SolarConstraints().

double ana::SolarConstraints::fErrorAngle
protected

Definition at line 29 of file SolarConstraints.h.

Referenced by ChiSq(), SaveTo(), and SolarConstraints().

double ana::SolarConstraints::fErrorDmsq
protected

Definition at line 28 of file SolarConstraints.h.

Referenced by ChiSq(), SaveTo(), and SolarConstraints().


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