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 SetIsOscProbAvg(true);
32 fscale = scale;
33 SetStdPath();
34 SetNUNM(0., 0., 0., 0., 0., 0.);
35 SetFracVnc(1.0);
36 InitMatrix();
37}
38
39//.............................................................................
44
45//.............................................................................
59void PMNS_NUNM::SetNUNM(double alpha_11, double alpha_21, double alpha_31,
60 double alpha_22, double alpha_32, double alpha_33)
61{
62 SetAlpha(0, 0, alpha_11, 0);
63 SetAlpha(1, 1, alpha_22, 0);
64 SetAlpha(2, 2, alpha_33, 0);
65
66 SetAlpha(1, 0, alpha_21, 0);
67 SetAlpha(2, 0, alpha_31, 0);
68 SetAlpha(2, 1, alpha_32, 0);
69
70 // upper part fixed to zero from https://arxiv.org/pdf/2309.16942.pdf
71}
72
74{
75 Ham.setZero();
76 V.setZero();
77}
78
79//.............................................................................
94void PMNS_NUNM::SetAlpha(int i, int j, double val, double phase)
95{
96 if (i < j) {
97 cerr << "WARNING: First argument should be larger or equal to second "
98 "argument"
99 << endl
100 << "Setting reverse order (Alpha_" << j << i << "). " << endl;
101 int temp = i;
102 i = j;
103 j = temp;
104 }
105 if (i < 0 || i > 2 || j > i || j > 2) {
106 cerr << "WARNING: Alpha_" << i << j << " not valid for " << fNumNus
107 << " neutrinos. Doing nothing." << endl;
108 return;
109 }
110
111 complexD h = val;
112
113 if (i == j) { h = 1. + val; }
114 else {
115 h *= complexD(cos(phase), sin(phase));
116 }
117
118 bool isSame = (Alpha(i, j) == h);
119
120 if (!isSame) ClearCache();
121
122 fGotES *= isSame;
123
124 Alpha(i, j) = h;
125}
126
127//.............................................................................
141{
142 if (i < j) {
143 cerr << "WARNING: First argument should be smaller or equal to second "
144 "argument"
145 << endl
146 << "Setting reverse order (Alpha_" << j << i << "). " << endl;
147 int temp = i;
148 i = j;
149 j = temp;
150 }
151 if (i < 0 || i > 2 || j < i || j > 2) {
152 cerr << "WARNING: Eps_" << i << j << " not valid for " << fNumNus
153 << " neutrinos. Returning 0." << endl;
154 return zero;
155 }
156
157 return Alpha(i, j);
158}
159
160//.............................................................................
169void PMNS_NUNM::SetAlpha_11(double a) { SetAlpha(0, 0, a, 0); }
170
171//.............................................................................
180void PMNS_NUNM::SetAlpha_22(double a) { SetAlpha(1, 1, a, 0); }
181
182//.............................................................................
191void PMNS_NUNM::SetAlpha_33(double a) { SetAlpha(2, 2, a, 0); }
192
193//.............................................................................
203void PMNS_NUNM::SetAlpha_21(double a, double phi) { SetAlpha(1, 0, a, phi); }
204
205//.............................................................................
215void PMNS_NUNM::SetAlpha_31(double a, double phi) { SetAlpha(2, 0, a, phi); }
216
217//.............................................................................
227void PMNS_NUNM::SetAlpha_32(double a, double phi) { SetAlpha(2, 1, a, phi); }
228
229//.............................................................................
241{
242 bool isSame = (fracVnc == f);
243
244 if (!isSame) ClearCache();
245
246 fGotES *= isSame;
247
248 fracVnc = f;
249}
250
251//.............................................................................
265matrixD PMNS_NUNM::ProbMatrix(int nflvi, int nflvf)
266{
267 assert(nflvi <= fNumNus && nflvi >= 0);
268 assert(nflvf <= fNumNus && nflvf >= 0);
269
270 // Output probabilities
271 matrixD probs(nflvi, vectorD(nflvf));
272
273 // List of states
274 matrixC allstates(nflvi, vectorC(fNumNus));
275
276 // Reset all initial states
277 for (int j = 0; j < nflvi; j++) {
280 allstates[j] = fNuState;
281 }
282
283 // Propagate all states in parallel
284 for (int i = 0; i < int(fNuPaths.size()); i++) {
285 for (int flvi = 0; flvi < nflvi; flvi++) {
286 fNuState = allstates[flvi];
288 allstates[flvi] = fNuState;
289 }
290 }
291
292 // Get all probabilities
293 for (int flvi = 0; flvi < nflvi; flvi++) {
294 allstates[flvi] = ApplyAlpha(allstates[flvi]);
295 for (int flvj = 0; flvj < nflvf; flvj++) {
296 probs[flvi][flvj] = norm(allstates[flvi][flvj]);
297 }
298 }
299
300 return probs;
301}
302
303//.............................................................................
309{
310 fNuStateBuffer = fState;
311 for (int i = 0; i < fNumNus; ++i) {
312 fState[i] = conj(Alpha(0, i)) * fNuStateBuffer[0] +
313 conj(Alpha(1, i)) * fNuStateBuffer[1] +
314 conj(Alpha(2, i)) * fNuStateBuffer[2];
315 }
316 return fState;
317}
318
319//.............................................................................
325{
326 fNuStateBuffer = fState;
327 for (int i = 0; i < 3; ++i) {
328 fState[i] = Alpha(i, 0) * fNuStateBuffer[0] +
329 Alpha(i, 1) * fNuStateBuffer[1] +
330 Alpha(i, 2) * fNuStateBuffer[2];
331 }
332 return fState;
333}
334
335//.............................................................................
340{
344}
345
346//.............................................................................
354{
355 if (fscale == 1) { // test <------ // normalise mixing matrix in high scale
356 // scenario to ensure completeness
357 X = Alpha * Alpha.adjoint();
358 for (int i = 0; i < 3; ++i) {
359 for (int j = 0; j < i + 1; ++j) {
360 Alpha(i, j) *=
361 1 / std::sqrt(X(i, i).real()); // Scale by the inverse square root
362 // of the diagonal elements of X
363 }
364 }
365 }
367}
368
369//.............................................................................
390{
391 double rho = fPath.density;
392 double zoa = fPath.zoa;
393
394 double lv = 2 * kGeV2eV * fEnergy; // 2*E in eV
395
396 double kr2GNe =
397 kK2 * M_SQRT2 * kGf * rho * zoa; // Electron matter potential in eV
398 double kr2GNn = kK2 * M_SQRT2 * kGf * rho * (1. - zoa) / 2. *
399 fracVnc; // Neutron matter potential in eV
400
401 // Finish build Hamiltonian in matter with dimension of eV
402
403 for (int i = 0; i < fNumNus; i++) {
404 if (!fIsNuBar) { V(i, i) = -1. * kr2GNn; }
405 else {
406 V(i, i) = kr2GNn;
407 }
408 for (int j = 0; j < fNumNus; j++) {
409 if (!fIsNuBar)
410 Ham(i, j) = fHms[i][j] / lv;
411 else
412 Ham(i, j) = conj(fHms[i][j]) / lv;
413 }
414 }
415
416 if (!fIsNuBar) { V(0, 0) += kr2GNe; }
417 else {
418 V(0, 0) -= kr2GNe;
419 }
420
421 if (fscale == 0) {
422 Ham += Alpha.adjoint() * V * Alpha;
423 } // low scale scenario with mixing matrix part of larger unitary matrix
424 else if (fscale == 1) {
425 Ham += Alpha.inverse() * V * (Alpha.adjoint()).inverse();
426 } // high scale scenario with non unitary mixing matrix
427
428 for (int i = 0; i < fNumNus; i++) {
429 for (int j = 0; j < fNumNus; j++) { fHam[i][j] = Ham(i, j); }
430 }
431}
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:64
virtual void SetAlpha_21(double a, double phi)
Set alpha_21 parameter.
Definition: PMNS_NUNM.cxx:203
virtual void SetFracVnc(double f)
Definition: PMNS_NUNM.cxx:240
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:59
virtual void SetAlpha_31(double a, double phi)
Set alpha_31 parameter.
Definition: PMNS_NUNM.cxx:215
virtual void SetAlpha(int i, int j, double val, double phase)
Set any given NUNM parameter.
Definition: PMNS_NUNM.cxx:94
Eigen::Matrix< std::complex< double >, 3, 3 > Alpha
Definition: PMNS_NUNM.h:79
virtual void Propagate()
Definition: PMNS_NUNM.cxx:339
virtual matrixD ProbMatrix(int nflvi, int nflvf)
Definition: PMNS_NUNM.cxx:265
Eigen::Matrix< std::complex< double >, 3, 3 > Ham
Definition: PMNS_NUNM.h:81
virtual void SetAlpha_11(double a)
Set alpha_11 parameter.
Definition: PMNS_NUNM.cxx:169
virtual ~PMNS_NUNM()
Destructor.
Definition: PMNS_NUNM.cxx:43
virtual void PropagatePath(NuPath p)
Definition: PMNS_NUNM.cxx:353
Eigen::Matrix< std::complex< double >, 3, 3 > X
Definition: PMNS_NUNM.h:78
virtual void SetIsOscProbAvg(bool isOscProbAvg)
Deactivate Maltoni.
Definition: PMNS_NUNM.h:61
virtual void SetAlpha_32(double a, double phi)
Set alpha_32 parameter.
Definition: PMNS_NUNM.cxx:227
vectorC ApplyAlphaDagger(vectorC fState)
Definition: PMNS_NUNM.cxx:308
virtual void SetAlpha_22(double a)
Set alpha_22 parameter.
Definition: PMNS_NUNM.cxx:180
virtual complexD GetAlpha(int i, int j)
Get any given NUNM parameter.
Definition: PMNS_NUNM.cxx:140
vectorC fNuStateBuffer
Definition: PMNS_NUNM.h:76
virtual void UpdateHam()
Definition: PMNS_NUNM.cxx:389
virtual void SetAlpha_33(double a)
Set alpha_33 parameter.
Definition: PMNS_NUNM.cxx:191
Eigen::Matrix< std::complex< double >, 3, 3 > V
Definition: PMNS_NUNM.h:80
vectorC ApplyAlpha(vectorC fState)
Definition: PMNS_NUNM.cxx:324
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