54 cerr <<
"WARNING: Gamma_" << j << 1 <<
" must be positive. "
55 <<
"Setting it to absolute value of input: " << abs(val) << endl;
80 cerr <<
"WARNING: Gamma_32 must be positive. "
81 <<
"Setting it to absolute value of input: " << abs(gamma32) << endl;
84 double min32 = 0.25 *
fGamma[1];
87 min32 *= 1 - pow(
fGamma[0], 2);
89 min32 *= 1 + 3 * pow(
fGamma[0], 2);
91 if (gamma32 < min32) {
101 cerr <<
"WARNING: Impossible to have Gamma32 = " << gamma32
102 <<
" with current Gamma21 and theta parameters." << endl
103 <<
" Changing the value of cos(theta) to " <<
fGamma[0]
114 cerr <<
"WARNING: Imaginary Gamma31 found. "
115 <<
"Changing the value of cos(theta) to " <<
fGamma[0] << endl;
123 double get_gamma32 =
GetGamma(3, 2);
178 cerr <<
"WARNING: First argument should be larger than second argument"
180 <<
"Setting reverse order (Gamma_" << j << i <<
"). " << endl;
189 if (j == 1) {
return fGamma[i - 1]; }
211 if (x[0] < x[1] && x[0] < x[2]) {
224 else if (x[1] < x[2]) {
227 if (x[0] < x[2]) out[2] = 2;
236 if (x[0] < x[1]) out[2] = 1;
267 for (
int i = 0; i <
fNumNus; i++) idx[ev_idx[i]] = dm_idx[i];
276 for (
int j = 0; j <
fNumNus; j++) {
277 for (
int i = 0; i < j; i++) {
280 GetGamma(max(idx[i], idx[j]) + 1, min(idx[i], idx[j]) + 1) *
283 gamma_ij *=
kGeV2eV * lengthIneV;
285 double arg = (
fEval[i] -
fEval[j]) * lengthIneV;
287 fRho[i][j] *= exp(-gamma_ij) *
complexD(cos(arg), -sin(arg));
vectorI sort3(const vectorD &x)
int fNumNus
Number of neutrino flavours.
double fEnergy
Neutrino energy.
static const double kKm2eV
km to eV^-1
matrixC fEvec
Eigenvectors of the Hamiltonian.
vectorD fEval
Eigenvalues of the Hamiltonian.
virtual void SetCurPath(NuPath p)
Set the path currently in use by the class.
vectorD fDm
m^2_i - m^2_1 in vacuum
static const double kGeV2eV
GeV to eV.
virtual void PropagatePath(NuPath p)
Propagate neutrino through a single path.
double fPower
Stores the power index parameter.
virtual void SetGamma32(double val)
Set the parameter.
virtual void SetDecoAngle(double th)
Set the decoherence angle.
virtual ~PMNS_Deco()
Destructor.
virtual double GetDecoAngle()
Get the decoherence angle.
virtual double GetGamma(int i, int j)
Get any given decoherence parameter.
virtual double GetPower()
Get the power index.
virtual void SetGamma(int j, double val)
Set any given decoherence parameter.
double fGamma[3]
Stores each decoherence parameter.
virtual void SetPower(double n)
Set the power index.
Base class for methods based on density matrices.
virtual void RotateState(bool to_basis, matrixC U)
Rotate rho to/from a given basis.
matrixC fRho
The neutrino density matrix state.
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
#define THROW_ON_INVALID_ARG(condition,...)
Some useful general definitions.
std::vector< int > vectorI
std::complex< double > complexD
std::vector< double > vectorD
A struct representing a neutrino path segment.
double length
The length of the path segment in km.