Jpp  master_rocky
the software that should make you happy
JOscParameters.hh
Go to the documentation of this file.
1 #ifndef __JOSCPROB__JOSCPARAMETERS__
2 #define __JOSCPROB__JOSCPARAMETERS__
3 
4 #include "Jeep/JProperties.hh"
5 
6 #include "JLang/JClonable.hh"
7 #include "JLang/JException.hh"
9 
10 #include "JTools/JArray.hh"
11 
12 #include "JOscProb/JMixingAngle.hh"
16 
17 
18 /**
19  * \author bjung, mdejong
20  */
21 
22 namespace JOSCPROB {}
23 namespace JPP { using namespace JOSCPROB; }
24 
25 namespace JOSCPROB {
26 
27  using JLANG::JClonable;
28  using JLANG::JParameter;
30 
31  using JTOOLS::JArray;
32 
33 
34  //
35  // Names of standard oscillation parameters
36  //
37  static constexpr const char* const dM21sq() { return "dM21sq"; }
38  static constexpr const char* const dM31sq() { return "dM31sq"; }
39  static constexpr const char* const deltaCP() { return "deltaCP"; }
40  static constexpr const char* const theta12() { return "theta12"; }
41  static constexpr const char* const theta13() { return "theta13"; }
42  static constexpr const char* const theta23() { return "theta23"; }
43 
44 
45  /**
46  * Data structure for single set of oscillation parameters.
47  */
48  template<class T>
50  public JClonable<JOscParametersInterface<T>, JOscParameters<T> >,
51  public JObjectStreamIO< JOscParameters<T> >
52  {
53  public:
54 
57 
60 
63 
64 
65  /**
66  * Default constructor.
67  */
69  dM21sq (),
70  dM31sq (),
71  deltaCP(),
72  theta12(),
73  theta13(),
74  theta23()
75  {}
76 
77 
78  /**
79  * Constructor.
80  *
81  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
82  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
83  * \param deltaCP PMNS complex phase [rad]
84  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
85  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
86  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
87  */
91  const JMixingAngle<T>& theta12,
92  const JMixingAngle<T>& theta13,
93  const JMixingAngle<T>& theta23) :
94  dM21sq (dM21sq),
95  dM31sq (dM31sq),
100  {}
101 
102 
103  /**
104  * Constructor.
105  *
106  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
107  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
108  * \param deltaCP PMNS complex phase [rad]
109  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
110  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
111  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
112  */
119  dM21sq (dM21sq),
120  dM31sq (dM31sq),
121  deltaCP(deltaCP),
122  theta12(theta12),
123  theta13(theta13),
125  {}
126 
127 
128  /**
129  * Constructor.
130  *
131  * \param name parameter name
132  * \param value parameter value
133  * \param args remaining pairs of parameter names and values
134  */
135  template<class ...Args>
136  JOscParameters(const std::string& name,
137  argument_type value,
138  const Args& ...args)
139  {
140  this->set(name, value, args...);
141  }
142 
143 
144  /**
145  * Constructor.
146  *
147  * \param values array with oscillation parameter values
148  */
149  template<unsigned int N>
151  dM21sq (values[0]),
152  dM31sq (values[1]),
153  deltaCP(values[2]),
154  theta12(values[3]),
155  theta13(values[4]),
156  theta23(values[5])
157  {}
158 
159 
160  /**
161  * Constructor.
162  *
163  * Values taken from the NuFIT 5.0 three-flavour global analysis best fit values reported in:\n
164  * https://link.springer.com/article/10.1007/JHEP09(2020)178
165  * including the Super-Kamiokande atmospheric data.
166  *
167  * \param useIO toggle inverted ordering
168  */
169  JOscParameters(const bool useIO) :
170  JOscParameters( JMassSquaredDifference<T>::make_parameter( 7.42e-5 ),
171  JMassSquaredDifference<T>::make_parameter( useIO ? -2.498e-3 + 7.42e-5 : 2.517e-3 ),
172  JComplexPhase<T>::make_parameter ( useIO ? 4.92 : 3.44 ),
173  JMixingAngle<T>::make_parameter ( useIO ? 0.5838 : 0.5836 ),
174  JMixingAngle<T>::make_parameter ( 0.150 ),
175  JMixingAngle<T>::make_parameter ( useIO ? 0.860 : 0.859 ) )
176  {}
177 
178 
179  /**
180  * Get properties of this class.
181  *
182  * \param equation equation parameters
183  */
185  {
186  return JOscParametersHelper(*this, equation);
187  }
188 
189 
190  /**
191  * Get properties of this class.
192  *
193  * \param equation equation parameters
194  */
196  {
197  return JOscParametersHelper(*this, equation);
198  }
199 
200 
201  JMassSquaredDifference<T> dM21sq; //!< Squared mass difference between the first and second neutrino mass eigenstates [eV2]
202  JMassSquaredDifference<T> dM31sq; //!< Squared mass difference between the first and third neutrino mass eigenstates [eV2]
203  JComplexPhase<T> deltaCP; //!< PMNS phase angle [rad]
204  JMixingAngle<T> theta12; //!< PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
205  JMixingAngle<T> theta13; //!< PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
206  JMixingAngle<T> theta23; //!< PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
207 
208 
209  private:
210 
211  /**
212  * Auxiliary class for I/O of oscillation parameters.
213  */
215  public JProperties
216  {
217  /**
218  * Constructor.
219  *
220  * \param parameters oscillation parameters
221  * \param equation equation parameters
222  */
224  const JEquationParameters& equation) :
225  JProperties(equation, 1)
226  {
227  this->put(JOSCPROB::dM21sq(), static_cast<JOscParameter_t&>(parameters.dM21sq));
228  this->put(JOSCPROB::dM31sq(), static_cast<JOscParameter_t&>(parameters.dM31sq));
229  this->put(JOSCPROB::deltaCP(), static_cast<JOscParameter_t&>(parameters.deltaCP));
230  this->put(JOSCPROB::theta12(), static_cast<JOscParameter_t&>(parameters.theta12));
231  this->put(JOSCPROB::theta13(), static_cast<JOscParameter_t&>(parameters.theta13));
232  this->put(JOSCPROB::theta23(), static_cast<JOscParameter_t&>(parameters.theta23));
233  }
234 
235 
236  /**
237  * Constructor.
238  *
239  * \param parameters oscillation parameters
240  * \param equation equation parameters
241  */
243  const JEquationParameters& equation) :
244  JProperties(equation, 1)
245  {
246  this->put(JOSCPROB::dM21sq(), static_cast<const JOscParameter_t&>(parameters.dM21sq));
247  this->put(JOSCPROB::dM31sq(), static_cast<const JOscParameter_t&>(parameters.dM31sq));
248  this->put(JOSCPROB::deltaCP(), static_cast<const JOscParameter_t&>(parameters.deltaCP));
249  this->put(JOSCPROB::theta12(), static_cast<const JOscParameter_t&>(parameters.theta12));
250  this->put(JOSCPROB::theta13(), static_cast<const JOscParameter_t&>(parameters.theta13));
251  this->put(JOSCPROB::theta23(), static_cast<const JOscParameter_t&>(parameters.theta23));
252  }
253  };
254  };
255 }
256 
257 #endif
Exceptions.
Utility class to parse parameter values.
Utility class to parse parameter values.
Definition: JProperties.hh:501
void put(const std::string &key, T &object)
Put object at given key.
Definition: JProperties.hh:651
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Parameter class.
Definition: JParameter.hh:36
Interface class for sets of oscillation parameters.
static JEquationParameters & getEquationParameters()
Get equation parameters.
JParameter_t::argument_type argument_type
Data structure for single set of oscillation parameters.
JMixingAngle< T > theta23
PMNS mixing angle between the second and third neutrino mass eigenstates [rad].
JMassSquaredDifference< T > dM21sq
Squared mass difference between the first and second neutrino mass eigenstates [eV2].
JOscParameters()
Default constructor.
JOscParameters(const std::string &name, argument_type value, const Args &...args)
Constructor.
virtual JProperties getProperties(const JEquationParameters &equation=JOscParametersInterface_t::getEquationParameters()) override
Get properties of this class.
JMixingAngle< T > theta12
PMNS mixing angle between the first and second neutrino mass eigenstates [rad].
JOscParametersInterface_t::JParameter_t JParameter_t
JOscParameters(argument_type dM21sq, argument_type dM31sq, argument_type deltaCP, argument_type theta12, argument_type theta13, argument_type theta23)
Constructor.
JOscParameters(const JMassSquaredDifference< T > &dM21sq, const JMassSquaredDifference< T > &dM31sq, const JComplexPhase< T > &deltaCP, const JMixingAngle< T > &theta12, const JMixingAngle< T > &theta13, const JMixingAngle< T > &theta23)
Constructor.
JOscParameters< T > JOscParameters_t
virtual JProperties getProperties(const JEquationParameters &equation=JOscParametersInterface_t::getEquationParameters()) const override
Get properties of this class.
JOscParametersInterface< T > JOscParametersInterface_t
JOscParametersInterface_t::JOscParameter_t JOscParameter_t
JOscParametersInterface_t::argument_type argument_type
JMassSquaredDifference< T > dM31sq
Squared mass difference between the first and third neutrino mass eigenstates [eV2].
JOscParameters(JArray< N, value_type > &values)
Constructor.
JOscParametersInterface_t::value_type value_type
JMixingAngle< T > theta13
PMNS mixing angle between the first and third neutrino mass eigenstates [rad].
JComplexPhase< T > deltaCP
PMNS phase angle [rad].
JOscParameters(const bool useIO)
Constructor.
One dimensional array of template objects with fixed length.
Definition: JArray.hh:43
static constexpr const char *const theta23()
static constexpr const char *const theta13()
static constexpr const char *const dM31sq()
static constexpr const char *const dM21sq()
static constexpr const char *const deltaCP()
static constexpr const char *const theta12()
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template class for object cloning.
Definition: JClonable.hh:59
Auxiliary base class for storing and loading a single object to and from an ASCII file,...
Implementation of oscillation complex phase.
Implementation of mass-squared difference.
Implementation of oscillation mixing angle.
Definition: JMixingAngle.hh:29
Abstract base class for oscillation parameter.
Auxiliary class for I/O of oscillation parameters.
JOscParametersHelper(JOscParameters_t &parameters, const JEquationParameters &equation)
Constructor.
JOscParametersHelper(const JOscParameters_t &parameters, const JEquationParameters &equation)
Constructor.