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

A simple Gaussian constraint on an arbitrary IFitVar. More...

#include "/cvmfs/"

Inheritance diagram for ana::GaussianConstraint:

Public Member Functions

 GaussianConstraint (const IFitVar *var, double mean, double sigma)
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 Reset () const
virtual void SaveTo (TDirectory *dir, const std::string &name) const

Protected Attributes

const IFitVarfVar
double fMean
double fSigma

Detailed Description

A simple Gaussian constraint on an arbitrary IFitVar.

Definition at line 11 of file GaussianConstraint.h.

Constructor & Destructor Documentation

ana::GaussianConstraint::GaussianConstraint ( const IFitVar var,
double  mean,
double  sigma 

Definition at line 14 of file GaussianConstraint.h.

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

15  : fVar(var), fMean(mean), fSigma(sigma)
16  {
17  }
var_value< double > var
Definition: StanTypedefs.h:14
double sigma(TH1F *hist, double percentile)

Member Function Documentation

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

Reimplemented from ana::IExperiment.

Definition at line 10 of file GaussianConstraint.cxx.

References fMean, fSigma, fVar, ana::IFitVar::GetValue(), and util::sqr().

Referenced by GaussianConstraint().

12  {
13  return util::sqr((fVar->GetValue(osc)-fMean)/fSigma);
14  }
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const =0
virtual stan::math::var ana::IExperiment::LogLikelihood ( osc::IOscCalcAdjustableStan osc,
const SystShifts syst = kNoShift 
) const

Reimplemented in test::GaussQuadExperiment, ana::SingleSampleExperiment, and ana::MultiExperiment.

Definition at line 25 of file IExperiment.h.

References ana::assert().

Referenced by ana::StanFitter::log_prob().

27  {
28  assert(false && "unimplemented");
29  return 0;
30  };
assert(nhit_max >=nhit_nbins)
virtual void ana::IExperiment::Reset ( ) const
void ana::IExperiment::SaveTo ( TDirectory *  dir,
const std::string name 
) const

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::Reset().

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

Member Data Documentation

double ana::GaussianConstraint::fMean

Definition at line 24 of file GaussianConstraint.h.

Referenced by ChiSq().

double ana::GaussianConstraint::fSigma

Definition at line 24 of file GaussianConstraint.h.

Referenced by ChiSq().

const IFitVar* ana::GaussianConstraint::fVar

Definition at line 23 of file GaussianConstraint.h.

Referenced by ChiSq().

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