All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ana::GaussianConstraint Class Reference

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

#include <GaussianConstraint.h>

Inheritance diagram for ana::GaussianConstraint:
ana::IExperiment

Public Member Functions

 GaussianConstraint (const IFitVar *var, double mean, double sigma)
 
virtual double ChiSq (osc::IOscCalcAdjustable *osc, const SystShifts &shift=SystShifts::Nominal()) const override
 
- Public Member Functions inherited from ana::IExperiment
virtual ~IExperiment ()
 
virtual void SaveTo (TDirectory *dir) 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 
)
inline

Definition at line 14 of file GaussianConstraint.h.

15  : fVar(var), fMean(mean), fSigma(sigma)
16  {
17  }
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
Definition: UtilFunc.cxx:13

Member Function Documentation

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

Implements ana::IExperiment.

Definition at line 10 of file GaussianConstraint.cxx.

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

Member Data Documentation

double ana::GaussianConstraint::fMean
protected

Definition at line 24 of file GaussianConstraint.h.

double ana::GaussianConstraint::fSigma
protected

Definition at line 24 of file GaussianConstraint.h.

const IFitVar* ana::GaussianConstraint::fVar
protected

Definition at line 23 of file GaussianConstraint.h.


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