13 A test of the ROE-related module tests using a large test file
14 (mdst14.root from the validation server)
18 from basf2
import set_random_seed, create_path, process
23 set_random_seed(
"1337")
24 fsps = [
'K-:all',
'pi-:all',
'gamma:all',
'K_L0:all']
28 testpath = create_path()
29 testpath.add_module(
'RootInput', inputFileNames=inputFile)
31 testpath.add_module(
'ParticleLoader', decayStrings=[fsp])
32 testpath.add_module(
'ParticleSelector', decayString=
'gamma:all', cut=
'isFromECL')
33 testpath.add_module(
'ParticleStats', particleLists=[fsps[0]])
35 testpath.add_module(
'RestOfEventBuilder', particleList=fsps[0],
36 particleListsInput=[
'pi+:all',
'gamma:all',
'K_L0:all'])
37 mask = (
'cleanMask',
'E > 0.05',
'E > 0.05',
'')
38 testpath.add_module(
'RestOfEventInterpreter', particleList=fsps[0],
42 roe_path = create_path()
43 v0list =
'K_S0:V0 -> pi+ pi-'
44 roe_path.add_module(
'ParticleLoader', decayStrings=[v0list])
46 roe_path.add_module(
'ParticleLoader', decayStrings=[
'mu+'])
47 roe_path.add_module(
'ParticleListManipulator', outputListName=
'mu+:roe',
48 inputListNames=[
'mu+:all'],
49 cut=
'isInRestOfEvent == 1 and isSignal == 1')
51 roe_path.add_module(
'RestOfEventUpdater',
52 particleList=v0list.split(
' ->', 1)[0],
53 updateMasks=[mask[0]])
54 roe_path.add_module(
'RestOfEventPrinter',
58 jpsi_roe_list =
'J/psi:roe'
59 roe_path.add_module(
'ParticleCombiner',
60 decayString=jpsi_roe_list +
' -> mu+:roe mu-:roe',
62 roe_path.add_module(
'ParticlePrinter', listName=jpsi_roe_list, fullPrint=
False)
64 roe_path.add_module(
'RestOfEventBuilder', particleList=jpsi_roe_list,
65 createNestedROE=
True, nestedROEMask=mask[0])
68 nested_roe_path = create_path()
70 nested_roe_path.add_module(
'RestOfEventPrinter',
73 roe_path.for_each(
'RestOfEvent',
'NestedRestOfEvents', path=nested_roe_path)
76 nested_list =
'B+:other'
77 roe_path.add_module(
'ParticleLoader',
78 decayStrings=[nested_list +
' -> ' + jpsi_roe_list],
81 roe_path.add_module(
'ParticleStats', particleLists=[nested_list])
82 roe_path.add_module(
'ParticlePrinter', listName=nested_list, fullPrint=
True)
84 testpath.for_each(
'RestOfEvent',
'RestOfEvents', path=roe_path)
def configure_logging_for_tests(user_replacements=None)
def require_file(filename, data_type="", py_case=None)