Public Member Functions | Protected Member Functions | List of all members
ana::IConstrainedFitVar Class Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-02/CAFAna/Core/IFitVar.h"

Inheritance diagram for ana::IConstrainedFitVar:
ana::IFitVar ana::Fit2SinSqTheta23SinSq2Theta13 ana::FitDmSq21 ana::FitDmSq32 ana::FitDmSq32InvertedHierarchy ana::FitDmSq32NormalHierarchy ana::FitDmSq32ScaledIH ana::FitDmSq32ScaledNH ana::FitEpsMuTau ana::FitSinSq2Theta12 ana::FitSinSq2Theta13 ana::FitSinSq2Theta13Sterile ana::FitSinSq2Theta23 ana::FitSinSqTheta13Sterile ana::FitSinSqTheta14Sterile ana::FitSinSqTheta23Sterile ana::FitSinSqTheta24Sterile ana::FitSinSqTheta34Sterile ana::FitTanSqTheta12 ana::FitTheta13InDegreesSterile ana::FitTheta13Sterile ana::FitTheta14InDegreesSterile ana::FitTheta14Sterile ana::FitTheta23InDegreesSterile ana::FitTheta23Sterile ana::FitTheta24InDegreesSterile ana::FitTheta24Sterile ana::FitTheta34InDegreesSterile ana::FitTheta34Sterile ana::FitVarsProduct ana::FitVarsProductMarg FitSinSqTheta23LO FitSinSqTheta23LO FitSinSqTheta23LO FitSinSqTheta23LowerOctant FitSinSqTheta23LowerOctant FitSinSqTheta23LowerOctant FitSinSqTheta23LowerOctant FitSinSqTheta23MaxMix FitSinSqTheta23MaxMix FitSinSqTheta23UO FitSinSqTheta23UO FitSinSqTheta23UO FitSinSqTheta23UpperOctant FitSinSqTheta23UpperOctant FitSinSqTheta23UpperOctant FitSinSqTheta23UpperOctant ana::StanFitSupport< ana::IConstrainedFitVar > ana::StanFitSupport< IConstrainedFitVar >

Public Member Functions

virtual double LowLimit () const =0
 
virtual double HighLimit () const =0
 
double Penalty (double val, osc::IOscCalcAdjustable *) const override
 Override the default implementation with one that pushes back towards the center of the constrained space. More...
 
virtual double GetValue (const osc::IOscCalcAdjustable *osc) const =0
 
virtual void SetValue (osc::IOscCalcAdjustable *osc, double val) const =0
 
const std::stringShortName () const
 
const std::stringLatexName () const
 

Protected Member Functions

template<typename T >
T Clamp (T val) const
 

Detailed Description

Definition at line 47 of file IFitVar.h.

Member Function Documentation

template<typename T >
T ana::IConstrainedFitVar::Clamp ( T  val) const
inlineprotected
virtual double ana::IFitVar::GetValue ( const osc::IOscCalcAdjustable osc) const
pure virtualinherited

Implemented in FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta34InDegreesSterile, ana::FitTheta24InDegreesSterile, FitSinSqTheta23UpperOctant, FitSinSqTheta23MaxMix, ana::FitTheta14InDegreesSterile, FitSinSqTheta23LowerOctant, FitSinSqTheta23UpperOctant, ana::FitTheta23InDegreesSterile, FitSinSqTheta23LowerOctant, ana::FitTheta13InDegreesSterile, ana::FitDeltaCPT, ana::FitDmSq21, ana::FitSinSqTheta34Sterile, ana::FitSigmaCPT, ana::FitSinSq2Theta12, ana::FitTheta34Sterile, ana::FitTanSqTheta12, ana::FitSinSqTheta24Sterile, FitSinSqTheta23MaxMix, ana::FitDmSq32InvertedHierarchy, ana::FitTheta24Sterile, ana::FitSinSq2Theta12CPT, ana::FitDmSq32ScaledIH, ana::FitSinSqTheta14Sterile, ana::FitDmSq32ScaledNH, ana::FitSinSq2Theta13CPT, ana::FitTheta14Sterile, ana::FitDmSq32NormalHierarchy, ana::FitSinSqTheta23Sterile, ana::FitDmSq32Scaled, ana::FitTheta23Sterile, ana::FitSinSqTheta23CPT, ana::FitDmSq32, ana::FitSinSq2Theta13Sterile, FitSinSqTheta23UpperOctant, ana::FitSinSq2Theta23, ana::FitSinSq2Theta23CPT, ana::FitSinSqTheta13Sterile, FitSinSqTheta23LowerOctant, ana::FitSinSqTheta23LowerOctant, ana::FitDmSq21CPT, ana::FitTheta13Sterile, FitSinSqTheta23LO, FitSinSqTheta23LO, FitSinSqTheta23LO, ana::ConstrainedFitVarWithPrior, ana::FitDelta24InPiUnitsSterile, ana::FitSinSqTheta23UpperOctant, FitSinSqTheta23UO, ana::Fit2SinSqTheta23SinSq2Theta13, FitSinSqTheta23UO, FitSinSqTheta23UO, ana::FitDelta14InPiUnitsSterile, ana::FitSinSqTheta23, ana::FitDelta13InPiUnitsSterile, ana::FitDeltaInPiUnits, ana::FitDmSq32ScaledCPT, ana::FitVarsProductMarg, ana::FitDmSq43Sterile, ana::FitVarWithPrior, ana::FitSinSq2Theta13, ana::FitVarsProduct, ana::FitDmSq41Sterile, ana::FitDmSq32CPT, ana::FitTheta13, ana::FitDmSq32Sterile, and ana::FitEpsMuTau.

Referenced by ana::GaussianConstraint::ChiSq(), ana::FrequentistSurface::FindMinimum(), ana::FindValley(), ana::FitVarsProduct::GetValue(), ana::FitVarsProductMarg::GetValue(), 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_3flavor_withsysts(), ana::Profile(), ana::SigmaDelta::SetFitVars(), ana::FitVarsProduct::SetValue(), ana::FitVarsProductMarg::SetValue(), ana::SigmaDelta::SigmaDelta(), test_fitvarsproduct(), and ana::IFitVar::~IFitVar().

virtual double ana::IConstrainedFitVar::HighLimit ( ) const
pure virtual

Implemented in FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta34InDegreesSterile, ana::FitTheta24InDegreesSterile, FitSinSqTheta23UpperOctant, FitSinSqTheta23MaxMix, ana::FitTheta14InDegreesSterile, FitSinSqTheta23LowerOctant, FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta23InDegreesSterile, ana::FitTheta13InDegreesSterile, ana::FitDmSq21, ana::FitSinSqTheta34Sterile, ana::FitSinSq2Theta12, ana::FitTheta34Sterile, ana::FitTanSqTheta12, ana::FitSinSqTheta24Sterile, FitSinSqTheta23MaxMix, ana::FitDmSq32InvertedHierarchy, ana::FitTheta24Sterile, ana::FitDmSq32ScaledIH, ana::FitSinSqTheta14Sterile, ana::FitDmSq32ScaledNH, ana::FitTheta14Sterile, ana::FitDmSq32NormalHierarchy, ana::FitSinSqTheta23Sterile, ana::FitSinSqTheta23CPTOctant, ana::FitDmSq32Scaled, ana::FitTheta23Sterile, ana::FitDmSq32, ana::FitSinSq2Theta13Sterile, FitSinSqTheta23UpperOctant, ana::FitSinSq2Theta23, FitSinSqTheta23LowerOctant, ana::FitSinSqTheta13Sterile, ana::ConstrainedFitVarWithPrior, ana::FitSinSqTheta23LowerOctant, FitSinSqTheta23LO, FitSinSqTheta23LO, FitSinSqTheta23LO, ana::FitTheta13Sterile, ana::FitSinSqTheta23UpperOctant, FitSinSqTheta23UO, FitSinSqTheta23UO, FitSinSqTheta23UO, ana::Fit2SinSqTheta23SinSq2Theta13, ana::FitDmSq32CPTHierarchy, ana::FitSinSqTheta23, ana::FitVarsProductMarg, ana::FitSinSq2Theta13, ana::FitVarsProduct, and ana::FitEpsMuTau.

Referenced by ana::FitVarsProduct::FitVarsProduct(), ana::FitVarsProductMarg::FitVarsProductMarg(), Penalty(), ana::SigmaDelta::SigmaDelta(), ana::SigmaDelta::SigmaPenalty(), ana::StanFitter::transform_helper(), and ana::StanFitter::write_array().

const std::string& ana::IFitVar::LatexName ( ) const
inlineinherited
virtual double ana::IConstrainedFitVar::LowLimit ( ) const
pure virtual

Implemented in FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta34InDegreesSterile, ana::FitTheta24InDegreesSterile, FitSinSqTheta23UpperOctant, FitSinSqTheta23MaxMix, ana::FitTheta14InDegreesSterile, FitSinSqTheta23LowerOctant, FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta23InDegreesSterile, ana::FitTheta13InDegreesSterile, ana::FitDmSq21, ana::FitSinSqTheta34Sterile, ana::FitSinSq2Theta12, ana::FitTheta34Sterile, ana::FitTanSqTheta12, ana::FitSinSqTheta24Sterile, FitSinSqTheta23MaxMix, ana::FitDmSq32InvertedHierarchy, ana::FitTheta24Sterile, ana::FitDmSq32ScaledIH, ana::FitSinSqTheta14Sterile, ana::FitDmSq32ScaledNH, ana::FitTheta14Sterile, ana::FitDmSq32NormalHierarchy, ana::FitSinSqTheta23Sterile, ana::FitSinSqTheta23CPTOctant, ana::FitDmSq32Scaled, ana::FitTheta23Sterile, ana::FitDmSq32, ana::FitSinSq2Theta13Sterile, FitSinSqTheta23UpperOctant, ana::FitSinSq2Theta23, FitSinSqTheta23LowerOctant, ana::FitSinSqTheta13Sterile, ana::ConstrainedFitVarWithPrior, ana::FitSinSqTheta23LowerOctant, FitSinSqTheta23LO, FitSinSqTheta23LO, FitSinSqTheta23LO, ana::FitTheta13Sterile, ana::FitSinSqTheta23UpperOctant, FitSinSqTheta23UO, FitSinSqTheta23UO, FitSinSqTheta23UO, ana::Fit2SinSqTheta23SinSq2Theta13, ana::FitDmSq32CPTHierarchy, ana::FitSinSqTheta23, ana::FitVarsProductMarg, ana::FitSinSq2Theta13, ana::FitVarsProduct, and ana::FitEpsMuTau.

Referenced by ana::FitVarsProduct::FitVarsProduct(), ana::FitVarsProductMarg::FitVarsProductMarg(), Penalty(), ana::SigmaDelta::SigmaDelta(), ana::SigmaDelta::SigmaPenalty(), ana::StanFitter::transform_helper(), and ana::StanFitter::write_array().

double ana::IConstrainedFitVar::Penalty ( double  val,
osc::IOscCalcAdjustable  
) const
overridevirtual

Override the default implementation with one that pushes back towards the center of the constrained space.

Reimplemented from ana::IFitVar.

Definition at line 8 of file IFitVar.cxx.

References hi(), HighLimit(), lo(), LowLimit(), extractScale::mean, Munits::rad, and util::sqr().

Referenced by ana::SigmaDelta::SigmaPenalty().

10  {
11  const auto lo = LowLimit();
12  const auto hi = HighLimit();
13 
14  if (val >= lo && val <= hi) return 0;
15 
16  // Try to direct fit back towards centre of the space. Engineer penalty to
17  // be zero at the limits.
18  const auto mean = (lo + hi) / 2;
19  const auto rad = (hi - lo) / 2;
20  return util::sqr((val - mean) / rad) - 1;
21 
22 
23  // if(val < lo) return util::sqr(lo-val);
24  // if(val > hi) return util::sqr(val-hi);
25  // return 0;
26  }
virtual double HighLimit() const =0
TSpline3 lo("lo", xlo, ylo, 12,"0")
virtual double LowLimit() const =0
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
TSpline3 hi("hi", xhi, yhi, 18,"0")
static constexpr Double_t rad
Definition: Munits.h:162
virtual void ana::IFitVar::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
pure virtualinherited

Implemented in FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta34InDegreesSterile, ana::FitTheta24InDegreesSterile, FitSinSqTheta23UpperOctant, FitSinSqTheta23MaxMix, ana::FitTheta14InDegreesSterile, FitSinSqTheta23LowerOctant, FitSinSqTheta23UpperOctant, FitSinSqTheta23LowerOctant, ana::FitTheta23InDegreesSterile, ana::FitTheta13InDegreesSterile, ana::FitDeltaCPT, ana::FitDmSq21, ana::FitSinSqTheta34Sterile, ana::FitSigmaCPT, ana::FitSinSq2Theta12, ana::FitTheta34Sterile, ana::FitTanSqTheta12, ana::FitSinSqTheta24Sterile, FitSinSqTheta23MaxMix, ana::FitDmSq32InvertedHierarchy, ana::FitTheta24Sterile, ana::FitSinSq2Theta12CPT, ana::FitDmSq32ScaledIH, ana::FitSinSqTheta14Sterile, ana::FitDmSq32ScaledNH, ana::FitSinSq2Theta13CPT, ana::FitTheta14Sterile, ana::FitDmSq32NormalHierarchy, ana::FitSinSqTheta23Sterile, ana::FitDmSq32Scaled, ana::FitTheta23Sterile, ana::FitSinSqTheta23CPT, ana::FitDmSq32, ana::FitSinSq2Theta13Sterile, FitSinSqTheta23UpperOctant, ana::FitSinSq2Theta23, ana::FitSinSq2Theta23CPT, FitSinSqTheta23LowerOctant, ana::FitSinSqTheta13Sterile, ana::FitSinSqTheta23LowerOctant, ana::FitDmSq21CPT, ana::FitTheta13Sterile, FitSinSqTheta23LO, ana::ConstrainedFitVarWithPrior, FitSinSqTheta23LO, FitSinSqTheta23LO, ana::FitSinSqTheta23UpperOctant, ana::FitDelta24InPiUnitsSterile, FitSinSqTheta23UO, ana::Fit2SinSqTheta23SinSq2Theta13, FitSinSqTheta23UO, FitSinSqTheta23UO, ana::FitDmSq32CPTHierarchy, ana::FitDelta14InPiUnitsSterile, ana::FitSinSqTheta23, ana::FitDelta13InPiUnitsSterile, ana::FitVarWithPrior, ana::FitDeltaInPiUnits, ana::FitDmSq32ScaledCPT, ana::FitVarsProductMarg, ana::FitDmSq43Sterile, ana::FitSinSq2Theta13, ana::FitVarsProduct, ana::FitDmSq41Sterile, ana::FitDmSq32CPT, ana::FitTheta13, ana::FitDmSq32Sterile, and ana::FitEpsMuTau.

Referenced by ana::CovMxSurface::CovMxSurface(), ana::FrequentistSurface::FillSurfacePoint(), ana::FrequentistSurface::FindMinimum(), ana::FindValley(), 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(), ana::Profile(), ana::SigmaDelta::SetFitVars(), ana::FitVarsProduct::SetValue(), ana::FitVarsProductMarg::SetValue(), test_fitvarsproduct(), and ana::IFitVar::~IFitVar().

const std::string& ana::IFitVar::ShortName ( ) const
inlineinherited

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