HPS-MC
test_func.py
Go to the documentation of this file.
1 import unittest
2 import hpsmc.func
3 
4 
5 class TestLint(unittest.TestCase):
6 
7  def test_lint_1pt1(self):
8  res = 6.306e-14 * 0.0004062 * 625
9  self.assertEqual(hpsmc.func.lint(0.0004062, 625), res)
10 
11  def test_lint_1pt92(self):
12  res = 6.306e-14 * 0.0008 * 875
13  self.assertEqual(hpsmc.func.lint(0.0008, 875), res)
14 
15  def test_lint_1pt05(self):
16  res = 6.306e-14 * 0.0004062 * 625
17  self.assertEqual(hpsmc.func.lint(0.0004062, 625), res)
18 
19  def test_lint_2pt2(self):
20  res = 6.306e-14 * 0.0004062 * 2500
21  self.assertEqual(hpsmc.func.lint(0.0004062, 2500), res)
22 
23  def test_lint_2pt3(self):
24  res = 6.306e-14 * 0.0004062 * 2500
25  self.assertEqual(hpsmc.func.lint(0.0004062, 2500), res)
26 
27  def test_lint_3pt7(self):
28  res = 6.306e-14 * 0.002 * 1500
29  self.assertEqual(hpsmc.func.lint(0.002, 1500), res)
30 
31  def test_lint_3pt74(self):
32  res = 6.306e-14 * 0.000875 * 625
33  self.assertEqual(hpsmc.func.lint(0.000875, 625), res)
34 
35  def test_lint_3pt742(self):
36  res = 6.306e-14 * 0.002 * 1500
37  self.assertEqual(hpsmc.func.lint(0.002, 1500), res)
38 
39  def test_lint_4pt4(self):
40  res = 6.306e-14 * 0.0004062 * 5000
41  self.assertEqual(hpsmc.func.lint(0.0004062, 5000), res)
42 
43  def test_lint_4pt55(self):
44  res = 6.306e-14 * 0.002 * 1500
45  self.assertEqual(hpsmc.func.lint(0.002, 1500), res)
46 
47  def test_lint_6pt6(self):
48  res = 6.306e-14 * 0.000875 * 5625
49  self.assertEqual(hpsmc.func.lint(0.000875, 5625), res)
50 
51 
52 if __name__ == '__main__':
53  unittest.main()
def test_lint_3pt74(self)
Definition: test_func.py:31
def test_lint_2pt3(self)
Definition: test_func.py:23
def test_lint_4pt55(self)
Definition: test_func.py:43
def test_lint_2pt2(self)
Definition: test_func.py:19
def test_lint_1pt92(self)
Definition: test_func.py:11
def test_lint_6pt6(self)
Definition: test_func.py:47
def test_lint_3pt742(self)
Definition: test_func.py:35
def test_lint_3pt7(self)
Definition: test_func.py:27
def test_lint_1pt05(self)
Definition: test_func.py:15
def test_lint_1pt1(self)
Definition: test_func.py:7
def test_lint_4pt4(self)
Definition: test_func.py:39
Miscellaneous math functions.
Definition: func.py:1
def lint(target_dz, num_electrons, density=6.306e-14)
Calculate integrated luminosity.
Definition: func.py:9