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

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/CAFAna/Vars/FitVarsCPT.h"

Inheritance diagram for ana::FitDmSq32CPTHierarchy:
ana::FitDmSq32CPT ana::FitDmSq32 ana::IConstrainedFitVar ana::IFitVar

Public Member Functions

 FitDmSq32CPTHierarchy (osc::ENuSign nuSign, bool inverted=false)
 
void SetValue (osc::IOscCalcAdjustable *osc, double val) const override
 
double LowLimit () const override
 
double HighLimit () const override
 
double GetValue (const osc::IOscCalcAdjustable *osc) 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::stringShortName () const
 
const std::stringLatexName () const
 

Protected Member Functions

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

Protected Attributes

const bool fInverted
 
const osc::ENuSign fNuSign
 

Detailed Description

FitDmSq32CPT, but constrained to a hierarchy (and away from the other oscillation maximum near 8e-3 eV^2)

Definition at line 66 of file FitVarsCPT.h.

Constructor & Destructor Documentation

ana::FitDmSq32CPTHierarchy::FitDmSq32CPTHierarchy ( osc::ENuSign  nuSign,
bool  inverted = false 
)
inlineexplicit

Definition at line 69 of file FitVarsCPT.h.

70  : IConstrainedFitVar( ((nuSign==osc::ENuSign::kNu) ? "dmsq32scaled_nu" : "dmsq32scaled_nubar")
71  + std::string(inverted ? "_IH" : "_NH"),
72  ((nuSign==osc::ENuSign::kNu) ? "#Deltam^{2}_{32} (10^{-3} eV^{2})"
73  : "#Delta#bar{m}^{2}_{32} (10^{-3} eV^{2})")
74  + std::string(inverted ? " IH" : " NH")),
75  FitDmSq32CPT(nuSign), fInverted(inverted)
76  {}
FitDmSq32CPT(osc::ENuSign nuSign)
Definition: FitVarsCPT.h:15
enum BeamMode string

Member Function Documentation

template<typename T >
T ana::IConstrainedFitVar::Clamp ( T  val) const
inlineprotectedinherited
double ana::FitDmSq32CPT::GetValue ( const osc::IOscCalcAdjustable osc) const
overridevirtualinherited
double ana::FitDmSq32CPTHierarchy::HighLimit ( ) const
inlineoverridevirtual

Reimplemented from ana::FitDmSq32.

Definition at line 84 of file FitVarsCPT.h.

84 {return !fInverted ? kDmsq32Limit : 0 ;}
constexpr double kDmsq32Limit
Definition: FitVarsCPT.h:62
const std::string& ana::IFitVar::LatexName ( ) const
inlineinherited
double ana::FitDmSq32CPTHierarchy::LowLimit ( ) const
inlineoverridevirtual

Reimplemented from ana::FitDmSq32.

Definition at line 83 of file FitVarsCPT.h.

References ana::kDmsq32Limit.

83 {return !fInverted ? 0 : -kDmsq32Limit ;}
constexpr double kDmsq32Limit
Definition: FitVarsCPT.h:62
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::FitDmSq32CPTHierarchy::SetValue ( osc::IOscCalcAdjustable osc,
double  val 
) const
inlineoverridevirtual

Reimplemented from ana::FitDmSq32CPT.

Definition at line 78 of file FitVarsCPT.h.

References ana::IConstrainedFitVar::Clamp(), and ana::FitDmSq32CPT::SetValue().

79  {
81  }
T Clamp(T val) const
Definition: IFitVar.h:60
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Definition: FitVarsCPT.cxx:47
const std::string& ana::IFitVar::ShortName ( ) const
inlineinherited

Member Data Documentation

const bool ana::FitDmSq32CPTHierarchy::fInverted
protected

Definition at line 86 of file FitVarsCPT.h.

const osc::ENuSign ana::FitDmSq32CPT::fNuSign
protectedinherited

Definition at line 25 of file FitVarsCPT.h.


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