12A test of the ROE-related module tests using a large test file
13(mdst16.root from the validation server)
17from basf2
import set_random_seed, create_path, process
22set_random_seed(
"1337")
23fsps = [
'K-:all',
'pi-:all',
'gamma:all',
'K_L0:all']
27testpath = create_path()
28testpath.add_module(
'RootInput', inputFileNames=inputFile)
30 testpath.add_module(
'ParticleLoader', decayStrings=[fsp])
31testpath.add_module(
'ParticleSelector', decayString=
'gamma:all', cut=
'isFromECL')
32testpath.add_module(
'ParticleStats', particleLists=[fsps[0]])
34testpath.add_module(
'RestOfEventBuilder', particleList=fsps[0],
35 particleListsInput=[
'pi+:all',
'gamma:all',
'K_L0:all'])
36mask = (
'cleanMask',
'E > 0.05',
'E > 0.05',
'')
37testpath.add_module(
'RestOfEventInterpreter', particleList=fsps[0],
41roe_path = create_path()
42v0list =
'K_S0:V0 -> pi+ pi-'
43roe_path.add_module(
'ParticleLoader', decayStrings=[v0list])
45roe_path.add_module(
'ParticleLoader', decayStrings=[
'mu+'])
46roe_path.add_module(
'ParticleListManipulator', outputListName=
'mu+:roe',
47 inputListNames=[
'mu+:all'],
48 cut=
'isInRestOfEvent == 1 and isSignal == 1')
50roe_path.add_module(
'RestOfEventUpdater',
51 particleList=v0list.split(
' ->', 1)[0],
52 updateMasks=[mask[0]])
53roe_path.add_module(
'RestOfEventPrinter',
57jpsi_roe_list =
'J/psi:roe'
58roe_path.add_module(
'ParticleCombiner',
59 decayString=jpsi_roe_list +
' -> mu+:roe mu-:roe',
61roe_path.add_module(
'ParticlePrinter', listName=jpsi_roe_list, fullPrint=
False)
63roe_path.add_module(
'RestOfEventBuilder', particleList=jpsi_roe_list,
64 createNestedROE=
True, nestedROEMask=mask[0])
67nested_roe_path = create_path()
69nested_roe_path.add_module(
'RestOfEventPrinter',
72roe_path.for_each(
'RestOfEvent',
'NestedRestOfEvents', path=nested_roe_path)
75nested_list =
'B+:other'
76roe_path.add_module(
'ParticleLoader',
77 decayStrings=[nested_list +
' -> ' + jpsi_roe_list],
80roe_path.add_module(
'ParticleStats', particleLists=[nested_list])
81roe_path.add_module(
'ParticlePrinter', listName=nested_list, fullPrint=
True)
83testpath.for_each(
'RestOfEvent',
'RestOfEvents', path=roe_path)
def require_file(filename, data_type="", py_case=None)
def configure_logging_for_tests(user_replacements=None)