OscProb
PMNS_Sterile.cxx
Go to the documentation of this file.
1
17
18#include <Eigen/Eigenvalues>
19
20#include "PMNS_Sterile.h"
21
22using namespace std;
23
24using namespace OscProb;
25
26//.............................................................................
34PMNS_Sterile::PMNS_Sterile(int numNus) : PMNS_Base(numNus), fHam(numNus, numNus)
35{
36}
37
38//.............................................................................
47{
48 double rho = fPath.density;
49 double zoa = fPath.zoa;
50
51 double lv = 2 * kGeV2eV * fEnergy; // 2E in eV
52 double kr2GNe =
53 kK2 * M_SQRT2 * kGf * rho * zoa; // Electron matter potential in eV
54 double kr2GNn = kK2 * M_SQRT2 * kGf * rho * (1 - zoa) /
55 2; // Neutron matter potential in eV
56
57 // Finish building Hamiltonian in matter with dimension of eV
58 for (int i = 0; i < fNumNus; i++) {
59 // Set diagonal elements which are real
60 fHam(i, i) = fHms[i][i] / lv;
61
62 // Set off-diagonal elements and flip deltaCP if needed
63 for (int j = i + 1; j < fNumNus; j++) {
64 // Obs: fHam is lower tirangular while fHms is upper triangular
65 if (!fIsNuBar)
66 fHam(j, i) = conj(fHms[i][j]) / lv;
67 else
68 fHam(j, i) = fHms[i][j] / lv;
69 }
70
71 // Subtract NC coherent forward scattering from sterile neutrinos.
72 // See arXiv:hep-ph/0606054v3, eq. 3.15, for example.
73 if (i > 2) {
74 if (!fIsNuBar)
75 fHam(i, i) += kr2GNn;
76 else
77 fHam(i, i) -= kr2GNn;
78 }
79 }
80
81 // Add nue CC coherent forward scattering.
82 if (!fIsNuBar)
83 fHam(0, 0) += kr2GNe;
84 else
85 fHam(0, 0) -= kr2GNe;
86}
87
88//.............................................................................
93template <typename T> void PMNS_Sterile::SolveEigenSystem()
94{
95 Eigen::Ref<T> H(fHam);
96
97 Eigen::SelfAdjointEigenSolver<T> eigensolver(H);
98
99 // Fill fEval and fEvec vectors from GSL objects
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);
104 }
105 }
106}
107
108//.............................................................................
121{
122 // Build Hamiltonian
123 BuildHms();
124
125 // Check if anything changed
126 if (fGotES) return;
127
128 // Try caching if activated
129 if (TryCache()) return;
130
131 UpdateHam();
132
133 // Choose the appropriate MatrixType for the solver
134 if (fNumNus == 4)
135 SolveEigenSystem<Eigen::Matrix4cd>();
136 else if (fNumNus == 3)
137 SolveEigenSystem<Eigen::Matrix3cd>();
138 else if (fNumNus == 2)
139 SolveEigenSystem<Eigen::Matrix2cd>();
140 else
141 SolveEigenSystem<Eigen::MatrixXcd>();
142
143 // Mark eigensystem as solved
144 fGotES = true;
145
146 // Fill cache if activated
147 FillCache();
148}
149
Base class implementing general functions for computing neutrino oscillations.
Definition: PMNS_Base.h:26
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
virtual void FillCache()
Cache the current eigensystem.
Definition: PMNS_Base.cxx:157
static const double kGf
G_F in units of GeV^-2.
Definition: PMNS_Base.h:220
matrixC fEvec
Eigenvectors of the Hamiltonian.
Definition: PMNS_Base.h:290
NuPath fPath
Current neutrino path.
Definition: PMNS_Base.h:296
vectorD fEval
Eigenvalues of the Hamiltonian.
Definition: PMNS_Base.h:289
virtual bool TryCache()
Try to find a cached eigensystem.
Definition: PMNS_Base.cxx:134
virtual void BuildHms()
Build the matrix of masses squared.
Definition: PMNS_Base.cxx:955
static const double kGeV2eV
GeV to eV.
Definition: PMNS_Base.h:217
virtual void UpdateHam()
Build the full Hamiltonian.
Eigen::MatrixXcd fHam
The full Hamiltonian.
Definition: PMNS_Sterile.h:48
void SolveEigenSystem()
Specialized solver for NxN matrices.
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
Some useful general definitions.
Definition: Absorption.h:6
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