Public Member Functions | Protected Member Functions | List of all members
FitSinSqTheta23UO Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-16/3FlavorAna/Ana2018/numu/BoxOpening/includes_starplots.h"

Inheritance diagram for FitSinSqTheta23UO:
ana::IConstrainedFitVar ana::IConstrainedFitVar ana::IConstrainedFitVar ana::IFitVar ana::IFitVar ana::IFitVar

Public Member Functions

virtual double GetValue (const osc::IOscCalcAdjustable *osc) const
 
virtual void SetValue (osc::IOscCalcAdjustable *osc, double val) const
 
virtual std::string ShortName () const
 
virtual std::string LatexName () const
 
virtual double LowLimit () const
 
virtual double HighLimit () const
 
virtual double GetValue (const osc::IOscCalcAdjustable *osc) const
 
virtual void SetValue (osc::IOscCalcAdjustable *osc, double val) const
 
virtual std::string ShortName () const
 
virtual std::string LatexName () const
 
virtual double LowLimit () const
 
virtual double HighLimit () const
 
virtual double GetValue (const osc::IOscCalcAdjustable *osc) const
 
virtual void SetValue (osc::IOscCalcAdjustable *osc, double val) const
 
virtual std::string ShortName () const
 
virtual std::string LatexName () const
 
virtual double LowLimit () const
 
virtual double HighLimit () const
 
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...
 

Protected Member Functions

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

Detailed Description

Definition at line 77 of file starPlot.C.

Member Function Documentation

template<typename T >
T ana::IConstrainedFitVar::Clamp ( T  val) const
inlineprotectedinherited
virtual double FitSinSqTheta23UO::GetValue ( const osc::IOscCalcAdjustable osc) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 78 of file includes_starplots.h.

References osc::_IOscCalcAdjustable< T >::GetTh23(), std::sin(), and util::sqr().

79  {
80  return util::sqr(sin(osc->GetTh23()));
81  };
virtual T GetTh23() const
Definition: IOscCalc.h:94
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
T sin(T number)
Definition: d0nt_math.hpp:132
virtual double FitSinSqTheta23UO::GetValue ( const osc::IOscCalcAdjustable osc) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 79 of file demoStarPlots.C.

References osc::_IOscCalcAdjustable< T >::GetTh23(), std::sin(), and util::sqr().

80  {
81  return util::sqr(sin(osc->GetTh23()));
82  };
virtual T GetTh23() const
Definition: IOscCalc.h:94
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
T sin(T number)
Definition: d0nt_math.hpp:132
virtual double FitSinSqTheta23UO::GetValue ( const osc::IOscCalcAdjustable osc) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 80 of file starPlot.C.

References osc::_IOscCalcAdjustable< T >::GetTh23(), std::sin(), and util::sqr().

Referenced by demoStarPlots(), make_starplots(), and starPlot().

81  {
82  return util::sqr(sin(osc->GetTh23()));
83  };
virtual T GetTh23() const
Definition: IOscCalc.h:94
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
T sin(T number)
Definition: d0nt_math.hpp:132
virtual double FitSinSqTheta23UO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 91 of file includes_starplots.h.

91 {return 1.;}
virtual double FitSinSqTheta23UO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 92 of file demoStarPlots.C.

92 {return 1.;}
virtual double FitSinSqTheta23UO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 93 of file starPlot.C.

93 {return 1.;}
virtual std::string FitSinSqTheta23UO::LatexName ( ) const
inlinevirtual

Definition at line 87 of file includes_starplots.h.

87 {return "sin^{2}#theta_{23} Constrained to Upper Octant";}
virtual std::string FitSinSqTheta23UO::LatexName ( ) const
inlinevirtual

Definition at line 88 of file demoStarPlots.C.

88 {return "sin^{2}#theta_{23} Constrained to Upper Octant";}
virtual std::string FitSinSqTheta23UO::LatexName ( ) const
inlinevirtual

Definition at line 89 of file starPlot.C.

89 {return "sin^{2}#theta_{23} Constrained to Upper Octant";}
virtual double FitSinSqTheta23UO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 90 of file includes_starplots.h.

90 {return 0.514;}
virtual double FitSinSqTheta23UO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 91 of file demoStarPlots.C.

91 {return 0.514;}
virtual double FitSinSqTheta23UO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 92 of file starPlot.C.

92 {return 0.514;}
double ana::IConstrainedFitVar::Penalty ( double  val,
osc::IOscCalcAdjustable  
) const
overridevirtualinherited

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(), ana::IConstrainedFitVar::HighLimit(), lo(), ana::IConstrainedFitVar::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 FitSinSqTheta23UO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 82 of file includes_starplots.h.

References std::asin(), ana::IConstrainedFitVar::Clamp(), osc::_IOscCalcAdjustable< T >::SetTh23(), and std::sqrt().

83  {
84  osc->SetTh23(asin(sqrt(Clamp(val))));
85  };
T sqrt(T number)
Definition: d0nt_math.hpp:156
T Clamp(T val) const
Definition: IFitVar.h:60
virtual void SetTh23(const T &th23)=0
T asin(T number)
Definition: d0nt_math.hpp:60
virtual void FitSinSqTheta23UO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 83 of file demoStarPlots.C.

References std::asin(), lem::Clamp(), osc::_IOscCalcAdjustable< T >::SetTh23(), and std::sqrt().

84  {
85  osc->SetTh23(asin(sqrt(Clamp(val))));
86  };
T sqrt(T number)
Definition: d0nt_math.hpp:156
T Clamp(T val) const
Definition: IFitVar.h:60
virtual void SetTh23(const T &th23)=0
T asin(T number)
Definition: d0nt_math.hpp:60
virtual void FitSinSqTheta23UO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 84 of file starPlot.C.

References std::asin(), lem::Clamp(), osc::_IOscCalcAdjustable< T >::SetTh23(), and std::sqrt().

85  {
86  osc->SetTh23(asin(sqrt(Clamp(val))));
87  };
T sqrt(T number)
Definition: d0nt_math.hpp:156
T Clamp(T val) const
Definition: IFitVar.h:60
virtual void SetTh23(const T &th23)=0
T asin(T number)
Definition: d0nt_math.hpp:60
virtual std::string FitSinSqTheta23UO::ShortName ( ) const
inlinevirtual

Definition at line 86 of file includes_starplots.h.

86 {return "sinsqth23_UO";}
virtual std::string FitSinSqTheta23UO::ShortName ( ) const
inlinevirtual

Definition at line 87 of file demoStarPlots.C.

87 {return "sinsqth23_UO";}
virtual std::string FitSinSqTheta23UO::ShortName ( ) const
inlinevirtual

Definition at line 88 of file starPlot.C.

88 {return "sinsqth23_UO";}

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