Belle II Software  light-2403-persian
TestStdV0 Class Reference
Inheritance diagram for TestStdV0:
Collaboration diagram for TestStdV0:

Public Member Functions

def test_stdkshorts_list (self)
 
def test_belle_list (self)
 
def test_stdlambdas_list (self)
 
def test_kshort_signals (self)
 

Private Member Functions

def _check_list (self, std_function=stdV0s.stdKshorts, expected_modules=["ParticleLoader", "ParticleListManipulator", "TreeFitter", "ParticleSelector", "ParticleLoader", "ParticleCombiner", "TreeFitter", "ParticleSelector", "ParticleListManipulator"], expected_lists=['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged'])
 

Detailed Description

Test case for standard V0 lists

Definition at line 21 of file test_std_v0.py.

Member Function Documentation

◆ _check_list()

def _check_list (   self,
  std_function = stdV0s.stdKshorts,
  expected_modules = [                 "ParticleLoader",                 "ParticleListManipulator",                 "TreeFitter",                 "ParticleSelector",                 "ParticleLoader",                 "ParticleCombiner",                 "TreeFitter",                 "ParticleSelector",                 "ParticleListManipulator"],
  expected_lists = ['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged'] 
)
private
check that a given function works

Definition at line 24 of file test_std_v0.py.

37  expected_lists=['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged']):
38  """check that a given function works"""
39  testpath = create_path()
40  std_function(path=testpath)
41 
42  loaded_modules = []
43  built_lists = []
44  for module in testpath.modules():
45  loaded_modules.append(module.type())
46  for param in module.available_params():
47  if module.type() == 'ParticleLoader' and param.name == 'decayStrings':
48  name = param.values[0].split(':')[1].split(' -> ')[0]
49  built_lists.append(name)
50  if module.type() == 'ParticleListManipulator' and param.name == 'outputListName':
51  name = str(param.values).split(':')[1].split(' -> ')[0]
52  built_lists.append(name)
53  if module.type() == 'ParticleCombiner' and param.name == 'decayString':
54  name = param.values.split(':')[1].split(' -> ')[0]
55  built_lists.append(name)
56 
57  # Check that we load the correct modules
58  self.assertListEqual(
59  loaded_modules, expected_modules,
60  f"Loaded modules do not match the expected ones (function {std_function.__name__})")
61 
62  # Check that we load the correct particle lists
63  self.assertListEqual(
64  built_lists, expected_lists,
65  f"Built particles lists do not match the expected ones (function {std_function.__name__})")
66 

◆ test_belle_list()

def test_belle_list (   self)
check that the builder function works with the legacy Belle Kshorts list

Definition at line 71 of file test_std_v0.py.

◆ test_kshort_signals()

def test_kshort_signals (   self)
check the number of signals in K_S0:merged and K_S0:scaled lists

Definition at line 100 of file test_std_v0.py.

◆ test_stdkshorts_list()

def test_stdkshorts_list (   self)
check that the builder function works with the stdKshorts list

Definition at line 67 of file test_std_v0.py.

◆ test_stdlambdas_list()

def test_stdlambdas_list (   self)
check that the builder function works with the stdLambdas list

Definition at line 81 of file test_std_v0.py.


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