Auxiliary program to write all elements in an oscillation parameters grid to separate output files.
53{
56
59
60
63
65
67
68 try {
69
71
73 = "oscillation_parameters.%.txt";
75 = '%';
77 = JOscParameters_t(true);
79 = 0;
80
82 }
83 catch(const exception& error) {
85 }
86
87
89
90 if (pos == std::string::npos) {
91 FATAL(
"Given output file name must contain the given wildcard character " <<
wildcard);
92 }
93
100
101 const int N = (theta12.getSize() *
102 theta13.getSize() *
103 theta23.getSize() *
104 deltaCP.getSize() *
105 dM21sq.getSize() *
106 dM31sq.getSize());
107
109
110 NOTICE(
"Writing " << N <<
" oscillation parameters files" <<
endl);
111
113
114 for (
int i1 = 0;
i1 != dM21sq.getSize(); ++
i1) {
115
116 parameters.
dM21sq = dM21sq.getX(
i1);
117
118 for (
int i2 = 0;
i2 != dM31sq.getSize(); ++
i2) {
119
120 parameters.
dM31sq = dM31sq.getX(
i2);
121
122 for (
int i3 = 0;
i3 != deltaCP.getSize(); ++
i3) {
123
125
126 for (
int i4 = 0;
i4 != theta12.getSize(); ++
i4) {
127
129
130 for (
int i5 = 0;
i5 != theta13.getSize(); ++
i5) {
131
133
134 for (
int i6 = 0;
i6 != theta23.getSize(); ++
i6) {
135
137
144
146
147 ofstream out(filename.c_str());
148
149 out << parameters;
150
151 out.close();
152 }
153 }
154 }
155 }
156 }
157 }
158
159 return 0;
160}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_STRING(A)
Make string.
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].
JMixingAngle< T > theta12
PMNS mixing angle between the first and second neutrino mass eigenstates [rad].
JMassSquaredDifference< T > dM31sq
Squared mass difference between the first and third neutrino mass eigenstates [eV2].
JMixingAngle< T > theta13
PMNS mixing angle between the first and third neutrino mass eigenstates [rad].
JComplexPhase< T > deltaCP
PMNS phase angle [rad].
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
int getIndex()
Get index for user I/O manipulation.
std::string to_string(const T &value)
Convert value to string.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for sequence of same character.