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 SetIsOscProbAvg(true);
35 SetStdPath();
36
37 for (int dim = 3; dim < 8; dim += 2) {
38 for (int flvi = 0; flvi < 3; flvi++) {
39 for (int flvj = flvi; flvj < 3; flvj++) {
40 SetaT(flvi, flvj, dim, 0, 0);
41 SetcT(flvi, flvj, dim + 1, 0, 0);
42 }
43 }
44 }
45}
46
47//.............................................................................
52
53//.............................................................................
68void PMNS_LIV::SetaT(int flvi, int flvj, int dim, double val, double phase)
69{
70 if (flvi > flvj) {
71 cerr << "WARNING: First argument should be smaller or equal to second "
72 "argument"
73 << endl
74 << "Setting reverse order (aT_" << flvj << flvi << "). " << endl;
75 int temp = flvi;
76 flvi = flvj;
77 flvj = temp;
78 }
79 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
80 cerr << "WARNING: aT_" << flvi << flvj << " not valid for " << fNumNus
81 << " neutrinos. Doing nothing." << endl;
82 return;
83 }
84 if (dim != 3 && dim != 5 && dim != 7) {
85 cerr << "WARNING: Invalid aT coefficient dimension dim=" << dim
86 << " not in [3,5,7].\n";
87 return;
88 }
89
90 int pos = (dim - 3) / 2;
91
92 complexD h = val;
93
94 if (flvi != flvj) h *= complexD(cos(phase), sin(phase));
95
96 bool isSame = (faT[flvi][flvj][pos] == h);
97
98 if (!isSame) ClearCache();
99
100 fGotES *= isSame;
101
102 faT[flvi][flvj][pos] = h;
103}
104
105//.............................................................................
120void PMNS_LIV::SetcT(int flvi, int flvj, int dim, double val, double phase)
121{
122 if (flvi > flvj) {
123 cerr << "WARNING: First argument should be smaller or equal to second "
124 "argument"
125 << endl
126 << "Setting reverse order (cT_" << flvj << flvi << "). " << endl;
127 int temp = flvi;
128 flvi = flvj;
129 flvj = temp;
130 }
131 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
132 cerr << "WARNING: cT_" << flvi << flvj << " not valid for " << fNumNus
133 << " neutrinos. Doing nothing." << endl;
134 return;
135 }
136 if (dim != 4 && dim != 6 && dim != 8) {
137 cerr << "WARNING: Invalid cT coefficient dimension dim=" << dim
138 << " not in [4,6,8].\n";
139 return;
140 }
141
142 int pos = dim / 2 - 2;
143
144 complexD h = val;
145
146 if (flvi != flvj) h *= complexD(cos(phase), sin(phase));
147
148 bool isSame = (fcT[flvi][flvj][pos] == h);
149
150 if (!isSame) ClearCache();
151
152 fGotES *= isSame;
153
154 fcT[flvi][flvj][pos] = h;
155}
156
157//.............................................................................
173complexD PMNS_LIV::GetaT(int flvi, int flvj, int dim)
174{
175 if (flvi > flvj) {
176 cerr << "WARNING: First argument should be smaller or equal to second "
177 "argument"
178 << endl
179 << "Setting reverse order (aT_" << flvj << flvi << "). " << endl;
180 int temp = flvi;
181 flvi = flvj;
182 flvj = temp;
183 }
184 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
185 cerr << "WARNING: aT_" << flvi << flvj << " not valid for " << fNumNus
186 << " neutrinos. Returning 0." << endl;
187 return zero;
188 }
189 if (dim != 3 && dim != 5 && dim != 7) {
190 cerr << "WARNING: Invalid aT coefficient dimension dim=" << dim
191 << " not in [3,5,7].\n";
192 return zero;
193 }
194
195 int pos = (dim - 3) / 2;
196
197 return faT[flvi][flvj][pos];
198}
199
200//.............................................................................
216complex<double> PMNS_LIV::GetcT(int flvi, int flvj, int dim)
217{
218 if (flvi > flvj) {
219 cerr << "WARNING: First argument should be smaller or equal to second "
220 "argument"
221 << endl
222 << "Setting reverse order (cT_" << flvj << flvi << "). " << endl;
223 int temp = flvi;
224 flvi = flvj;
225 flvj = temp;
226 }
227 if (flvi < 0 || flvi > 2 || flvj < flvi || flvj > 2) {
228 cerr << "WARNING: cT_" << flvi << flvj << " not valid for " << fNumNus
229 << " neutrinos. Returning 0." << endl;
230 return zero;
231 }
232 if (dim != 4 && dim != 6 && dim != 8) {
233 cerr << "WARNING: Invalid cT coefficient dimension dim=" << dim
234 << " not in [4,6,8].\n";
235 return zero;
236 }
237
238 int pos = dim / 2 - 2;
239
240 return fcT[flvi][flvj][pos];
241}
242
243//.............................................................................
250
251//.............................................................................
256{
257 double lv = 2 * kGeV2eV * fEnergy; // 2*E in eV
258
259 // Set the vacuum Hamiltonian
260 for (int i = 0; i < fNumNus; i++) {
261 for (int j = i; j < fNumNus; j++) { fHam[i][j] = fHms[i][j] / lv; }
262 }
263
264 // Add matter potential
265 double kr2GNe = kK2 * M_SQRT2 * kGf * fPath.density * fPath.zoa;
266 if (!fIsNuBar)
267 fHam[0][0] += kr2GNe;
268 else
269 fHam[0][0] -= kr2GNe;
270
271 // Add LIV terms for all dimensions
272 double energy_pow = kGeV2eV;
273
274 for (int dim = 3; dim < 9; dim++) {
275 // Increase energy power
276 if (dim > 3) energy_pow *= fEnergy;
277
278 // Set parameter index
279 int coeff_idx = (dim - 3) / 2;
280
281 for (int i = 0; i < fNumNus; i++) {
282 for (int j = i; j < fNumNus; j++) {
283 complexD liv_term = energy_pow;
284
285 if (dim % 2 == 1) { // aT is CPT-odd
286 if (fIsNuBar)
287 liv_term *= -faT[i][j][coeff_idx];
288 else
289 liv_term *= faT[i][j][coeff_idx];
290 }
291 else { // cT is CPT-even
292 // Add 4/3 coefficient for backward compatibility
293 if (dim == 4)
294 liv_term *= -4 / 3. * fcT[i][j][coeff_idx];
295 else
296 liv_term *= -fcT[i][j][coeff_idx];
297 }
298
299 fHam[i][j] += liv_term;
300 }
301 }
302 }
303
304 // Conjugate Hamiltonian for antineutrinos
305 if (fIsNuBar) {
306 for (int i = 0; i < fNumNus; i++) {
307 for (int j = i + 1; j < fNumNus; j++) { fHam[i][j] = conj(fHam[i][j]); }
308 }
309 }
310}
311
313//
314// Obsolete functions for backward compatibility...
315//
317
318//.............................................................................
345void PMNS_LIV::SetLIV(double aT_ee, double aT_mumu, double aT_tautau,
346 double aT_emu, double aT_etau, double aT_mutau,
347 double cT_ee, double cT_mumu, double cT_tautau,
348 double cT_emu, double cT_etau, double cT_mutau,
349 double delta_aT_emu, double delta_aT_etau,
350 double delta_aT_mutau, double delta_cT_emu,
351 double delta_cT_etau, double delta_cT_mutau)
352{
353 SetaT(0, 0, aT_ee, 0);
354 SetaT(1, 1, aT_mumu, 0);
355 SetaT(2, 2, aT_tautau, 0);
356
357 SetaT(0, 1, aT_emu, delta_aT_emu);
358 SetaT(0, 2, aT_etau, delta_aT_etau);
359 SetaT(1, 2, aT_mutau, delta_aT_mutau);
360
361 SetcT(0, 0, cT_ee, 0);
362 SetcT(1, 1, cT_mumu, 0);
363 SetcT(2, 2, cT_tautau, 0);
364
365 SetcT(0, 1, cT_emu, delta_cT_emu);
366 SetcT(0, 2, cT_etau, delta_cT_etau);
367 SetcT(1, 2, cT_mutau, delta_cT_mutau);
368}
369
370//.............................................................................
388void PMNS_LIV::SetaT(int flvi, int flvj, double val, double phase)
389{
390 SetaT(flvi, flvj, 3, val, phase);
391}
392
393//.............................................................................
411void PMNS_LIV::SetcT(int flvi, int flvj, double val, double phase)
412{
413 SetcT(flvi, flvj, 4, val, phase);
414}
415
416//.............................................................................
422void PMNS_LIV::SetaT_ee(double a) { SetaT(0, 0, a, 0); }
423
424//.............................................................................
430void PMNS_LIV::SetaT_mumu(double a) { SetaT(1, 1, a, 0); }
431
432//.............................................................................
438void PMNS_LIV::SetaT_tautau(double a) { SetaT(2, 2, a, 0); }
439
440//.............................................................................
447void PMNS_LIV::SetaT_emu(double a, double phi) { SetaT(0, 1, a, phi); }
448
449//.............................................................................
456void PMNS_LIV::SetaT_etau(double a, double phi) { SetaT(0, 2, a, phi); }
457
458//.............................................................................
465void PMNS_LIV::SetaT_mutau(double a, double phi) { SetaT(1, 2, a, phi); }
466
467//.............................................................................
473void PMNS_LIV::SetcT_ee(double a) { SetcT(0, 0, a, 0); }
474
475//.............................................................................
481void PMNS_LIV::SetcT_mumu(double a) { SetcT(1, 1, a, 0); }
482
483//.............................................................................
489void PMNS_LIV::SetcT_tautau(double a) { SetcT(2, 2, a, 0); }
490
491//.............................................................................
498void PMNS_LIV::SetcT_emu(double a, double phi) { SetcT(0, 1, a, phi); }
499
500//.............................................................................
507void PMNS_LIV::SetcT_etau(double a, double phi) { SetcT(0, 2, a, phi); }
508
509//.............................................................................
516void PMNS_LIV::SetcT_mutau(double a, double phi) { SetcT(1, 2, a, phi); }
517
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
virtual void SolveHamMatter()
Solve the full Hamiltonian in matter.
Definition: PMNS_Fast.cxx:117
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:64
virtual void SetaT_ee(double a)
Set eps_ee parameter.
Definition: PMNS_LIV.cxx:422
virtual void SetcT_ee(double a)
Set eps_ee parameter.
Definition: PMNS_LIV.cxx:473
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:345
virtual void SetaT_tautau(double a)
Set eps_tautau parameter.
Definition: PMNS_LIV.cxx:438
virtual void SetIsOscProbAvg(bool isOscProbAvg)
Deactivate Maltoni.
Definition: PMNS_LIV.h:49
virtual void SetcT_mutau(double a, double phi)
Definition: PMNS_LIV.cxx:516
virtual void SetcT_etau(double a, double phi)
Definition: PMNS_LIV.cxx:507
virtual void SetcT_tautau(double a)
Set eps_tautau parameter.
Definition: PMNS_LIV.cxx:489
virtual complexD GetcT(int flvi, int flvj, int dim=4)
Definition: PMNS_LIV.cxx:216
virtual void UpdateHam()
Build the full Hamiltonian.
Definition: PMNS_LIV.cxx:255
virtual void SetaT_emu(double a, double phi)
Set diagonal LIV pars.
Definition: PMNS_LIV.cxx:447
virtual void SetcT_emu(double a, double phi)
Definition: PMNS_LIV.cxx:498
virtual void SetaT_mumu(double a)
Set eps_mumu parameter.
Definition: PMNS_LIV.cxx:430
virtual void SetaT_mutau(double a, double phi)
Definition: PMNS_LIV.cxx:465
virtual void SetcT_mumu(double a)
Set eps_mumu parameter.
Definition: PMNS_LIV.cxx:481
virtual ~PMNS_LIV()
Destructor.
Definition: PMNS_LIV.cxx:51
complexD fcT[3][3][3]
Stores each cT LIV parameter of dimension 4,6,8.
Definition: PMNS_LIV.h:65
virtual complexD GetaT(int flvi, int flvj, int dim=3)
Definition: PMNS_LIV.cxx:173
virtual void SolveHam()
Solve the full Hamiltonian.
Definition: PMNS_LIV.cxx:249
virtual void SetaT(int flvi, int flvj, int dim, double val, double phase)
Definition: PMNS_LIV.cxx:68
virtual void SetcT(int flvi, int flvj, int dim, double val, double phase)
Definition: PMNS_LIV.cxx:120
virtual void SetaT_etau(double a, double phi)
Definition: PMNS_LIV.cxx:456
complexD faT[3][3][3]
Stores each aT LIV parameter of dimension 3,5,7.
Definition: PMNS_LIV.h:63
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