Public Member Functions | Protected Member Functions | List of all members
ana::FitSinSqTheta34Sterile Class Reference

$ \sin^2\theta_{34} $ More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-10-26/NuXAna/Vars/FitVarsSterile.h"

Inheritance diagram for ana::FitSinSqTheta34Sterile:
ana::IConstrainedFitVar ana::IFitVar

Public Member Functions

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

Protected Member Functions

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

Detailed Description

$ \sin^2\theta_{34} $

Definition at line 290 of file FitVarsSterile.h.

Constructor & Destructor Documentation

ana::FitSinSqTheta34Sterile::FitSinSqTheta34Sterile ( )
inline

Definition at line 293 of file FitVarsSterile.h.

References ana::FitDmSq32Sterile::GetValue(), ana::FitDmSq32Sterile::SetValue(), and febshutoff_auto::val.

293 : IConstrainedFitVar("ssth34", "sin^{2}#theta_{34}") {};

Member Function Documentation

template<typename T >
T ana::IConstrainedFitVar::Clamp ( T  val) const
inlineprotectedinherited
double ana::FitSinSqTheta34Sterile::GetValue ( const osc::IOscCalcAdjustable osc) const
overridevirtual

Implements ana::IFitVar.

Definition at line 253 of file FitVarsSterile.cxx.

References osc::DowncastToSterile(), std::sin(), and util::sqr().

Referenced by make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), and MakeSurface().

254  {
255  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(3,4)));
256  }
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
const OscCalcSterile * DowncastToSterile(const IOscCalc *calc)
T sin(T number)
Definition: d0nt_math.hpp:132
double ana::FitSinSqTheta34Sterile::HighLimit ( ) const
inlineoverridevirtual

Implements ana::IConstrainedFitVar.

Definition at line 300 of file FitVarsSterile.h.

References ana::kFitSinSqTheta34Sterile.

300 {return 1;}
const std::string& ana::IFitVar::LatexName ( ) const
inlineinherited
double ana::FitSinSqTheta34Sterile::LowLimit ( ) const
inlineoverridevirtual

Implements ana::IConstrainedFitVar.

Definition at line 299 of file FitVarsSterile.h.

299 {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
void ana::FitSinSqTheta34Sterile::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
overridevirtual

Implements ana::IFitVar.

Definition at line 259 of file FitVarsSterile.cxx.

References std::asin(), lem::Clamp(), osc::DowncastToSterile(), osc::OscCalcSterile::SetAngle(), and std::sqrt().

Referenced by DrawSurface(), FakeSignal(), GetNus18SeedValues(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), and MakeSurface().

260  {
262  }
T sqrt(T number)
Definition: d0nt_math.hpp:156
T Clamp(T val) const
Definition: IFitVar.h:60
const OscCalcSterile * DowncastToSterile(const IOscCalc *calc)
void SetAngle(int i, int j, double th)
T asin(T number)
Definition: d0nt_math.hpp:60
const std::string& ana::IFitVar::ShortName ( ) const
inlineinherited

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