Belle II Software  release-06-02-00
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 19 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 22 of file test_std_pi0s.py.

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

◆ test_all_list()

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

Definition at line 85 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 139 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 55 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 71 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 89 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 143 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 93 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 153 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 97 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 163 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 101 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 173 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 112 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 105 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 183 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 129 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 122 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 194 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 51 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 205 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 215 of file test_std_pi0s.py.


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