111 def initialize(self):
112 '''define histograms'''
113
114 usedBin1 = 100
115 usedBin2 = 2000
116 eclMinVal = 19.5
117 eclMaxVal = 1100.5
118
119 timeBin = int(maxTime - minTime)
120
121
122 self.TH1F_Index = {}
123 self.TH1F_Store = []
124 TH1F_Store_Count = 0
125
126 self.TH2F_Index = {}
127 self.TH2F_Store = []
128 TH2F_Store_Count = 0
129
130 self.reso_TH2D_Histogram_Index = {}
131 self.reso_TH2D_Histograms = []
132 reso_TH2D_Histograms_Count = 0
133
134 self.outputFileName = str(args.fileDir) + str(args.moduleName) + outputFileTag
135 self.f = TFile(self.outputFileName + ".root", "RECREATE")
136
137
138
139
140 self.TH1F_Store.append(TH1F("th1f_svdEventT0", "SVD EventT0", 500, -50., 50.))
141 self.TH1F_Store[-1].GetXaxis().SetTitle("SVD EventT0 (ns)")
142 self.TH1F_Index["th1f_svdEventT0"] = TH1F_Store_Count
143 TH1F_Store_Count += 1
144 self.TH1F_Store.append(TH1F("th1f_svdEventT0_State", "SVD EventT0 Availability", 2, -0.5, 1.5))
145 self.TH1F_Store[-1].GetXaxis().SetBinLabel(1, "Not Available")
146 self.TH1F_Store[-1].GetXaxis().SetBinLabel(2, "Available")
147 self.TH1F_Index["th1f_svdEventT0_State"] = TH1F_Store_Count
148 TH1F_Store_Count += 1
149
150 self.TH1F_Store.append(TH1F("th1f_cdcEventT0", "CDC EventT0", 500, -50., 50.))
151 self.TH1F_Store[-1].GetXaxis().SetTitle("CDC EventT0 (ns)")
152 self.TH1F_Index["th1f_cdcEventT0"] = TH1F_Store_Count
153 TH1F_Store_Count += 1
154 self.TH1F_Store.append(TH1F("th1f_cdcEventT0_State", "CDC EventT0 Availability", 2, -0.5, 1.5))
155 self.TH1F_Store[-1].GetXaxis().SetBinLabel(1, "Not Available")
156 self.TH1F_Store[-1].GetXaxis().SetBinLabel(2, "Available")
157 self.TH1F_Index["th1f_cdcEventT0_State"] = TH1F_Store_Count
158 TH1F_Store_Count += 1
159
160
161
162 self.TH1F_Store.append(TH1F("th1f_svdEventT0topRef", "SVD EventT0 - TOP Online EventT0", 500, -20., 20.))
163 self.TH1F_Store[-1].GetXaxis().SetTitle("SVD EventT0 - TOP Online EventT0 (ns)")
164 self.TH1F_Index["th1f_svdEventT0topRef"] = TH1F_Store_Count
165 TH1F_Store_Count += 1
166
167
168
169 self.TH1F_Store.append(TH1F("th1f_clsTime_PreTracking", "(PreTracking) Cluster Time", timeBin, minTime, maxTime))
170 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
171 self.TH1F_Store[-1].SetLineColor(1)
172 self.TH1F_Index["th1f_clsTime_PreTracking"] = TH1F_Store_Count
173 TH1F_Store_Count += 1
174 self.TH1F_Store.append(TH1F("th1f_bkgClsTime_PreTracking", "(PreTracking) Bkg Cluster Time", timeBin, minTime, maxTime))
175 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
176 self.TH1F_Store[-1].SetLineColor(2)
177 self.TH1F_Index["th1f_bkgClsTime_PreTracking"] = TH1F_Store_Count
178 TH1F_Store_Count += 1
179 self.TH1F_Store.append(TH1F("th1f_sigClsTime_PreTracking", "(PreTracking) Sig Cluster Time", timeBin, minTime, maxTime))
180 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
181 self.TH1F_Store[-1].SetLineColor(3)
182 self.TH1F_Index["th1f_sigClsTime_PreTracking"] = TH1F_Store_Count
183 TH1F_Store_Count += 1
184
185 self.TH1F_Store.append(TH1F("th1f_clsTime_PostTracking", "(PostTracking) Cluster Time", timeBin, minTime, maxTime))
186 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
187 self.TH1F_Store[-1].SetLineColor(1)
188 self.TH1F_Index["th1f_clsTime_PostTracking"] = TH1F_Store_Count
189 TH1F_Store_Count += 1
190 self.TH1F_Store.append(TH1F("th1f_bkgClsTime_PostTracking", "(PostTracking) Bkg Cluster Time", timeBin, minTime, maxTime))
191 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
192 self.TH1F_Store[-1].SetLineColor(2)
193 self.TH1F_Index["th1f_bkgClsTime_PostTracking"] = TH1F_Store_Count
194 TH1F_Store_Count += 1
195 self.TH1F_Store.append(TH1F("th1f_sigClsTime_PostTracking", "(PostTracking) Sig Cluster Time", timeBin, minTime, maxTime))
196 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
197 self.TH1F_Store[-1].SetLineColor(3)
198 self.TH1F_Index["th1f_sigClsTime_PostTracking"] = TH1F_Store_Count
199 TH1F_Store_Count += 1
200
201 self.TH1F_Store.append(TH1F("th1f_trackTime", "Track Time", timeBin * 10, minTime, maxTime))
202 self.TH1F_Store[-1].GetXaxis().SetTitle("Track Time (ns)")
203 self.TH1F_Index["th1f_trackTime"] = TH1F_Store_Count
204 TH1F_Store_Count += 1
205 self.TH1F_Store.append(TH1F("th1f_trackTimeCDCRef", "Track Time - CDC EventT0", 10000, -50, 50))
206 self.TH1F_Store[-1].GetXaxis().SetTitle("Track Time - CDC EventT0 (ns)")
207 self.TH1F_Index["th1f_trackTimeCDCRef"] = TH1F_Store_Count
208 TH1F_Store_Count += 1
209
210
211
212 self.TH1F_Store.append(TH1F("th1f_clsTimeCdcRef_PreTracking", "(PreTracking) Cluster Time - CDC EventT0",
213 timeBin * 2, minTime, maxTime))
214 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time - CDC EventT0 (ns)")
215 self.TH1F_Store[-1].SetLineColor(1)
216 self.TH1F_Index["th1f_clsTimeCdcRef_PreTracking"] = TH1F_Store_Count
217 TH1F_Store_Count += 1
218
219 self.TH1F_Store.append(TH1F("th1f_clsTimeCdcRef_PostTracking", "(PostTracking) Cluster Time - CDC EventT0",
220 timeBin * 2, minTime, maxTime))
221 self.TH1F_Store[-1].GetXaxis().SetTitle("Cluster Time - CDC EventT0 (ns)")
222 self.TH1F_Store[-1].SetLineColor(1)
223 self.TH1F_Index["th1f_clsTimeCdcRef_PostTracking"] = TH1F_Store_Count
224 TH1F_Store_Count += 1
225
226
227
228 self.TH1F_Store.append(TH1F("th1f_eclTCEmax", "ECL E_{max}^{TC}", 1250, 0.5, 1250.5))
229 self.TH1F_Store[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
230 self.TH1F_Index["th1f_eclTCEmax"] = TH1F_Store_Count
231 TH1F_Store_Count += 1
232 self.TH1F_Store.append(TH1F("th1f_eclTCEmax_State", "ECL E_{max}^{TC} Availability", 2, -0.5, 1.5))
233 self.TH1F_Store[-1].GetXaxis().SetBinLabel(1, "Not Available")
234 self.TH1F_Store[-1].GetXaxis().SetBinLabel(2, "Available")
235 self.TH1F_Index["th1f_eclTCEmax_State"] = TH1F_Store_Count
236 TH1F_Store_Count += 1
237
238 self.TH2F_Store.append(TH2F("th2f_timeGr_vs_grAmp", "Time Group vs Group Amplitude", 60, 0., 300, 21, -1.5, 19.5))
239 self.TH2F_Store[-1].GetXaxis().SetTitle("Group Amplitude")
240 self.TH2F_Store[-1].GetYaxis().SetTitle("Time Group")
241 self.TH2F_Index["th2f_timeGr_vs_grAmp"] = TH2F_Store_Count
242 TH2F_Store_Count += 1
243 self.TH2F_Store.append(TH2F("th2f_timeGr_vs_grCenter", "Time Group vs Group Center", 80, minTime, maxTime, 21, -1.5, 19.5))
244 self.TH2F_Store[-1].GetXaxis().SetTitle("Group Center (ns)")
245 self.TH2F_Store[-1].GetYaxis().SetTitle("Time Group")
246 self.TH2F_Index["th2f_timeGr_vs_grCenter"] = TH2F_Store_Count
247 TH2F_Store_Count += 1
248 self.TH2F_Store.append(TH2F("th2f_timeGr_vs_grWidth", "Time Group vs Group Width", 50, 1, 11, 21, -1.5, 19.5))
249 self.TH2F_Store[-1].GetXaxis().SetTitle("Group Width (ns)")
250 self.TH2F_Store[-1].GetYaxis().SetTitle("Time Group")
251 self.TH2F_Index["th2f_timeGr_vs_grWidth"] = TH2F_Store_Count
252 TH2F_Store_Count += 1
253 self.TH2F_Store.append(TH2F("th2f_timeGr_vs_clsTime", "Time Group vs Cluster Time",
254 timeBin, minTime, maxTime, 21, -1.5, 19.5))
255 self.TH2F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
256 self.TH2F_Store[-1].GetYaxis().SetTitle("Time Group")
257 self.TH2F_Index["th2f_timeGr_vs_clsTime"] = TH2F_Store_Count
258 TH2F_Store_Count += 1
259 self.TH2F_Store.append(TH2F("th2f_timeGr_vs_clsTime_PostTracking", "(PostTracking) Time Group vs Cluster Time",
260 timeBin, minTime, maxTime, 21, -1.5, 19.5))
261 self.TH2F_Store[-1].GetXaxis().SetTitle("Cluster Time (ns)")
262 self.TH2F_Store[-1].GetYaxis().SetTitle("Time Group")
263 self.TH2F_Index["th2f_timeGr_vs_clsTime_PostTracking"] = TH2F_Store_Count
264 TH2F_Store_Count += 1
265
266 for i in range(4):
267 self.TH2F_Store.append(TH2F("th2f_sig" + str(i) + "GrMean_vs_cdcEventT0", "Center of 'Group " +
268 str(i) + "' vs CDC EventT0", 500, -50., 50., 500, -50., 50.))
269 self.TH2F_Store[-1].GetXaxis().SetTitle("Center of 'Group " + str(i) + "' (ns)")
270 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
271 self.TH2F_Index["th2f_sig" + str(i) + "GrMean_vs_cdcEventT0"] = TH2F_Store_Count
272 TH2F_Store_Count += 1
273 self.TH2F_Store.append(TH2F("th2f_sig" + str(i) + "GrMean_vs_cdcEventT0_rot45pos",
274 "Center of 'Group " + str(i) + "' vs CDC EventT0 (Rotated 45)",
275 500, -50., 50., 500, -50., 50.))
276 self.TH2F_Store[-1].GetXaxis().SetTitle("Center of 'Group " + str(i) + "' (ns)")
277 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
278 self.TH2F_Index["th2f_sig" + str(i) + "GrMean_vs_cdcEventT0_rot45pos"] = TH2F_Store_Count
279 TH2F_Store_Count += 1
280 self.TH2F_Store.append(TH2F("th2f_sig" + str(i) + "GrMean_vs_cdcEventT0_rot45neg",
281 "Center of 'Group " + str(i) + "' vs CDC EventT0 (Rotated -45)",
282 500, -50., 50., 500, -50., 50.))
283 self.TH2F_Store[-1].GetXaxis().SetTitle("Center of 'Group " + str(i) + "' (ns)")
284 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
285 self.TH2F_Index["th2f_sig" + str(i) + "GrMean_vs_cdcEventT0_rot45neg"] = TH2F_Store_Count
286 TH2F_Store_Count += 1
287
288 self.TH2F_Store.append(TH2F("th2f_aveClsTimeInTrk_vs_cdcEventT0",
289 "Track Time vs CDC EventT0", 500, -50., 50., 500, -50., 50.))
290 self.TH2F_Store[-1].GetXaxis().SetTitle("<Cluster Time> in Track (ns)")
291 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
292 self.TH2F_Index["th2f_aveClsTimeInTrk_vs_cdcEventT0"] = TH2F_Store_Count
293 TH2F_Store_Count += 1
294 self.TH2F_Store.append(TH2F("th2f_svdEventT0_vs_cdcEventT0", "SVD EventT0 vs CDC EventT0",
295 500, -50., 50., 500, -50., 50.))
296 self.TH2F_Store[-1].GetXaxis().SetTitle("SVD EventT0 (ns)")
297 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
298 self.TH2F_Index["th2f_svdEventT0_vs_cdcEventT0"] = TH2F_Store_Count
299 TH2F_Store_Count += 1
300 self.TH2F_Store.append(TH2F("th2f_svdEventT0_vs_cdcEventT0_rot45pos",
301 "SVD EventT0 vs CDC EventT0 (Rotated 45)", 500, -50., 50., 500, -50., 50.))
302 self.TH2F_Store[-1].GetXaxis().SetTitle("SVD EventT0 (ns)")
303 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
304 self.TH2F_Index["th2f_svdEventT0_vs_cdcEventT0_rot45pos"] = TH2F_Store_Count
305 TH2F_Store_Count += 1
306 self.TH2F_Store.append(TH2F("th2f_svdEventT0_vs_cdcEventT0_rot45neg",
307 "SVD EventT0 vs CDC EventT0 (Rotated -45)", 500, -50., 50., 500, -50., 50.))
308 self.TH2F_Store[-1].GetXaxis().SetTitle("SVD EventT0 (ns)")
309 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 (ns)")
310 self.TH2F_Index["th2f_svdEventT0_vs_cdcEventT0_rot45neg"] = TH2F_Store_Count
311 TH2F_Store_Count += 1
312
313 self.TH2F_Store.append(TH2F("th2f_trkTime_vs_clsTime_inCDCEventT0", "Track Time vs Cluster Time",
314 timeBin, minTime, maxTime, timeBin, minTime, maxTime))
315 self.TH2F_Store[-1].GetXaxis().SetTitle("Track Time - Cluster Time (ns)")
316 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 - Track Time (ns)")
317 self.TH2F_Index["th2f_trkTime_vs_clsTime_inCDCEventT0"] = TH2F_Store_Count
318 TH2F_Store_Count += 1
319 self.TH2F_Store.append(TH2F("th2f_trkTime_vs_clsTime_inSVDEventT0", "Track Time vs Cluster Time",
320 timeBin, minTime, maxTime, timeBin, minTime, maxTime))
321 self.TH2F_Store[-1].GetXaxis().SetTitle("Track Time - Cluster Time (ns)")
322 self.TH2F_Store[-1].GetYaxis().SetTitle("SVD EventT0 - Track Time (ns)")
323 self.TH2F_Index["th2f_trkTime_vs_clsTime_inSVDEventT0"] = TH2F_Store_Count
324 TH2F_Store_Count += 1
325
326 self.TH2F_Store.append(TH2F("th2f_aveClsTimeInTrk_vs_clsTime_inCDCEventT0", "<Cluster Time> in Track vs Cluster Time",
327 timeBin, minTime, maxTime, timeBin, minTime, maxTime))
328 self.TH2F_Store[-1].GetXaxis().SetTitle("<Cluster Time> in Track - Cluster Time (ns)")
329 self.TH2F_Store[-1].GetYaxis().SetTitle("CDC EventT0 - <Cluster Time> in Track (ns)")
330 self.TH2F_Index["th2f_aveClsTimeInTrk_vs_clsTime_inCDCEventT0"] = TH2F_Store_Count
331 TH2F_Store_Count += 1
332 self.TH2F_Store.append(TH2F("th2f_aveClsTimeInTrk_vs_clsTime_inSVDEventT0", "<Cluster Time> in Track vs Cluster Time",
333 timeBin, minTime, maxTime, timeBin, minTime, maxTime))
334 self.TH2F_Store[-1].GetXaxis().SetTitle("<Cluster Time> in Track - Cluster Time (ns)")
335 self.TH2F_Store[-1].GetYaxis().SetTitle("SVD EventT0 - <Cluster Time> in Track (ns)")
336 self.TH2F_Index["th2f_aveClsTimeInTrk_vs_clsTime_inSVDEventT0"] = TH2F_Store_Count
337 TH2F_Store_Count += 1
338
339
340
341 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_clsTimeTopRef_PreTracking",
342 "(PreTracking) ECL E_{max}^{TC} vs Cluster Time - TOP Online EventT0",
343 usedBin1, eclMinVal, eclMaxVal, usedBin2, -50, 50.))
344 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
345 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("Cluster Time - TOP Online EventT0 (ns)")
346 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_clsTimeTopRef_PreTracking"] = reso_TH2D_Histograms_Count
347 reso_TH2D_Histograms_Count += 1
348 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_clsTimeTopRef_PostTracking",
349 "(PostTracking) ECL E_{max}^{TC} vs Cluster Time - TOP Online EventT0",
350 usedBin1, eclMinVal, eclMaxVal, usedBin2, -50, 50.))
351 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
352 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("Cluster Time - TOP Online EventT0 (ns)")
353 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_clsTimeTopRef_PostTracking"] = reso_TH2D_Histograms_Count
354 reso_TH2D_Histograms_Count += 1
355
356 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_svdEventT0TopRef",
357 "ECL E_{max}^{TC} vs SVD EventT0 - TOP Online EventT0",
358 usedBin1, eclMinVal, eclMaxVal, usedBin2, -50, 50.))
359 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
360 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("SVD EventT0 - TOP Online EventT0 (ns)")
361 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_svdEventT0TopRef"] = reso_TH2D_Histograms_Count
362 reso_TH2D_Histograms_Count += 1
363
364 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_totalTracks",
365 "ECL E_{max}^{TC} vs Total SVD Tracks",
366 usedBin1, eclMinVal, eclMaxVal, 36, -0.5, 35.5))
367 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
368 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("Total SVD Tracks")
369 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_totalTracks"] = reso_TH2D_Histograms_Count
370 reso_TH2D_Histograms_Count += 1
371
372 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_totalClusters_PreTracking",
373 "(PreTracking) ECL E_{max}^{TC} vs Total SVD Clusters",
374 usedBin1, eclMinVal, eclMaxVal, 1000, 0.5, 1000.5))
375 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
376 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("Total SVD Clusters")
377 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_totalClusters_PreTracking"] = reso_TH2D_Histograms_Count
378 reso_TH2D_Histograms_Count += 1
379 self.reso_TH2D_Histograms.append(TH2F("reso_eclTCEmax_vs_totalClusters_PostTracking",
380 "(PostTracking) ECL E_{max}^{TC} vs Total SVD Clusters",
381 usedBin1, eclMinVal, eclMaxVal, 1000, 0.5, 1000.5))
382 self.reso_TH2D_Histograms[-1].GetXaxis().SetTitle("ECL E_{max}^{TC} (ADC)")
383 self.reso_TH2D_Histograms[-1].GetYaxis().SetTitle("Total SVD Clusters")
384 self.reso_TH2D_Histogram_Index["reso_eclTCEmax_vs_totalClusters_PostTracking"] = reso_TH2D_Histograms_Count
385 reso_TH2D_Histograms_Count += 1
386