Belle II Software development
B2A102-ccbarEventGeneration.py
1#!/usr/bin/env python3
2
3
10
11
29
30import basf2 as b2
31from modularAnalysis import setupEventInfo
32from mdst import add_mdst_output
33from generators import add_inclusive_continuum_generator
34
35# Defining one path
36my_path = b2.create_path()
37
38# generation of 100 events according to the specified DECAY table
39# e+e- -> ccbar -> D*+ anything
40# D*+ -> D0 pi+; D0 -> K- pi+
41#
42setupEventInfo(100, path=my_path)
43add_inclusive_continuum_generator(finalstate="ccbar",
44 particles=["D*+"],
45 userdecfile=b2.find_file('analysis/examples/simulations/B2A102-ccbarEventGeneration.dec'),
46 path=my_path)
47
48add_mdst_output(mc=True, filename='B2A102-ccbarEventGeneration-kkmc.root', path=my_path)
49
50# Process the events
51b2.process(my_path)
52
53# print out the summary
54print(b2.statistics)