Belle II Software development
KLMK0LGenerate.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>KLMK0LOutput.root</output>
14 <contact>Leo Piilonen (piilonen@vt.edu)</contact>
15 <description>Generation of 2000 B -> J/psi K_L0 events for KLM validation.</description>
16</header>
17"""
18
19import basf2
20from simulation import add_simulation
21from reconstruction import add_reconstruction
22from validationgenerators import add_evtgen_for_validation
23
24# Fixed random seed
25basf2.set_random_seed(123456)
26
27# Create main path
28main = basf2.create_path()
29
30# Add modules to main path
31main.add_module('EventInfoSetter', evtNumList=[2000])
32
33add_evtgen_for_validation(main)
34basf2.set_module_parameters(main, name='EvtGenInput', userDECFile=basf2.find_file('klm/validation/btojpsikl0.dec'))
35
36add_simulation(path=main)
37add_reconstruction(path=main)
38
39main.add_module('Progress')
40main.add_module('ProgressBar')
41
42main.add_module('RootOutput', outputFileName='../KLMK0LOutput.root')
43
44# Process the path
45basf2.process(main)