A convenience FitVar_StanSupport that wraps a pre-existing FitVar_StanSupport with a function you specify (enables re-use of functions) More...
Public Types | |
typedef 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. More... | |
Private Attributes | |
const StanFitSupport< IFitVar > * | fVar |
PriorFnType | fPriorFn |
A convenience FitVar_StanSupport that wraps a pre-existing FitVar_StanSupport with a function you specify (enables re-use of functions)
Warning: the function you pass as a prior must be normalizable (i.e., finite integral) when multiplied by the likelihood over the domain of your Var. This class can't check for you (the MCMC is going to explore that space); if your prior*likelihood isn't normalizable, you are likely to get unexpected results.
Definition at line 20 of file FitVarWithPrior.h.
typedef std::function<typename stan::math::var(stan::math::var, const osc::_IOscCalcAdjustable <stan::math::var>*)> ana::FitVarWithPrior::PriorFnType |
Function that will return the log of the value of the prior density for a given parameter.
Definition at line 28 of file FitVarWithPrior.h.
|
inline |
Constructor. Ensure that var doesn't go out of scope before this object does!
Definition at line 32 of file FitVarWithPrior.h.
|
inlineoverridevirtual |
Forward to wrapped Var's GetValue()
Implements ana::IFitVar.
Definition at line 41 of file FitVarWithPrior.h.
Referenced by FCCorrectSlice(), FCTutorial2020(), goodness_of_fit(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), joint_fit_future_bestfit_univ(), joint_fit_future_contour_univ(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), plot_joint_fit_2020_contours(), RunFitter(), syst_table_fit(), and syst_table_fit_new().
|
inlineoverride |
Definition at line 45 of file FitVarWithPrior.h.
|
pure virtualinherited |
Implemented in ana::FitDeltaInPiUnits.
|
inlineinherited |
Definition at line 37 of file IFitVar.h.
References ana::IFitVar::fLatexName, ana::IFitVar::fShortName, and string.
Referenced by ana::FrequentistSurface::CreateHistograms(), ana::SurfaceKrige::SurfaceKrige(), and test_fitvarsproduct().
|
inlineoverride |
Implement calculation of log-prior by forwarding to stored function.
Definition at line 62 of file FitVarWithPrior.h.
|
inlinevirtualinherited |
Log of the prior probability density. Default implementation just does log(Prior()), but this can be overridden if there optimizations that speed up the calculation.
Definition at line 102 of file IFitVar.h.
|
inlinevirtualinherited |
Reimplemented in ana::FitDeltaCPT, ana::FitSigmaCPT, and ana::IConstrainedFitVar.
Definition at line 34 of file IFitVar.h.
Referenced by ana::FrequentistSurface::FillSurface().
|
inlinevirtualinherited |
The prior probability density distribution on this variable (which can depend on others if needed). If there are optimizations that can make log(Prior()) more expensive than a direct implementation, consider implementing LogPrior() directly instead.
Definition at line 98 of file IFitVar.h.
|
inlineoverridevirtual |
Forward to wrapped Var's SetValue()
Implements ana::IFitVar.
Definition at line 51 of file FitVarWithPrior.h.
Referenced by bin_composition_pie_chart(), CVNCuts(), fill_col(), futureSig_reach_singlePOTcombo_syst(), GetCalculator(), GetMinChiSqSlc(), SystEntry::hDm(), SystEntry::hDmDcp(), SystEntry::hSin(), SystEntry::hSinDcp(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), MakeFakeData(), MakePeriCutPlot(), makeSystTable(), makeSystTable_reduced(), MakeTable(), PeripheralCuts(), predEventCountWithSystError(), ResetCalc(), SetFakeCalc(), SetSeeds(), test_nue2017Prediction(), and test_nue2018_fitter().
|
inlineoverride |
Definition at line 55 of file FitVarWithPrior.h.
|
pure virtualinherited |
Implemented in ana::FitDeltaInPiUnits.
|
inlineinherited |
Definition at line 36 of file IFitVar.h.
References ana::IFitVar::fShortName.
Referenced by ana::CovMxSurface::CovMxSurface(), ana::FrequentistSurface::FillSurface(), MakeSurface(), MakeSurfaceJoint(), plot_3flavor_withsysts(), ana::FrequentistSurface::ProgressBarTitle(), ana::MCMCSamples::SampleValue(), ana::StanFitter::transform_helper(), ana::MCMCSample::Val(), ana::MCMCSamples::VarOffset(), and ana::StanFitter::write_array().
|
private |
Definition at line 70 of file FitVarWithPrior.h.
|
private |
Definition at line 68 of file FitVarWithPrior.h.