Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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"
8 #include "JLang/JStringStream.hh"
10 
11 #include "JTools/JGrid.hh"
12 #include "JTools/JArray.hh"
13 
14 #include "JOscProb/JMixingAngle.hh"
18 
19 
20 /**
21  * \author bjung, mdejong
22  */
23 
24 namespace JOSCPROB {}
25 namespace JPP { using namespace JOSCPROB; }
26 
27 namespace JOSCPROB {
28 
29  using JLANG::JClonable;
30  using JLANG::JParameter;
32 
33  using JTOOLS::JGrid;
34  using JTOOLS::JArray;
35 
36 
37  //
38  // Names of standard oscillation parameters
39  //
40  static constexpr const char* const dM21sq() { return "dM21sq"; }
41  static constexpr const char* const dM31sq() { return "dM31sq"; }
42  static constexpr const char* const deltaCP() { return "deltaCP"; }
43  static constexpr const char* const theta12() { return "theta12"; }
44  static constexpr const char* const theta13() { return "theta13"; }
45  static constexpr const char* const theta23() { return "theta23"; }
46 
47 
48  /**
49  * Data structure for single set of oscillation parameters.
50  */
51  template<class T>
53  public JClonable<JOscParametersInterface<T>, JOscParameters<T> >,
54  public JObjectStreamIO< JOscParameters<T> >
55  {
56  public:
57 
60 
63 
66 
67 
68  /**
69  * Default constructor.
70  */
72  dM21sq (),
73  dM31sq (),
74  deltaCP(),
75  theta12(),
76  theta13(),
77  theta23()
78  {}
79 
80 
81  /**
82  * Constructor.
83  *
84  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
85  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
86  * \param deltaCP PMNS complex phase [rad]
87  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
88  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
89  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
90  */
94  const JMixingAngle<T>& theta12,
95  const JMixingAngle<T>& theta13,
96  const JMixingAngle<T>& theta23) :
97  dM21sq (dM21sq),
98  dM31sq (dM31sq),
99  deltaCP(deltaCP),
100  theta12(theta12),
101  theta13(theta13),
102  theta23(theta23)
103  {}
104 
105 
106  /**
107  * Constructor.
108  *
109  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
110  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
111  * \param deltaCP PMNS complex phase [rad]
112  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
113  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
114  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
115  */
122  dM21sq (dM21sq),
123  dM31sq (dM31sq),
124  deltaCP(deltaCP),
125  theta12(theta12),
126  theta13(theta13),
127  theta23(theta23)
128  {}
129 
130 
131  /**
132  * Constructor.
133  *
134  * \param name parameter name
135  * \param value parameter value
136  * \param args remaining pairs of parameter names and values
137  */
138  template<class ...Args>
139  JOscParameters(const std::string& name,
140  argument_type value,
141  const Args& ...args)
142  {
143  this->set(name, value, args...);
144  }
145 
146 
147  /**
148  * Constructor.
149  *
150  * \param values array with oscillation parameter values
151  */
152  template<unsigned int N>
154  dM21sq (values[0]),
155  dM31sq (values[1]),
156  deltaCP(values[2]),
157  theta12(values[3]),
158  theta13(values[4]),
159  theta23(values[5])
160  {}
161 
162 
163  /**
164  * Constructor.
165  *
166  * Values taken from the NuFIT 5.0 three-flavour global analysis best fit values reported in:\n
167  * https://link.springer.com/article/10.1007/JHEP09(2020)178
168  * including the Super-Kamiokande atmospheric data.
169  *
170  * \param useIO toggle inverted ordering
171  */
172  JOscParameters(const bool useIO) :
173  JOscParameters( JMassSquaredDifference<T>::make_parameter( 7.42e-5 ),
174  JMassSquaredDifference<T>::make_parameter( useIO ? -2.498e-3 + 7.42e-5 : 2.517e-3 ),
175  JComplexPhase<T>::make_parameter ( useIO ? 4.92 : 3.44 ),
176  JMixingAngle<T>::make_parameter ( useIO ? 0.5838 : 0.5836 ),
177  JMixingAngle<T>::make_parameter ( 0.150 ),
178  JMixingAngle<T>::make_parameter ( useIO ? 0.860 : 0.859 ) )
179  {}
180 
181 
182  /**
183  * Get properties of this class.
184  *
185  * \param equation equation parameters
186  */
188  {
189  return JOscParametersHelper(*this, equation);
190  }
191 
192 
193  /**
194  * Get properties of this class.
195  *
196  * \param equation equation parameters
197  */
199  {
200  return JOscParametersHelper(*this, equation);
201  }
202 
203 
204  JMassSquaredDifference<T> dM21sq; //!< Squared mass difference between the first and second neutrino mass eigenstates [eV2]
205  JMassSquaredDifference<T> dM31sq; //!< Squared mass difference between the first and third neutrino mass eigenstates [eV2]
206  JComplexPhase<T> deltaCP; //!< PMNS phase angle [rad]
207  JMixingAngle<T> theta12; //!< PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
208  JMixingAngle<T> theta13; //!< PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
209  JMixingAngle<T> theta23; //!< PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
210 
211 
212  private:
213 
214  /**
215  * Auxiliary class for I/O of oscillation parameters.
216  */
218  public JProperties
219  {
220  /**
221  * Constructor.
222  *
223  * \param parameters oscillation parameters
224  * \param equation equation parameters
225  */
227  const JEquationParameters& equation) :
228  JProperties(equation, 1)
229  {
230  this->put(JOSCPROB::dM21sq(), static_cast<JOscParameter_t&>(parameters.dM21sq));
231  this->put(JOSCPROB::dM31sq(), static_cast<JOscParameter_t&>(parameters.dM31sq));
232  this->put(JOSCPROB::deltaCP(), static_cast<JOscParameter_t&>(parameters.deltaCP));
233  this->put(JOSCPROB::theta12(), static_cast<JOscParameter_t&>(parameters.theta12));
234  this->put(JOSCPROB::theta13(), static_cast<JOscParameter_t&>(parameters.theta13));
235  this->put(JOSCPROB::theta23(), static_cast<JOscParameter_t&>(parameters.theta23));
236  }
237 
238 
239  /**
240  * Constructor.
241  *
242  * \param parameters oscillation parameters
243  * \param equation equation parameters
244  */
246  const JEquationParameters& equation) :
247  JProperties(equation, 1)
248  {
249  this->put(JOSCPROB::dM21sq(), static_cast<const JOscParameter_t&>(parameters.dM21sq));
250  this->put(JOSCPROB::dM31sq(), static_cast<const JOscParameter_t&>(parameters.dM31sq));
251  this->put(JOSCPROB::deltaCP(), static_cast<const JOscParameter_t&>(parameters.deltaCP));
252  this->put(JOSCPROB::theta12(), static_cast<const JOscParameter_t&>(parameters.theta12));
253  this->put(JOSCPROB::theta13(), static_cast<const JOscParameter_t&>(parameters.theta13));
254  this->put(JOSCPROB::theta23(), static_cast<const JOscParameter_t&>(parameters.theta23));
255  }
256  };
257  };
258 }
259 
260 #endif
JMixingAngle< T > theta13
PMNS mixing angle between the first and third neutrino mass eigenstates [rad].
Abstract base class for oscillation parameter.
Exceptions.
void put(const std::string &key, T &object)
Put object at given key.
Definition: JProperties.hh:651
JOscParameters(const std::string &name, argument_type value, const Args &...args)
Constructor.
Parameter class.
Definition: JParameter.hh:34
virtual JProperties getProperties(const JEquationParameters &equation=JOscParametersInterface_t::getEquationParameters()) override
Get properties of this class.
static constexpr const char *const theta23()
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.
static constexpr const char *const dM21sq()
JOscParameters(const bool useIO)
Constructor.
static constexpr const char *const dM31sq()
static constexpr const char *const deltaCP()
Utility class to parse parameter values.
Definition: JProperties.hh:497
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
Simple data structure to support I/O of equations (see class JLANG::JEquation).
JOscParametersInterface_t::argument_type argument_type
JMassSquaredDifference< T > dM31sq
Squared mass difference between the first and third neutrino mass eigenstates [eV2].
JMixingAngle< T > theta23
PMNS mixing angle between the second and third neutrino mass eigenstates [rad].
JOscParameters()
Default constructor.
JOscParametersHelper(JOscParameters_t &parameters, const JEquationParameters &equation)
Constructor.
Implementation of oscillation complex phase.
JOscParametersInterface_t::value_type value_type
Utility class to parse parameter values.
JParameter_t::argument_type argument_type
JOscParametersInterface_t::JOscParameter_t JOscParameter_t
JComplexPhase< T > deltaCP
PMNS phase angle [rad].
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Template class for object cloning.
Definition: JClonable.hh:20
Implementation of mass-squared difference.
JOscParametersInterface< T > JOscParametersInterface_t
virtual JProperties getProperties(const JEquationParameters &equation=JOscParametersInterface_t::getEquationParameters()) const override
Get properties of this class.
JMassSquaredDifference< T > dM21sq
Squared mass difference between the first and second neutrino mass eigenstates [eV2].
One dimensional array of template objects with fixed length.
Definition: JArray.hh:40
JMixingAngle< T > theta12
PMNS mixing angle between the first and second neutrino mass eigenstates [rad].
then fatal The output file must have the wildcard in the name
Definition: JCanberra.sh:31
static constexpr const char *const theta13()
Data structure for single set of oscillation parameters.
JOscParametersHelper(const JOscParameters_t &parameters, const JEquationParameters &equation)
Constructor.
Simple data structure for an abstract collection of equidistant abscissa values.
Definition: JGrid.hh:38
static JEquationParameters & getEquationParameters()
Get equation parameters.
JOscParameters(argument_type dM21sq, argument_type dM31sq, argument_type deltaCP, argument_type theta12, argument_type theta13, argument_type theta23)
Constructor.
possible values
JOscParameters< T > JOscParameters_t
Implementation of oscillation mixing angle.
Definition: JMixingAngle.hh:27
Auxiliary base class for storing and loading a single object to and from an ASCII file...
Interface class for sets of oscillation parameters.
JOscParametersInterface_t::JParameter_t JParameter_t
JOscParameters(JArray< N, value_type > &values)
Constructor.
static constexpr const char *const theta12()
Auxiliary class for I/O of oscillation parameters.