16#include <Eigen/Eigenvalues>
35 SetNUNM(0., 0., 0., 0., 0., 0.);
61 double alpha_22,
double alpha_32,
double alpha_33)
98 cerr <<
"WARNING: First argument should be larger or equal to second "
101 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
114 if (i == j) { h = 1. + val; }
116 h *=
complexD(cos(phase), sin(phase));
119 bool isSame = (
Alpha(i, j) == h);
144 cerr <<
"WARNING: First argument should be smaller or equal to second "
147 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
268 assert(nflvi <= fNumNus && nflvi >= 0);
269 assert(nflvf <= fNumNus && nflvf >= 0);
278 for (
int j = 0; j < nflvi; j++) {
285 for (
int i = 0; i < int(
fNuPaths.size()); i++) {
286 for (
int flvi = 0; flvi < nflvi; flvi++) {
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]);
312 for (
int i = 0; i <
fNumNus; ++i) {
328 for (
int i = 0; i < 3; ++i) {
359 for (
int i = 0; i < 3; ++i) {
360 for (
int j = 0; j < i + 1; ++j) {
362 1 / std::sqrt(
X(i, i).real());
398 kK2 * M_SQRT2 *
kGf * rho * zoa;
399 double kr2GNn =
kK2 * M_SQRT2 *
kGf * rho * (1. - zoa) / 2. *
404 for (
int i = 0; i <
fNumNus; i++) {
405 if (!
fIsNuBar) {
V(i, i) = -1. * kr2GNn; }
409 for (
int j = 0; j <
fNumNus; j++) {
413 Ham(i, j) = conj(
fHms[i][j]) / lv;
429 for (
int i = 0; i <
fNumNus; i++) {
virtual void Propagate()
Propagate neutrino through full path.
static const complexD zero
zero in complex
bool fIsNuBar
Anti-neutrino flag.
vectorC fNuState
The neutrino current state.
int fNumNus
Number of neutrino flavours.
std::vector< NuPath > fNuPaths
Vector of neutrino paths.
double fEnergy
Neutrino energy.
static const double kK2
mol/GeV^2/cm^3 to eV
virtual void PropagatePath(NuPath p)
Propagate neutrino through a single path.
matrixC fHms
matrix H*2E in eV^2
bool fGotES
Tag to avoid recalculating eigensystem.
static const double kGf
G_F in units of GeV^-2.
NuPath fPath
Current neutrino path.
virtual void ResetToFlavour(int flv)
Reset neutrino state to pure flavour flv.
virtual void ClearCache()
Clear the cache.
static const double kGeV2eV
GeV to eV.
virtual void SetStdPath()
Set standard neutrino path.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
complexD fHam[3][3]
The full hamiltonian.
virtual void SetAlpha_21(double a, double phi)
Set alpha_21 parameter.
virtual void SetFracVnc(double f)
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.
virtual void SetAlpha_31(double a, double phi)
Set alpha_31 parameter.
virtual void SetAlpha(int i, int j, double val, double phase)
Set any given NUNM parameter.
Eigen::Matrix< std::complex< double >, 3, 3 > Alpha
virtual matrixD ProbMatrix(int nflvi, int nflvf)
Eigen::Matrix< std::complex< double >, 3, 3 > Ham
virtual void SetAlpha_11(double a)
Set alpha_11 parameter.
virtual ~PMNS_NUNM()
Destructor.
virtual void PropagatePath(NuPath p)
Eigen::Matrix< std::complex< double >, 3, 3 > X
virtual void SetIsOscProbAvg(bool isOscProbAvg)
Deactivate Maltoni.
virtual void SetAlpha_32(double a, double phi)
Set alpha_32 parameter.
vectorC ApplyAlphaDagger(vectorC fState)
virtual void SetAlpha_22(double a)
Set alpha_22 parameter.
virtual complexD GetAlpha(int i, int j)
Get any given NUNM parameter.
virtual void SetAlpha_33(double a)
Set alpha_33 parameter.
Eigen::Matrix< std::complex< double >, 3, 3 > V
vectorC ApplyAlpha(vectorC fState)
Some useful general definitions.
std::complex< double > complexD
std::vector< complexD > vectorC
std::vector< double > vectorD
std::vector< vectorD > matrixD
std::vector< vectorC > matrixC
A struct representing a neutrino path segment.
double density
The density of the path segment in g/cm^3.
double zoa
The effective Z/A value of the path segment.