94{
95 float nan = numeric_limits<float>::quiet_NaN();
96
97
98 TH1F* h_zs5countsU = (TH1F*)
findHist(
"SVDExpReco/SVDDQM_StripCountsU");
99 TH1F* h_zs5countsV = (TH1F*)
findHist(
"SVDExpReco/SVDDQM_StripCountsV");
100 TH1F* h_events = (TH1F*)
findHist(
"SVDExpReco/SVDDQM_nEvents");
101
102
106 if (h_zs5countsU) h_zs5countsU->Draw("colz");
108 if (h_zs5countsV) h_zs5countsV->Draw("colz");
110 if (h_events) h_events->Draw("colz");
111
112 int nE = 0;
113 if (h_events) nE = h_events->GetEntries();
114
115
116 if (h_zs5countsU == NULL || h_zs5countsV == NULL || h_events == NULL) {
117 if (h_zs5countsU == NULL) {
118 B2INFO("Histograms needed for Average Offline Occupancy on U side are not found");
119 }
120 if (h_zs5countsV == NULL) {
121 B2INFO("Histograms needed for Average Offline Occupancy on V side are not found");
122 }
123 } else {
124
125 std::pair<float, float> avgOffOccL3UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3);
127
128 std::pair<float, float> avgOffOccL4UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4);
130
131 std::pair<float, float> avgOffOccL5UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5);
133
134 std::pair<float, float> avgOffOccL6UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6);
136
137
140
143
146
149
150
151 std::pair<float, float> avgOffOccL3X1UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, -1, 1);
153
154 std::pair<float, float> avgOffOccL3X2UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, -1, 2);
156
157 std::pair<float, float> avgOffOccL4X1UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, -1, 1);
159
160 std::pair<float, float> avgOffOccL4X2UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, -1, 2);
162
163 std::pair<float, float> avgOffOccL4X3UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, -1, 3);
165
166 std::pair<float, float> avgOffOccL5X1UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, -1, 1);
168
169 std::pair<float, float> avgOffOccL5X2UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, -1, 2);
171
172 std::pair<float, float> avgOffOccL5X3UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, -1, 3);
174
175 std::pair<float, float> avgOffOccL5X4UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, -1, 4);
177
178 std::pair<float, float> avgOffOccL6X1UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, -1, 1);
180
181 std::pair<float, float> avgOffOccL6X2UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, -1, 2);
183
184 std::pair<float, float> avgOffOccL6X3UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, -1, 3);
186
187 std::pair<float, float> avgOffOccL6X4UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, -1, 4);
189
190 std::pair<float, float> avgOffOccL6X5UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, -1, 5);
192
193
194 std::pair<float, float> avgOffOccL311UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, 1, 1);
196
197 std::pair<float, float> avgOffOccL312UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, 1, 2);
199
200 std::pair<float, float> avgOffOccL321UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, 2, 1);
202
203 std::pair<float, float> avgOffOccL322UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 3, 2, 2);
205
206 std::pair<float, float> avgOffOccL461UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, 6, 1);
208
209 std::pair<float, float> avgOffOccL462UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, 6, 2);
211
212 std::pair<float, float> avgOffOccL581UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 8, 1);
214
215 std::pair<float, float> avgOffOccL582UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 8, 2);
217
218 std::pair<float, float> avgOffOccL6101UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 10, 1);
220
221 std::pair<float, float> avgOffOccL6102UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 10, 2);
223
224
225
226
227 std::pair<float, float> avgOffOccL411UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, 1, 1);
229
230 std::pair<float, float> avgOffOccL4102UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, 10, 2);
232
233
234 std::pair<float, float> avgOffOccL433UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 4, 3, 3);
236
237 std::pair<float, float> avgOffOccL513UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 1, 3);
239
240 std::pair<float, float> avgOffOccL514UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 1, 4);
242
243 std::pair<float, float> avgOffOccL592UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 9, 2);
245
246 std::pair<float, float> avgOffOccL594UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 5, 9, 4);
248
249 std::pair<float, float> avgOffOccL643UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 4, 3);
251
252 std::pair<float, float> avgOffOccL664UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 6, 4);
254
255 std::pair<float, float> avgOffOccL6103UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 10, 3);
257
258 std::pair<float, float> avgOffOccL6115UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 11, 5);
260
261 std::pair<float, float> avgOffOccL6124UV =
avgOccupancyUV(h_zs5countsU, h_zs5countsV, nE, 6, 12, 4);
263 }
264
265
266
267 TH2F* h_found_tracksU = (TH2F*)
findHist(
"SVDEfficiency/TrackHitsU");
268 TH2F* h_matched_clusU = (TH2F*)
findHist(
"SVDEfficiency/MatchedHitsU");
269 TH2F* h_found_tracksV = (TH2F*)
findHist(
"SVDEfficiency/TrackHitsV");
270 TH2F* h_matched_clusV = (TH2F*)
findHist(
"SVDEfficiency/MatchedHitsV");
271
275 if (h_found_tracksU) h_found_tracksU->Draw("colz");
277 if (h_found_tracksV) h_found_tracksV->Draw("colz");
279 if (h_matched_clusU) h_matched_clusU->Draw("colz");
281 if (h_matched_clusV) h_matched_clusV->Draw("colz");
282
283
284 if (h_matched_clusU == NULL || h_matched_clusV == NULL || h_found_tracksU == NULL) {
285 if (h_matched_clusU == NULL) {
286 B2INFO("Histograms needed for Average Efficiency on U side are not found");
287 }
288 if (h_matched_clusV == NULL) {
289 B2INFO("Histograms needed for Average Efficiency on V side are not found");
290 }
291 } else {
292
293 std::pair<float, float> avgEffL3 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3);
295
296 std::pair<float, float> avgEffL4 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4);
298
299 std::pair<float, float> avgEffL5 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5);
301
302 std::pair<float, float> avgEffL6 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6);
304
305
306 std::pair<float, float> avgEffL3456 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV);
308
309
310 std::pair<float, float> avgEffL3X1 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, -1, 1);
312
313
314 std::pair<float, float> avgEffL3X2 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, -1, 2);
316
317
318 std::pair<float, float> avgEffL4X1 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, -1, 1);
320
321
322 std::pair<float, float> avgEffL4X2 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, -1, 2);
324
325
326 std::pair<float, float> avgEffL4X3 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, -1, 3);
328
329
330 std::pair<float, float> avgEffL5X1 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, -1, 1);
332
333
334 std::pair<float, float> avgEffL5X2 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, -1, 2);
336
337
338 std::pair<float, float> avgEffL5X3 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, -1, 3);
340
341
342 std::pair<float, float> avgEffL5X4 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, -1, 4);
344
345
346 std::pair<float, float> avgEffL6X1 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, -1, 1);
348
349
350 std::pair<float, float> avgEffL6X2 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, -1, 2);
352
353
354 std::pair<float, float> avgEffL6X3 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, -1, 3);
356
357
358 std::pair<float, float> avgEffL6X4 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, -1, 4);
360
361
362 std::pair<float, float> avgEffL6X5 =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, -1, 5);
364
365
366 std::pair<float, float> avgEffL311UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, 1,
367 1);
369
370 std::pair<float, float> avgEffL312UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, 1,
371 2);
373
374 std::pair<float, float> avgEffL321UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, 2,
375 1);
377
378 std::pair<float, float> avgEffL322UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 3, 2,
379 2);
381
382 std::pair<float, float> avgEffL461UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, 6,
383 1);
385
386 std::pair<float, float> avgEffL462UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, 6,
387 2);
389
390 std::pair<float, float> avgEffL581UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 8,
391 1);
393
394 std::pair<float, float> avgEffL582UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 8,
395 2);
397
398 std::pair<float, float> avgEffL6101UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 10,
399 1);
401
402 std::pair<float, float> avgEffL6102UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 10,
403 2);
405
406
407
408
409 std::pair<float, float> avgEffL411UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, 1,
410 1);
412
413 std::pair<float, float> avgEffL4102UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, 10,
414 2);
416
417
418 std::pair<float, float> avgEffL433UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 4, 3,
419 3);
421
422 std::pair<float, float> avgEffL513UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 1,
423 3);
425
426 std::pair<float, float> avgEffL514UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 1,
427 4);
429
430 std::pair<float, float> avgEffL592UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 9,
431 2);
433
434 std::pair<float, float> avgEffL594UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 5, 9,
435 4);
437
438 std::pair<float, float> avgEffL643UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 4,
439 3);
441
442 std::pair<float, float> avgEffL664UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 6,
443 4);
445
446 std::pair<float, float> avgEffL6103UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 10,
447 3);
449
450 std::pair<float, float> avgEffL6115UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 11,
451 5);
453
454 std::pair<float, float> avgEffL6124UV =
avgEfficiencyUV(h_matched_clusU, h_matched_clusV, h_found_tracksU, h_found_tracksV, 6, 12,
455 4);
457 }
458
459
460 TH1F* h_clusterCharge_L3U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterChargeU3");
461 TH1F* h_clusterCharge_L3V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterChargeV3");
462 TH1F* h_clusterCharge_L456U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterChargeU456");
463 TH1F* h_clusterCharge_L456V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterChargeV456");
464
468 if (h_clusterCharge_L3U) h_clusterCharge_L3U->Draw();
470 if (h_clusterCharge_L3V) h_clusterCharge_L3V->Draw();
472 if (h_clusterCharge_L456U) h_clusterCharge_L456U->Draw();
474 if (h_clusterCharge_L456U) h_clusterCharge_L456U->Draw();
475
476
477 float MPVClusterChargeL3U = nan;
478 if (h_clusterCharge_L3U)
479 if (h_clusterCharge_L3U->GetEntries() != 0)
480 MPVClusterChargeL3U =
xForMaxY(h_clusterCharge_L3U);
481 float MPVClusterChargeL3V = nan;
482 if (h_clusterCharge_L3V)
483 if (h_clusterCharge_L3V->GetEntries() != 0)
484 MPVClusterChargeL3V =
xForMaxY(h_clusterCharge_L3V);
485 float MPVClusterChargeL456U = nan;
486 if (h_clusterCharge_L456U)
487 if (h_clusterCharge_L456U->GetEntries() != 0)
488 MPVClusterChargeL456U =
xForMaxY(h_clusterCharge_L456U);
489 float MPVClusterChargeL456V = nan;
490 if (h_clusterCharge_L456V)
491 if (h_clusterCharge_L456V->GetEntries() != 0)
492 MPVClusterChargeL456V =
xForMaxY(h_clusterCharge_L456V);
493
494 if (h_clusterCharge_L3U == NULL || h_clusterCharge_L456U == NULL) {
495 B2INFO("Histograms needed for MPV cluster charge on U side are not found");
496 } else {
497 m_monObj->setVariable(
"MPVClusterChargeL3U", MPVClusterChargeL3U);
498 m_monObj->setVariable(
"MPVClusterChargeL456U", MPVClusterChargeL456U);
499 }
500
501 if (h_clusterCharge_L3V == NULL || h_clusterCharge_L456V == NULL) {
502 B2INFO("Histograms needed for MPV cluster charge on V side are not found");
503 } else {
504 m_monObj->setVariable(
"MPVClusterChargeL3V", MPVClusterChargeL3V);
505 m_monObj->setVariable(
"MPVClusterChargeL456V", MPVClusterChargeL456V);
506 }
507
508
509
510 TH1F* h_clusterSNR_L3U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterSNRU3");
511 TH1F* h_clusterSNR_L3V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterSNRV3");
512 TH1F* h_clusterSNR_L456U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterSNRU456");
513 TH1F* h_clusterSNR_L456V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterSNRV456");
514
518 if (h_clusterSNR_L3U) h_clusterSNR_L3U->Draw();
520 if (h_clusterSNR_L3V) h_clusterSNR_L3V->Draw();
522 if (h_clusterSNR_L456U) h_clusterSNR_L456U->Draw();
524 if (h_clusterSNR_L456V) h_clusterSNR_L456V->Draw();
525
526 float MPVClusterSNRL3U = nan;
527 if (h_clusterSNR_L3U)
528 if (h_clusterSNR_L3U->GetEntries() != 0)
529 MPVClusterSNRL3U =
xForMaxY(h_clusterSNR_L3U);
530 float MPVClusterSNRL3V = nan;
531 if (h_clusterSNR_L3V)
532 if (h_clusterSNR_L3V->GetEntries() != 0)
533 MPVClusterSNRL3V =
xForMaxY(h_clusterSNR_L3V);
534 float MPVClusterSNRL456U = nan;
535 if (h_clusterSNR_L456U)
536 if (h_clusterSNR_L456U->GetEntries() != 0)
537 MPVClusterSNRL456U =
xForMaxY(h_clusterSNR_L456U);
538 float MPVClusterSNRL456V = nan;
539 if (h_clusterSNR_L456V)
540 if (h_clusterSNR_L456V->GetEntries() != 0)
541 MPVClusterSNRL456V =
xForMaxY(h_clusterSNR_L456V);
542
543 if (h_clusterSNR_L3U == NULL || h_clusterSNR_L456U == NULL) {
544 B2INFO("Histograms needed for MPV cluster SNR on U side are not found");
545 } else {
546 m_monObj->setVariable(
"MPVClusterSNRL3U", MPVClusterSNRL3U);
547 m_monObj->setVariable(
"MPVClusterSNRL456U", MPVClusterSNRL456U);
548 }
549
550 if (h_clusterSNR_L3V == NULL || h_clusterSNR_L456V == NULL) {
551 B2INFO("Histograms needed for MPV cluster SNR on V side are not found");
552 } else {
553 m_monObj->setVariable(
"MPVClusterSNRL3V", MPVClusterSNRL3V);
554 m_monObj->setVariable(
"MPVClusterSNRL456V", MPVClusterSNRL456V);
555 }
556
557
558
559 TH1F* h_clusterTime_L3U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeU3");
560 TH1F* h_clusterTime_L3V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeV3");
561 TH1F* h_clusterTime_L456U = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeU456");
562 TH1F* h_clusterTime_L456V = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeV456");
563 TH1F* h_MeanSVD3EventT0 = (TH1F*)
findHist(
"SVDHitTime/SVD3EventT0");
564 TH1F* h_MeanSVD6EventT0 = (TH1F*)
findHist(
"SVDHitTime/SVD6EventT0");
565 TH1F* h_MeanSVDEventT0 = 0x0;
566
567 if (h_MeanSVD3EventT0)
568 h_MeanSVDEventT0 = (TH1F*)h_MeanSVD3EventT0->Clone();
569
573 if (h_clusterTime_L3U) h_clusterTime_L3U->Draw();
575 if (h_clusterTime_L3V) h_clusterTime_L3V->Draw();
577 if (h_clusterTime_L456U) h_clusterTime_L456U->Draw();
579 if (h_clusterTime_L456V) h_clusterTime_L456V->Draw();
580
584 if (h_MeanSVD3EventT0) h_MeanSVD3EventT0->Draw();
586 if (h_MeanSVD6EventT0) h_MeanSVD6EventT0->Draw();
588 if (h_MeanSVDEventT0) {
589 if (h_MeanSVD6EventT0)
590 h_MeanSVDEventT0->Add(h_MeanSVD6EventT0);
591 h_MeanSVDEventT0->Draw();
592 }
593
594 float MPVClusterTimeL3U = nan;
595 if (h_clusterTime_L3U)
596 if (h_clusterTime_L3U->GetEntries() != 0)
597 MPVClusterTimeL3U =
xForMaxY(h_clusterTime_L3U);
598 float MPVClusterTimeL3V = nan;
599 if (h_clusterTime_L3V)
600 if (h_clusterTime_L3V->GetEntries() != 0)
601 MPVClusterTimeL3V =
xForMaxY(h_clusterTime_L3V);
602 float MPVClusterTimeL456U = nan;
603 if (h_clusterTime_L456U)
604 if (h_clusterTime_L456U->GetEntries() != 0)
605 MPVClusterTimeL456U =
xForMaxY(h_clusterTime_L456U);
606 float MPVClusterTimeL456V = nan;
607 if (h_clusterTime_L456V)
608 if (h_clusterTime_L456V->GetEntries() != 0)
609 MPVClusterTimeL456V =
xForMaxY(h_clusterTime_L456V);
610 float FWHMClusterTimeL3U = nan;
611 if (h_clusterTime_L3U)
612 if (h_clusterTime_L3U->GetEntries() != 0)
613 FWHMClusterTimeL3U =
histFWHM(h_clusterTime_L3U);
614 float FWHMClusterTimeL3V = nan;
615 if (h_clusterTime_L3V)
616 if (h_clusterTime_L3V->GetEntries() != 0)
617 FWHMClusterTimeL3V =
histFWHM(h_clusterTime_L3V);
618 float FWHMClusterTimeL456U = nan;
619 if (h_clusterTime_L456U)
620 if (h_clusterTime_L456U->GetEntries() != 0)
621 FWHMClusterTimeL456U =
histFWHM(h_clusterTime_L456U);
622 float FWHMClusterTimeL456V = nan;
623 if (h_clusterTime_L456V)
624 if (h_clusterTime_L456V->GetEntries() != 0)
625 FWHMClusterTimeL456V =
histFWHM(h_clusterTime_L456V);
626
627 float MeanSVD3EventT0 = nan;
628 if (h_MeanSVD3EventT0)
629 if (h_MeanSVD3EventT0->GetEntries() != 0)
630 MeanSVD3EventT0 =
xForMaxY(h_MeanSVD3EventT0);
631
632 float MeanSVD6EventT0 = nan;
633 if (h_MeanSVD6EventT0)
634 if (h_MeanSVD6EventT0->GetEntries() != 0)
635 MeanSVD6EventT0 =
xForMaxY(h_MeanSVD6EventT0);
636
637 float MeanSVDEventT0 = nan;
638 if (h_MeanSVDEventT0)
639 if (h_MeanSVDEventT0->GetEntries() != 0)
640 MeanSVDEventT0 =
xForMaxY(h_MeanSVDEventT0);
641
642 if (h_clusterTime_L3U == NULL || h_clusterTime_L456U == NULL) {
643 B2INFO("Histograms needed for MPV cluster time on U side are not found");
644 } else {
645 m_monObj->setVariable(
"MPVClusterTimeL3U", MPVClusterTimeL3U);
646 m_monObj->setVariable(
"MPVClusterTimeL456U", MPVClusterTimeL456U);
647 m_monObj->setVariable(
"FWHMClusterTimeL3U", FWHMClusterTimeL3U);
648 m_monObj->setVariable(
"FWHMClusterTimeL456U", FWHMClusterTimeL456U);
649 }
650
651 if (h_clusterTime_L3V == NULL || h_clusterTime_L456V == NULL) {
652 B2INFO("Histograms needed for MPV cluster time on V side are not found");
653 } else {
654 m_monObj->setVariable(
"MPVClusterTimeL3V", MPVClusterTimeL3V);
655 m_monObj->setVariable(
"MPVClusterTimeL456V", MPVClusterTimeL456V);
656 m_monObj->setVariable(
"FWHMClusterTimeL3V", FWHMClusterTimeL3V);
657 m_monObj->setVariable(
"FWHMClusterTimeL456V", FWHMClusterTimeL456V);
658 }
659
660 if (h_MeanSVD3EventT0 == NULL) {
661 B2INFO("Histograms needed for SVD Event T0 (3 samples) not found");
662 } else {
663 m_monObj->setVariable(
"MeanSVD3EventT0", MeanSVD3EventT0);
664 }
665
666 if (h_MeanSVD6EventT0 == NULL) {
667 B2INFO("Histograms needed for SVD Event T0 (6 samples) not found");
668 } else {
669 m_monObj->setVariable(
"MeanSVD6EventT0", MeanSVD6EventT0);
670 }
671
672 if (h_MeanSVDEventT0 == NULL) {
673 B2INFO("Histograms needed for SVD Event T0 (all samples) not found");
674 } else {
675 m_monObj->setVariable(
"MeanSVDEventT0", MeanSVDEventT0);
676 }
677
678
679 TH1F* h_maxBinU = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_StripMaxBinUAll");
680 TH1F* h_maxBinV = (TH1F*)
findHist(
"SVDClsTrk/SVDTRK_StripMaxBinVAll");
681
685 if (h_maxBinU) h_maxBinU->Draw();
687 if (h_maxBinV) h_maxBinV->Draw();
688
689 if (h_maxBinU == NULL) {
690 B2INFO("Histogram needed for Average MaxBin on U side is not found");
691 } else {
692 float avgMaxBinU = h_maxBinU->GetMean();
693 m_monObj->setVariable(
"avgMaxBinU", avgMaxBinU);
694 }
695
696 if (h_maxBinV == NULL) {
697 B2INFO("Histogram needed for Average MaxBin on V side is not found");
698 } else {
699 float avgMaxBinV = h_maxBinV->GetMean();
700 m_monObj->setVariable(
"avgMaxBinV", avgMaxBinV);
701 }
702
703 std::map<std::pair<int, int>, int> ladderMap = {
704 {{3, 1}, 0}, {{3, 2}, 1},
705 {{4, 1}, 2}, {{4, 2}, 3}, {{4, 3}, 4},
706 {{5, 1}, 5}, {{5, 2}, 6}, {{5, 3}, 7}, {{5, 4}, 8},
707 {{6, 1}, 9}, {{6, 2}, 10}, {{6, 3}, 11}, {{6, 4}, 12}, {{6, 5}, 13}
708 };
709
710
711 for (const auto& it : ladderMap) {
712 std::pair<int, int> p = it.first;
713 int layer = p.first;
714 int sensor = p.second;
715
716 TString name = Form("SVDClsTrk/SVDTRK_ClusterCharge_L%d.x.%d", layer, sensor);
717 TString title = Form("MPVClusterCharge_L%d.x.%d", layer, sensor);
718 TH1F* h_clusterCharge = (TH1F*)
findHist(name.Data());
719 float MPVClusterCharge = nan;
720 if (h_clusterCharge)
721 if (h_clusterCharge->GetEntries() != 0)
722 MPVClusterCharge =
xForMaxY(h_clusterCharge);
723
724 if (h_clusterCharge == NULL) {
725 B2INFO("Histograms needed for cluster charge not found");
726 } else {
727 m_monObj->setVariable(title.Data(), MPVClusterCharge);
728 }
729
730 name = Form("SVDClsTrk/SVDTRK_ClusterSNR_L%d.x.%d", layer, sensor);
731 title = Form("MPVClusterSNR_L%d.x.%d", layer, sensor);
732 TH1F* h_clusterSNR = (TH1F*)
findHist(name.Data());
733 float MPVClusterSNR = nan;
734 if (h_clusterSNR)
735 if (h_clusterSNR->GetEntries() != 0)
736 MPVClusterSNR =
xForMaxY(h_clusterSNR);
737
738 if (h_clusterSNR == NULL) {
739 B2INFO("Histograms needed for cluster SNR not found");
740 } else {
741 m_monObj->setVariable(title.Data(), MPVClusterSNR);
742 }
743 }
744
745 for (int ladder = 1; ladder <= 2; ++ladder) {
746 for (int sensor = 1; sensor <= 2; ++sensor) {
747
748 TString name = Form("SVDClsTrk/SVDTRK_ClusterCharge_L3.%d.%d", ladder, sensor);
749 TString title = Form("MPVClusterCharge_L3.%d.%d", ladder, sensor);
750 float MPVClusterCharge = nan;
751 TH1F* h_clusterCharge = (TH1F*)
findHist(name.Data());
752 if (h_clusterCharge)
753 if (h_clusterCharge->GetEntries() != 0)
754 MPVClusterCharge =
xForMaxY(h_clusterCharge);
755
756 if (h_clusterCharge == NULL) {
757 B2INFO("Histograms needed for cluster charge not found");
758 } else {
759 m_monObj->setVariable(title.Data(), MPVClusterCharge);
760 }
761
762 name = Form("SVDClsTrk/SVDTRK_ClusterSNR_L3.%d.%d", ladder, sensor);
763 title = Form("MPVClusterSNR_L3.%d.%d", ladder, sensor);
764 TH1F* h_clusterSNR = (TH1F*)
findHist(name.Data());
765 float MPVClusterSNR = nan;
766 if (h_clusterSNR)
767 if (h_clusterSNR->GetEntries() != 0)
768 MPVClusterSNR =
xForMaxY(h_clusterSNR);
769
770 if (h_clusterSNR == NULL) {
771 B2INFO("Histograms needed for cluster SNR not found");
772 } else {
773 m_monObj->setVariable(title.Data(), MPVClusterSNR);
774 }
775 }
776 }
777
778 B2INFO("DQMHistAnalysisSVDGeneral: endRun called");
779}
float histFWHM(TH1F *h) const
Calculate full width at half maximum of histogram.
TCanvas * m_c_MPVTimeClusterOnTrack
time for clusters on track
TCanvas * m_c_MeanSVDEventT0
Mean Event T0 from SVD.
TCanvas * m_c_MPVChargeClusterOnTrack
charge for clusters on track
TCanvas * m_c_avgEfficiency
List of canvases to be added to MonitoringObject.
std::pair< float, float > avgOccupancyGrpId0UV(int iLayer, int nEvents) const
Calculate avg offline occupancy for specified layer for time group id = 0.
std::pair< float, float > avgOccupancyUV(TH1F *hU, TH1F *hV, int nEvents, int layer=-1, int ladder=-1, int sensor=-1) const
Calculate avg offline occupancy for one specific sensor, especially.
std::pair< float, float > avgEfficiencyUV(TH2F *hMCU, TH2F *hMCV, TH2F *hFTU, TH2F *hFTV, int layer=-1, int ladder=-1, int sensor=-1) const
Calculate avg efficiency for specified sensors.
TCanvas * m_c_MPVSNRClusterOnTrack
SNR for clusters on track.
float xForMaxY(TH1F *h) const
Calculate abscissa of max Y bin.
TCanvas * m_c_avgOffOccupancy
number of ZS5 fired strips
TCanvas * m_c_avgMaxBinClusterOnTrack
average number of the APV sample which corresponds to the maximum amplitude for clusters on track
#define SetVariable(x)
set variable to mirabelle for a given member