Belle II Software development
generateChargedMCforDecFileVal.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>../charged.cdst.root</output>
14 <description>creating charged MC cdst files needed for the DecayFile/Multiplicity validation</description>
15</header>
16"""
17
18import basf2 as b2
19import generators as ge
20
21b2.set_random_seed('charged')
22
23# create path
24main = b2.create_path()
25
26# default to early phase 3 (exp=1003), run 0, number of events = 100000
27main.add_module("EventInfoSetter", expList=1003, runList=0, evtNumList=100000)
28
29# generate BBbar events
30ge.add_evtgen_generator(path=main, finalstate='charged')
31
32# finally add cdst output
33main.add_module('RootOutput', outputFileName='../charged.cdst.root')
34
35main.add_module('Progress')
36# process events and print call statistics
37b2.process(path=main)
38print(b2.statistics)