Belle II Software  release-05-01-25
test2_feiHadronicB0.py
1 #!/usr/bin/env/python3
2 # -*-coding: utf-8-*-
3 
4 """
5 <header>
6  <input>../feiHadronicB0.udst.root</input>
7  <output>feiHadronicB0_Validation.root</output>
8  <contact>philip.grace@adelaide.edu.au</contact>
9 </header>
10 """
11 
12 import basf2 as b2
13 import modularAnalysis as ma
14 from variables import variables as vm
15 from validation_tools.metadata import create_validation_histograms
16 
17 path = b2.Path()
18 
19 ma.inputMdst('default', '../feiHadronicB0.udst.root', path=path)
20 
21 vm.addAlias('sigProb', 'extraInfo(SignalProbability)')
22 vm.addAlias('log10_sigProb', 'log10(extraInfo(SignalProbability))')
23 vm.addAlias('d0_massDiff', 'daughter(0,massDifference(0))')
24 vm.addAlias('d0_M', 'daughter(0,M)')
25 vm.addAlias('decayModeID', 'extraInfo(decayModeID)')
26 vm.addAlias('nDaug', 'countDaughters(1>0)') # Dummy cut so all daughters are selected.
27 
28 histogramFilename = 'feiHadronicB0_Validation.root'
29 myEmail = 'Phil Grace <philip.grace@adelaide.edu.au>'
30 
31 create_validation_histograms(
32  rootfile=histogramFilename,
33  particlelist='B0:generic',
34  variables_1d=[
35  ('sigProb', 100, 0.0, 1.0, 'Signal probability', myEmail,
36  'Signal probability of the reconstructed tag B candidates',
37  'Most around zero, with a tail at non-zero values.', 'Signal probability', 'Candidates', 'logy'),
38  ('nDaug', 6, 0.0, 6, 'Number of daughters of tag B', myEmail,
39  'Number of daughters of tag B', 'Some distribution of number of daughters', 'n_{daughters}', 'Candidates'),
40  ('d0_massDiff', 100, 0.0, 0.5, 'Mass difference of D* and D', myEmail,
41  'Mass difference of D^{*} and D', 'Peak at 0.14 GeV', 'm(D^{*})-m(D) [GeV]', 'Candidates', 'shifter'),
42  ('d0_M', 100, 0.0, 3.0, 'Mass of zeroth daughter (D* or D)', myEmail,
43  'Mass of zeroth daughter of tag B (either a $D^{*}$ or a D)', 'Peaks at 1.86 GeV and 2.00 GeV',
44  'm(D^{(*)}) [GeV]', 'Candidates', 'shifter'),
45  ('deltaE', 40, -0.2, 0.2, '#Delta E', myEmail,
46  '$\\Delta E$ of event', 'Peak around zero', '#Delta E [GeV]', 'Candidates', 'shifter'),
47  ('Mbc', 40, 5.2, 5.3, 'Mbc', myEmail,
48  'Beam-constrained mass of event', 'Peaking around B mass (5.28 GeV)', 'M_{bc} [GeV]', 'Candidates', 'shifter')],
49  variables_2d=[('deltaE', 100, -0.2, 0.2, 'Mbc', 100, 5.2, 5.3, 'Mbc vs deltaE', myEmail,
50  'Plot of the $\\Delta E$ of the event against the beam constrained mass',
51  'Peak of $\\Delta E$ around zero, and $M_{bc}$ around B mass (5.28 GeV)',
52  '#Delta E [GeV]', 'M_{bc} [GeV]', 'colz'),
53  ('decayModeID', 26, 0, 26, 'log10_sigProb', 100, -3.0, 0.0,
54  'Signal probability for each decay mode ID', myEmail,
55  'Signal probability for each decay mode ID', 'Some distribtuion of candidates in the first few decay mode IDs',
56  'Decay mode ID', '#log_10(signal probability)', 'colz')],
57  path=path)
58 
59 b2.process(path)
60 print(b2.statistics)
validation_tools.metadata
Definition: metadata.py:1