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

BSMPT v3.0.8 pull request #180

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
692 changes: 11 additions & 681 deletions include/BSMPT/ThermalFunctions/NegativeBosonSpline.h

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions include/BSMPT/models/ClassPotentialOrigin.h
Original file line number Diff line number Diff line change
Expand Up @@ -1148,14 +1148,6 @@ class Class_Potential_Origin
virtual void Debugging(const std::vector<double> &input,
std::vector<double> &output) const = 0;

/**
* Checks if the tensors are correctly implemented. For this the fermion,
* quark and gauge boson masses are calculated and printed next to the values
* defined in SMparah.h
*/
void CheckImplementation(
const int &WhichMinimizer = Minimizer::WhichMinimizerDefault) const;

/**
* Find all possible sign combinations of the vevs under which the potential
* is invariant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <vector>

#include <BSMPT/minimizer/Minimizer.h>
#include <BSMPT/models/SMparam.h>

namespace BSMPT
Expand Down Expand Up @@ -63,5 +64,14 @@ TestResults CheckSymmetricTensorQuarks(
TestResults CheckSymmetricTensorGauge(
const std::vector<std::vector<std::vector<std::vector<double>>>> &Tensor);

/**
* Checks if the tensors are correctly implemented. For this the fermion,
* quark and gauge boson masses are calculated and printed next to the values
* defined in SMparah.h
*/
void CheckImplementation(
const Class_Potential_Origin &point,
const int &WhichMinimizer = Minimizer::WhichMinimizerDefault);

} // namespace ModelTests
} // namespace BSMPT
14 changes: 12 additions & 2 deletions include/BSMPT/transition_tracer/transition_tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,24 @@ class TransitionTracer

/**
* @brief Store the list of bounce solutions
*
*/
std::vector<BounceSolution> ListBounceSolution;

/**
* @brief output data storage
*/
output output_store;

/**
* @brief CheckMassRatio
* @param input
* @param vev
* @param temp
* @return maximal ratio
*/
double CheckMassRatio(const user_input &input,
const std::vector<double> &vec,
const double &temp) const;
};

} // namespace BSMPT
} // namespace BSMPT
55 changes: 43 additions & 12 deletions sh/prepareData_C2HDM.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
import pandas as pd
import sys

####### The parameters Type, Lambda1 to Lambda4, re_Lambda5, im_Lambda5, tanbeta and re_m12squared should have the label
####### of the corresponding parameter. With Seperator you have to tell which seperator your data file
####### The parameters Type,Lambda1 to Lambda4,re_Lambda5,im_Lambda5, tanbeta and re_m12squared should have the label
####### of the corresponding parameter. With Seperator you have to tell which seperator your data file
####### is using (e.g. , \t or space). Your InputFILE will then be saved to OutputFILE.

def convert(InputFile, OutputFile):
print(f'Reading {InputFile}.')
print(f'Output is saved to {OutputFile}.')
Seperator = "\t"
InputFILE = "../example/C2HDM_Input.dat"
OutputFILE = "C2HDM_Ordered.dat"
Type = "Type"
Lambda1 = "L1"
Lambda2 = "L2"
Lambda3 = "L3"
Lambda4 = "L4"
re_Lambda5 = "re_L5"
im_Lambda5 = "im_L5"
tanbeta = "tbeta"
re_m12squared = "re_m12sq"

HasIndexCol=False
Separator='\t'
Expand All @@ -26,17 +35,39 @@ def convert(InputFile, OutputFile):
tanbeta='tbeta'
re_m12squared='re_m12sq'

with open(InputFile, 'r') as file:
df = pd.read_csv(file,index_col=HasIndexCol,sep=Separator)
def convert(IndexCol):
df = pd.DataFrame()
if IndexCol == "False":
df = pd.read_table(InputFILE, index_col=False, sep=Seperator)
else:
df = pd.read_table(InputFILE, index_col=int(IndexCol), sep=Seperator)

frontcol=[Type,Lambda1,Lambda2,Lambda3,Lambda4,re_Lambda5,im_Lambda5,re_m12squared,tanbeta]
frontcol = [
Type,
Lambda1,
Lambda2,
Lambda3,
Lambda4,
re_Lambda5,
im_Lambda5,
re_m12squared,
tanbeta,
]

Col = [c for c in frontcol if c in df] + [c for c in df if c not in frontcol]

df = df[Col]

with open(OutputFile, 'w') as file:
df.to_csv(file, index=False, sep='\t')
df.to_csv(OutputFILE, index=False, sep="\t")


parser = argparse.ArgumentParser()
parser.add_argument(
"-i",
"--indexcol",
help="Column which stores the index of your data",
default="False",
)

if __name__ == "__main__":
convert(sys.argv[1], sys.argv[2])
args = parser.parse_args()
convert(args.indexcol)
75 changes: 47 additions & 28 deletions sh/prepareData_N2HDM.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,62 @@
import pandas as pd
import argparse

####### The parameters Type,Lambda1 to Lambda8, tanbeta, m12squared and v_s should have the label of the
####### The parameters Type,Lambda1 to Lambda8, tanbeta, m12squared and v_s should have the label of the
####### corresponding parameter. With Seperator you have to tell which seperator your data file
####### is using (e.g. , \t or space). Your InputFILE will then be saved to OutputFILE.

Seperator='\t'
InputFILE='../example/N2HDM_Input.dat'
OutputFILE='N2HDM_Ordered.dat'
Type='p_THDMtype'
Lambda1='p_L1'
Lambda2='p_L2'
Lambda3='p_L3'
Lambda4='p_L4'
Lambda5='p_L5'
Lambda6='p_L6'
Lambda7='p_L7'
Lambda8='p_L8'
tanbeta='p_tbeta'
m12squared='p_m12sq'
vs='p_vs'
Seperator = "\t"
InputFILE = "../example/N2HDM_Input.dat"
OutputFILE = "N2HDM_Ordered.dat"
Type = "p_THDMtype"
Lambda1 = "p_L1"
Lambda2 = "p_L2"
Lambda3 = "p_L3"
Lambda4 = "p_L4"
Lambda5 = "p_L5"
Lambda6 = "p_L6"
Lambda7 = "p_L7"
Lambda8 = "p_L8"
tanbeta = "p_tbeta"
m12squared = "p_m12sq"
vs = "p_vs"

def convert(IndexCol):
df=pd.DataFrame()
if IndexCol == 'False':
df=pd.read_table(InputFILE,index_col=False,sep=Seperator)
else:
df=pd.read_table(InputFILE,index_col=int(IndexCol),sep=Seperator)
df = pd.DataFrame()
if IndexCol == "False":
df = pd.read_table(InputFILE, index_col=False, sep=Seperator)
else:
df = pd.read_table(InputFILE, index_col=int(IndexCol), sep=Seperator)

frontcol=[Type,Lambda1,Lambda2,Lambda3,Lambda4,Lambda5,Lambda6,Lambda7,Lambda8,vs,tanbeta,m12squared]
frontcol = [
Type,
Lambda1,
Lambda2,
Lambda3,
Lambda4,
Lambda5,
Lambda6,
Lambda7,
Lambda8,
vs,
tanbeta,
m12squared,
]

Col = [c for c in frontcol if c in df] + [c for c in df if c not in frontcol]
df=df[Col]
Col = [c for c in frontcol if c in df] + [c for c in df if c not in frontcol]
df = df[Col]

df.to_csv(OutputFILE, index=False, sep="\t")

df.to_csv(OutputFILE,index=False,sep='\t')

parser = argparse.ArgumentParser()
parser.add_argument('-i','--indexcol',help='Column which stores the index of your data', default='False')
parser.add_argument(
"-i",
"--indexcol",
help="Column which stores the index of your data",
default="False",
)

if __name__ == "__main__":
args = parser.parse_args()
convert(args.indexcol)
args = parser.parse_args()
convert(args.indexcol)
48 changes: 33 additions & 15 deletions sh/prepareData_R2HDM.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,53 @@
import pandas as pd
import sys

####### The parameters Type, Lambda1 to Lambda5, tanbeta and m12squared should have the label of the corresponding
####### The parameters Type,Lambda1 to Lambda5, tanbeta and m12squared should have the label of the corresponding
####### parameter. With Seperator you have to tell which seperator your data file
####### is using (e.g. , \t or space). Your InputFILE will then be saved to OutputFILE

def convert(InputFile, OutputFile):

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning

This assignment to 'convert' is unnecessary as it is
redefined
before this value is used.
print(f'Reading {InputFile}.')
print(f'Output is saved to {OutputFile}.')

HasIndexCol=False
Separator='\t'
Type='yuktype'
Lambda1='L1'
Lambda2='L2'
Lambda3='L3'
Lambda4='L4'
Lambda5='L5'
tanbeta='tbeta'
m12squared='m12sq'
Seperator = "\t"
InputFILE = "../example/R2HDM_Input.dat"
InputFILE = "wI.csv"
OutputFILE = "R2HDM_Ordered.dat"
Type = "yuktype"
Lambda1 = "L1"
Lambda2 = "L2"
Lambda3 = "L3"
Lambda4 = "L4"
Lambda5 = "L5"
tanbeta = "tbeta"
m12squared = "m12sq"

with open(InputFile, 'r') as file:
df = pd.read_csv(file,index_col=HasIndexCol,sep=Separator)

frontcol=[Type,Lambda1,Lambda2,Lambda3,Lambda4,Lambda5,m12squared,tanbeta]
def convert(IndexCol):
df = pd.DataFrame()
if IndexCol == "False":
df = pd.read_table(InputFILE, index_col=False, sep=Seperator)
else:
df = pd.read_table(InputFILE, index_col=int(IndexCol), sep=Seperator)

frontcol = [Type, Lambda1, Lambda2, Lambda3, Lambda4, Lambda5, m12squared, tanbeta]

Col = [c for c in frontcol if c in df] + [c for c in df if c not in frontcol]
df = df[Col]

with open(OutputFile, 'w') as file:
df.to_csv(file, index=False, sep='\t')
df.to_csv(OutputFILE, index=False, sep="\t")


parser = argparse.ArgumentParser()
parser.add_argument(
"-i",
"--indexcol",
help="Column which stores the index of your data",
default="False",
)

if __name__ == "__main__":
convert(sys.argv[1], sys.argv[2])
args = parser.parse_args()
convert(args.indexcol)
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

add_subdirectory(minimizer)
add_subdirectory(models)
add_subdirectory(models/modeltests)
if(BSMPTCompileBaryo)
add_subdirectory(baryo_calculation)
add_subdirectory(WallThickness)
Expand Down Expand Up @@ -46,7 +47,7 @@ target_link_libraries(TripleHiggsCouplingsNLO Models Utility)
target_compile_features(TripleHiggsCouplingsNLO PUBLIC cxx_std_17)

add_executable(Test prog/Test.cpp)
target_link_libraries(Test Minimizer Models Utility)
target_link_libraries(Test Minimizer Models ModelTests Utility)
target_compile_features(Test PUBLIC cxx_std_17)

add_executable(CalcGW prog/CalcGW.cpp)
Expand Down
Loading
Loading