Jpp  18.3.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 
13 #include "JOscProb/JMixingAngle.hh"
17 
18 
19 /**
20  * \author bjung, mdejong
21  */
22 
23 namespace JOSCPROB {}
24 namespace JPP { using namespace JOSCPROB; }
25 
26 namespace JOSCPROB {
27 
28  using JLANG::JClonable;
29  using JLANG::JParameter;
31 
32  using JTOOLS::JGrid;
33 
34 
35  //
36  // Names of standard oscillation parameters
37  //
38  static constexpr const char* const dM21sq() { return "dM21sq"; }
39  static constexpr const char* const dM31sq() { return "dM31sq"; }
40  static constexpr const char* const deltaCP() { return "deltaCP"; }
41  static constexpr const char* const theta12() { return "theta12"; }
42  static constexpr const char* const theta13() { return "theta13"; }
43  static constexpr const char* const theta23() { return "theta23"; }
44 
45 
46  /**
47  * Data structure for single set of oscillation parameters.
48  */
49  template<class T = double>
51  public JClonable<JOscParametersInterface<T>, JOscParameters<T> >,
52  public JObjectStreamIO< JOscParameters<T> >
53  {
54  public:
55 
58 
62 
63 
64  /**
65  * Default constructor.
66  */
68  dM21sq (),
69  dM31sq (),
70  deltaCP(),
71  theta12(),
72  theta13(),
73  theta23()
74  {}
75 
76 
77  /**
78  * Constructor.
79  *
80  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
81  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
82  * \param deltaCP PMNS complex phase [rad]
83  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
84  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
85  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
86  */
90  const JMixingAngle<T>& theta12,
91  const JMixingAngle<T>& theta13,
92  const JMixingAngle<T>& theta23) :
93  dM21sq (dM21sq),
94  dM31sq (dM31sq),
95  deltaCP(deltaCP),
96  theta12(theta12),
97  theta13(theta13),
98  theta23(theta23)
99  {}
100 
101 
102  /**
103  * Constructor.
104  *
105  * \param dM21sq Squared mass difference between the first and second neutrino mass eigenstates [eV2]
106  * \param dM31sq Squared mass difference between the first and third neutrino mass eigenstates [eV2]
107  * \param deltaCP PMNS complex phase [rad]
108  * \param theta12 PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
109  * \param theta13 PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
110  * \param theta23 PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
111  */
118  dM21sq (dM21sq),
119  dM31sq (dM31sq),
120  deltaCP(deltaCP),
121  theta12(theta12),
122  theta13(theta13),
123  theta23(theta23)
124  {}
125 
126 
127  /**
128  * Constructor.
129  *
130  * \param name parameter name
131  * \param value parameter value
132  * \param args remaining pairs of parameter names and values
133  */
134  template<class ...Args>
136  argument_type value,
137  const Args& ...args)
138  {
139  this->set(name, value, args...);
140  }
141 
142 
143  /**
144  * Constructor.
145  *
146  * Values taken from the NuFIT 5.0 three-flavour global analysis best fit values reported in:\n
147  * https://link.springer.com/article/10.1007/JHEP09(2020)178
148  * including the Super-Kamiokande atmospheric data.
149  *
150  * \param useIO toggle inverted ordering
151  */
152  JOscParameters(const bool useIO) :
153  JOscParameters( JMassSquaredDifference<T>::make_parameter( 7.42e-5 ),
154  JMassSquaredDifference<T>::make_parameter( useIO ? -2.498e-3 + 7.42e-5 : 2.517e-3 ),
155  JComplexPhase<T>::make_parameter ( useIO ? 4.92 : 3.44 ),
156  JMixingAngle<T>::make_parameter ( useIO ? 0.5838 : 0.5836 ),
157  JMixingAngle<T>::make_parameter ( 0.150 ),
158  JMixingAngle<T>::make_parameter ( useIO ? 0.860 : 0.859 ) )
159  {}
160 
161 
162  /**
163  * Get properties of this class.
164  *
165  * \param equation equation parameters
166  */
168  {
169  return JOscParametersHelper(*this, equation);
170  }
171 
172 
173  /**
174  * Get properties of this class.
175  *
176  * \param equation equation parameters
177  */
179  {
180  return JOscParametersHelper(*this, equation);
181  }
182 
183 
184  JMassSquaredDifference<T> dM21sq; //!< Squared mass difference between the first and second neutrino mass eigenstates [eV2]
185  JMassSquaredDifference<T> dM31sq; //!< Squared mass difference between the first and third neutrino mass eigenstates [eV2]
186  JComplexPhase<T> deltaCP; //!< PMNS phase angle [rad]
187  JMixingAngle<T> theta12; //!< PMNS mixing angle between the first and second neutrino mass eigenstates [rad]
188  JMixingAngle<T> theta13; //!< PMNS mixing angle between the first and third neutrino mass eigenstates [rad]
189  JMixingAngle<T> theta23; //!< PMNS mixing angle between the second and third neutrino mass eigenstates [rad]
190 
191 
192  private:
193 
194  /**
195  * Auxiliary class for I/O of oscillation parameters.
196  */
198  public JProperties
199  {
200  /**
201  * Constructor.
202  *
203  * \param parameters oscillation parameters
204  * \param equation equation parameters
205  */
207  const JEquationParameters& equation) :
208  JProperties(equation, 1)
209  {
210  this->put(JOSCPROB::dM21sq(), static_cast<JOscParameter_t&>(parameters.dM21sq));
211  this->put(JOSCPROB::dM31sq(), static_cast<JOscParameter_t&>(parameters.dM31sq));
212  this->put(JOSCPROB::deltaCP(), static_cast<JOscParameter_t&>(parameters.deltaCP));
213  this->put(JOSCPROB::theta12(), static_cast<JOscParameter_t&>(parameters.theta12));
214  this->put(JOSCPROB::theta13(), static_cast<JOscParameter_t&>(parameters.theta13));
215  this->put(JOSCPROB::theta23(), static_cast<JOscParameter_t&>(parameters.theta23));
216  }
217 
218 
219  /**
220  * Constructor.
221  *
222  * \param parameters oscillation parameters
223  * \param equation equation parameters
224  */
226  const JEquationParameters& equation) :
227  JProperties(equation, 1)
228  {
229  this->put(JOSCPROB::dM21sq(), static_cast<const JOscParameter_t&>(parameters.dM21sq));
230  this->put(JOSCPROB::dM31sq(), static_cast<const JOscParameter_t&>(parameters.dM31sq));
231  this->put(JOSCPROB::deltaCP(), static_cast<const JOscParameter_t&>(parameters.deltaCP));
232  this->put(JOSCPROB::theta12(), static_cast<const JOscParameter_t&>(parameters.theta12));
233  this->put(JOSCPROB::theta13(), static_cast<const JOscParameter_t&>(parameters.theta13));
234  this->put(JOSCPROB::theta23(), static_cast<const JOscParameter_t&>(parameters.theta23));
235  }
236  };
237  };
238 }
239 
240 #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()
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
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.
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.
then awk string
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].
JMixingAngle< T > theta12
PMNS mixing angle between the first and second neutrino mass eigenstates [rad].
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.
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
static constexpr const char *const theta12()
Auxiliary class for I/O of oscillation parameters.