Belle II Software  release-05-02-19
TestStdPhotons Class Reference
Inheritance diagram for TestStdPhotons:
Collaboration diagram for TestStdPhotons:

Public Member Functions

def test_nonsense_list (self)
 
def test_all_list (self)
 
def test_cdc_list (self)
 
def test_loose_list (self)
 
def test_default_list (self)
 
def test_tight_list (self)
 
def test_pi0eff60_Jan2020_list (self)
 
def test_pi0eff50_Jan2020_list (self)
 
def test_pi0eff40_Jan2020_list (self)
 
def test_pi0eff30_Jan2020_list (self)
 
def test_pi0eff20_Jan2020_list (self)
 
def test_pi0eff10_Jan2020_list (self)
 
def test_skim (self)
 
def test_belle (self)
 

Private Member Functions

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

Detailed Description

Test case for standard photon lists

Definition at line 9 of file test_std_photons.py.

Member Function Documentation

◆ _check_list()

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

Definition at line 12 of file test_std_photons.py.

12  def _check_list(self, listtype=None, std_function=stdPhotons.stdPhotons, expected_lists=["all"]):
13  """check that a given listtype function works"""
14  testpath = create_path()
15  if (std_function is stdPhotons.stdPhotons) and (listtype is not None):
16  std_function(listtype, path=testpath)
17  else:
18  std_function(path=testpath)
19 
20  # verify that we load only the list-creating modules
21  self.assertEqual(
22  len(testpath.modules()), len(expected_lists),
23  "List %s doesn't work with function %s" % (listtype, std_function.__name__))
24  self.assertTrue(all((module.type() == "ParticleLoader") or (module.type() == "ParticleListManipulator")
25  for module in testpath.modules()))
26 
27  #
28  built_list = []
29  for module in testpath.modules():
30  for param in module.available_params():
31  if param.name == 'decayStringsWithCuts':
32  name = param.values[0][0].split(':')[1]
33  built_list.append(name)
34  if param.name == 'outputListName':
35  name = str(param.values).split(':')[1]
36  built_list.append(name)
37 
38  # we have the particle lists we expect
39  for a, b in zip(built_list, expected_lists):
40  self.assertEqual(a, b, "Loaded list \'%s\' instead of \'%s\' with function %s" % (a, b, std_function.__name__))
41 

◆ test_all_list()

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

Definition at line 46 of file test_std_photons.py.

◆ test_belle()

def test_belle (   self)
check that the builder function works with the belle list

Definition at line 94 of file test_std_photons.py.

◆ test_cdc_list()

def test_cdc_list (   self)
check that the builder function works with the cdc list

Definition at line 50 of file test_std_photons.py.

◆ test_default_list()

def test_default_list (   self)
check that the builder function works with the default (loose) list

Definition at line 58 of file test_std_photons.py.

◆ test_loose_list()

def test_loose_list (   self)
check that the builder function works with the loose list

Definition at line 54 of file test_std_photons.py.

◆ test_nonsense_list()

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

Definition at line 42 of file test_std_photons.py.

◆ test_pi0eff10_Jan2020_list()

def test_pi0eff10_Jan2020_list (   self)
check that the builder function works with the pi0eff10_Jan2020 list

Definition at line 86 of file test_std_photons.py.

◆ test_pi0eff20_Jan2020_list()

def test_pi0eff20_Jan2020_list (   self)
check that the builder function works with the pi0eff20_Jan2020 list

Definition at line 82 of file test_std_photons.py.

◆ test_pi0eff30_Jan2020_list()

def test_pi0eff30_Jan2020_list (   self)
check that the builder function works with the pi0eff30_Jan2020 list

Definition at line 78 of file test_std_photons.py.

◆ test_pi0eff40_Jan2020_list()

def test_pi0eff40_Jan2020_list (   self)
check that the builder function works with the pi0eff40_Jan2020 list

Definition at line 74 of file test_std_photons.py.

◆ test_pi0eff50_Jan2020_list()

def test_pi0eff50_Jan2020_list (   self)
check that the builder function works with the pi0eff50_Jan2020 list

Definition at line 70 of file test_std_photons.py.

◆ test_pi0eff60_Jan2020_list()

def test_pi0eff60_Jan2020_list (   self)
check that the builder function works with the pi0eff60_Jan2020 list

Definition at line 66 of file test_std_photons.py.

◆ test_skim()

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

Definition at line 90 of file test_std_photons.py.

◆ test_tight_list()

def test_tight_list (   self)
check that the builder function works with the tight list

Definition at line 62 of file test_std_photons.py.


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