OscProb
PMNS_NUNM.cxx
Go to the documentation of this file.
1
2//
3// Implementation of Non Unitarity neutrino Mixing (NUNM) of neutrinos in matter
4// in a three-neutrino framework.
5//
6// This class inherits from the PMNS_Fast class.
7//
8// Authors:
9// cerisy\cppm.in2p3.fr
10// jcoelho\@apc.in2p3.fr
12
13#include "PMNS_NUNM.h"
14#include "Definitions.h"
15#include <Eigen/Dense>
16#include <Eigen/Eigenvalues>
17#include <iostream>
18
19using namespace OscProb;
20using namespace std;
21
22//.............................................................................
29PMNS_NUNM::PMNS_NUNM(int scale) : PMNS_Fast()
30{
31 fscale = scale;
32 SetStdPath();
33 SetNUNM(0., 0., 0., 0., 0., 0.);
34 SetFracVnc(1.0);
35 InitMatrix();
36}
37
38//.............................................................................
43
44//.............................................................................
58void PMNS_NUNM::SetNUNM(double alpha_11, double alpha_21, double alpha_31,
59 double alpha_22, double alpha_32, double alpha_33)
60{
61 SetAlpha(0, 0, alpha_11, 0);
62 SetAlpha(1, 1, alpha_22, 0);
63 SetAlpha(2, 2, alpha_33, 0);
64
65 SetAlpha(1, 0, alpha_21, 0);
66 SetAlpha(2, 0, alpha_31, 0);
67 SetAlpha(2, 1, alpha_32, 0);
68
69 // upper part fixed to zero from https://arxiv.org/pdf/2309.16942.pdf
70}
71
73{
74 Ham.setZero();
75 V.setZero();
76}
77
78//.............................................................................
93void PMNS_NUNM::SetAlpha(int i, int j, double val, double phase)
94{
95 if (i < j) {
96 cerr << "WARNING: First argument should be larger or equal to second "
97 "argument"
98 << endl
99 << "Setting reverse order (Alpha_" << j << i << "). " << endl;
100 int temp = i;
101 i = j;
102 j = temp;
103 }
104 if (i < 0 || i > 2 || j > i || j > 2) {
105 cerr << "WARNING: Alpha_" << i << j << " not valid for " << fNumNus
106 << " neutrinos. Doing nothing." << endl;
107 return;
108 }
109
110 complexD h = val;
111
112 if (i == j) { h = 1. + val; }
113 else {
114 h *= complexD(cos(phase), sin(phase));
115 }
116
117 bool isSame = (Alpha(i, j) == h);
118
119 if (!isSame) ClearCache();
120
121 fGotES *= isSame;
122
123 Alpha(i, j) = h;
124}
125
126//.............................................................................
140{
141 if (i < j) {
142 cerr << "WARNING: First argument should be smaller or equal to second "
143 "argument"
144 << endl
145 << "Setting reverse order (Alpha_" << j << i << "). " << endl;
146 int temp = i;
147 i = j;
148 j = temp;
149 }
150 if (i < 0 || i > 2 || j < i || j > 2) {
151 cerr << "WARNING: Eps_" << i << j << " not valid for " << fNumNus
152 << " neutrinos. Returning 0." << endl;
153 return zero;
154 }
155
156 return Alpha(i, j);
157}
158
159//.............................................................................
168void PMNS_NUNM::SetAlpha_11(double a) { SetAlpha(0, 0, a, 0); }
169
170//.............................................................................
179void PMNS_NUNM::SetAlpha_22(double a) { SetAlpha(1, 1, a, 0); }
180
181//.............................................................................
190void PMNS_NUNM::SetAlpha_33(double a) { SetAlpha(2, 2, a, 0); }
191
192//.............................................................................
202void PMNS_NUNM::SetAlpha_21(double a, double phi) { SetAlpha(1, 0, a, phi); }
203
204//.............................................................................
214void PMNS_NUNM::SetAlpha_31(double a, double phi) { SetAlpha(2, 0, a, phi); }
215
216//.............................................................................
226void PMNS_NUNM::SetAlpha_32(double a, double phi) { SetAlpha(2, 1, a, phi); }
227
228//.............................................................................
240{
241 bool isSame = (fracVnc == f);
242
243 if (!isSame) ClearCache();
244
245 fGotES *= isSame;
246
247 fracVnc = f;
248}
249
250//.............................................................................
264matrixD PMNS_NUNM::ProbMatrix(int nflvi, int nflvf)
265{
266 assert(nflvi <= fNumNus && nflvi >= 0);
267 assert(nflvf <= fNumNus && nflvf >= 0);
268
269 // Output probabilities
270 matrixD probs(nflvi, vectorD(nflvf));
271
272 // List of states
273 matrixC allstates(nflvi, vectorC(fNumNus));
274
275 // Reset all initial states
276 for (int j = 0; j < nflvi; j++) {
279 allstates[j] = fNuState;
280 }
281
282 // Propagate all states in parallel
283 for (int i = 0; i < int(fNuPaths.size()); i++) {
284 for (int flvi = 0; flvi < nflvi; flvi++) {
285 fNuState = allstates[flvi];
287 allstates[flvi] = fNuState;
288 }
289 }
290
291 // Get all probabilities
292 for (int flvi = 0; flvi < nflvi; flvi++) {
293 allstates[flvi] = ApplyAlpha(allstates[flvi]);
294 for (int flvj = 0; flvj < nflvf; flvj++) {
295 probs[flvi][flvj] = norm(allstates[flvi][flvj]);
296 }
297 }
298
299 return probs;
300}
301
302//.............................................................................
308{
309 fNuStateBuffer = fState;
310 for (int i = 0; i < fNumNus; ++i) {
311 fState[i] = conj(Alpha(0, i)) * fNuStateBuffer[0] +
312 conj(Alpha(1, i)) * fNuStateBuffer[1] +
313 conj(Alpha(2, i)) * fNuStateBuffer[2];
314 }
315 return fState;
316}
317
318//.............................................................................
324{
325 fNuStateBuffer = fState;
326 for (int i = 0; i < 3; ++i) {
327 fState[i] = Alpha(i, 0) * fNuStateBuffer[0] +
328 Alpha(i, 1) * fNuStateBuffer[1] +
329 Alpha(i, 2) * fNuStateBuffer[2];
330 }
331 return fState;
332}
333
334//.............................................................................
339{
343}
344
345//.............................................................................
353{
354 if (fscale == 1) { // test <------ // normalise mixing matrix in high scale
355 // scenario to ensure completeness
356 X = Alpha * Alpha.adjoint();
357 for (int i = 0; i < 3; ++i) {
358 for (int j = 0; j < i + 1; ++j) {
359 Alpha(i, j) *=
360 1 / std::sqrt(X(i, i).real()); // Scale by the inverse square root
361 // of the diagonal elements of X
362 }
363 }
364 }
366}
367
368//.............................................................................
389{
390 double rho = fPath.density;
391 double zoa = fPath.zoa;
392
393 double lv = 2 * kGeV2eV * fEnergy; // 2*E in eV
394
395 double kr2GNe =
396 kK2 * M_SQRT2 * kGf * rho * zoa; // Electron matter potential in eV
397 double kr2GNn = kK2 * M_SQRT2 * kGf * rho * (1. - zoa) / 2. *
398 fracVnc; // Neutron matter potential in eV
399
400 // Finish build Hamiltonian in matter with dimension of eV
401
402 for (int i = 0; i < fNumNus; i++) {
403 if (!fIsNuBar) { V(i, i) = -1. * kr2GNn; }
404 else {
405 V(i, i) = kr2GNn;
406 }
407 for (int j = 0; j < fNumNus; j++) {
408 if (!fIsNuBar)
409 Ham(i, j) = fHms[i][j] / lv;
410 else
411 Ham(i, j) = conj(fHms[i][j]) / lv;
412 }
413 }
414
415 if (!fIsNuBar) { V(0, 0) += kr2GNe; }
416 else {
417 V(0, 0) -= kr2GNe;
418 }
419
420 if (fscale == 0) {
421 Ham += Alpha.adjoint() * V * Alpha;
422 } // low scale scenario with mixing matrix part of larger unitary matrix
423 else if (fscale == 1) {
424 Ham += Alpha.inverse() * V * (Alpha.adjoint()).inverse();
425 } // high scale scenario with non unitary mixing matrix
426
427 for (int i = 0; i < fNumNus; i++) {
428 for (int j = 0; j < fNumNus; j++) { fHam[i][j] = Ham(i, j); }
429 }
430}
virtual void Propagate()
Propagate neutrino through full path.
Definition: PMNS_Base.cxx:1018
static const complexD zero
zero in complex
Definition: PMNS_Base.h:211
bool fIsNuBar
Anti-neutrino flag.
Definition: PMNS_Base.h:293
vectorC fNuState
The neutrino current state.
Definition: PMNS_Base.h:283
int fNumNus
Number of neutrino flavours.
Definition: PMNS_Base.h:277
std::vector< NuPath > fNuPaths
Vector of neutrino paths.
Definition: PMNS_Base.h:295
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 PropagatePath(NuPath p)
Propagate neutrino through a single path.
Definition: PMNS_Base.cxx:983
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
static const double kGf
G_F in units of GeV^-2.
Definition: PMNS_Base.h:220
NuPath fPath
Current neutrino path.
Definition: PMNS_Base.h:296
virtual void ResetToFlavour(int flv)
Reset neutrino state to pure flavour flv.
Definition: PMNS_Base.cxx:1034
virtual void ClearCache()
Clear the cache.
Definition: PMNS_Base.cxx:111
static const double kGeV2eV
GeV to eV.
Definition: PMNS_Base.h:217
virtual void SetStdPath()
Set standard neutrino path.
Definition: PMNS_Base.cxx:205
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
Definition: PMNS_Fast.h:40
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:62
virtual void SetAlpha_21(double a, double phi)
Set alpha_21 parameter.
Definition: PMNS_NUNM.cxx:202
virtual void SetFracVnc(double f)
Definition: PMNS_NUNM.cxx:239
void SetNUNM(double alpha_11, double alpha_21, double alpha_31, double alpha_22, double alpha_32, double alpha_33)
Set the NUNM parameters all at once.
Definition: PMNS_NUNM.cxx:58
virtual void SetAlpha_31(double a, double phi)
Set alpha_31 parameter.
Definition: PMNS_NUNM.cxx:214
virtual void SetAlpha(int i, int j, double val, double phase)
Set any given NUNM parameter.
Definition: PMNS_NUNM.cxx:93
Eigen::Matrix< std::complex< double >, 3, 3 > Alpha
Definition: PMNS_NUNM.h:74
virtual void Propagate()
Definition: PMNS_NUNM.cxx:338
virtual matrixD ProbMatrix(int nflvi, int nflvf)
Definition: PMNS_NUNM.cxx:264
Eigen::Matrix< std::complex< double >, 3, 3 > Ham
Definition: PMNS_NUNM.h:76
virtual void SetAlpha_11(double a)
Set alpha_11 parameter.
Definition: PMNS_NUNM.cxx:168
virtual ~PMNS_NUNM()
Destructor.
Definition: PMNS_NUNM.cxx:42
virtual void PropagatePath(NuPath p)
Definition: PMNS_NUNM.cxx:352
Eigen::Matrix< std::complex< double >, 3, 3 > X
Definition: PMNS_NUNM.h:73
virtual void SetAlpha_32(double a, double phi)
Set alpha_32 parameter.
Definition: PMNS_NUNM.cxx:226
vectorC ApplyAlphaDagger(vectorC fState)
Definition: PMNS_NUNM.cxx:307
virtual void SetAlpha_22(double a)
Set alpha_22 parameter.
Definition: PMNS_NUNM.cxx:179
virtual complexD GetAlpha(int i, int j)
Get any given NUNM parameter.
Definition: PMNS_NUNM.cxx:139
vectorC fNuStateBuffer
Definition: PMNS_NUNM.h:71
virtual void UpdateHam()
Definition: PMNS_NUNM.cxx:388
virtual void SetAlpha_33(double a)
Set alpha_33 parameter.
Definition: PMNS_NUNM.cxx:190
Eigen::Matrix< std::complex< double >, 3, 3 > V
Definition: PMNS_NUNM.h:75
vectorC ApplyAlpha(vectorC fState)
Definition: PMNS_NUNM.cxx:323
Some useful general definitions.
Definition: Absorption.h:6
std::complex< double > complexD
Definition: Definitions.h:21
std::vector< complexD > vectorC
Definition: Definitions.h:22
std::vector< double > vectorD
Definition: Definitions.h:18
std::vector< vectorD > matrixD
Definition: Definitions.h:19
std::vector< vectorC > matrixC
Definition: Definitions.h:23
Definition: EigenPoint.h:44
A struct representing a neutrino path segment.
Definition: NuPath.h:34
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