14from simulation
import add_simulation
21b2.set_log_level(b2.LogLevel.INFO)
23if 'BELLE2_BACKGROUND_MIXING_DIR' not in os.environ:
24 b2.B2ERROR(
'BELLE2_BACKGROUND_MIXING_DIR variable is not set - it must contain the path to BG mixing samples')
28bg = glob.glob(os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'] +
'/*.root')
30 b2.B2ERROR(
'No files found in ', os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'])
34main = b2.create_path()
37eventinfosetter = b2.register_module(
'EventInfoSetter')
38eventinfosetter.param({
'evtNumList': [10],
'runList': [1]})
39main.add_module(eventinfosetter)
42evtgeninput = b2.register_module(
'EvtGenInput')
43main.add_module(evtgeninput)
46add_simulation(main, bkgfiles=bg, bkgOverlay=
False)
50for m
in main.modules():
51 if m.type() ==
"BeamBkgMixer":
52 m.param(
'overallScaleFactor', 2.5)
53 m.param(
'maxEdepECL', 0)
56 b2.B2ERROR(
"Could not find module of type 'BeamBkgMixer'")
59progress = b2.register_module(
'Progress')
60main.add_module(progress)