Belle II Software  release-05-01-25
test2_TCPV.py
1 #!/usr/bin/env/python3
2 # -*-coding: utf-8-*-
3 
4 """
5 <header>
6  <input>../TCPV.udst.root</input>
7  <output>TCPV_Validation.root</output>
8  <contact>reem.rasheed@iphc.cnrs.fr</contact>
9 </header>
10 """
11 import basf2 as b2
12 import modularAnalysis as ma
13 from stdV0s import stdKshorts
14 from stdPhotons import stdPhotons
15 from stdCharged import stdPi
16 
17 from ROOT import gROOT
18 import sysconfig
19 
20 gROOT.ProcessLine(".include " + sysconfig.get_path("include"))
21 # the variables that are printed out are: Mbc, deltaE, invariant mass of
22 # momentum of D meson, and invariant mass of D meson and pion.
23 
24 tcpvskimpath = b2.Path()
25 
26 
27 fileList = ['../TCPV.udst.root']
28 ma.inputMdstList('default', fileList, path=tcpvskimpath)
29 
30 Kres = 'K_10'
31 stdKshorts(path=tcpvskimpath)
32 stdPhotons('loose', path=tcpvskimpath)
33 stdPi('all', path=tcpvskimpath)
34 ma.applyCuts('gamma:loose', '1.4 < E < 4', path=tcpvskimpath)
35 
36 ma.reconstructDecay(Kres + ":all -> K_S0:merged pi+:all pi-:all ", "", path=tcpvskimpath)
37 
38 ma.reconstructDecay("B0:signal -> " + Kres + ":all gamma:loose", "Mbc > 5.2 and deltaE < 0.5 and deltaE > -0.5", path=tcpvskimpath)
39 
40 ma.matchMCTruth('B0:signal', path=tcpvskimpath)
41 
42 variableshisto = [('deltaE', 100, -0.5, 0.5), ('Mbc', 100, 5.2, 5.3)]
43 ma.variablesToHistogram('B0:signal', variableshisto, filename='TCPV_Validation.root', path=tcpvskimpath)
44 
45 
46 b2.process(tcpvskimpath)
47 print(b2.statistics)
stdPhotons
Definition: stdPhotons.py:1