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

A simple Gaussian constraint on dmsq32, dependent on the hierarchy. More...

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

Inheritance diagram for ana::Dmsq32Constraint:
ana::IExperiment

Public Member Functions

 Dmsq32Constraint (double meanNH, double sigmaNH, double meanIH, double sigmaIH)
 
virtual double ChiSq (osc::IOscCalcAdjustable *osc, const SystShifts &shift=SystShifts::Nominal()) const override
 
virtual stan::math::var LogLikelihood (osc::IOscCalcAdjustableStan *osc, const SystShifts &syst=kNoShift) const
 
virtual void SaveTo (TDirectory *dir, const std::string &name) const
 

Protected Attributes

double fMeanNH
 
double fSigmaNH
 
double fMeanIH
 
double fSigmaIH
 

Detailed Description

A simple Gaussian constraint on dmsq32, dependent on the hierarchy.

Definition at line 8 of file Dmsq32Constraint.h.

Constructor & Destructor Documentation

ana::Dmsq32Constraint::Dmsq32Constraint ( double  meanNH,
double  sigmaNH,
double  meanIH,
double  sigmaIH 
)
inline

Definition at line 11 of file Dmsq32Constraint.h.

References ChiSq(), and ana::SystShifts::Nominal().

13  : fMeanNH(meanNH), fSigmaNH(sigmaNH),
14  fMeanIH(fabs(meanIH)), fSigmaIH(sigmaIH)
15  {
16  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15

Member Function Documentation

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

Reimplemented from ana::IExperiment.

Definition at line 10 of file Dmsq32Constraint.cxx.

References stan::math::fabs(), fMeanIH, fMeanNH, fSigmaIH, fSigmaNH, osc::_IOscCalcAdjustable< T >::GetDmsq32(), and util::sqr().

Referenced by Dmsq32Constraint().

12  {
13  const double dm = osc->GetDmsq32();
14 
15  if(dm > 0){
16  return util::sqr((dm-fMeanNH)/fSigmaNH);
17  }
18  else{
19  return util::sqr((fabs(dm)-fMeanIH)/fSigmaIH);
20  }
21  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
virtual T GetDmsq32() const
Definition: IOscCalc.h:91
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::IExperiment::SaveTo ( TDirectory *  dir,
const std::string name 
) const
virtualinherited

Reimplemented in ana::SingleSampleExperiment, ana::MultiExperiment, ana::CountingExperiment, ana::SolarConstraints, and ana::ReactorExperiment.

Definition at line 32 of file IExperiment.cxx.

References ana::assert().

Referenced by ana::IExperiment::LogLikelihood().

33  {
34  assert(0 && "Not implemented");
35  }
assert(nhit_max >=nhit_nbins)

Member Data Documentation

double ana::Dmsq32Constraint::fMeanIH
protected

Definition at line 23 of file Dmsq32Constraint.h.

Referenced by ChiSq().

double ana::Dmsq32Constraint::fMeanNH
protected

Definition at line 22 of file Dmsq32Constraint.h.

Referenced by ChiSq().

double ana::Dmsq32Constraint::fSigmaIH
protected

Definition at line 23 of file Dmsq32Constraint.h.

Referenced by ChiSq().

double ana::Dmsq32Constraint::fSigmaNH
protected

Definition at line 22 of file Dmsq32Constraint.h.

Referenced by ChiSq().


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