Пример #1
0
 def test_vreal(self):
     m2 = 7812
     Lambda = 0.258
     C = {k: 0 for k in ['phiD', 'phiBox']}
     C['phi'] = 1e-6
     with self.assertRaises(ValueError):
         smpar.m2Lambda_to_vMh2(m2, Lambda, C)
Пример #2
0
 def test_vMh2_positive(self):
     v = 246
     Mh2 = 125**2
     m2 = 7812
     Lambda = 0.258
     C = {k: 0 for k in ['phi', 'phiBox', 'phiD']}
     with self.assertRaises(ValueError):
         smpar.vMh2_to_m2Lambda(-v, Mh2, C)
     with self.assertRaises(ValueError):
         smpar.vMh2_to_m2Lambda(v, -Mh2, C)
     with self.assertRaises(ValueError):
         smpar.m2Lambda_to_vMh2(-m2, -Lambda, C)
     with self.assertRaises(ValueError):
         smpar.m2Lambda_to_vMh2(m2, -Lambda, C)
Пример #3
0
 def test_general(self):
     v = 246
     Mh2 = 125**2
     C = {k: np.random.rand() / 500**2 for k in ['phi', 'phiBox', 'phiD']}
     d = smpar.vMh2_to_m2Lambda(v, Mh2, C)
     d2 = smpar.m2Lambda_to_vMh2(d['m2'], d['Lambda'], C)
     self.assertAlmostEqual(d2['v'], v, places=6)
     self.assertAlmostEqual(d2['Mh2'], Mh2, places=6)
Пример #4
0
 def test_sm(self):
     v = 246
     Mh2 = 125**2
     C = {k: 0 for k in ['phi', 'phiBox', 'phiD']}
     d = smpar.vMh2_to_m2Lambda(v, Mh2, C)
     d2 = smpar.m2Lambda_to_vMh2(d['m2'], d['Lambda'], C)
     self.assertAlmostEqual(d['m2'], Mh2 / 2)
     self.assertAlmostEqual(d['Lambda'], Mh2 / v**2)
     self.assertAlmostEqual(d2['v'], v)
     self.assertAlmostEqual(d2['Mh2'], Mh2)
Пример #5
0
 def test_negative_m2Lambda(self):
     v = 246
     Mh2 = 125**2
     C = {k: 0 for k in ['phi', 'phiD']}
     C['phiBox'] = 1e-5
     d = smpar.vMh2_to_m2Lambda(v, Mh2, C)  # m2 and Lambda negative
     d2 = smpar.m2Lambda_to_vMh2(d['m2'], d['Lambda'], C)
     self.assertAlmostEqual(d2['v'], v, places=6)
     self.assertAlmostEqual(d2['Mh2'], Mh2, places=6)
     C = {k: 0 for k in ['phiBox', 'phiD']}
     C['phi'] = -2e-6
     d = smpar.vMh2_to_m2Lambda(v, Mh2, C)  # Lambda negative
     d2 = smpar.m2Lambda_to_vMh2(d['m2'], d['Lambda'], C)
     self.assertAlmostEqual(d2['v'], v, places=6)
     self.assertAlmostEqual(d2['Mh2'], Mh2, places=6)
     C['phi'] = -3e-6
     d = smpar.vMh2_to_m2Lambda(v, Mh2, C)  # m2 and Lambda negative
     d2 = smpar.m2Lambda_to_vMh2(d['m2'], d['Lambda'], C)
     self.assertAlmostEqual(d2['v'], v, places=6)
     self.assertAlmostEqual(d2['Mh2'], Mh2, places=6)