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//.............................................................................
101{
102 // Do vacuum oscillation in low density
103 if (fPath.density < 1.0e-6) {
105 return;
106 }
107
108 // Build Hamiltonian
109 BuildHms();
110
111 // Check if anything changed
112 if (fGotES) return;
113
114 // Try caching if activated
115 if (TryCache()) return;
116
117 UpdateHam();
118
119 double fEvalGLoBES[3];
120 complexD fEvecGLoBES[3][3];
121
122 // Solve Hamiltonian for eigensystem using the GLoBES method
123 zheevh3(fHam, fEvecGLoBES, fEvalGLoBES);
124
125 // Fill fEval and fEvec vectors from GLoBES arrays
126 for (int i = 0; i < fNumNus; i++) {
127 fEval[i] = fEvalGLoBES[i];
128 for (int j = 0; j < fNumNus; j++) { fEvec[i][j] = fEvecGLoBES[i][j]; }
129 }
130
131 fGotES = true;
132
133 // Fill cache if activated
134 FillCache();
135}
136
137//.............................................................................
144{
145 double s12, s23, s13, c12, c23, c13;
146 complexD idelta(0.0, fDelta[0][2]);
147 if (fIsNuBar) idelta = conj(idelta);
148
149 s12 = sin(fTheta[0][1]);
150 s23 = sin(fTheta[1][2]);
151 s13 = sin(fTheta[0][2]);
152 c12 = cos(fTheta[0][1]);
153 c23 = cos(fTheta[1][2]);
154 c13 = cos(fTheta[0][2]);
155
156 fEvec[0][0] = c12 * c13;
157 fEvec[0][1] = s12 * c13;
158 fEvec[0][2] = s13 * exp(-idelta);
159
160 fEvec[1][0] = -s12 * c23 - c12 * s23 * s13 * exp(idelta);
161 fEvec[1][1] = c12 * c23 - s12 * s23 * s13 * exp(idelta);
162 fEvec[1][2] = s23 * c13;
163
164 fEvec[2][0] = s12 * s23 - c12 * c23 * s13 * exp(idelta);
165 fEvec[2][1] = -c12 * s23 - s12 * c23 * s13 * exp(idelta);
166 fEvec[2][2] = c23 * c13;
167
168 fEval[0] = 0;
169 fEval[1] = fDm[1] / (2 * kGeV2eV * fEnergy);
170 fEval[2] = fDm[2] / (2 * kGeV2eV * fEnergy);
171}
172
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 SetVacuumEigensystem()
Set the eigensystem to the analytic solution of the vacuum Hamiltonian.
Definition: PMNS_Fast.cxx:143
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
Definition: PMNS_Fast.cxx:100
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:62
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