OscProb
PMNS_LIV.cxx
Go to the documentation of this file.
1
18
19#include <iostream>
20
21#include "PMNS_LIV.h"
22
23using namespace OscProb;
24
25using namespace std;
26
27//.............................................................................
32PMNS_LIV::PMNS_LIV() : PMNS_Fast()
33{
34 SetStdPath();
35
36 for (int dim = 3; dim < 8; dim += 2) {
37 for (int flvi = 0; flvi < 3; flvi++) {
38 for (int flvj = flvi; flvj < 3; flvj++) {
39 SetaT(flvi, flvj, dim, 0, 0);
40 SetcT(flvi, flvj, dim + 1, 0, 0);
41 }
42 }
43 }
44}
45
46//.............................................................................
51
52//.............................................................................
67void PMNS_LIV::SetaT(int flvi, int flvj, int dim, double val, double phase)
68{
69 if (flvi > flvj) {
70 cerr << "WARNING: First argument should be smaller or equal to second "
71 "argument"
72 << endl
73 << "Setting reverse order (aT_" << flvj << flvi << "). " << endl;
74 int temp = flvi;
75 flvi = flvj;
76 flvj = temp;
77 }
78 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
79 cerr << "WARNING: aT_" << flvi << flvj << " not valid for " << fNumNus
80 << " neutrinos. Doing nothing." << endl;
81 return;
82 }
83 if (dim != 3 && dim != 5 && dim != 7) {
84 cerr << "WARNING: Invalid aT coefficient dimension dim=" << dim
85 << " not in [3,5,7].\n";
86 return;
87 }
88
89 int pos = (dim - 3) / 2;
90
91 complexD h = val;
92
93 if (flvi != flvj) h *= complexD(cos(phase), sin(phase));
94
95 bool isSame = (faT[flvi][flvj][pos] == h);
96
97 if (!isSame) ClearCache();
98
99 fGotES *= isSame;
100
101 faT[flvi][flvj][pos] = h;
102}
103
104//.............................................................................
119void PMNS_LIV::SetcT(int flvi, int flvj, int dim, double val, double phase)
120{
121 if (flvi > flvj) {
122 cerr << "WARNING: First argument should be smaller or equal to second "
123 "argument"
124 << endl
125 << "Setting reverse order (cT_" << flvj << flvi << "). " << endl;
126 int temp = flvi;
127 flvi = flvj;
128 flvj = temp;
129 }
130 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
131 cerr << "WARNING: cT_" << flvi << flvj << " not valid for " << fNumNus
132 << " neutrinos. Doing nothing." << endl;
133 return;
134 }
135 if (dim != 4 && dim != 6 && dim != 8) {
136 cerr << "WARNING: Invalid cT coefficient dimension dim=" << dim
137 << " not in [4,6,8].\n";
138 return;
139 }
140
141 int pos = dim / 2 - 2;
142
143 complexD h = val;
144
145 if (flvi != flvj) h *= complexD(cos(phase), sin(phase));
146
147 bool isSame = (fcT[flvi][flvj][pos] == h);
148
149 if (!isSame) ClearCache();
150
151 fGotES *= isSame;
152
153 fcT[flvi][flvj][pos] = h;
154}
155
156//.............................................................................
172complexD PMNS_LIV::GetaT(int flvi, int flvj, int dim)
173{
174 if (flvi > flvj) {
175 cerr << "WARNING: First argument should be smaller or equal to second "
176 "argument"
177 << endl
178 << "Setting reverse order (aT_" << flvj << flvi << "). " << endl;
179 int temp = flvi;
180 flvi = flvj;
181 flvj = temp;
182 }
183 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
184 cerr << "WARNING: aT_" << flvi << flvj << " not valid for " << fNumNus
185 << " neutrinos. Returning 0." << endl;
186 return zero;
187 }
188 if (dim != 3 && dim != 5 && dim != 7) {
189 cerr << "WARNING: Invalid aT coefficient dimension dim=" << dim
190 << " not in [3,5,7].\n";
191 return zero;
192 }
193
194 int pos = (dim - 3) / 2;
195
196 return faT[flvi][flvj][pos];
197}
198
199//.............................................................................
215complex<double> PMNS_LIV::GetcT(int flvi, int flvj, int dim)
216{
217 if (flvi > flvj) {
218 cerr << "WARNING: First argument should be smaller or equal to second "
219 "argument"
220 << endl
221 << "Setting reverse order (cT_" << flvj << flvi << "). " << endl;
222 int temp = flvi;
223 flvi = flvj;
224 flvj = temp;
225 }
226 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
227 cerr << "WARNING: cT_" << flvi << flvj << " not valid for " << fNumNus
228 << " neutrinos. Returning 0." << endl;
229 return zero;
230 }
231 if (dim != 4 && dim != 6 && dim != 8) {
232 cerr << "WARNING: Invalid cT coefficient dimension dim=" << dim
233 << " not in [4,6,8].\n";
234 return zero;
235 }
236
237 int pos = dim / 2 - 2;
238
239 return fcT[flvi][flvj][pos];
240}
241
242//.............................................................................
247{
248 double lv = 2 * kGeV2eV * fEnergy; // 2*E in eV
249
250 // Set the vacuum Hamiltonian
251 for (int i = 0; i < fNumNus; i++) {
252 for (int j = i; j < fNumNus; j++) { fHam[i][j] = fHms[i][j] / lv; }
253 }
254
255 // Add matter potential
256 double kr2GNe = kK2 * M_SQRT2 * kGf * fPath.density * fPath.zoa;
257 if (!fIsNuBar)
258 fHam[0][0] += kr2GNe;
259 else
260 fHam[0][0] -= kr2GNe;
261
262 // Add LIV terms for all dimensions
263 double energy_pow = kGeV2eV;
264
265 for (int dim = 3; dim < 9; dim++) {
266 // Increase energy power
267 if (dim > 3) energy_pow *= fEnergy;
268
269 // Set parameter index
270 int coeff_idx = (dim - 3) / 2;
271
272 for (int i = 0; i < fNumNus; i++) {
273 for (int j = i; j < fNumNus; j++) {
274 complexD liv_term = energy_pow;
275
276 if (dim % 2 == 1) { // aT is CPT-odd
277 if (fIsNuBar)
278 liv_term *= -faT[i][j][coeff_idx];
279 else
280 liv_term *= faT[i][j][coeff_idx];
281 }
282 else { // cT is CPT-even
283 // Add 4/3 coefficient for backward compatibility
284 if (dim == 4)
285 liv_term *= -4 / 3. * fcT[i][j][coeff_idx];
286 else
287 liv_term *= -fcT[i][j][coeff_idx];
288 }
289
290 fHam[i][j] += liv_term;
291 }
292 }
293 }
294
295 // Conjugate Hamiltonian for antineutrinos
296 if (fIsNuBar) {
297 for (int i = 0; i < fNumNus; i++) {
298 for (int j = i + 1; j < fNumNus; j++) { fHam[i][j] = conj(fHam[i][j]); }
299 }
300 }
301}
302
304//
305// Obsolete functions for backward compatibility...
306//
308
309//.............................................................................
336void PMNS_LIV::SetLIV(double aT_ee, double aT_mumu, double aT_tautau,
337 double aT_emu, double aT_etau, double aT_mutau,
338 double cT_ee, double cT_mumu, double cT_tautau,
339 double cT_emu, double cT_etau, double cT_mutau,
340 double delta_aT_emu, double delta_aT_etau,
341 double delta_aT_mutau, double delta_cT_emu,
342 double delta_cT_etau, double delta_cT_mutau)
343{
344 SetaT(0, 0, aT_ee, 0);
345 SetaT(1, 1, aT_mumu, 0);
346 SetaT(2, 2, aT_tautau, 0);
347
348 SetaT(0, 1, aT_emu, delta_aT_emu);
349 SetaT(0, 2, aT_etau, delta_aT_etau);
350 SetaT(1, 2, aT_mutau, delta_aT_mutau);
351
352 SetcT(0, 0, cT_ee, 0);
353 SetcT(1, 1, cT_mumu, 0);
354 SetcT(2, 2, cT_tautau, 0);
355
356 SetcT(0, 1, cT_emu, delta_cT_emu);
357 SetcT(0, 2, cT_etau, delta_cT_etau);
358 SetcT(1, 2, cT_mutau, delta_cT_mutau);
359}
360
361//.............................................................................
379void PMNS_LIV::SetaT(int flvi, int flvj, double val, double phase)
380{
381 SetaT(flvi, flvj, 3, val, phase);
382}
383
384//.............................................................................
402void PMNS_LIV::SetcT(int flvi, int flvj, double val, double phase)
403{
404 SetcT(flvi, flvj, 4, val, phase);
405}
406
407//.............................................................................
413void PMNS_LIV::SetaT_ee(double a) { SetaT(0, 0, a, 0); }
414
415//.............................................................................
421void PMNS_LIV::SetaT_mumu(double a) { SetaT(1, 1, a, 0); }
422
423//.............................................................................
429void PMNS_LIV::SetaT_tautau(double a) { SetaT(2, 2, a, 0); }
430
431//.............................................................................
438void PMNS_LIV::SetaT_emu(double a, double phi) { SetaT(0, 1, a, phi); }
439
440//.............................................................................
447void PMNS_LIV::SetaT_etau(double a, double phi) { SetaT(0, 2, a, phi); }
448
449//.............................................................................
456void PMNS_LIV::SetaT_mutau(double a, double phi) { SetaT(1, 2, a, phi); }
457
458//.............................................................................
464void PMNS_LIV::SetcT_ee(double a) { SetcT(0, 0, a, 0); }
465
466//.............................................................................
472void PMNS_LIV::SetcT_mumu(double a) { SetcT(1, 1, a, 0); }
473
474//.............................................................................
480void PMNS_LIV::SetcT_tautau(double a) { SetcT(2, 2, a, 0); }
481
482//.............................................................................
489void PMNS_LIV::SetcT_emu(double a, double phi) { SetcT(0, 1, a, phi); }
490
491//.............................................................................
498void PMNS_LIV::SetcT_etau(double a, double phi) { SetcT(0, 2, a, phi); }
499
500//.............................................................................
507void PMNS_LIV::SetcT_mutau(double a, double phi) { SetcT(1, 2, a, phi); }
508
static const complexD zero
zero in complex
Definition: PMNS_Base.h:211
bool fIsNuBar
Anti-neutrino flag.
Definition: PMNS_Base.h:293
int fNumNus
Number of neutrino flavours.
Definition: PMNS_Base.h:277
double fEnergy
Neutrino energy.
Definition: PMNS_Base.h:292
static const double kK2
mol/GeV^2/cm^3 to eV
Definition: PMNS_Base.h:216
matrixC fHms
matrix H*2E in eV^2
Definition: PMNS_Base.h:284
bool fGotES
Tag to avoid recalculating eigensystem.
Definition: PMNS_Base.h:299
static const double kGf
G_F in units of GeV^-2.
Definition: PMNS_Base.h:220
NuPath fPath
Current neutrino path.
Definition: PMNS_Base.h:296
virtual void ClearCache()
Clear the cache.
Definition: PMNS_Base.cxx:111
static const double kGeV2eV
GeV to eV.
Definition: PMNS_Base.h:217
virtual void SetStdPath()
Set standard neutrino path.
Definition: PMNS_Base.cxx:205
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
Definition: PMNS_Fast.h:40
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:62
virtual void SetaT_ee(double a)
Set eps_ee parameter.
Definition: PMNS_LIV.cxx:413
virtual void SetcT_ee(double a)
Set eps_ee parameter.
Definition: PMNS_LIV.cxx:464
void SetLIV(double aT_ee, double aT_mumu, double aT_tautau, double aT_emu, double aT_etau, double aT_mutau, double cT_ee, double CT_mumu, double CT_tautau, double cT_emu, double cT_etau, double cT_mutau, double delta_aT_emu=0, double delta_aT_etau=0, double delta_aT_mutau=0, double delta_cT_emu=0, double delta_cT_etau=0, double delta_cT_mutau=0)
Set the LIV parameters all at once.
Definition: PMNS_LIV.cxx:336
virtual void SetaT_tautau(double a)
Set eps_tautau parameter.
Definition: PMNS_LIV.cxx:429
virtual void SetcT_mutau(double a, double phi)
Definition: PMNS_LIV.cxx:507
virtual void SetcT_etau(double a, double phi)
Definition: PMNS_LIV.cxx:498
virtual void SetcT_tautau(double a)
Set eps_tautau parameter.
Definition: PMNS_LIV.cxx:480
virtual complexD GetcT(int flvi, int flvj, int dim=4)
Definition: PMNS_LIV.cxx:215
virtual void UpdateHam()
Build the full Hamiltonian.
Definition: PMNS_LIV.cxx:246
virtual void SetaT_emu(double a, double phi)
Set diagonal LIV pars.
Definition: PMNS_LIV.cxx:438
virtual void SetcT_emu(double a, double phi)
Definition: PMNS_LIV.cxx:489
virtual void SetaT_mumu(double a)
Set eps_mumu parameter.
Definition: PMNS_LIV.cxx:421
virtual void SetaT_mutau(double a, double phi)
Definition: PMNS_LIV.cxx:456
virtual void SetcT_mumu(double a)
Set eps_mumu parameter.
Definition: PMNS_LIV.cxx:472
virtual ~PMNS_LIV()
Destructor.
Definition: PMNS_LIV.cxx:50
complexD fcT[3][3][3]
Stores each cT LIV parameter of dimension 4,6,8.
Definition: PMNS_LIV.h:58
virtual complexD GetaT(int flvi, int flvj, int dim=3)
Definition: PMNS_LIV.cxx:172
virtual void SetaT(int flvi, int flvj, int dim, double val, double phase)
Definition: PMNS_LIV.cxx:67
virtual void SetcT(int flvi, int flvj, int dim, double val, double phase)
Definition: PMNS_LIV.cxx:119
virtual void SetaT_etau(double a, double phi)
Definition: PMNS_LIV.cxx:447
complexD faT[3][3][3]
Stores each aT LIV parameter of dimension 3,5,7.
Definition: PMNS_LIV.h:56
Some useful general definitions.
Definition: Absorption.h:6
std::complex< double > complexD
Definition: Definitions.h:21
Definition: EigenPoint.h:44
double density
The density of the path segment in g/cm^3.
Definition: NuPath.h:79
double zoa
The effective Z/A value of the path segment.
Definition: NuPath.h:80