Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osc::_IOscCalcAdjustable< T > Class Template Referenceabstract

General interface to any calculator that lets you set the parameters. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-04-14/CAFAna/Core/FitVarWithPrior.h"

Inheritance diagram for osc::_IOscCalcAdjustable< T >:
osc::_IOscCalc< T > osc::_OscCalcDMP< T > osc::_OscCalcPMNS< T > osc::_OscCalcPMNSOpt< T > osc::analytic::_OscCalc< T > osc::OscCalcCPT osc::OscCalcPMNS_CPT osc::OscCalcSterile osc::OscCalcSterileBeam osc::OscCalcSterileTrivial

Public Member Functions

virtual ~_IOscCalcAdjustable ()
 
virtual _IOscCalcAdjustable< T > * Copy () const =0
 
virtual void SetL (double L)=0
 
virtual void SetRho (double rho)=0
 
virtual void SetDmsq21 (const T &dmsq21)=0
 
virtual void SetDmsq32 (const T &dmsq32)=0
 
virtual void SetTh12 (const T &th12)=0
 
virtual void SetTh13 (const T &th13)=0
 
virtual void SetTh23 (const T &th23)=0
 
virtual void SetdCP (const T &dCP)=0
 
virtual double GetL () const
 
virtual double GetRho () const
 
virtual T GetDmsq21 () const
 
virtual T GetDmsq32 () const
 
virtual T GetTh12 () const
 
virtual T GetTh13 () const
 
virtual T GetTh23 () const
 
virtual T GetdCP () const
 
virtual void InvalidateCache ()
 Invalidate any caching used internally by the calculator. More...
 
virtual T P (int flavBefore, int flavAfter, double E)=0
 E in GeV; flavors as PDG codes (so, neg==>antinu) More...
 
virtual Eigen::Array< T, Eigen::Dynamic, 1 > P (int flavBefore, int flavAfter, const std::vector< double > &E)
 
virtual Eigen::Array< T, Eigen::Dynamic, 1 > P (int flavBefore, int flavAfter, const Eigen::ArrayXd &E)
 
virtual TMD5 * GetParamsHash () const
 Use to check two calculators are in the same state. More...
 

Protected Member Functions

TMD5 * GetParamsHashDefault (const std::string &txt) const
 This is only a safe implementation if your calculator only depends on these eight parameters. More...
 

Protected Attributes

double fRho
 
double fL
 
T fDmsq21
 
T fDmsq32
 
T fTh12
 
T fTh13
 
T fTh23
 
T fdCP
 

Detailed Description

template<typename T>
class osc::_IOscCalcAdjustable< T >

General interface to any calculator that lets you set the parameters.

Definition at line 9 of file FitVarWithPrior.h.

Constructor & Destructor Documentation

template<class T >
osc::_IOscCalcAdjustable< T >::~_IOscCalcAdjustable ( )
virtual

Definition at line 41 of file IOscCalc.cxx.

42  {
43  }

Member Function Documentation

template<typename T>
virtual _IOscCalcAdjustable<T>* osc::_IOscCalcAdjustable< T >::Copy ( ) const
pure virtual
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetdCP ( ) const
inlinevirtual
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetDmsq21 ( ) const
inlinevirtual
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetDmsq32 ( ) const
inlinevirtual
template<typename T>
virtual double osc::_IOscCalcAdjustable< T >::GetL ( ) const
inlinevirtual
template<typename T>
virtual TMD5* osc::_IOscCalc< T >::GetParamsHash ( ) const
inlinevirtualinherited
template<typename T >
TMD5 * osc::_IOscCalcAdjustable< T >::GetParamsHashDefault ( const std::string txt) const
protected

This is only a safe implementation if your calculator only depends on these eight parameters.

Parameters
txtA string to uniquely identify your calculator class

Definition at line 47 of file IOscCalc.cxx.

References runNovaSAM::ret, and T.

Referenced by osc::_OscCalcPMNS< T >::GetParamsHash(), osc::_OscCalcPMNSOpt< T >::GetParamsHash(), and osc::analytic::_OscCalc< T >::GetParamsHash().

48  {
49  TMD5* ret = new TMD5;
50  ret->Update((unsigned char*)txt.c_str(), txt.size());
51  const int kNumParams = 8;
52  T buf[kNumParams] = {fRho, fL, fDmsq21, fDmsq32,
53  fTh12, fTh13, fTh23, fdCP};
54  ret->Update((unsigned char*)buf, sizeof(T)*kNumParams);
55  ret->Final();
56  return ret;
57  }
double T
Definition: Xdiff_gwt.C:5
template<typename T>
virtual double osc::_IOscCalcAdjustable< T >::GetRho ( ) const
inlinevirtual

Reimplemented in osc::OscCalcCPT, and osc::OscCalcSterile.

Definition at line 89 of file IOscCalc.h.

Referenced by osc::CopyParams(), osc::OscCalcCPT::GetRho(), ana::ResetSterileCalcToDefault(), and ana::SaveTo().

89 { return fRho ; }
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh12 ( ) const
inlinevirtual
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh13 ( ) const
inlinevirtual
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh23 ( ) const
inlinevirtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::InvalidateCache ( )
inlinevirtual

Invalidate any caching used internally by the calculator.

Some calculators use a cache that can become stale in ways that the calculator may not know about (e.g., Stan var clearing). Default implementation does nothing.

Reimplemented in osc::_OscCalcDMP< T >.

Definition at line 102 of file IOscCalc.h.

102 {};
template<typename T>
virtual T osc::_IOscCalc< T >::P ( int  flavBefore,
int  flavAfter,
double  E 
)
pure virtualinherited
template<class T >
Eigen::Array< T, Eigen::Dynamic, 1 > osc::_IOscCalc< T >::P ( int  flavBefore,
int  flavAfter,
const std::vector< double > &  E 
)
virtualinherited

Default implementation forwards to non-vector version using a simple loop. Override if your calculator has a more efficient implementation.

Reimplemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, and osc::_OscCalcDMP< T >.

Definition at line 25 of file IOscCalc.cxx.

References MECModelEnuComparisons::i, osc::_IOscCalc< T >::P(), P, runNovaSAM::ret, and submit_hadd::u.

26  {
27  Eigen::Matrix<T,Eigen::Dynamic,1> ret(E.size());
28  for(auto i = 0u; i < E.size(); i++) {
29  ret(i) = this->P(flavBefore, flavAfter, E[i]);
30  }
31  return ret.array().isNaN().select(0, ret);
32  }
Float_t E
Definition: plot.C:20
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
template<class T >
Eigen::Array< T, Eigen::Dynamic, 1 > osc::_IOscCalc< T >::P ( int  flavBefore,
int  flavAfter,
const Eigen::ArrayXd &  E 
)
virtualinherited

Default implementation forawrds to vector<double> version. Override if your calculator has a more efficient implementation.

Reimplemented in osc::analytic::_OscCalc< T >.

Definition at line 35 of file IOscCalc.cxx.

References P.

36  {
37  return P(flavBefore, flavAfter, std::vector<double>(&E[0], &E[0]+E.size()));
38  }
Float_t E
Definition: plot.C:20
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetdCP ( const T dCP)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetDmsq21 ( const T dmsq21)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetDmsq32 ( const T dmsq32)
pure virtual

Implemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, osc::_OscCalcDMP< T >, osc::OscCalc, osc::_OscCalcPMNSOpt< T >, osc::_OscCalcPMNS< T >, osc::OscCalcPMNS_NSI, and osc::OscCalcGeneral.

Referenced by CAF_makeCAFSensitivities_for_FNEX(), CalcRWithSystsNus17(), ComparePredictions(), osc::CopyParams(), default_calc(), demoFitContours(), demoFitSlices(), demoPlotSystBands(), genie_contours(), getContProf(), getContProf_Sensitivity(), getHists_FNEX(), joint_fit_2017_contours(), joint_fit_2017_slices(), joint_fit_2018_contours(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_contours(), joint_fit_2019_slices(), joint_fit_future_contour_univ(), jointsensitivity(), ana::LoadFrom< osc::IOscCalcAdjustable >(), make_extrap_figure(), make_extrap_figure_hists(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_tables(), make_surfprof(), make_surfprof_sensitivity(), MakeCAFSensitivities_for_FNEX(), makePredTables(), monoprob(), plot_datamcpred(), plot_nue_xsec_pred(), plot_oscprob(), plot_predictions(), plotDataPred(), plotDataPred_SplitCanvas(), Plotting_DataAndPrediction(), PredRatioToNom(), resetCalc(), ResetCalc(), mcmc_ana::ResetCalculator(), test::ResetCalculator(), mcmc::ResetCalculator(), ana::ResetOscCalcToDefault(), ana::ResetOscCalcToDefaultIH(), ResetOscCalcToMyDefault(), ana::ResetOscCalcToTemplate(), RestartCalculator(), run_joint_fit_2020_bestfit(), run_joint_fit_2020_contours(), run_joint_fit_2020_slices(), saveFDMCHists(), sensitivity2018(), sensitivity2020(), osc::OscCalcCPT::SetDmsq32(), SetHierarchy(), SetOscillationParameters(), cmf::ShifterAndWeighter::SetOscillationVals(), ana::FitDmSq32::SetValue(), ana::FitDmSq32Scaled::SetValue(), ana::FitDmSq32NormalHierarchy::SetValue(), ana::FitDmSq32ScaledNH::SetValue(), ana::FitDmSq32ScaledIH::SetValue(), ana::FitDmSq32InvertedHierarchy::SetValue(), systematics_extrap_comp_from_pred_interp(), systematics_summary_from_pred_interp(), Tutorial2019FitContours(), and Tutorial2019FitSlices().

template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetL ( double  L)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetRho ( double  rho)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh12 ( const T th12)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh13 ( const T th13)
pure virtual
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh23 ( const T th23)
pure virtual

Implemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, osc::_OscCalcDMP< T >, osc::OscCalc, osc::_OscCalcPMNSOpt< T >, osc::OscCalcGeneral, osc::_OscCalcPMNS< T >, and osc::OscCalcPMNS_NSI.

Referenced by CalcRWithSystsNus17(), ComparePredictions(), osc::CopyParams(), default_calc(), demoPlotSystBands(), genie_contours(), getContProf(), getContProf_Sensitivity(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_slices(), jointsensitivity(), ana::LoadFrom< osc::IOscCalcAdjustable >(), make_extrap_figure(), make_extrap_figure_hists(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_tables(), make_surfprof(), make_surfprof_sensitivity(), makePredTables(), monoprob(), plot_datamcpred(), plot_nue_xsec_pred(), plot_oscprob(), plot_predictions(), plotDataPred(), plotDataPred_SplitCanvas(), Plotting_DataAndPrediction(), PredRatioToNom(), resetCalc(), ResetCalc(), mcmc_ana::ResetCalculator(), test::ResetCalculator(), mcmc::ResetCalculator(), ana::ResetOscCalcToDefault(), ResetOscCalcToMyDefault(), ana::ResetOscCalcToTemplate(), RestartCalculator(), run_joint_fit_2020_bestfit(), saveFDMCHists(), sensitivity2018(), sensitivity2020(), SetOscillationParameters(), cmf::ShifterAndWeighter::SetOscillationVals(), osc::OscCalcCPT::SetTh23(), ana::FitSinSqTheta23::SetValue(), FitSinSqTheta23UO::SetValue(), ana::FitSinSqTheta23UpperOctant::SetValue(), FitSinSqTheta23LO::SetValue(), ana::FitSinSqTheta23LowerOctant::SetValue(), ana::FitSinSq2Theta23::SetValue(), FitSinSqTheta23MaxMix::SetValue(), FitSinSqTheta23LowerOctant::SetValue(), FitSinSqTheta23UpperOctant::SetValue(), systematics_extrap_comp_from_pred_interp(), and systematics_summary_from_pred_interp().

Member Data Documentation

template<typename T>
T osc::_IOscCalcAdjustable< T >::fdCP
protected
template<typename T>
T osc::_IOscCalcAdjustable< T >::fDmsq21
protected
template<typename T>
T osc::_IOscCalcAdjustable< T >::fDmsq32
protected
template<typename T>
double osc::_IOscCalcAdjustable< T >::fL
protected
template<typename T>
double osc::_IOscCalcAdjustable< T >::fRho
protected
template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh12
protected
template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh13
protected
template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh23
protected

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