31 import modularAnalysis
as ma
32 import simulation
as si
33 import reconstruction
as re
39 if not os.path.isfile(
'B2A101-Y4SEventGeneration-evtgen.root'):
41 'Required input file (B2A101-Y4SEventGeneration-evtgen.root) does not exist. \n'
42 'Please run B2A101-Y4SEventGeneration.py tutorial script first.')
45 my_path = b2.create_path()
48 ma.inputMdst(
'default',
'B2A101-Y4SEventGeneration-evtgen.root', path=my_path)
52 if 'BELLE2_BACKGROUND_DIR' not in os.environ:
54 'BELLE2_BACKGROUND_DIR variable is not set. \n'
55 'Please export (setenv) the variable to the location of BG overlay sample. \n'
56 'Check https://confluence.desy.de/display/BI/Beam+background+samples to find them')
58 bg = glob.glob(os.environ[
'BELLE2_BACKGROUND_DIR'] +
'/*.root')
60 b2.B2FATAL(
'No files found in ', os.environ[
'BELLE2_BACKGROUND_DIR'])
63 si.add_simulation(path=my_path, bkgfiles=bg)
66 re.add_reconstruction(path=my_path)
69 re.add_mdst_output(path=my_path,
71 filename=
'B2A101-Y4SEventGeneration-gsim-BKGx1.root')
74 my_path.add_module(
'ProgressBar')