Belle II Software  release-08-01-10
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 27 of file KLMK0LPlotModule.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 30 of file KLMK0LPlotModule.py.

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

Member Function Documentation

◆ event()

def event (   self)
 Event function. 

Definition at line 174 of file KLMK0LPlotModule.py.

◆ terminate()

def terminate (   self)
 Termination function. 

Definition at line 223 of file KLMK0LPlotModule.py.


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