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)
35 : PMNS_Maltoni(numNus), fHam(numNus, numNus)
36{
37}
38
39//.............................................................................
48{
49 double rho = fPath.density;
50 double zoa = fPath.zoa;
51
52 double lv = 2 * kGeV2eV * fEnergy; // 2E in eV
53 double kr2GNe =
54 kK2 * M_SQRT2 * kGf * rho * zoa; // Electron matter potential in eV
55 double kr2GNn = kK2 * M_SQRT2 * kGf * rho * (1 - zoa) /
56 2; // Neutron matter potential in eV
57
58 // Finish building Hamiltonian in matter with dimension of eV
59 for (int i = 0; i < fNumNus; i++) {
60 // Set diagonal elements which are real
61 fHam(i, i) = fHms[i][i] / lv;
62
63 // Set off-diagonal elements and flip deltaCP if needed
64 for (int j = i + 1; j < fNumNus; j++) {
65 // Obs: fHam is lower tirangular while fHms is upper triangular
66 if (!fIsNuBar)
67 fHam(j, i) = conj(fHms[i][j]) / lv;
68 else
69 fHam(j, i) = fHms[i][j] / lv;
70 }
71
72 // Subtract NC coherent forward scattering from sterile neutrinos.
73 // See arXiv:hep-ph/0606054v3, eq. 3.15, for example.
74 if (i > 2) {
75 if (!fIsNuBar)
76 fHam(i, i) += kr2GNn;
77 else
78 fHam(i, i) -= kr2GNn;
79 }
80 }
81
82 // Add nue CC coherent forward scattering.
83 if (!fIsNuBar)
84 fHam(0, 0) += kr2GNe;
85 else
86 fHam(0, 0) -= kr2GNe;
87}
88
89//.............................................................................
94template <typename T> void PMNS_Sterile::SolveEigenSystem()
95{
96 Eigen::Ref<T> H(fHam);
97
98 Eigen::SelfAdjointEigenSolver<T> eigensolver(H);
99
100 // Fill fEval and fEvec vectors from GSL objects
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);
105 }
106 }
107}
108
109//.............................................................................
122{
123 // Build Hamiltonian
124 BuildHms();
125
126 // Check if anything changed
127 if (fGotES) return;
128
129 // Try caching if activated
130 if (TryCache()) return;
131
132 UpdateHam();
133
134 // Choose the appropriate MatrixType for the solver
135 if (fNumNus == 4)
136 SolveEigenSystem<Eigen::Matrix4cd>();
137 else if (fNumNus == 3)
138 SolveEigenSystem<Eigen::Matrix3cd>();
139 else if (fNumNus == 2)
140 SolveEigenSystem<Eigen::Matrix2cd>();
141 else
142 SolveEigenSystem<Eigen::MatrixXcd>();
143
144 // Mark eigensystem as solved
145 fGotES = true;
146
147 // Fill cache if activated
148 FillCache();
149}
150
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
Implementation of oscillations of neutrinos in matter in a framework with a Taylor expansion.
Definition: PMNS_Maltoni.h:34
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