12This is a log-type unit test on compatibility of the ROE and the reconstructed
13V0 objects created by V0Finder. It runs over a mdst file which contains two muons,
14converted gamma, K_S0 and Lambda0. It uses two muons as a signal side, so ROE should
15contain only 3 V0 objects. The mdst file was generated by scripts in the
16external repository: https://gitlab.desy.de/belle2/software/examples-data-creation/roe-unittest-mc
17There is no larger equivalent of this test.
21from basf2
import set_random_seed, create_path, process
25set_random_seed(
"1337")
27fsp_signal_side =
'mu+'
31testpath = create_path()
32testpath.add_module(
'RootInput', inputFileNames=testinput)
33testpath.add_module(
'ParticleLoader', decayStrings=[fsp_signal_side])
34testpath.add_module(
'ParticleListManipulator', outputListName=fsp_signal_side,
35 inputListNames=[fsp_signal_side +
':all'], cut=
'isSignal == 1')
36testpath.add_module(
'ParticleLoader', decayStrings=[fsp_tag_side])
37testpath.add_module(
'ParticleListManipulator', outputListName=fsp_tag_side, inputListNames=[fsp_tag_side +
':all'])
38testpath.add_module(
'ParticleStats', particleLists=[fsp_signal_side])
40signal_side_name =
'B0'
41testpath.add_module(
'ParticleCombiner',
42 decayString=signal_side_name +
' -> mu+ mu-',
45testpath.add_module(
'RestOfEventBuilder', particleList=signal_side_name,
46 particleListsInput=[fsp_tag_side])
47mask = (
'cleanMask',
'',
'',
'')
48testpath.add_module(
'RestOfEventInterpreter', particleList=signal_side_name,
52roe_path = create_path()
54v0list = [
'gamma:conv -> e+ e-',
57cut =
"daughter(0, isSignal) > 0 and daughter(1, isSignal) >0"
59 roe_path.add_module(
'ParticleLoader', decayStrings=[v0], addDaughters=
True)
60 roe_path.add_module(
'ParticleListManipulator', outputListName=v0.split()[0],
61 inputListNames=[v0.split()[0].split(
":")[0] +
':V0'], cut=
'-0.1 < dM < 0.1')
62 roe_path.add_module(
'ParticleSelector',
63 decayString=v0.split(
' ->', 1)[0],
66 roe_path.add_module(
'RestOfEventUpdater',
67 particleList=v0.split(
' ->', 1)[0],
68 updateMasks=[mask[0]])
69roe_path.add_module(
'RestOfEventPrinter',
71 unpackComposites=
False,
73testpath.for_each(
'RestOfEvent',
'RestOfEvents', path=roe_path)
75testpath.add_module(
'ParticlePrinter', listName=signal_side_name, fullPrint=
False,
76 variables=[
'nROE_Composites(cleanMask)'])
def require_file(filename, data_type="", py_case=None)
def configure_logging_for_tests(user_replacements=None)