32 constexpr
double pow2(
double x) noexcept {
return x*x; }
50 const auto a11 = m0(0,0), a12 = m0(0,1), a22 = m0(1,1);
51 const auto c1 = a11 + a22;
52 const auto c2 = std::sqrt(pow2(a11) + 4*pow2(a12) - 2*a11*a22 + pow2(a22));
55 mh2_0L << 0.5*(c1 - c2), 0.5*(c1 + c2);
58 const auto b11 = m1(0,0), b12 = m1(0,1), b22 = m1(1,1);
59 const auto c3 = b11 + b22;
60 const auto c4 = (a11*b11 - a22*b11 + 4*a12*b12 - a11*b22 + a22*b22)/c2;
63 mh2_1L << 0.5*(c3 - c4), 0.5*(c3 + c4);
66 const auto d11 = m2(0,0), d12 = m2(0,1), d22 = m2(1,1);
67 const auto c5 = d11 + d22;
68 const auto c6 = 0.5*(pow2(b11) + 4*pow2(b12) - 2*b11*b22 + pow2(b22)
69 - pow2(c4) + 2*a11*d11 - 2*a22*d11 + 8*a12*d12
70 - 2*a11*d22 + 2*a22*d22)/c2;
73 mh2_2L << 0.5*(c5 - c6), 0.5*(c5 + c6);
76 const auto e11 = m3(0,0), e12 = m3(0,1), e22 = m3(1,1);
77 const auto c7 = e11 + e22;
78 const auto c8 = 0.5/c2*(
79 2*(4*b12*d12 + b11*(d11 - d22) + b22*(-d11 + d22) + a11*e11 - a22*e11
80 + 4*a12*e12 - a11*e22 + a22*e22)
81 + (c4*(2*b11*b22 - 2*a11*d11 + 2*a22*d11 - 8*a12*d12 + 2*a11*d22
82 - 2*a22*d22 - pow2(b11) - 4*pow2(b12) - pow2(b22) + pow2(c4)))/c2);
85 mh2_3L << 0.5*(c7 - c8), 0.5*(c7 + c8);
87 return std::make_tuple(mh2_0L, mh2_1L, mh2_2L, mh2_3L);
Contains routines to diagonalize mass matrices.
std::tuple< V2, V2, V2, V2 > fs_diagonalize_hermitian_perturbatively(const RM22 &m0, const RM22 &m1, const RM22 &m2, const RM22 &m3)
Eigen::Matrix2d RM22
real 2x2 matrix
Eigen::Vector2d V2
real 2-vector