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