Skip to content

Commit

Permalink
adding SLHA conversion function overloads for singlet fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jan 5, 2016
1 parent 4755333 commit 7d53a36
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/slha_io.hpp
Expand Up @@ -197,18 +197,30 @@ class SLHA_io {
static void convert_symmetric_fermion_mixings_to_slha(Eigen::Array<double, N, 1>&,
Eigen::Matrix<double, N, N>&);

static void convert_symmetric_fermion_mixings_to_slha(double&,
Eigen::Matrix<double, 1, 1>&);

template<int N>
static void convert_symmetric_fermion_mixings_to_slha(Eigen::Array<double, N, 1>&,
Eigen::Matrix<std::complex<double>, N, N>&);

static void convert_symmetric_fermion_mixings_to_slha(double&,
Eigen::Matrix<std::complex<double>, 1, 1>&);

template<int N>
static void convert_symmetric_fermion_mixings_to_hk(Eigen::Array<double, N, 1>&,
Eigen::Matrix<double, N, N>&);

static void convert_symmetric_fermion_mixings_to_hk(double&,
Eigen::Matrix<double, 1, 1>&);

template<int N>
static void convert_symmetric_fermion_mixings_to_hk(Eigen::Array<double, N, 1>&,
Eigen::Matrix<std::complex<double>, N, N>&);

static void convert_symmetric_fermion_mixings_to_hk(double&,
Eigen::Matrix<std::complex<double>, 1, 1>&);

private:
SLHAea::Coll data; ///< SHLA data
Modsel modsel; ///< data from block MODSEL
Expand Down Expand Up @@ -369,6 +381,11 @@ void SLHA_io::convert_symmetric_fermion_mixings_to_slha(Eigen::Array<double, N,
{
}

void SLHA_io::convert_symmetric_fermion_mixings_to_slha(double&,
Eigen::Matrix<double, 1, 1>&)
{
}

/**
* Converts the given vector of masses and the corresponding (complex)
* mixing matrix to SLHA convention: Matrix rows with non-zero
Expand Down Expand Up @@ -403,12 +420,38 @@ void SLHA_io::convert_symmetric_fermion_mixings_to_slha(Eigen::Array<double, N,
}
}

/**
* @param m mass
* @param z 1x1 mixing matrix
*/
void SLHA_io::convert_symmetric_fermion_mixings_to_slha(double& m,
Eigen::Matrix<std::complex<double>, 1, 1>& z)
{
// check if 1st row contains non-zero imaginary parts
if (!is_zero(Abs(Im(z(0,0))))) {
z(0,0) *= std::complex<double>(0.0,1.0);
m *= -1;
#ifdef ENABLE_DEBUG
if (!is_zero(Abs(Im(z(0,0))))) {
WARNING("Element (0,0) of the following fermion mixing matrix"
" contains entries which have non-zero real and imaginary"
" parts:\nZ = " << z);
}
#endif
}
}

template<int N>
void SLHA_io::convert_symmetric_fermion_mixings_to_hk(Eigen::Array<double, N, 1>&,
Eigen::Matrix<double, N, N>&)
{
}

void SLHA_io::convert_symmetric_fermion_mixings_to_hk(double&,
Eigen::Matrix<double, 1, 1>&)
{
}

/**
* Converts the given vector of masses and the corresponding (real)
* mixing matrix to Haber-Kane convention (Phys. Rept. 117 (1985)
Expand All @@ -429,6 +472,15 @@ void SLHA_io::convert_symmetric_fermion_mixings_to_hk(Eigen::Array<double, N, 1>
}
}

void SLHA_io::convert_symmetric_fermion_mixings_to_hk(double& m,
Eigen::Matrix<std::complex<double>, 1, 1>& z)
{
if (m < 0.) {
z(0,0) *= std::complex<double>(0.0,1.0);
m *= -1;
}
}

} // namespace flexiblesusy

#endif

0 comments on commit 7d53a36

Please sign in to comment.