Belle II Software  release-05-01-25
test2_feiSLB0.py
1 #!/usr/bin/env/python3
2 # -*-coding: utf-8-*-
3 
4 """
5 <header>
6  <input>../feiSLB0.udst.root</input>
7  <output>feiSLB0_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', '../feiSLB0.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 = 'feiSLB0_Validation.root'
29 myEmail = 'Phil Grace <philip.grace@adelaide.edu.au>'
30 
31 create_validation_histograms(
32  rootfile=histogramFilename,
33  particlelist='B0:semileptonic',
34  variables_1d=[
35  ('sigProb', 100, 0.0, 1.0, 'Signal probability', myEmail,
36  'Signal probability of the reconstructed tag B candidates', 'Most around zero, with a tail at non-zero values.',
37  '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  ('cosThetaBetweenParticleAndNominalB', 100, -6.0, 4.0, '#cos#theta_{BY}', myEmail,
41  'Cosine of angle between the reconstructed B and the nominal B', 'Distribution peaking between -1 and 1',
42  '#cos#theta_{BY}', 'Candidates'),
43  ('d0_massDiff', 100, 0.0, 0.5, 'Mass difference of D* and D', myEmail,
44  'Mass difference of $D^{*}$ and D', 'Peak at 0.14 GeV', 'm(D^{*})-m(D) [GeV]', 'Candidates', 'shifter'),
45  ('d0_M', 100, 0.0, 3.0, 'Mass of zeroth daughter (D* or D)', myEmail,
46  'Mass of zeroth daughter of tag B (either a $D^{*}$ or a D)', 'Peaks at 1.86 GeV and 2.00 GeV',
47  'm(D^{(*)}) [GeV]', 'Candidates', 'shifter')],
48  variables_2d=[('decayModeID', 8, 0, 8, 'log10_sigProb', 100, -3.0, 0.0,
49  'Signal probability for each decay mode ID', myEmail,
50  'Signal probability for each decay mode ID',
51  'Some distribtuion of candidates in the first few decay mode IDs',
52  'Decay mode ID', '#log_10(signal probability)', 'colz')],
53  path=path)
54 
55 b2.process(path)
56 print(b2.statistics)
validation_tools.metadata
Definition: metadata.py:1