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);
70 cerr <<
"WARNING: First argument should be smaller or equal to second "
73 <<
"Setting reverse order (aT_" << flvj << flvi <<
"). " << endl;
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;
83 if (dim != 3 && dim != 5 && dim != 7) {
84 cerr <<
"WARNING: Invalid aT coefficient dimension dim=" << dim
85 <<
" not in [3,5,7].\n";
89 int pos = (dim - 3) / 2;
93 if (flvi != flvj) h *=
complexD(cos(phase), sin(phase));
95 bool isSame = (
faT[flvi][flvj][pos] == h);
101 faT[flvi][flvj][pos] = h;
122 cerr <<
"WARNING: First argument should be smaller or equal to second "
125 <<
"Setting reverse order (cT_" << flvj << flvi <<
"). " << endl;
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;
135 if (dim != 4 && dim != 6 && dim != 8) {
136 cerr <<
"WARNING: Invalid cT coefficient dimension dim=" << dim
137 <<
" not in [4,6,8].\n";
141 int pos = dim / 2 - 2;
145 if (flvi != flvj) h *=
complexD(cos(phase), sin(phase));
147 bool isSame = (
fcT[flvi][flvj][pos] == h);
153 fcT[flvi][flvj][pos] = h;
175 cerr <<
"WARNING: First argument should be smaller or equal to second "
178 <<
"Setting reverse order (aT_" << flvj << flvi <<
"). " << endl;
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;
188 if (dim != 3 && dim != 5 && dim != 7) {
189 cerr <<
"WARNING: Invalid aT coefficient dimension dim=" << dim
190 <<
" not in [3,5,7].\n";
194 int pos = (dim - 3) / 2;
196 return faT[flvi][flvj][pos];
218 cerr <<
"WARNING: First argument should be smaller or equal to second "
221 <<
"Setting reverse order (cT_" << flvj << flvi <<
"). " << endl;
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;
231 if (dim != 4 && dim != 6 && dim != 8) {
232 cerr <<
"WARNING: Invalid cT coefficient dimension dim=" << dim
233 <<
" not in [4,6,8].\n";
237 int pos = dim / 2 - 2;
239 return fcT[flvi][flvj][pos];
251 for (
int i = 0; i <
fNumNus; i++) {
258 fHam[0][0] += kr2GNe;
260 fHam[0][0] -= kr2GNe;
265 for (
int dim = 3; dim < 9; dim++) {
267 if (dim > 3) energy_pow *=
fEnergy;
270 int coeff_idx = (dim - 3) / 2;
272 for (
int i = 0; i <
fNumNus; i++) {
273 for (
int j = i; j <
fNumNus; j++) {
278 liv_term *= -
faT[i][j][coeff_idx];
280 liv_term *=
faT[i][j][coeff_idx];
285 liv_term *= -4 / 3. *
fcT[i][j][coeff_idx];
287 liv_term *= -
fcT[i][j][coeff_idx];
290 fHam[i][j] += liv_term;
297 for (
int i = 0; i <
fNumNus; i++) {
298 for (
int j = i + 1; j <
fNumNus; j++) {
fHam[i][j] = conj(
fHam[i][j]); }
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)
344 SetaT(0, 0, aT_ee, 0);
345 SetaT(1, 1, aT_mumu, 0);
346 SetaT(2, 2, aT_tautau, 0);
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);
352 SetcT(0, 0, cT_ee, 0);
353 SetcT(1, 1, cT_mumu, 0);
354 SetcT(2, 2, cT_tautau, 0);
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);
381 SetaT(flvi, flvj, 3, val, phase);
404 SetcT(flvi, flvj, 4, val, phase);
static const complexD zero
zero in complex
bool fIsNuBar
Anti-neutrino flag.
int fNumNus
Number of neutrino flavours.
double fEnergy
Neutrino energy.
static const double kK2
mol/GeV^2/cm^3 to eV
matrixC fHms
matrix H*2E in eV^2
bool fGotES
Tag to avoid recalculating eigensystem.
static const double kGf
G_F in units of GeV^-2.
NuPath fPath
Current neutrino path.
virtual void ClearCache()
Clear the cache.
static const double kGeV2eV
GeV to eV.
virtual void SetStdPath()
Set standard neutrino path.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
complexD fHam[3][3]
The full hamiltonian.
virtual void SetaT_ee(double a)
Set eps_ee parameter.
virtual void SetcT_ee(double a)
Set eps_ee parameter.
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.
virtual void SetaT_tautau(double a)
Set eps_tautau parameter.
virtual void SetcT_mutau(double a, double phi)
virtual void SetcT_etau(double a, double phi)
virtual void SetcT_tautau(double a)
Set eps_tautau parameter.
virtual complexD GetcT(int flvi, int flvj, int dim=4)
virtual void UpdateHam()
Build the full Hamiltonian.
virtual void SetaT_emu(double a, double phi)
Set diagonal LIV pars.
virtual void SetcT_emu(double a, double phi)
virtual void SetaT_mumu(double a)
Set eps_mumu parameter.
virtual void SetaT_mutau(double a, double phi)
virtual void SetcT_mumu(double a)
Set eps_mumu parameter.
virtual ~PMNS_LIV()
Destructor.
complexD fcT[3][3][3]
Stores each cT LIV parameter of dimension 4,6,8.
virtual complexD GetaT(int flvi, int flvj, int dim=3)
virtual void SetaT(int flvi, int flvj, int dim, double val, double phase)
virtual void SetcT(int flvi, int flvj, int dim, double val, double phase)
virtual void SetaT_etau(double a, double phi)
complexD faT[3][3][3]
Stores each aT LIV parameter of dimension 3,5,7.
Some useful general definitions.
std::complex< double > complexD
double density
The density of the path segment in g/cm^3.
double zoa
The effective Z/A value of the path segment.