OscProb
PMNS_Fast.cxx
Go to the documentation of this file.
1
2//
3// Implementation of oscillations of neutrinos in matter in a
4// three-neutrino framework.
5//
6// jcoelho\@apc.in2p3.fr
8
10
11#include "PMNS_Fast.h"
12
13using namespace OscProb;
14
15//.............................................................................
21PMNS_Fast::PMNS_Fast() : PMNS_Base(), fHam() {}
22
23//.............................................................................
28
29//.............................................................................
37void PMNS_Fast::SetMix(double th12, double th23, double th13, double deltacp)
38{
39 SetAngle(1, 2, th12);
40 SetAngle(1, 3, th13);
41 SetAngle(2, 3, th23);
42 SetDelta(1, 3, deltacp);
43}
44
45//.............................................................................
55void PMNS_Fast::SetDeltaMsqrs(double dm21, double dm32)
56{
57 SetDm(2, dm21);
58 SetDm(3, dm32 + dm21);
59}
60
61//.............................................................................
70{
71 double lv = 2 * kGeV2eV * fEnergy; // 2E in eV
72
73 double kr2GNe = kK2 * M_SQRT2 * kGf;
74 kr2GNe *= fPath.density * fPath.zoa; // Matter potential in eV
75
76 // Finish building Hamiltonian in matter with dimension of eV
77 for (int i = 0; i < fNumNus; i++) {
78 fHam[i][i] = fHms[i][i] / lv;
79 for (int j = i + 1; j < fNumNus; j++) {
80 if (!fIsNuBar)
81 fHam[i][j] = fHms[i][j] / lv;
82 else
83 fHam[i][j] = conj(fHms[i][j]) / lv;
84 }
85 }
86 if (!fIsNuBar)
87 fHam[0][0] += kr2GNe;
88 else
89 fHam[0][0] -= kr2GNe;
90}
91
92//.............................................................................
99{
100 // Do vacuum oscillation in low density
101 if (fPath.density < 1.0e-6) {
103 return;
104 }
105
107}
108
109//.............................................................................
118{
119 // Build Hamiltonian
120 BuildHms();
121
122 // Check if anything changed
123 if (fGotES) return;
124
125 // Try caching if activated
126 if (TryCache()) return;
127
128 UpdateHam();
129
130 double fEvalGLoBES[3];
131 complexD fEvecGLoBES[3][3];
132
133 // Solve Hamiltonian for eigensystem using the GLoBES method
134 zheevh3(fHam, fEvecGLoBES, fEvalGLoBES);
135
136 // Fill fEval and fEvec vectors from GLoBES arrays
137 for (int i = 0; i < fNumNus; i++) {
138 fEval[i] = fEvalGLoBES[i];
139 for (int j = 0; j < fNumNus; j++) { fEvec[i][j] = fEvecGLoBES[i][j]; }
140 }
141
142 fGotES = true;
143
144 // Fill cache if activated
145 FillCache();
146}
147
148//.............................................................................
155{
156 double s12, s23, s13, c12, c23, c13;
157 complexD idelta(0.0, fDelta[0][2]);
158 if (fIsNuBar) idelta = conj(idelta);
159
160 s12 = sin(fTheta[0][1]);
161 s23 = sin(fTheta[1][2]);
162 s13 = sin(fTheta[0][2]);
163 c12 = cos(fTheta[0][1]);
164 c23 = cos(fTheta[1][2]);
165 c13 = cos(fTheta[0][2]);
166
167 fEvec[0][0] = c12 * c13;
168 fEvec[0][1] = s12 * c13;
169 fEvec[0][2] = s13 * exp(-idelta);
170
171 fEvec[1][0] = -s12 * c23 - c12 * s23 * s13 * exp(idelta);
172 fEvec[1][1] = c12 * c23 - s12 * s23 * s13 * exp(idelta);
173 fEvec[1][2] = s23 * c13;
174
175 fEvec[2][0] = s12 * s23 - c12 * c23 * s13 * exp(idelta);
176 fEvec[2][1] = -c12 * s23 - s12 * c23 * s13 * exp(idelta);
177 fEvec[2][2] = c23 * c13;
178
179 fEval[0] = 0;
180 fEval[1] = fDm[1] / (2 * kGeV2eV * fEnergy);
181 fEval[2] = fDm[2] / (2 * kGeV2eV * fEnergy);
182}
183
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
virtual void SetDm(int j, double dm)
Set the mass-splitting dm_j1 in eV^2.
Definition: PMNS_Base.cxx:674
virtual void SetDelta(int i, int j, double delta)
Set the CP phase delta_ij.
Definition: PMNS_Base.cxx:602
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
vectorD fDm
m^2_i - m^2_1 in vacuum
Definition: PMNS_Base.h:279
virtual bool TryCache()
Try to find a cached eigensystem.
Definition: PMNS_Base.cxx:134
matrixD fDelta
delta[i][j] CP violating phase
Definition: PMNS_Base.h:281
virtual void SetAngle(int i, int j, double th)
Set the mixing angle theta_ij.
Definition: PMNS_Base.cxx:539
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
matrixD fTheta
theta[i][j] mixing angle
Definition: PMNS_Base.h:280
virtual void UpdateHam()
Build the full Hamiltonian.
Definition: PMNS_Fast.cxx:69
virtual void SetDeltaMsqrs(double dm21, double dm32)
Set both mass-splittings at once.
Definition: PMNS_Fast.cxx:55
virtual void SolveHamMatter()
Solve the full Hamiltonian in matter.
Definition: PMNS_Fast.cxx:117
virtual void SetVacuumEigensystem()
Set the eigensystem to the analytic solution of the vacuum Hamiltonian.
Definition: PMNS_Fast.cxx:154
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
Definition: PMNS_Fast.cxx:98
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:64
virtual void SetMix(double th12, double th23, double th13, double deltacp)
Set the all mixing parameters at once.
Definition: PMNS_Fast.cxx:37
virtual ~PMNS_Fast()
Destructor.
Definition: PMNS_Fast.cxx:27
Some useful general definitions.
Definition: Absorption.h:6
std::complex< double > complexD
Definition: Definitions.h:21
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
int zheevh3(std::complex< double > A[3][3], std::complex< double > Q[3][3], double w[3])
Definition: zheevh3.cxx:31