26 b2.set_log_level(b2.LogLevel.INFO)
29 if 'BELLE2_BACKGROUND_MIXING_DIR' not in os.environ:
30 b2.B2ERROR(
'BELLE2_BACKGROUND_MIXING_DIR variable is not set - it must contain the path to BG mixing samples')
37 bg = glob.glob(os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'] +
'/*.root')
39 b2.B2ERROR(
'No files found in ', os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'])
56 main = b2.create_path()
59 eventinfosetter = b2.register_module(
'EventInfoSetter')
60 eventinfosetter.param({
'evtNumList': [10],
'runList': [1]})
61 main.add_module(eventinfosetter)
64 gearbox = b2.register_module(
'Gearbox')
65 main.add_module(gearbox)
68 geometry = b2.register_module(
'Geometry')
69 main.add_module(geometry)
72 simulateEventLevelTriggerTimeInfo = b2.register_module(
'SimulateEventLevelTriggerTimeInfo')
73 main.add_module(simulateEventLevelTriggerTimeInfo)
78 bkgmixer = b2.register_module(
'BeamBkgMixer')
79 bkgmixer.param(
'backgroundFiles', bg)
80 bkgmixer.param(
'components', [
'CDC',
'TOP',
'ECL'])
81 bkgmixer.param(
'minTime', -5000)
82 bkgmixer.param(
'maxTime', 10000)
83 bkgmixer.param(
'scaleFactors', [(
'Coulomb_LER', 1.05), (
'Coulomb_HER', 1.08), (
'RBB_LER', 0.8)])
84 main.add_module(bkgmixer)
89 output = b2.register_module(
'RootOutput')
90 output.param(
'outputFileName',
'testMixer.root')
91 main.add_module(output)
94 progress = b2.register_module(
'Progress')
95 main.add_module(progress)