23 #ifdef DICT_FOR_PYTHON 28 typedef std::function<typename stan::math::var(stan::math::var, const osc::_IOscCalcAdjustable <stan::math::var>*)>
PriorFnType;
37 fVar(var), fPriorFn(priorFn)
43 return fVar->GetValue(osc);
47 return fVar->GetValue(osc);
53 fVar->SetValue(osc, val);
57 fVar->SetValue(osc, val);
64 return fPriorFn(val, calc);
77 #ifdef DICT_FOR_PYTHON 92 fPriorFnName(priorName)
97 return fVar->GetValue(osc);
101 return fVar->GetValue(osc);
106 fVar->SetValue(osc, val);
110 fVar->SetValue(osc, val);
116 return fPriorFn(val, calc);
121 return fVar->LowLimit();
126 return fVar->HighLimit();
const StanFitSupport< IConstrainedFitVar > * fVar
std::function< typename stan::math::var(stan::math::var, const osc::_IOscCalcAdjustable< stan::math::var > *)> PriorFnType
Function that will return the log of the value of the prior density for a given parameter.
Cuts and Vars for the 2020 FD DiF Study.
const std::string & PriorName() const
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Forward to wrapped Var's GetValue()
double LowLimit() const override
FitVarWithPrior(const StanFitSupport< IFitVar > *var, PriorFnType priorFn, const std::string &priorName)
Constructor. Ensure that var doesn't go out of scope before this object does!
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Forward to wrapped Var's SetValue()
ConstrainedFitVarWithPrior(const StanFitSupport< IConstrainedFitVar > *var, FitVarWithPrior::PriorFnType priorFn, const std::string &priorName)
stan::math::var GetValue(const osc::IOscCalcAdjustableStan *osc) const override
double HighLimit() const override
stan::math::var GetValue(const osc::_IOscCalcAdjustable< stan::math::var > *osc) const override
void SetValue(osc::IOscCalcAdjustableStan *osc, stan::math::var val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const StanFitSupport< IFitVar > * fVar
Oscillation probability calculators.
stan::math::var LogPrior(const stan::math::var &val, const osc::_IOscCalcAdjustable< stan::math::var > *calc) const override
Implement calculation of log-prior by forwarding to stored function.
General interface to any calculator that lets you set the parameters.
Interface definition for fittable variables.
Version of FitVarWithPrior for use with constrained FitVar_StanSupports.
std::function< typename stan::math::var(const stan::math::var &, const osc::_IOscCalcAdjustable< stan::math::var > *)> PriorFnType
A convenience FitVar_StanSupport that wraps a pre-existing FitVar_StanSupport with a function you spe...
void SetValue(osc::_IOscCalcAdjustable< stan::math::var > *osc, stan::math::var val) const override
stan::math::var LogPrior(const stan::math::var &val, const osc::_IOscCalcAdjustable< stan::math::var > *calc) const override