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