30 def __init__(self, output_file, evtgen, check_eklm):
36 self.check_eklm = check_eklm
38 self.output_file = ROOT.TFile(output_file,
'recreate')
39 contact =
'Leo Piilonen (piilonen@vt.edu)'
41 self.hist_nkl = ROOT.TH1F(
'k0l_number',
42 'Number of KLM clusters per 1 MC particle',
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 \
50 functions.Add(TNamed(
'Contact', contact))
51 functions.Add(TNamed(
'MetaOptions',
'shifter'))
53 self.hist_xres = ROOT.TH1F(
'k0l_xres',
54 'KLM K0L decay vertex X resolution',
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'))
64 self.hist_yres = ROOT.TH1F(
'k0l_yres',
65 'KLM K0L decay vertex Y resolution',
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'))
75 self.hist_zres = ROOT.TH1F(
'k0l_zres',
76 'KLM K0L decay vertex Z resolution',
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'))
86 self.hist_tres = ROOT.TH1F(
'k0l_tres',
87 'KLM K0L decay time resolution',
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'))
97 self.hist_pres = ROOT.TH1F(
'k0l_pres',
98 'KLM K0L momentum resolution',
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'))
108 self.hist_ptres = ROOT.TH1F(
'k0l_ptres',
109 'KLM K0L momentum theta resolution',
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'))
119 self.hist_ppres = ROOT.TH1F(
'k0l_ppres',
120 'KLM K0L momentum phi resolution',
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'))
130 self.hist_covmat = ROOT.TH1F(
'k0l_covmat',
131 'KLM K0L coordinates covariance matrix',
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'))
146 self.hist_corrmat = ROOT.TH1F(
'k0l_corrmat',
147 'KLM K0L correlation matrix',
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'))
166 self.vertex_k_av = XYZVector(0, 0, 0)