5 A clone of the test of the ROE-related module tests using a larger test file (mdst12.root)
6 this is not present on the bamboo server so this test only runs on buildbot or
7 wherever the validation-data are visible (it's also a bit slower).
11 from basf2
import set_random_seed, create_path, process
16 set_random_seed(
"1337")
17 fsps = [
'K-',
'pi-',
'gamma',
'K_L0']
21 testpath = create_path()
22 testpath.add_module(
'RootInput', inputFileNames=inputFile)
24 testpath.add_module(
'ParticleLoader', decayStringsWithCuts=[(fsp,
'')])
25 testpath.add_module(
'ParticleStats', particleLists=[fsps[0]])
27 testpath.add_module(
'RestOfEventBuilder', particleList=fsps[0],
28 particleListsInput=[
'pi+',
'gamma',
'K_L0'])
29 mask = (
'cleanMask',
'E > 0.05',
'E > 0.05')
30 testpath.add_module(
'RestOfEventInterpreter', particleList=fsps[0],
34 roe_path = create_path()
35 v0list =
'K_S0 -> pi+ pi-'
36 roe_path.add_module(
'ParticleLoader', decayStringsWithCuts=[(v0list,
'')])
38 roe_path.add_module(
'ParticleLoader', decayStringsWithCuts=[(
'mu+:roe',
39 'isInRestOfEvent == 1 and isSignal == 1')])
41 roe_path.add_module(
'RestOfEventUpdater',
42 particleList=v0list.split(
' ->', 1)[0],
43 updateMasks=[mask[0]])
44 roe_path.add_module(
'RestOfEventPrinter',
48 jpsi_roe_list =
'J/psi:roe'
49 roe_path.add_module(
'ParticleCombiner',
50 decayString=jpsi_roe_list+
' -> mu+:roe mu-:roe',
52 roe_path.add_module(
'ParticlePrinter', listName=jpsi_roe_list, fullPrint=
False)
54 roe_path.add_module(
'RestOfEventBuilder', particleList=jpsi_roe_list,
55 createNestedROE=
True, nestedROEMask=mask[0])
58 nested_roe_path = create_path()
60 nested_roe_path.add_module(
'RestOfEventPrinter',
63 roe_path.for_each(
'RestOfEvent',
'NestedRestOfEvents', path=nested_roe_path)
66 nested_list =
'B+:other'
67 roe_path.add_module(
'ParticleLoader',
68 decayStringsWithCuts=[(nested_list+
' -> '+jpsi_roe_list,
'')],
71 roe_path.add_module(
'ParticleStats', particleLists=[nested_list])
72 roe_path.add_module(
'ParticlePrinter', listName=nested_list, fullPrint=
True)
74 testpath.for_each(
'RestOfEvent',
'RestOfEvents', path=roe_path)