Belle II Software  release-08-01-10
SVDValidationRecoDigitPerformance.py
1 # !/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 <header>
14  <input>SVDValidationTTreeRecoDigit.root</input>
15  <output>SVDRecoDigitPerformance.root</output>
16  <description>
17  Validation plots related to RecoDigit performance.
18  </description>
19  <contact>
20  SVD Software Group, svd-software@belle2.org
21  </contact>
22 </header>
23 """
24 
25 import ROOT as R
26 
27 import plotUtils as pu
28 
29 inputRD = R.TFile.Open("../SVDValidationTTreeRecoDigit.root")
30 
31 treeRD = inputRD.Get("tree")
32 
33 histsRDP = R.TFile.Open("SVDRecoDigitPerformance.root", "recreate")
34 
35 pu.plotter(
36  name='TimeResolution',
37  title='Resolution of the reconstructed time of a single strip',
38  nbins=200,
39  xmin=-100,
40  xmax=100,
41  x_label='RecoDigit time resolution (ns)',
42  y_label='counts',
43  granules=pu.gD,
44  tree=treeRD,
45  expr='recodigit_time - truehit_time',
46  cut='',
47  descr='Definition: (reconstructed time of the RecoDigit) - (time of the Truehit);\
48  for all RecoDigit related to at least one TrueHit.',
49  check='Distribution should be centered around 0, with an RMS between 7 and 10 ns.',
50  isShifter=True)
51 
52 pu.plotter(
53  name='StripCharge',
54  title='Charge of the strip',
55  nbins=50,
56  xmin=0,
57  xmax=120000,
58  x_label='Strip charge (e-)',
59  y_label='counts',
60  granules=pu.gD,
61  tree=treeRD,
62  expr='recodigit_charge',
63  cut='',
64  descr='Strip charge for all RecoDigits related to at least one TrueHit.',
65  check='',
66  isShifter=False)