Belle II Software  release-05-01-25
test2_BtoDh_hh.py
1 #!/usr/bin/env/python3
2 # -*-coding: utf-8-*-
3 
4 """
5 <header>
6  <input>14140100.udst.root</input>
7  <output>BtoDh_hh_Validation.root</output>
8  <contact>niharikarout@physics.iitm.ac.in</contact>
9 </header>
10 """
11 
12 import basf2 as b2
13 import modularAnalysis as ma
14 from stdCharged import stdK, stdPi
15 
16 hhpath = b2.Path()
17 
18 ma.inputMdst('default', '14140100.udst.root', path=hhpath)
19 
20 stdPi('all', path=hhpath)
21 stdK('all', path=hhpath)
22 
23 
24 ma.reconstructDecay('D0 -> K-:all pi+:all', '1.84 < M < 1.89', path=hhpath)
25 ma.reconstructDecay('B-:ch3 ->D0 K-:all', '5.24 < Mbc < 5.3 and abs(deltaE) < 0.15', path=hhpath)
26 
27 # the variables that are printed out are: Mbc, deltaE and the daughter particle invariant masses.
28 
29 ma.variablesToHistogram(
30  filename='BtoDh_hh_Validation.root',
31  decayString='B-:ch3',
32  variables=[
33  ('Mbc', 100, 5.2, 5.3),
34  ('deltaE', 100, -1, 1),
35  ('daughter(0, InvM)', 100, 1.8, 1.9)], # D0 invariant mass
36  variables_2d=[
37  ('Mbc', 50, 5.23, 5.31, 'deltaE', 50, -0.7, 0.7)], path=hhpath)
38 
39 b2.process(hhpath)
40 print(b2.statistics)