Belle II Software  release-08-01-10
TestStdPi0s Class Reference
Inheritance diagram for TestStdPi0s:
Collaboration diagram for TestStdPi0s:

Public Member Functions

def test_nonsense_list (self)
 
def test_default_list_exists (self)
 
def test_default_list_works (self)
 
def test_all_list (self)
 
def test_eff10_May2020_list (self)
 
def test_eff20_May2020_list (self)
 
def test_eff30_May2020_list (self)
 
def test_eff40_May2020_list (self)
 
def test_eff50_May2020_nomcmatch_list (self)
 
def test_eff50_May2020_list (self)
 
def test_eff60_May2020_nomcmatch_list (self)
 
def test_eff60_May2020_list (self)
 
def test_allfit_list (self)
 
def test_eff10_May2020fit_list (self)
 
def test_eff20_May2020fit_list (self)
 
def test_eff30_May2020fit_list (self)
 
def test_eff40_May2020fit_list (self)
 
def test_eff50_May2020fit_list (self)
 
def test_eff60_May2020fit_list (self)
 
def test_skim (self)
 
def test_SkimHighEff (self)
 

Private Member Functions

def _check_list (self, listtype=None, std_function=stdPi0s.stdPi0s, expected_lists=["all"])
 

Detailed Description

Test case for standard pi0 lists

Definition at line 18 of file test_std_pi0s.py.

Member Function Documentation

◆ _check_list()

def _check_list (   self,
  listtype = None,
  std_function = stdPi0s.stdPi0s,
  expected_lists = ["all"] 
)
private
check that a given listtype function works

Definition at line 21 of file test_std_pi0s.py.

21  def _check_list(self, listtype=None, std_function=stdPi0s.stdPi0s, expected_lists=["all"]):
22  """check that a given listtype function works"""
23  testpath = create_path()
24  if (std_function is stdPi0s.stdPi0s) and (listtype is not None):
25  std_function(listtype, path=testpath)
26  else:
27  std_function(path=testpath)
28 
29  built_lists = []
30  for module in testpath.modules():
31  for param in module.available_params():
32  if module.type() == 'ParticleLoader' and param.name == 'decayStrings':
33  name = param.values[0].split(':')[1]
34  built_lists.append(name)
35  if module.type() == 'ParticleListManipulator' and param.name == 'outputListName':
36  name = str(param.values).split(':')[1]
37  built_lists.append(name)
38  if module.type() == 'ParticleCombiner' and param.name == 'decayString':
39  name = param.values.split(':')[1].split(' -> ')[0]
40  built_lists.append(name)
41 
42  # we have the particle lists we expect
43  for a, b in zip(built_lists, expected_lists):
44  self.assertEqual(a, b, f"Loaded list \'{a}\' instead of \'{b}\' with function {std_function.__name__}")
45 
46  print(list(built_lists))
47  result = map(lambda w1, w2: w1 == w2, built_lists, expected_lists)
48  print(list(result))
49 

◆ test_all_list()

def test_all_list (   self)
check that the builder function works with the all list

Definition at line 84 of file test_std_pi0s.py.

◆ test_allfit_list()

def test_allfit_list (   self)
check that the builder function works with the allFit list

Definition at line 138 of file test_std_pi0s.py.

◆ test_default_list_exists()

def test_default_list_exists (   self)
Check that the default list type is one of the lists in the cases that are checked for in :func:`stdPi0s.stdPi0s`.

This test relies on ``ValueError`` being raised for nonsense list types, which is tested by
:func:`test_nonsense_list`.  However, :func:`test_nonsense_list` doesn't ensure that the default list works, so
for that this test is needed.

Definition at line 54 of file test_std_pi0s.py.

◆ test_default_list_works()

def test_default_list_works (   self)
Check that the default list type works.

Definition at line 70 of file test_std_pi0s.py.

◆ test_eff10_May2020_list()

def test_eff10_May2020_list (   self)
check that the builder function works with the eff10_May2020 list

Definition at line 88 of file test_std_pi0s.py.

◆ test_eff10_May2020fit_list()

def test_eff10_May2020fit_list (   self)
check that the builder function works with the eff10_May2020Fit list

Definition at line 142 of file test_std_pi0s.py.

◆ test_eff20_May2020_list()

def test_eff20_May2020_list (   self)
check that the builder function works with the eff20_May2020 list

Definition at line 92 of file test_std_pi0s.py.

◆ test_eff20_May2020fit_list()

def test_eff20_May2020fit_list (   self)
check that the builder function works with the eff20_May2020Fit list

Definition at line 152 of file test_std_pi0s.py.

◆ test_eff30_May2020_list()

def test_eff30_May2020_list (   self)
check that the builder function works with the eff30_May2020 list

Definition at line 96 of file test_std_pi0s.py.

◆ test_eff30_May2020fit_list()

def test_eff30_May2020fit_list (   self)
check that the builder function works with the eff30_May2020Fit list

Definition at line 162 of file test_std_pi0s.py.

◆ test_eff40_May2020_list()

def test_eff40_May2020_list (   self)
check that the builder function works with the eff40_May2020 list

Definition at line 100 of file test_std_pi0s.py.

◆ test_eff40_May2020fit_list()

def test_eff40_May2020fit_list (   self)
check that the builder function works with the eff40_May2020Fit list

Definition at line 172 of file test_std_pi0s.py.

◆ test_eff50_May2020_list()

def test_eff50_May2020_list (   self)
check that the builder function works with the eff50_May2020 list

Definition at line 111 of file test_std_pi0s.py.

◆ test_eff50_May2020_nomcmatch_list()

def test_eff50_May2020_nomcmatch_list (   self)
check that the builder function works with the eff50_May2020_nomcmatch list

Definition at line 104 of file test_std_pi0s.py.

◆ test_eff50_May2020fit_list()

def test_eff50_May2020fit_list (   self)
check that the builder function works with the eff50_May2020Fit list

Definition at line 182 of file test_std_pi0s.py.

◆ test_eff60_May2020_list()

def test_eff60_May2020_list (   self)
check that the builder function works with the eff60_May2020 list

Definition at line 128 of file test_std_pi0s.py.

◆ test_eff60_May2020_nomcmatch_list()

def test_eff60_May2020_nomcmatch_list (   self)
check that the builder function works with the eff50_May2020_nomcmatch list

Definition at line 121 of file test_std_pi0s.py.

◆ test_eff60_May2020fit_list()

def test_eff60_May2020fit_list (   self)
check that the builder function works with the eff60_May2020Fit list

Definition at line 193 of file test_std_pi0s.py.

◆ test_nonsense_list()

def test_nonsense_list (   self)
check that the builder function raises a ValueError for a non-existing list name

Definition at line 50 of file test_std_pi0s.py.

◆ test_skim()

def test_skim (   self)
check that the builder function works with the skim list

Definition at line 204 of file test_std_pi0s.py.

◆ test_SkimHighEff()

def test_SkimHighEff (   self)
check that the builder function works with the skim list

Definition at line 214 of file test_std_pi0s.py.


The documentation for this class was generated from the following file: