Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with negative TanBeta in R2HDM #104

Merged
merged 5 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.13)
project(
BSMPT
VERSION 2.5.0
VERSION 2.5.1
LANGUAGES C CXX
DESCRIPTION
"BSMPT - Beyond the Standard Model Phase Transitions : A C++ package for the computation of the EWPT in BSM models"
Expand Down
5 changes: 5 additions & 0 deletions src/models/ClassPotentialR2HDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ void Class_Potential_R2HDM::set_gen(const std::vector<double> &par)
C_SinBetaSquared = TanBeta * TanBeta * C_CosBetaSquared;
C_SinBeta = sqrt(C_SinBetaSquared);

if (TanBeta < 0) // for beta in 4th quadrant
{
C_SinBeta *= -1;
}

phbasler marked this conversation as resolved.
Show resolved Hide resolved
u1 = RealMMix * TanBeta -
C_vev0 * C_vev0 * C_SinBetaSquared * (L4 + RL5 + L3) / 0.2e1 -
C_vev0 * C_vev0 * C_CosBetaSquared * L1 / 0.2e1;
Expand Down
50 changes: 49 additions & 1 deletion tests/unittests/Test-r2hdm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using Approx = Catch::Approx;

#include <BSMPT/minimizer/Minimizer.h>
#include <BSMPT/models/ClassPotentialOrigin.h> // for Class_Potential_Origin
#include <BSMPT/models/ClassPotentialR2HDM.h>
#include <BSMPT/models/IncludeAllModels.h>
#include <BSMPT/models/ModelTestfunctions.h>

Expand All @@ -26,6 +27,16 @@ const std::vector<double> example_point_R2HDM{/* lambda_1 = */ 2.740595,
/* tan(beta) = */ 4.63286,
/* Yukawa Type = */ 1};

const std::vector<double> example_point_R2HDM_negTanBeta{
/* lambda_1 = */ 2.740595,
/* lambda_2 = */ 0.242356,
/* lambda_3 = */ 5.534491,
/* lambda_4 = */ -2.585467,
/* lambda_5 = */ -2.225991,
/* m_{12}^2 = */ -7738.56,
/* tan(beta) = */ -4.63286,
/* Yukawa Type = */ 1};

TEST_CASE("Checking NLOVEV for R2HDM", "[r2hdm]")
{
using namespace BSMPT;
Expand Down Expand Up @@ -82,6 +93,42 @@ TEST_CASE("Checking EWPT for R2HDM", "[r2hdm]")
}
}

TEST_CASE("Checking sign of SinBeta for pos. TanBeta", "[r2hdm]")

Check notice

Code scanning / CodeQL

Unused static function

Static function CATCH2_INTERNAL_TEST_4 is unreachable ([autoRegistrar5](1) must be removed at the same time)
{
using namespace BSMPT;
using namespace Models;
Class_Potential_R2HDM point;
point.set_gen(example_point_R2HDM);
REQUIRE(point.C_SinBeta >= 0);
}

TEST_CASE("Checking sign of SinBeta for neg. TanBeta", "[r2hdm]")

Check notice

Code scanning / CodeQL

Unused static function

Static function CATCH2_INTERNAL_TEST_6 is unreachable ([autoRegistrar7](1) must be removed at the same time)
{
using namespace BSMPT;
using namespace Models;
Class_Potential_R2HDM point;
point.set_gen(example_point_R2HDM_negTanBeta);
REQUIRE(point.C_SinBeta <= 0);
}

TEST_CASE("Checking sign of CosBeta for pos. TanBeta", "[r2hdm]")

Check notice

Code scanning / CodeQL

Unused static function

Static function CATCH2_INTERNAL_TEST_8 is unreachable ([autoRegistrar9](1) must be removed at the same time)
{
using namespace BSMPT;
using namespace Models;
Class_Potential_R2HDM point;
point.set_gen(example_point_R2HDM);
REQUIRE(point.C_CosBeta >= 0);
}

TEST_CASE("Checking sign of CosBeta for neg. TanBeta", "[r2hdm]")

Check notice

Code scanning / CodeQL

Unused static function

Static function CATCH2_INTERNAL_TEST_10 is unreachable ([autoRegistrar11](1) must be removed at the same time)
{
using namespace BSMPT;
using namespace Models;
Class_Potential_R2HDM point;
point.set_gen(example_point_R2HDM_negTanBeta);
REQUIRE(point.C_CosBeta >= 0);
}

TEST_CASE("Checking number of CT parameters for R2HDM", "[r2hdm]")
{
using namespace BSMPT;
Expand Down Expand Up @@ -242,7 +289,8 @@ TEST_CASE("Checking triple higgs NLO couplings in the R2HDM", "[r2hdm]")
modelPointer->Prepare_Triple();
modelPointer->TripleHiggsCouplings();

auto Check = [](auto result, auto expected) {
auto Check = [](auto result, auto expected)
{
if (std::abs(expected) > 1e-4)
{
REQUIRE(result == Approx(expected).epsilon(1e-4));
Expand Down