Belle II Software  release-05-01-25
test2_BtoXll.py
1 #!/usr/bin/env/python3
2 # -*-coding: utf-8-*-
3 
4 """
5 <header>
6  <input>../BtoXll.udst.root</input>
7  <output>../BtoXll_Validation.root</output>
8  <contact>soumen.halder@tifr.res.in</contact>
9 </header>
10 """
11 __author__ = "Soumen Halder, Trevor Shillington"
12 
13 import basf2 as b2
14 import modularAnalysis as ma
15 from stdCharged import stdK
16 from stdCharged import stdMu
17 from validation_tools.metadata import create_validation_histograms
18 # the variables that are printed out are: Mbc and deltaE
19 
20 my_path = b2.Path()
21 
22 my_email = 'Trevor Shillington <trshillington@hep.physics.mcgill.ca>'
23 
24 histogram_filename = 'BtoXll_Validation.root'
25 
26 fileList = ['../BtoXll.udst.root']
27 ma.inputMdstList('default', fileList, path=my_path)
28 
29 stdK(listtype='good', path=my_path)
30 stdMu(listtype='good', path=my_path)
31 ma.reconstructDecay("B+:signal -> K+:good mu+:good mu-:good", "Mbc > 5.2 and deltaE < 0.5 and deltaE > -0.5", path=my_path)
32 ma.matchMCTruth('B+:signal', path=my_path)
33 
34 create_validation_histograms(
35  rootfile=histogram_filename,
36  particlelist='B+:signal',
37  variables_1d=[
38  ('deltaE', 100, -0.5, 0.5, 'Signal B deltaE', my_email,
39  'deltaE of the Signal B', '', 'deltaE [GeV]', 'Candidates'),
40  ('Mbc', 100, 5.2, 5.3, 'Signal B Mbc', my_email,
41  'Mbc of the signal B', '', 'Mbc [GeV/c^2]', 'Candidates')],
42  variables_2d=[],
43  path=my_path)
44 
45 b2.process(my_path)
46 print(b2.statistics)
validation_tools.metadata
Definition: metadata.py:1