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