Belle II Software  release-08-01-10
B2A102-ccbarEventGeneration.py
1 #!/usr/bin/env python3
2 
3 
10 
11 
29 
30 import basf2 as b2
31 from modularAnalysis import setupEventInfo
32 from mdst import add_mdst_output
33 from generators import add_inclusive_continuum_generator
34 
35 # Defining one path
36 my_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 #
42 setupEventInfo(100, path=my_path)
43 add_inclusive_continuum_generator(finalstate="ccbar",
44  particles=["D*+"],
45  userdecfile=b2.find_file('analysis/examples/simulations/B2A102-ccbarEventGeneration.dec'),
46  path=my_path)
47 
48 add_mdst_output(mc=True, filename='B2A102-ccbarEventGeneration-kkmc.root', path=my_path)
49 
50 # Process the events
51 b2.process(my_path)
52 
53 # print out the summary
54 print(b2.statistics)