18#include <Eigen/Eigenvalues>
34PMNS_Sterile::PMNS_Sterile(
int numNus) :
PMNS_Base(numNus), fHam(numNus, numNus)
53 kK2 * M_SQRT2 *
kGf * rho * zoa;
54 double kr2GNn =
kK2 * M_SQRT2 *
kGf * rho * (1 - zoa) /
58 for (
int i = 0; i <
fNumNus; i++) {
63 for (
int j = i + 1; j <
fNumNus; j++) {
95 Eigen::Ref<T> H(
fHam);
97 Eigen::SelfAdjointEigenSolver<T> eigensolver(H);
100 for (
int i = 0; i <
fNumNus; i++) {
101 fEval[i] = eigensolver.eigenvalues()(i);
102 for (
int j = 0; j <
fNumNus; j++) {
103 fEvec[i][j] = eigensolver.eigenvectors()(i, j);
135 SolveEigenSystem<Eigen::Matrix4cd>();
137 SolveEigenSystem<Eigen::Matrix3cd>();
139 SolveEigenSystem<Eigen::Matrix2cd>();
141 SolveEigenSystem<Eigen::MatrixXcd>();
Base class implementing general functions for computing neutrino oscillations.
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.
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.