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