Belle II Software  release-05-02-19
KLMK0LPlotModule Class Reference
Inheritance diagram for KLMK0LPlotModule:
Collaboration diagram for KLMK0LPlotModule:

Public Member Functions

def __init__ (self, output_file, evtgen, check_eklm)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 evtgen
 True for evtgen events, false for particle gun.
 
 check_eklm
 Whether to check if cluster is in EKLM.
 
 output_file
 Output file.
 
 hist_nkl
 Number of K0L histogram.
 
 hist_xres
 X resolution histogram.
 
 hist_yres
 Y resolution histogram.
 
 hist_zres
 Z resolution histogram.
 
 hist_tres
 Time resolution histogram.
 
 hist_pres
 Momentum resolution histogram.
 
 hist_ptres
 Momentum theta resolution histogram.
 
 hist_ppres
 Momentum phi resolution histogram.
 
 hist_covmat
 Covariance matrix histogram.
 
 hist_corrmat
 Correlation matrix histogram.
 
 vertex_k_av
 Average vertex.
 
 vertex
 Vertex list.
 
 momentum_av
 Average momentum.
 
 momentum
 Energy list.
 

Detailed Description

Class for creation of KLM K0L validation plots. 

Definition at line 19 of file KLMK0LPlotModule.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_file,
  evtgen,
  check_eklm 
)
Initialization.

Definition at line 22 of file KLMK0LPlotModule.py.

22  def __init__(self, output_file, evtgen, check_eklm):
23  """Initialization."""
24  super(KLMK0LPlotModule, self).__init__()
25 
26  self.evtgen = evtgen
27 
28  self.check_eklm = check_eklm
29 
30  self.output_file = ROOT.TFile(output_file, 'recreate')
31  contact = 'Kirill Chilikin (chilikin@lebedev.ru)'
32 
33  self.hist_nkl = ROOT.TH1F('k0l_number',
34  'Number of KLM clusters per 1 MC particle',
35  5, -0.5, 4.5)
36  self.hist_nkl.SetXTitle('KLM clusters')
37  self.hist_nkl.SetYTitle('Events')
38  functions = self.hist_nkl.GetListOfFunctions()
39  functions.Add(TNamed('Description', 'Number of KLM clusters per 1 MC particle'))
40  functions.Add(TNamed('Check', 'No efficiency decrease or multiple candidates \
41  increase'))
42  functions.Add(TNamed('Contact', contact))
43  functions.Add(TNamed('MetaOptions', 'shifter'))
44 
45  self.hist_xres = ROOT.TH1F('k0l_xres',
46  'KLM K0L decay vertex X resolution',
47  100, -50, 50)
48  self.hist_xres.SetXTitle('cm')
49  self.hist_xres.SetYTitle('Events')
50  functions = self.hist_xres.GetListOfFunctions()
51  functions.Add(TNamed('Description', 'X resolution'))
52  functions.Add(TNamed('Check', 'No bias, resolution ~ 16 cm.'))
53  functions.Add(TNamed('Contact', contact))
54  functions.Add(TNamed('MetaOptions', 'shifter'))
55 
56  self.hist_yres = ROOT.TH1F('k0l_yres',
57  'KLM K0L decay vertex Y resolution',
58  100, -50, 50)
59  self.hist_yres.SetXTitle('cm')
60  self.hist_yres.SetYTitle('Events')
61  functions = self.hist_yres.GetListOfFunctions()
62  functions.Add(TNamed('Description', 'Y resolution'))
63  functions.Add(TNamed('Check', 'No bias, resolution ~ 16 cm.'))
64  functions.Add(TNamed('Contact', contact))
65  functions.Add(TNamed('MetaOptions', 'shifter'))
66 
67  self.hist_zres = ROOT.TH1F('k0l_zres',
68  'KLM K0L decay vertex Z resolution',
69  100, -50, 50)
70  self.hist_zres.SetXTitle('cm')
71  self.hist_zres.SetYTitle('Events')
72  functions = self.hist_zres.GetListOfFunctions()
73  functions.Add(TNamed('Description', 'Z resolution'))
74  functions.Add(TNamed('Check', 'No bias, resolution ~ 16 cm.'))
75  functions.Add(TNamed('Contact', contact))
76  functions.Add(TNamed('MetaOptions', 'shifter'))
77 
78  self.hist_tres = ROOT.TH1F('k0l_tres',
79  'KLM K0L decay time resolution',
80  100, -20., 10.)
81  self.hist_tres.SetXTitle('ns')
82  self.hist_tres.SetYTitle('Events')
83  functions = self.hist_tres.GetListOfFunctions()
84  functions.Add(TNamed('Description', 'Time resolution'))
85  functions.Add(TNamed('Check', 'No bias.'))
86  functions.Add(TNamed('Contact', contact))
87  functions.Add(TNamed('MetaOptions', 'shifter'))
88 
89  self.hist_pres = ROOT.TH1F('k0l_pres',
90  'KLM K0L momentum resolution',
91  100, -3., 3.)
92  self.hist_pres.SetXTitle('GeV')
93  self.hist_pres.SetYTitle('Events')
94  functions = self.hist_pres.GetListOfFunctions()
95  functions.Add(TNamed('Description', 'Momentum resolution'))
96  functions.Add(TNamed('Check', 'No bias.'))
97  functions.Add(TNamed('Contact', contact))
98  functions.Add(TNamed('MetaOptions', 'shifter'))
99 
100  self.hist_ptres = ROOT.TH1F('k0l_ptres',
101  'KLM K0L momentum theta resolution',
102  100, -0.2, 0.2)
103  self.hist_ptres.SetXTitle('rad')
104  self.hist_ptres.SetYTitle('Events')
105  functions = self.hist_ptres.GetListOfFunctions()
106  functions.Add(TNamed('Description', 'Momentum theta resolution'))
107  functions.Add(TNamed('Check', 'No bias, resolution ~ 0.06'))
108  functions.Add(TNamed('Contact', contact))
109  functions.Add(TNamed('MetaOptions', 'shifter'))
110 
111  self.hist_ppres = ROOT.TH1F('k0l_ppres',
112  'KLM K0L momentum phi resolution',
113  100, -0.2, 0.2)
114  self.hist_ppres.SetXTitle('rad')
115  self.hist_ppres.SetYTitle('Events')
116  functions = self.hist_ppres.GetListOfFunctions()
117  functions.Add(TNamed('Description', 'Momentum phi resolution'))
118  functions.Add(TNamed('Check', 'No bias, resolution ~ 0.07'))
119  functions.Add(TNamed('Contact', contact))
120  functions.Add(TNamed('MetaOptions', 'shifter'))
121 
122  self.hist_covmat = ROOT.TH1F('k0l_covmat',
123  'KLM K0L coordinates covariance matrix',
124  6, 0, 1)
125  self.hist_covmat.GetXaxis().SetBinLabel(1, 'xx')
126  self.hist_covmat.GetXaxis().SetBinLabel(2, 'xy')
127  self.hist_covmat.GetXaxis().SetBinLabel(3, 'xz')
128  self.hist_covmat.GetXaxis().SetBinLabel(4, 'yy')
129  self.hist_covmat.GetXaxis().SetBinLabel(5, 'yz')
130  self.hist_covmat.GetXaxis().SetBinLabel(6, 'zz')
131  self.hist_covmat.SetYTitle('Covariance, cm^{2}')
132  functions = self.hist_covmat.GetListOfFunctions()
133  functions.Add(TNamed('Description', 'Momentum phi resolution'))
134  functions.Add(TNamed('Check', 'No large off-diagonal elements.'))
135  functions.Add(TNamed('Contact', contact))
136  functions.Add(TNamed('MetaOptions', 'shifter'))
137 
138  self.hist_corrmat = ROOT.TH1F('k0l_corrmat',
139  'KLM K0L correlation matrix',
140  10, 0, 1)
141  self.hist_corrmat.GetXaxis().SetBinLabel(1, 'xx')
142  self.hist_corrmat.GetXaxis().SetBinLabel(2, 'xy')
143  self.hist_corrmat.GetXaxis().SetBinLabel(3, 'xz')
144  self.hist_corrmat.GetXaxis().SetBinLabel(4, 'xp')
145  self.hist_corrmat.GetXaxis().SetBinLabel(5, 'yy')
146  self.hist_corrmat.GetXaxis().SetBinLabel(6, 'yz')
147  self.hist_corrmat.GetXaxis().SetBinLabel(7, 'yp')
148  self.hist_corrmat.GetXaxis().SetBinLabel(8, 'zz')
149  self.hist_corrmat.GetXaxis().SetBinLabel(9, 'zp')
150  self.hist_corrmat.GetXaxis().SetBinLabel(10, 'pp')
151  self.hist_corrmat.SetYTitle('Correlation coefficient')
152  functions = self.hist_corrmat.GetListOfFunctions()
153  functions.Add(TNamed('Description', 'Momentum phi resolution'))
154  functions.Add(TNamed('Check', 'No large off-diagonal elements.'))
155  functions.Add(TNamed('Contact', contact))
156  functions.Add(TNamed('MetaOptions', 'shifter'))
157 
158  self.vertex_k_av = ROOT.TVector3(0, 0, 0)
159 
160  self.vertex = []
161 
162  self.momentum_av = 0
163 
164  self.momentum = []
165 

Member Function Documentation

◆ event()

def event (   self)
Event function. 

Definition at line 166 of file KLMK0LPlotModule.py.

◆ terminate()

def terminate (   self)
Termination function. 

Definition at line 215 of file KLMK0LPlotModule.py.


The documentation for this class was generated from the following file: