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

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

Inheritance diagram for FitSinSqTheta23LO:
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 97 of file starPlot.C.

Member Function Documentation

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

Implements ana::IFitVar.

Definition at line 98 of file includes_starplots.h.

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

99  {
100  return util::sqr(sin(osc->GetTh23()));
101  };
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 FitSinSqTheta23LO::GetValue ( const osc::IOscCalcAdjustable osc) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 99 of file demoStarPlots.C.

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

100  {
101  return util::sqr(sin(osc->GetTh23()));
102  };
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 FitSinSqTheta23LO::GetValue ( const osc::IOscCalcAdjustable osc) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 100 of file starPlot.C.

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

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

101  {
102  return util::sqr(sin(osc->GetTh23()));
103  };
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 FitSinSqTheta23LO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 112 of file includes_starplots.h.

112 {return 0.49;}
virtual double FitSinSqTheta23LO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 113 of file demoStarPlots.C.

113 {return 0.49;}
virtual double FitSinSqTheta23LO::HighLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 114 of file starPlot.C.

114 {return 0.49;}
virtual std::string FitSinSqTheta23LO::LatexName ( ) const
inlinevirtual

Definition at line 107 of file includes_starplots.h.

107 {return "sin^{2}#theta_{23} Constraint to Lower Octant";}
virtual std::string FitSinSqTheta23LO::LatexName ( ) const
inlinevirtual

Definition at line 108 of file demoStarPlots.C.

108 {return "sin^{2}#theta_{23} Constraint to Lower Octant";}
virtual std::string FitSinSqTheta23LO::LatexName ( ) const
inlinevirtual

Definition at line 109 of file starPlot.C.

109 {return "sin^{2}#theta_{23} Constraint to Lower Octant";}
virtual double FitSinSqTheta23LO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 110 of file includes_starplots.h.

110 {return 0.;}
virtual double FitSinSqTheta23LO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 111 of file demoStarPlots.C.

111 {return 0.;}
virtual double FitSinSqTheta23LO::LowLimit ( ) const
inlinevirtual

Implements ana::IConstrainedFitVar.

Definition at line 112 of file starPlot.C.

112 {return 0.;}
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 FitSinSqTheta23LO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 102 of file includes_starplots.h.

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

103  {
104  osc->SetTh23(asin(sqrt(Clamp(val))));
105  };
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 FitSinSqTheta23LO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 103 of file demoStarPlots.C.

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

104  {
105  osc->SetTh23(asin(sqrt(Clamp(val))));
106  };
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 FitSinSqTheta23LO::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlinevirtual

Implements ana::IFitVar.

Definition at line 104 of file starPlot.C.

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

105  {
106  osc->SetTh23(asin(sqrt(Clamp(val))));
107  };
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 FitSinSqTheta23LO::ShortName ( ) const
inlinevirtual

Definition at line 106 of file includes_starplots.h.

106 {return "sinsqth23_LO";}
virtual std::string FitSinSqTheta23LO::ShortName ( ) const
inlinevirtual

Definition at line 107 of file demoStarPlots.C.

107 {return "sinsqth23_LO";}
virtual std::string FitSinSqTheta23LO::ShortName ( ) const
inlinevirtual

Definition at line 108 of file starPlot.C.

108 {return "sinsqth23_LO";}

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