Belle II Software light-2406-ragdoll
test0_GenericB_GENSIMRECtoDST.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>../GenericB_GENSIMRECtoDST.dst.root</output>
14 <contact>Frank Meier; frank.meier@duke.edu</contact>
15</header>
16"""
17
18import basf2
19from simulation import add_simulation
20from reconstruction import add_reconstruction
21from beamparameters import add_beamparameters
22
23basf2.set_random_seed(12345)
24
25main = basf2.create_path()
26
27# specify number of events to be generated
28eventinfosetter = basf2.register_module('EventInfoSetter')
29eventinfosetter.param('evtNumList', [1000])
30eventinfosetter.param('runList', [0])
31eventinfosetter.param('expList', [0])
32main.add_module(eventinfosetter)
33
34# set the BeamParameters for running at Y(4S)
35beamparameters = add_beamparameters(main, "Y4S")
36basf2.print_params(beamparameters)
37
38# generate BBbar events
39main.add_module('EvtGenInput')
40
41# detector simulation, digitisers and clusterisers
42add_simulation(main)
43
44# reconstruction
45add_reconstruction(main)
46
47# dst output
48output = basf2.register_module('RootOutput')
49output.param('outputFileName', '../GenericB_GENSIMRECtoDST.dst.root')
50main.add_module(output)
51
52main.add_module('Progress')
53# Go!
54basf2.process(main)
55
56# Print call statistics
57print(basf2.statistics)