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