13 <output>EvtGenSimRec_B2Kpi.root</output>
14 <contact>marko.staric@ijs.si</contact>
15 <description>Generates signal MC of B0 -> K-pi+, 200 events</description>
21from simulation import add_simulation
22from reconstruction import add_reconstruction
23from ROOT import Belle2
26b2.set_random_seed(123451)
28main = b2.create_path()
30# specify number of events to be generated
31eventinfosetter = b2.register_module('EventInfoSetter')
32eventinfosetter.param('evtNumList', [1000])
33main.add_module(eventinfosetter)
35# generate events (B0 -> K+pi- + cc, other B0 generic)
36evtgeninput = b2.register_module('EvtGenInput')
37evtgeninput.param('userDECFile', Belle2.FileSystem.findFile('top/validation/B2Kpi.dec'))
38main.add_module(evtgeninput)
42if 'BELLE2_BACKGROUND_DIR' in os.environ:
43 bg = glob.glob(os.environ['BELLE2_BACKGROUND_DIR'] +
'/*.root')
44add_simulation(main, bkgfiles=bg)
47add_reconstruction(main)
50output = b2.register_module(
'RootOutput')
51output.param(
'outputFileName',
'../EvtGenSimRec_B2Kpi.root')
52output.param(
'branchNames', [
'MCParticles',
'MCInitialParticles',
'Tracks',
'TrackFitResults',
53 'TOPLikelihoods',
'TOPBarHits',
'ExtHits',
'TOPRecBunch'])
54main.add_module(output)
56main.add_module(
'Progress')