#ifndef __JOSCPROB__JOSCPARAMETERS__ #define __JOSCPROB__JOSCPARAMETERS__ #include "Jeep/JProperties.hh" #include "JLang/JClonable.hh" #include "JLang/JException.hh" #include "JLang/JObjectStreamIO.hh" #include "JTools/JArray.hh" #include "JOscProb/JMixingAngle.hh" #include "JOscProb/JComplexPhase.hh" #include "JOscProb/JMassSquaredDifference.hh" #include "JOscProb/JOscParametersInterface.hh" /** * \author bjung, mdejong */ namespace JOSCPROB {} namespace JPP { using namespace JOSCPROB; } namespace JOSCPROB { using JLANG::JClonable; using JLANG::JParameter; using JLANG::JObjectStreamIO; using JTOOLS::JArray; // // Names of standard oscillation parameters // static constexpr const char* const dM21sq() { return "dM21sq"; } static constexpr const char* const dM31sq() { return "dM31sq"; } static constexpr const char* const deltaCP() { return "deltaCP"; } static constexpr const char* const theta12() { return "theta12"; } static constexpr const char* const theta13() { return "theta13"; } static constexpr const char* const theta23() { return "theta23"; } /** * Data structure for single set of oscillation parameters. */ template class JOscParameters : public JClonable, JOscParameters >, public JObjectStreamIO< JOscParameters > { public: typedef JOscParametersInterface JOscParametersInterface_t; typedef JOscParameters JOscParameters_t; typedef typename JOscParametersInterface_t::JOscParameter_t JOscParameter_t; typedef typename JOscParametersInterface_t::JParameter_t JParameter_t; typedef typename JOscParametersInterface_t::argument_type argument_type; typedef typename JOscParametersInterface_t::value_type value_type; /** * Default constructor. */ JOscParameters() : dM21sq (), dM31sq (), deltaCP(), theta12(), theta13(), theta23() {} /** * Constructor. * * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2] * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2] * \param deltaCP PMNS complex phase [rad] * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad] * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad] * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad] */ JOscParameters(const JMassSquaredDifference& dM21sq, const JMassSquaredDifference& dM31sq, const JComplexPhase& deltaCP, const JMixingAngle& theta12, const JMixingAngle& theta13, const JMixingAngle& theta23) : dM21sq (dM21sq), dM31sq (dM31sq), deltaCP(deltaCP), theta12(theta12), theta13(theta13), theta23(theta23) {} /** * Constructor. * * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2] * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2] * \param deltaCP PMNS complex phase [rad] * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad] * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad] * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad] */ explicit JOscParameters(argument_type dM21sq, argument_type dM31sq, argument_type deltaCP, argument_type theta12, argument_type theta13, argument_type theta23) : dM21sq (dM21sq), dM31sq (dM31sq), deltaCP(deltaCP), theta12(theta12), theta13(theta13), theta23(theta23) {} /** * Constructor. * * \param name parameter name * \param value parameter value * \param args remaining pairs of parameter names and values */ template JOscParameters(const std::string& name, argument_type value, const Args& ...args) { this->set(name, value, args...); } /** * Constructor. * * \param values array with oscillation parameter values */ template JOscParameters(JArray& values) : dM21sq (values[0]), dM31sq (values[1]), deltaCP(values[2]), theta12(values[3]), theta13(values[4]), theta23(values[5]) {} /** * Constructor. * * Values taken from the NuFIT 5.0 three-flavour global analysis best fit values reported in:\n * https://link.springer.com/article/10.1007/JHEP09(2020)178 * including the Super-Kamiokande atmospheric data. * * \param useIO toggle inverted ordering */ JOscParameters(const bool useIO) : JOscParameters( JMassSquaredDifference::make_parameter( 7.42e-5 ), JMassSquaredDifference::make_parameter( useIO ? -2.498e-3 + 7.42e-5 : 2.517e-3 ), JComplexPhase::make_parameter ( useIO ? 4.92 : 3.44 ), JMixingAngle::make_parameter ( useIO ? 0.5838 : 0.5836 ), JMixingAngle::make_parameter ( 0.150 ), JMixingAngle::make_parameter ( useIO ? 0.860 : 0.859 ) ) {} /** * Get properties of this class. * * \param equation equation parameters */ virtual JProperties getProperties(const JEquationParameters& equation = JOscParametersInterface_t::getEquationParameters()) override { return JOscParametersHelper(*this, equation); } /** * Get properties of this class. * * \param equation equation parameters */ virtual JProperties getProperties(const JEquationParameters& equation = JOscParametersInterface_t::getEquationParameters()) const override { return JOscParametersHelper(*this, equation); } JMassSquaredDifference dM21sq; //!< Squared mass difference between the first and second neutrino mass eigenstates [eV2] JMassSquaredDifference dM31sq; //!< Squared mass difference between the first and third neutrino mass eigenstates [eV2] JComplexPhase deltaCP; //!< PMNS phase angle [rad] JMixingAngle theta12; //!< PMNS mixing angle between the first and second neutrino mass eigenstates [rad] JMixingAngle theta13; //!< PMNS mixing angle between the first and third neutrino mass eigenstates [rad] JMixingAngle theta23; //!< PMNS mixing angle between the second and third neutrino mass eigenstates [rad] private: /** * Auxiliary class for I/O of oscillation parameters. */ struct JOscParametersHelper : public JProperties { /** * Constructor. * * \param parameters oscillation parameters * \param equation equation parameters */ JOscParametersHelper(JOscParameters_t& parameters, const JEquationParameters& equation) : JProperties(equation, 1) { this->put(JOSCPROB::dM21sq(), static_cast(parameters.dM21sq)); this->put(JOSCPROB::dM31sq(), static_cast(parameters.dM31sq)); this->put(JOSCPROB::deltaCP(), static_cast(parameters.deltaCP)); this->put(JOSCPROB::theta12(), static_cast(parameters.theta12)); this->put(JOSCPROB::theta13(), static_cast(parameters.theta13)); this->put(JOSCPROB::theta23(), static_cast(parameters.theta23)); } /** * Constructor. * * \param parameters oscillation parameters * \param equation equation parameters */ JOscParametersHelper(const JOscParameters_t& parameters, const JEquationParameters& equation) : JProperties(equation, 1) { this->put(JOSCPROB::dM21sq(), static_cast(parameters.dM21sq)); this->put(JOSCPROB::dM31sq(), static_cast(parameters.dM31sq)); this->put(JOSCPROB::deltaCP(), static_cast(parameters.deltaCP)); this->put(JOSCPROB::theta12(), static_cast(parameters.theta12)); this->put(JOSCPROB::theta13(), static_cast(parameters.theta13)); this->put(JOSCPROB::theta23(), static_cast(parameters.theta23)); } }; }; } #endif