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