Should massless states raise negative squared mass error?

Report the bugs you found
Post Reply
JPEllis
Posts: 71
Joined: 28. Apr 2016, 10:34

Should massless states raise negative squared mass error?

Post by JPEllis » 5. Feb 2018, 07:09

Hi,

In the SPheno code generated by SARAH, there are certain comparison of the form:

Code: Select all

If mass_squared <= 0:
    warn about negative mass squared
    exit with error
which, unfortunately, causes massless particles to produce errors. Is that intentional or not? I'm suspecting it is not as other parts of the code do not raise any error for massless particles.

Here's a patch that fixes the issue by replacing less-than-or-equal comparison with less-than comparison if you want to include it.

Code: Select all

From 6d02e3fc73414387cf38927349b93a8f19610bdd Mon Sep 17 00:00:00 2001
From: JP-Ellis <josh@jpellis.me>
Date: Mon, 5 Feb 2018 16:15:22 +1100
Subject: [PATCH] Don't raise negative mass square errors on massless states

Signed-off-by: JP-Ellis <josh@jpellis.me>
---
 Package/SPheno/IncludeSPheno/SM/TreeLevelMasses_SM_HC.f90 | 6 +++---
 Package/SPheno/SPhenoLoopMasses.m                         | 2 +-
 Package/SPheno/SPhenoTreeMasses.m                         | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Package/SPheno/IncludeSPheno/SM/TreeLevelMasses_SM_HC.f90 b/Package/SPheno/IncludeSPheno/SM/TreeLevelMasses_SM_HC.f90
index 9c1cdb0..47a43d9 100644
--- a/Package/SPheno/IncludeSPheno/SM/TreeLevelMasses_SM_HC.f90
+++ b/Package/SPheno/IncludeSPheno/SM/TreeLevelMasses_SM_HC.f90
@@ -362,7 +362,7 @@ ZDR2(i1,:) = Conjg(phaseM) *ZDR2(i1,:)
       Call TerminateProgram 
     End If 
   If (Abs(MFd2(i1)).Le.MaxMassNumericalZero) MFd2(i1) = Abs(MFd2(i1))+1.E-10_dp 
-  If (MFd2(i1).Le.0._dp) Then 
+  If (MFd2(i1).Lt.0._dp) Then
     If (ErrorLevel.Ge.0) Then 
       Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) 
       Write(10,*) 'a mass squarred is negative: ',i1,MFd2(i1) 
@@ -501,7 +501,7 @@ ZUR2(i1,:) = Conjg(phaseM) *ZUR2(i1,:)
       Call TerminateProgram 
     End If 
   If (Abs(MFu2(i1)).Le.MaxMassNumericalZero) MFu2(i1) = Abs(MFu2(i1))+1.E-10_dp 
-  If (MFu2(i1).Le.0._dp) Then 
+  If (MFu2(i1).Lt.0._dp) Then
     If (ErrorLevel.Ge.0) Then 
       Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) 
       Write(10,*) 'a mass squarred is negative: ',i1,MFu2(i1) 
@@ -640,7 +640,7 @@ ZER2(i1,:) = Conjg(phaseM) *ZER2(i1,:)
       Call TerminateProgram 
     End If 
   If (Abs(MFe2(i1)).Le.MaxMassNumericalZero) MFe2(i1) = Abs(MFe2(i1))+1.E-10_dp 
-  If (MFe2(i1).Le.0._dp) Then 
+  If (MFe2(i1).Lt.0._dp) Then
     If (ErrorLevel.Ge.0) Then 
       Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) 
       Write(10,*) 'a mass squarred is negative: ',i1,MFe2(i1) 
diff --git a/Package/SPheno/SPhenoLoopMasses.m b/Package/SPheno/SPhenoLoopMasses.m
index 87eeba9..f5744fd 100755
--- a/Package/SPheno/SPhenoLoopMasses.m
+++ b/Package/SPheno/SPhenoLoopMasses.m
@@ -1679,7 +1679,7 @@ WriteString[sphenoLoop, "End if \n"];
 
 WriteString[sphenoLoop,MixingName<>"OS_p2(il,:) = "<>MixingName<>"_1L(il,:) \n "];
 
-WriteString[sphenoLoop, "  If (Eig(i1).Le.0._dp) Then \n"];
+WriteString[sphenoLoop, "  If (Eig(i1).Lt.0._dp) Then \n"];
 WriteString[sphenoLoop, "    If (ErrorLevel.Ge.0) Then \n"];
 WriteString[sphenoLoop, "      Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) \n"];
 WriteString[sphenoLoop, "      Write(10,*) 'a mass squarred is negative: ',i1,Eig(i1) \n"];
diff --git a/Package/SPheno/SPhenoTreeMasses.m b/Package/SPheno/SPhenoTreeMasses.m
index 46ba26b..cc85dae 100755
--- a/Package/SPheno/SPhenoTreeMasses.m
+++ b/Package/SPheno/SPhenoTreeMasses.m
@@ -1113,7 +1113,7 @@ WriteString[sphenoTree, "      Write(*,*) 'NaN appearing in '//NameOfUnit(Iname)
 WriteString[sphenoTree, "      Call TerminateProgram \n"];
 WriteString[sphenoTree, "    End If \n"];
 WriteString[sphenoTree, "  If ((Abs(Eig(i1)).Le.MaxMassNumericalZero).and.(Eig(i1).lt.0._dp)) Eig(i1) = Abs(Eig(i1))+1.E-10_dp \n"]; 
-WriteString[sphenoTree, "  If (Eig(i1).Le.0._dp) Then \n"];
+WriteString[sphenoTree, "  If (Eig(i1).Lt.0._dp) Then \n"];
 If[MassesForEffpot===False,
 WriteString[sphenoTree, "    If (ErrorLevel.Ge.0) Then \n"];
 WriteString[sphenoTree, "      Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) \n"];
@@ -1167,7 +1167,7 @@ WriteString[sphenoTree, "  phaseM = Sqrt( mat2(i1,i1) / Abs(mat2(i1,i1))) \n"];
 WriteString[sphenoTree, "  "<>MixingName<>"(i1,:)= phaseM * "<>MixingName<>"(i1,:) \n"];
 WriteString[sphenoTree, "End if \n"];
 WriteString[sphenoTree, "  If ((Abs(Eig(i1)).Le.MaxMassNumericalZero).and.(Eig(i1).lt.0._dp)) Eig(i1) = Abs(Eig(i1))+1.E-10_dp \n"]; 
-WriteString[sphenoTree, "  If (Eig(i1).Le.0._dp) Then \n"];
+WriteString[sphenoTree, "  If (Eig(i1).Lt.0._dp) Then \n"];
 If[MassesForEffpot===False,
 WriteString[sphenoTree, "    If (ErrorLevel.Ge.0) Then \n"];
 WriteString[sphenoTree, "      Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) \n"];
@@ -1342,7 +1342,7 @@ WriteString[sphenoTree, "      Write(*,*) 'NaN appearing in '//NameOfUnit(Iname)
 WriteString[sphenoTree, "      Call TerminateProgram \n"];
 WriteString[sphenoTree, "    End If \n"];
 WriteString[sphenoTree, "  If (Abs("<>Name<>"2(i1)).Le.MaxMassNumericalZero) "<>Name<>"2(i1) = Abs("<>Name<>"2(i1))+1.E-10_dp \n"]; 
-WriteString[sphenoTree, "  If ("<>Name<>"2(i1).Le.0._dp) Then \n"];
+WriteString[sphenoTree, "  If ("<>Name<>"2(i1).Lt.0._dp) Then \n"];
 If[MassesForEffpot===False,
 WriteString[sphenoTree, "    If (ErrorLevel.Ge.0) Then \n"];
 WriteString[sphenoTree, "      Write(10,*) 'Warning from Subroutine '//NameOfUnit(Iname) \n"];
-- 
josh@jpellis.me
Joshua Ellis jpellis.me

FStaub
Site Admin
Posts: 822
Joined: 13. Apr 2016, 14:05

Re: Should massless states raise negative squared mass error?

Post by FStaub » 6. Feb 2018, 13:17

Hi,

in most cases this should cause any problem because of the line before

Code: Select all

WriteString[sphenoTree,  "  If ((Abs(Eig(i1)).Le.MaxMassNumericalZero).and.(Eig(i1).lt.0._dp)) Eig(i1) = Abs(Eig(i1))+1.E-10_dp \n"]; 
which is there to catch also cases of tiny negative masses which are only numerical artifacts. Only for the loop masses this was missing.

Cheers,
Florian

Post Reply