14 from simulation
import add_simulation
21 b2.set_log_level(b2.LogLevel.INFO)
23 if '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')
28 bg = glob.glob(os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'] +
'/*.root')
30 b2.B2ERROR(
'No files found in ', os.environ[
'BELLE2_BACKGROUND_MIXING_DIR'])
34 main = b2.create_path()
37 eventinfosetter = b2.register_module(
'EventInfoSetter')
38 eventinfosetter.param({
'evtNumList': [10],
'runList': [1]})
39 main.add_module(eventinfosetter)
42 evtgeninput = b2.register_module(
'EvtGenInput')
43 main.add_module(evtgeninput)
46 add_simulation(main, bkgfiles=bg, bkgOverlay=
False)
50 for 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'")
59 progress = b2.register_module(
'Progress')
60 main.add_module(progress)