16#include <Eigen/Eigenvalues>
34 SetNUNM(0., 0., 0., 0., 0., 0.);
60 double alpha_22,
double alpha_32,
double alpha_33)
97 cerr <<
"WARNING: First argument should be larger or equal to second "
100 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
113 if (i == j) { h = 1. + val; }
115 h *=
complexD(cos(phase), sin(phase));
118 bool isSame = (
Alpha(i, j) == h);
143 cerr <<
"WARNING: First argument should be smaller or equal to second "
146 <<
"Setting reverse order (Alpha_" << j << i <<
"). " << endl;
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;
267 assert(nflvi <= fNumNus && nflvi >= 0);
268 assert(nflvf <= fNumNus && nflvf >= 0);
277 for (
int j = 0; j < nflvi; j++) {
284 for (
int i = 0; i < int(
fNuPaths.size()); i++) {
285 for (
int flvi = 0; flvi < nflvi; flvi++) {
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]);
311 for (
int i = 0; i <
fNumNus; ++i) {
327 for (
int i = 0; i < 3; ++i) {
358 for (
int i = 0; i < 3; ++i) {
359 for (
int j = 0; j < i + 1; ++j) {
361 1 / std::sqrt(
X(i, i).real());
397 kK2 * M_SQRT2 *
kGf * rho * zoa;
398 double kr2GNn =
kK2 * M_SQRT2 *
kGf * rho * (1. - zoa) / 2. *
403 for (
int i = 0; i <
fNumNus; i++) {
404 if (!
fIsNuBar) {
V(i, i) = -1. * kr2GNn; }
408 for (
int j = 0; j <
fNumNus; j++) {
412 Ham(i, j) = conj(
fHms[i][j]) / lv;
428 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.