18#include <Eigen/Eigenvalues>
34PMNS_Sterile::PMNS_Sterile(
int numNus)
54 kK2 * M_SQRT2 *
kGf * rho * zoa;
55 double kr2GNn =
kK2 * M_SQRT2 *
kGf * rho * (1 - zoa) /
59 for (
int i = 0; i <
fNumNus; i++) {
64 for (
int j = i + 1; j <
fNumNus; j++) {
96 Eigen::Ref<T> H(
fHam);
98 Eigen::SelfAdjointEigenSolver<T> eigensolver(H);
101 for (
int i = 0; i <
fNumNus; i++) {
102 fEval[i] = eigensolver.eigenvalues()(i);
103 for (
int j = 0; j <
fNumNus; j++) {
104 fEvec[i][j] = eigensolver.eigenvectors()(i, j);
136 SolveEigenSystem<Eigen::Matrix4cd>();
138 SolveEigenSystem<Eigen::Matrix3cd>();
140 SolveEigenSystem<Eigen::Matrix2cd>();
142 SolveEigenSystem<Eigen::MatrixXcd>();
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.
virtual void FillCache()
Cache the current eigensystem.
static const double kGf
G_F in units of GeV^-2.
matrixC fEvec
Eigenvectors of the Hamiltonian.
NuPath fPath
Current neutrino path.
vectorD fEval
Eigenvalues of the Hamiltonian.
virtual bool TryCache()
Try to find a cached eigensystem.
virtual void BuildHms()
Build the matrix of masses squared.
static const double kGeV2eV
GeV to eV.
Implementation of oscillations of neutrinos in matter in a framework with a Taylor expansion.
virtual void UpdateHam()
Build the full Hamiltonian.
Eigen::MatrixXcd fHam
The full Hamiltonian.
void SolveEigenSystem()
Specialized solver for NxN matrices.
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
Some useful general definitions.
double density
The density of the path segment in g/cm^3.
double zoa
The effective Z/A value of the path segment.