Skip to content

Commit

Permalink
Merge branch 'development' into feature-SMtower
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Sep 2, 2016
2 parents 92e450b + dd32401 commit ddc393d
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 35 deletions.
2 changes: 1 addition & 1 deletion meta/FSMathLink.m
Expand Up @@ -134,7 +134,7 @@
];

ToUTF8String[s_] :=
StringJoin[("\\u0" <> IntegerString[#,16])& /@ ToCharacterCode[ToString[s]]];
StringJoin[("\\u" <> Utils`FSStringPadLeft[IntegerString[#,16], 4, "0"])& /@ ToCharacterCode[ToString[s]]];

ToValidWolframSymbolString[par_?CConversion`GreekQ] := ToUTF8String[par];
ToValidWolframSymbolString[par_] := ToString[par];
Expand Down
5 changes: 5 additions & 0 deletions meta/Utils.m
Expand Up @@ -84,6 +84,8 @@ occurrence of the given rule is replaced (if it exists) or added (if

FSImportString::usage = "Returns the content of a file in form of a string. If the file does not exist, \"unknown\" is returned.";

FSStringPadLeft::usage = "StringPadLeft[] for Mathematica 9 and below.";

Begin["`Private`"];

ApplyAndConcatenate[Func_, l_List] :=
Expand Down Expand Up @@ -152,6 +154,9 @@ occurrence of the given rule is replaced (if it exists) or added (if
]
];

FSStringPadLeft[str_String, width_, pad_String] :=
StringJoin[PadLeft[Characters[str], width, pad]];

ForceJoin[elem___] :=
Join[Sequence @@ Select[{elem}, (Head[#] === List)&]];

Expand Down
35 changes: 26 additions & 9 deletions src/mssm_twoloophiggs_impl.f
Expand Up @@ -5569,7 +5569,9 @@ function tauF1ab(t,A0,BL,T1,T2,s2t,c2t,cb,sb,q,mu)
Nc = 1d0

mu2 = mu**2
if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

tauF1ab =
$ (2.*BL*mu2/t*(mu2-BL+t)/delt(BL,mu2,t)
Expand Down Expand Up @@ -5608,7 +5610,9 @@ function tauF1c(t,A0,BL,T1,T2,s2t,c2t,cb,sb,q,mu)
Nc = 1d0

mu2 = mu**2
if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

Xt = s2t*(T1-T2)/2d0/Sqrt(t)
Yt = s2t*(T1-T2)/2d0/Sqrt(t) - mu/sb/cb
Expand Down Expand Up @@ -5721,7 +5725,9 @@ function tauF2c(t,A0,BL,T1,T2,s2t,c2t,cb,sb,q,mu)
Nc = 1d0

mu2 = mu**2
if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

Xt = s2t*(T1-T2)/2d0/Sqrt(t)
Yt = Xt - mu/cb/sb
Expand Down Expand Up @@ -5837,7 +5843,9 @@ function tauF3c(t,A0,BL,T1,T2,s2t,c2t,cb,sb,q,mu)
Nc = 1d0

mu2 = mu**2
if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

Xt = s2t*(T1-T2)/2d0/Sqrt(t)
Yt = Xt - mu/cb/sb
Expand Down Expand Up @@ -6316,12 +6324,16 @@ function tauFAc(t,A0,BL,T1,T2,s2t,c2t,cb,sb,q,mu)
Nc = 1d0

mu2 = mu**2
if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

Xt = s2t*(T1-T2)/2d0/Sqrt(t)
Yt = Xt - mu/cb/sb
At = sb**2*Xt+cb**2*Yt
if (At.eq.0d0) At=1d-10
if (At.eq.0d0) then
At=1d-10
endif

ct2 = (1d0+c2t)/2d0
st2 = (1d0-c2t)/2d0
Expand Down Expand Up @@ -6462,11 +6474,13 @@ subroutine tausqtad(t,A0,BL,T1,T2,st,ct,q,mu,tb,vv,

c ADDED by BEN: guards against NANs when sin theta is zero!
if (dabs(st).lt.1.0d-10) then
if (st.ge.0.0d0) st=1.0d-10
if (st.ge.0.0d0) then
st=1.0d-10
else
st=-1.0d-10
endif
ct = sqrt(1.d0-st*st)
endif
ct = sqrt(1.d0-st*st)
c end of addition by BEN 13/6/12

s2t = 2d0*ct*st
Expand Down Expand Up @@ -6523,12 +6537,15 @@ subroutine tautadfuncs(t,A0,BL,T1,T2,s2t,c2t,q,mu,sb,cb,F2l,G2l)
cb2 = cb**2
mu2 = mu**2

if(mu2.eq.0d0) mu2 = 1d-10
if (mu2.eq.0d0) then
mu2 = 1d-10
endif

Xt = s2t*(T1-T2)/2d0/Sqrt(t)
Yt = Xt - mu/cb/sb
At = sb2*Xt+cb2*Yt


F2l = (delt(mu2,t,T1)+2*mu2*t)/T1*phi(mu2,t,T1)
$ -(delt(mu2,t,T2)+2*mu2*t)/T2*phi(mu2,t,T2)
$ +A0*cb2*(2*Sqrt(t)+s2t*Yt)/4/s2t/T1/(T1-T2)*
Expand Down
26 changes: 16 additions & 10 deletions test/test_NMSSM.hpp
Expand Up @@ -5,6 +5,7 @@
#include "wrappers.hpp"
#include "ew_input.hpp"
#include "nmssmsoftsusy.h"
#include "conversion.hpp"
#include "NMSSM_two_scale_model.hpp"

using namespace flexiblesusy;
Expand All @@ -27,7 +28,7 @@ void setup_NMSSM_const(NMSSM<Two_scale>& m, NmssmSoftsusy& s, const NMSSM_input_
const double cosBeta = cos(atan(tanBeta));
const double M12 = input.m12;
const double m0 = input.m0;
const double a0 = input.Azero;
const double a0 = input.Azero + 100;
const double root2 = sqrt(2.0);
const double vev = 246.0;
const double vu = vev * sinBeta;
Expand All @@ -41,18 +42,23 @@ void setup_NMSSM_const(NMSSM<Two_scale>& m, NmssmSoftsusy& s, const NMSSM_input_
Yu_SS(3,3) = 165.0 * root2 / (vev * sinBeta);
Yd_SS(3,3) = 2.9 * root2 / (vev * cosBeta);
Ye_SS(3,3) = 1.77699 * root2 / (vev * cosBeta);
DoubleMatrix ID(3, 3), mm0_SS(3, 3);
for (int i=1; i<=3; i++) ID(i, i) = 1.0;
mm0_SS = ID * sqr(m0);
DoubleMatrix mm0_SS(3, 3), mm0_SSb(3, 3);
mm0_SS(1,1) = sqr(m0 + 0);
mm0_SS(2,2) = sqr(m0 + 1);
mm0_SS(3,3) = sqr(m0 + 2);
mm0_SSb(1,1) = sqr(m0 + 3);
mm0_SSb(2,2) = sqr(m0 + 4);
mm0_SSb(3,3) = sqr(m0 + 5);

Eigen::Matrix<double,3,3> Yu(Eigen::Matrix<double,3,3>::Zero()),
Yd(Eigen::Matrix<double,3,3>::Zero()),
Ye(Eigen::Matrix<double,3,3>::Zero()),
mm0(Eigen::Matrix<double,3,3>::Zero());
mm0, mm0b;
Yu(2,2) = 165.0 * root2 / (vev * sinBeta);
Yd(2,2) = 2.9 * root2 / (vev * cosBeta);
Ye(2,2) = 1.77699 * root2 / (vev * cosBeta);
mm0 = Sqr(m0) * Eigen::Matrix<double,3,3>::Identity();
mm0 = ToEigenMatrix(mm0_SS);
mm0b = ToEigenMatrix(mm0_SSb);

m.set_scale(scale);
m.set_loops(1);
Expand All @@ -69,9 +75,9 @@ void setup_NMSSM_const(NMSSM<Two_scale>& m, NmssmSoftsusy& s, const NMSSM_input_
m.set_MassWB(M12);
m.set_mq2(mm0);
m.set_ml2(mm0);
m.set_md2(mm0);
m.set_md2(mm0b);
m.set_mu2(mm0);
m.set_me2(mm0);
m.set_me2(mm0b);
m.set_mHd2(Sqr(m0));
m.set_mHu2(Sqr(m0));
m.set_ms2(Sqr(m0));
Expand Down Expand Up @@ -101,9 +107,9 @@ void setup_NMSSM_const(NMSSM<Two_scale>& m, NmssmSoftsusy& s, const NMSSM_input_
s.setGauginoMass(3, M12);
s.setSoftMassMatrix(mQl, mm0_SS);
s.setSoftMassMatrix(mUr, mm0_SS);
s.setSoftMassMatrix(mDr, mm0_SS);
s.setSoftMassMatrix(mDr, mm0_SSb);
s.setSoftMassMatrix(mLl, mm0_SS);
s.setSoftMassMatrix(mEr, mm0_SS);
s.setSoftMassMatrix(mEr, mm0_SSb);
s.setMh1Squared(sqr(m0));
s.setMh2Squared(sqr(m0));
s.setMsSquared(sqr(m0));
Expand Down
15 changes: 10 additions & 5 deletions test/test_NMSSM_ewsb.cpp
Expand Up @@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE( test_NMSSM_one_loop_ewsb )
const double vS_fs = m.get_vS();
const double ms2_fs = m.get_ms2();

BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 2.0e-9);
BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 2.1e-9);
BOOST_CHECK_CLOSE_FRACTION(vS_ss , vS_fs , 3.0e-8);
BOOST_CHECK_CLOSE_FRACTION(ms2_ss , ms2_fs , 5.0e-8);
}
Expand Down Expand Up @@ -215,9 +215,14 @@ BOOST_AUTO_TEST_CASE( test_NMSSM_two_loop_tadpoles )
const double tu_1_and_2loop_ss = s.displayTadpole2Ms();
const double ts_1_and_2loop_ss = s.displayTadpoleSMs();

BOOST_CHECK_CLOSE(two_loop_tadpole[0] / vd, td_1_and_2loop_ss - tadpole_ss_1, 1.0e-10);
BOOST_CHECK_CLOSE(two_loop_tadpole[1] / vu, tu_1_and_2loop_ss - tadpole_ss_2, 3.0e-11);
BOOST_CHECK_CLOSE(two_loop_tadpole[2] / vS, ts_1_and_2loop_ss - tadpole_ss_3, 1.0e-11);
// The following tests fail, because there are NaNs in the O(at*at)
// and O(atau*atau) 2L tadpoles. In this case Softsusy sets all
// tadpoles to 0. FlexibleSUSY sets only the ones to zero, which
// are NaN.

// BOOST_CHECK_CLOSE(two_loop_tadpole[0] / vd, td_1_and_2loop_ss - tadpole_ss_1, 1.0e-10);
// BOOST_CHECK_CLOSE(two_loop_tadpole[1] / vu, tu_1_and_2loop_ss - tadpole_ss_2, 3.0e-11);
// BOOST_CHECK_CLOSE(two_loop_tadpole[2] / vS, ts_1_and_2loop_ss - tadpole_ss_3, 1.0e-11);
}

BOOST_AUTO_TEST_CASE( test_NMSSM_two_loop_ewsb )
Expand Down Expand Up @@ -282,7 +287,7 @@ BOOST_AUTO_TEST_CASE( test_NMSSM_two_loop_ewsb )
const double vS_fs = m.get_vS();
const double ms2_fs = m.get_ms2();

BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 5.0e-9);
BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 5.5e-9);
BOOST_CHECK_CLOSE_FRACTION(vS_ss , vS_fs , 4.0e-8);
BOOST_CHECK_CLOSE_FRACTION(ms2_ss , ms2_fs , 8.0e-8);
}
18 changes: 9 additions & 9 deletions test/test_NMSSM_low_scale_constraint.cpp
Expand Up @@ -129,17 +129,17 @@ BOOST_AUTO_TEST_CASE( test_low_energy_constraint )
// from the last run) to calculate the Yukawa couplings.

BOOST_MESSAGE("testing diagonal yukawa elements");
BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(0,0), s.displayYukawaMatrix(YU)(1,1), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(0,0), s.displayYukawaMatrix(YD)(1,1), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(0,0), s.displayYukawaMatrix(YE)(1,1), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(0,0), s.displayYukawaMatrix(YU)(1,1), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(0,0), s.displayYukawaMatrix(YD)(1,1), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(0,0), s.displayYukawaMatrix(YE)(1,1), 0.005);

BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(1,1), s.displayYukawaMatrix(YU)(2,2), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(1,1), s.displayYukawaMatrix(YD)(2,2), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(1,1), s.displayYukawaMatrix(YE)(2,2), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(1,1), s.displayYukawaMatrix(YU)(2,2), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(1,1), s.displayYukawaMatrix(YD)(2,2), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(1,1), s.displayYukawaMatrix(YE)(2,2), 0.005);

BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(2,2), s.displayYukawaMatrix(YU)(3,3), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(2,2), s.displayYukawaMatrix(YD)(3,3), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(2,2), s.displayYukawaMatrix(YE)(3,3), 0.002);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yu()(2,2), s.displayYukawaMatrix(YU)(3,3), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Yd()(2,2), s.displayYukawaMatrix(YD)(3,3), 0.005);
BOOST_CHECK_CLOSE_FRACTION(m.get_Ye()(2,2), s.displayYukawaMatrix(YE)(3,3), 0.005);

BOOST_MESSAGE("testing running VEV");
const double running_vev = Sqrt(Sqr(m.get_vu()) + Sqr(m.get_vd()));
Expand Down
2 changes: 1 addition & 1 deletion test/test_NMSSM_self_energies.cpp
Expand Up @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE( test_NMSSM_self_energy_neutral_higgs )
const double vS_fs = m.get_vS();
const double ms2_fs = m.get_ms2();

BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 5.0e-9);
BOOST_CHECK_CLOSE_FRACTION(kappa_ss, kappa_fs, 5.5e-9);
BOOST_CHECK_CLOSE_FRACTION(vS_ss , vS_fs , 3.6e-8);
BOOST_CHECK_CLOSE_FRACTION(ms2_ss , ms2_fs , 7.5e-8);

Expand Down

0 comments on commit ddc393d

Please sign in to comment.