16#include <Eigen/Eigenvalues>
33 SetNUNM(0., 0., 0., 0., 0., 0.);
59 double alpha_22,
double alpha_32,
double alpha_33)
96 cerr <<
"WARNING: First argument should be larger or equal to second "
99 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
112 if (i == j) { h = 1. + val; }
114 h *=
complexD(cos(phase), sin(phase));
117 bool isSame = (
Alpha(i, j) == h);
142 cerr <<
"WARNING: First argument should be smaller or equal to second "
145 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
266 assert(nflvi <= fNumNus && nflvi >= 0);
267 assert(nflvf <= fNumNus && nflvf >= 0);
276 for (
int j = 0; j < nflvi; j++) {
283 for (
int i = 0; i < int(
fNuPaths.size()); i++) {
284 for (
int flvi = 0; flvi < nflvi; flvi++) {
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]);
310 for (
int i = 0; i <
fNumNus; ++i) {
326 for (
int i = 0; i < 3; ++i) {
357 for (
int i = 0; i < 3; ++i) {
358 for (
int j = 0; j < i + 1; ++j) {
360 1 / std::sqrt(
X(i, i).real());
396 kK2 * M_SQRT2 *
kGf * rho * zoa;
397 double kr2GNn =
kK2 * M_SQRT2 *
kGf * rho * (1. - zoa) / 2. *
402 for (
int i = 0; i <
fNumNus; i++) {
403 if (!
fIsNuBar) {
V(i, i) = -1. * kr2GNn; }
407 for (
int j = 0; j <
fNumNus; j++) {
411 Ham(i, j) = conj(
fHms[i][j]) / lv;
427 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 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.