66 for (
int i = 1; i <
fNumNus; i++) {
72 for (
int j = 1; j <
fNumNus; j++) {
74 fHms[j][j] = sqrt(fabs(
fDm[j] + m1 * m1)) - m1;
76 for (
int i = 0; i < j; i++) {
fHms[i][j] = 0; }
78 for (
int i = 0; i < j; i++) {
RotateH(i, j,
fHms); }
82 for (
int i = 0; i <
fNumNus; i++) {
fHms[i][i] += m1; }
97 for (
int i = 0; i < 3; i++) {
98 for (
int j = i; j < 3; j++) {
100 if (i < j) tmp[j][i] = conj(A[i][j]);
105 for (
int i = 0; i < 3; i++) {
106 for (
int j = i; j < 3; j++) {
107 for (
int k = 0; k < 3; k++) { A[i][j] += tmp[i][k] * tmp[k][j]; }
128 for (
int i = 0; i <
fNumNus; i++) {
129 for (
int j = i; j <
fNumNus; j++) {
130 fHam[i][j] = (
fHms[i][j] + nsiCoup *
fEps[i][j]) / sqrtlv;
142 fHam[0][0] += kr2GNe;
144 fHam[0][0] -= kr2GNe;
void HermitianSquare(complexD(&A)[3][3])
bool fIsNuBar
Anti-neutrino flag.
int fNumNus
Number of neutrino flavours.
double fEnergy
Neutrino energy.
virtual void RotateH(int i, int j, matrixC &Ham)
Rotate the Hamiltonian by theta_ij and delta_ij.
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.
bool fBuiltHms
Tag to avoid rebuilding Hms.
vectorD fDm
m^2_i - m^2_1 in vacuum
static const double kGeV2eV
GeV to eV.
complexD fHam[3][3]
The full hamiltonian.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with NSI.
virtual double GetZoACoup()
Get effective Z/A coupling.
complexD fEps[3][3]
Stores each NSI parameter.
virtual ~PMNS_SNSI()
Destructor.
double fM
Lightest neutrino mass.
virtual void UpdateHam()
Build the full Hamiltonian.
virtual void SetLowestMass(double m)
Set lightest neutrino mass.
virtual double GetLowestMass()
Get lightest neutrino mass.
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.