Belle II Software  release-05-01-25
test0_TCPV.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: B to KS pi+ pi- gamma decay
4 
5 
6 """
7 <header>
8  <output>../TCPV.dst.root</output>
9  <contact>rrasheed@desy.de</contact>
10 </header>
11 """
12 
13 import basf2 as b2
14 import mdst as mdst
15 import generators as ge
16 import simulation as si
17 import reconstruction as re
18 import modularAnalysis as ma
19 
20 
21 # Defining custom path
22 tcpvskimpath = b2.Path()
23 
24 # specify number of events to be generated
25 ma.setupEventInfo(noEvents=1000, path=tcpvskimpath)
26 
27 ge.add_evtgen_generator(path=tcpvskimpath,
28  finalstate='signal',
29  signaldecfile=b2.find_file(
30  'skim/validation/dectcpv.dec'))
31 
32 
33 # detector simulation
34 # add_simulation(main, bkgfiles=bg)
35 si.add_simulation(path=tcpvskimpath)
36 
37 # reconstruction
38 re.add_reconstruction(path=tcpvskimpath)
39 
40 
41 # Finally add mdst output
42 output_filename = "../TCPV.dst.root"
43 mdst.add_mdst_output(path=tcpvskimpath, mc=True, filename=output_filename)
44 
45 
46 # process events and print call statistics
47 b2.process(tcpvskimpath)
48 print(b2.statistics)
mdst.add_mdst_output
def add_mdst_output(path, mc=True, filename='mdst.root', additionalBranches=[], dataDescription=None)
Definition: mdst.py:8