Belle II Software light-2406-ragdoll
B2A101-Y4SEventGeneration.py
1#!/usr/bin/env python3
2
3
10
11
29
30import basf2 as b2
31import generators as ge
32import modularAnalysis as ma
33
34# generation of 100 events according to the specified DECAY table
35# Y(4S) -> Btag- Bsig+
36# Btag- -> D0 pi-; D0 -> K- pi+
37# Bsig+ -> mu+ nu_mu
38#
39
40# Defining custom path
41my_path = b2.create_path()
42
43# Setting up number of events to generate
44ma.setupEventInfo(noEvents=100, path=my_path)
45
46# Adding genberator
47ge.add_evtgen_generator(path=my_path,
48 finalstate='signal',
49 signaldecfile=b2.find_file(
50 'analysis/examples/simulations/B2A101-Y4SEventGeneration.dec'))
51
52# dump generated events in DST format to the output ROOT file
53my_path.add_module('RootOutput', outputFileName='B2A101-Y4SEventGeneration-evtgen.root')
54
55# process all modules added to the path
56b2.process(path=my_path)
57
58# print out the summary
59print(b2.statistics)