Belle II Software development
SVDLocalCalibrationsCheckModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <svd/modules/svdCalibration/SVDLocalCalibrationsCheckModule.h>
10#include <vxd/geometry/GeoCache.h>
11#include <svd/geometry/SensorInfo.h>
12
13#include <TCanvas.h>
14#include <TLine.h>
15#include <TPaveText.h>
16#include <TStyle.h>
17#include <TText.h>
18
19using namespace Belle2;
20
21//-----------------------------------------------------------------
22// Register the Module
23//-----------------------------------------------------------------
24REG_MODULE(SVDLocalCalibrationsCheck);
25
26//-----------------------------------------------------------------
27// Implementation
28//-----------------------------------------------------------------
29
31{
32 // Set module properties
33 setDescription("Module to produce a list of histograms showing the uploaded calibration constants");
34
35 // Parameter definitions
36 addParam("outputPdfName", m_outputPdfName, "output pdf filename", std::string("SVDLocalCalibrationsCheck.pdf"));
37 addParam("referenceID", m_idFileNameREF, "ID of REFERENCE xml file.",
38 std::string("refID"));
39 addParam("checkID", m_idFileNameCHECK, "ID of CHECK xml file.",
40 std::string("checkID"));
41 addParam("reference_root", m_rootFileNameREF, "Name of REFERENCE root file.",
42 std::string("SVDLocalCalibrationsMonitor_ref.root"));
43 addParam("check_root", m_rootFileNameCHECK, "Name of CHECK root file.",
44 std::string("SVDLocalCalibrationsMonitor_check.root"));
45 addParam("plotGoodAPVs", m_plotGoodAPVs, "If true draw 1D plots also for good APVs", bool(false));
46
47 addParam("cutN_outliers", m_cutN_out, "Max number of outliers allowed", int(5));
48 addParam("cutNoise_average", m_cutNoise_ave, "Max deviation of average noise per APV, in ADC", float(0.1));
49 addParam("cutNoise_outliers", m_cutNoise_out, "Max deviation of single strip, in ADC", float(2));
50 addParam("cutCalPeakADC_average", m_cutCalpeakADC_ave, "Max deviation of average CalPeakADC per APV, in ADC", float(4));
51 addParam("cutCalPeakADC_outliers", m_cutCalpeakADC_out, "Max deviation of single strip, in ADC", float(10));
52 addParam("cutPedestal_average", m_cutPedestal_ave, "Max deviation of average pedestal per APV, in ADC", float(4));
53 addParam("cutPedestal_outliers", m_cutPedestal_out, "Max deviation of single strip, in ADC", float(10));
54
55}
56
58{
59 B2INFO("SVD Local Calibration Check Configuration");
60 B2INFO("-----------------------------------------");
61 B2INFO("");
62 B2INFO("- input files:");
63 B2INFO(" reference: " << m_idFileNameREF);
64 B2INFO(" check: " << m_idFileNameCHECK);
65 B2INFO("- output file:");
66 B2INFO(" output pdf: " << m_outputPdfName);
67 B2INFO("");
68 B2INFO("- analysis parameters:");
69 B2INFO(" outliers (Noise, Pedestal, CalPeakADC)");
70 B2INFO(" max allowed outliers = " << m_cutN_out);
71 B2INFO(" Noise");
72 B2INFO(" max difference on the APV averages = " << m_cutNoise_ave << " ADC");
73 B2INFO(" max to mark a strip as outlier = " << m_cutNoise_out << " ADC");
74 B2INFO(" CalPeakADC");
75 B2INFO(" max difference on the APV averages = " << m_cutCalpeakADC_ave << " ADC");
76 B2INFO(" max to mark a strip as outlier = " << m_cutCalpeakADC_out << " ADC");
77 B2INFO(" Pedestal");
78 B2INFO(" max difference on the APV averages = " << m_cutPedestal_ave << " ADC");
79 B2INFO(" max to mark a strip as outlier = " << m_cutPedestal_out << " ADC");
80 B2INFO("--------------------------------------------------------------");
81 B2INFO("");
82}
83
85{
86
88
89 gStyle->SetOptStat(0);
90 gStyle->SetLegendBorderSize(0);
91 gStyle->SetTextFont(42);
92
93 // read REFERENCE root file
94 m_rootFilePtrREF = new TFile(m_rootFileNameREF.c_str(), "READ");
95
96 // m_rootFilePtrREF->Print();
97
98 //REF tree initialization
99 m_treeREF = (TTree*)m_rootFilePtrREF->Get("calibLocalDetailed");
100 m_treeREF->SetBranchAddress("run", &m_runREF, &b_runREF);
101 m_treeREF->SetBranchAddress("layer", &m_layerREF, &b_layerREF);
102 m_treeREF->SetBranchAddress("ladder", &m_ladderREF, &b_ladderREF);
103 m_treeREF->SetBranchAddress("sensor", &m_sensorREF, &b_sensorREF);
104 m_treeREF->SetBranchAddress("side", &m_sideREF, &b_sideREF);
105 m_treeREF->SetBranchAddress("strip", &m_stripREF, &b_stripREF);
106 m_treeREF->SetBranchAddress("mask", &m_maskREF, &b_maskREF);
107 m_treeREF->SetBranchAddress("noise", &m_noiseREF, &b_noiseREF);
108 m_treeREF->SetBranchAddress("noiseEl", &m_noiseElREF, &b_noiseElREF);
109 m_treeREF->SetBranchAddress("gain", &m_gainREF, &b_gainREF);
110 m_treeREF->SetBranchAddress("pedestal", &m_pedestalREF, &b_pedestalREF);
111 m_treeREF->SetBranchAddress("calPeakADC", &m_calPeakADCREF, &b_calPeakADCREF);
112 m_treeREF->SetBranchAddress("calPeakTime", &m_calPeakTimeREF, &b_calPeakTimeREF);
113 m_treeREF->SetBranchAddress("pulseWidth", &m_pulseWidthREF, &b_pulseWidthREF);
114
115 // read CHECK root file
116 m_rootFilePtrCHECK = new TFile(m_rootFileNameCHECK.c_str(), "READ");
117 // m_rootFilePtrCHECK->Print();
118
119 //CHECK tree initialization
120 m_treeCHECK = (TTree*)m_rootFilePtrCHECK->Get("calibLocalDetailed");
121 m_treeCHECK->SetBranchAddress("run", &m_runCHECK, &b_runCHECK);
122 m_treeCHECK->SetBranchAddress("layer", &m_layerCHECK, &b_layerCHECK);
123 m_treeCHECK->SetBranchAddress("ladder", &m_ladderCHECK, &b_ladderCHECK);
124 m_treeCHECK->SetBranchAddress("sensor", &m_sensorCHECK, &b_sensorCHECK);
125 m_treeCHECK->SetBranchAddress("side", &m_sideCHECK, &b_sideCHECK);
126 m_treeCHECK->SetBranchAddress("strip", &m_stripCHECK, &b_stripCHECK);
127 m_treeCHECK->SetBranchAddress("mask", &m_maskCHECK, &b_maskCHECK);
128 m_treeCHECK->SetBranchAddress("noise", &m_noiseCHECK, &b_noiseCHECK);
129 m_treeCHECK->SetBranchAddress("noiseEl", &m_noiseElCHECK, &b_noiseElCHECK);
130 m_treeCHECK->SetBranchAddress("gain", &m_gainCHECK, &b_gainCHECK);
131 m_treeCHECK->SetBranchAddress("pedestal", &m_pedestalCHECK, &b_pedestalCHECK);
132 m_treeCHECK->SetBranchAddress("calPeakTime", &m_calPeakTimeCHECK, &b_calPeakTimeCHECK);
133 m_treeCHECK->SetBranchAddress("calPeakADC", &m_calPeakADCCHECK, &b_calPeakADCCHECK);
134 m_treeCHECK->SetBranchAddress("pulseWidth", &m_pulseWidthCHECK, &b_pulseWidthCHECK);
135
136
138 m_h2MaskREF = (SVDHistograms<TH2F>*)m_rootFilePtrREF->Get("expert/h2Mask");
139 m_h2MaskCHECK = (SVDHistograms<TH2F>*)m_rootFilePtrCHECK->Get("expert/h2Mask");
140
141 TH1F template_mask("maskDIFF_L@layerL@ladderS@sensor@view@apv",
142 "Mask Deviation Distribution in @layer.@ladder.@sensor @view/@side",
143 // 200, -1, 1);
144 200, -5, 5);
145 // template_mask.GetXaxis()->SetTitle("( ref - check ) / ref");
146 template_mask.GetXaxis()->SetTitle("ref - check");
147 m_hMaskDIFF = new SVDAPVHistograms<TH1F>(template_mask);
149 m_hMaskSummary = new SVDSummaryPlots("maskSummary@view", "REF - CHECK Number of Masked strips @view/@side Side");
150 m_hMaskSummaryCHECK = new SVDSummaryPlots("maskCHECKSummary@view", "CHECK Number Masked Strips @view/@side Side");
151
153 m_h2NoiseREF = (SVDHistograms<TH2F>*)m_rootFilePtrREF->Get("expert/h2Noise");
154 m_h2NoiseCHECK = (SVDHistograms<TH2F>*)m_rootFilePtrCHECK->Get("expert/h2Noise");
155
156 TH1F template_noise("noiseDIFF_L@layerL@ladderS@sensor@view@apv",
157 "Noise Deviation Distribution in @layer.@ladder.@sensor @view/@side",
158 // 200, -1, 1);
159 200, -5, 5);
160 // template_noise.GetXaxis()->SetTitle("( ref - check ) / ref");
161 template_noise.GetXaxis()->SetTitle("ref - check (ADC)");
162 m_hNoiseDIFF = new SVDAPVHistograms<TH1F>(template_noise);
164 m_hNoiseSummary = new SVDSummaryPlots("noiseSummary@view", "Number of problematic APV chips due to Noise for @view/@side Side");
165
166
167
168
170 m_h2CalpeakTimeREF = (SVDHistograms<TH2F>*)m_rootFilePtrREF->Get("expert/h2CalPeakTime");
171 m_h2CalpeakTimeCHECK = (SVDHistograms<TH2F>*)m_rootFilePtrCHECK->Get("expert/h2CalPeakTime");
172
173 TH1F template_calpeakTime("calpeakTimeDIFF_L@layerL@ladderS@sensor@view@apv",
174 // "CalpeakTime Deviation Distribution in @layer.@ladder.@sensor @view/@side APV @apv",
175 "CalPeakTime Deviation Distribution in @layer.@ladder.@sensor @view/@side",
176 500, -0.5, 0.5);
177 template_calpeakTime.GetXaxis()->SetTitle("( ref - check ) / ref");
178 m_hCalpeakTimeDIFF = new SVDAPVHistograms<TH1F>(template_calpeakTime);
180 m_hCalpeakTimeSummary = new SVDSummaryPlots("calPeakTimeSummary@view",
181 "Number of problematic APV chips due to CalPeakTime for @view/@side Side for @view/@side Side");
182
184 m_h2CalpeakADCREF = (SVDHistograms<TH2F>*)m_rootFilePtrREF->Get("expert/h2CalPeakADC");
185 m_h2CalpeakADCCHECK = (SVDHistograms<TH2F>*)m_rootFilePtrCHECK->Get("expert/h2CalPeakADC");
186
187 TH1F template_calpeakADC("calpeakADCDIFF_L@layerL@ladderS@sensor@view@apv",
188 // "CalpeakADC Deviation Distribution in @layer.@ladder.@sensor @view/@side APV @apv",
189 "CalPeakADC Deviation Distribution in @layer.@ladder.@sensor @view/@side",
190 400, -20, 20);
191 template_calpeakADC.GetXaxis()->SetTitle("ref - check (ADC)");
192 m_hCalpeakADCDIFF = new SVDAPVHistograms<TH1F>(template_calpeakADC);
194 m_hCalpeakADCSummary = new SVDSummaryPlots("calPeakADCSummary@view",
195 "Number of problematic APV chips due to CalPeakADC for @view/@side Side");
196
197
199 m_h2PedestalREF = (SVDHistograms<TH2F>*)m_rootFilePtrREF->Get("expert/h2Pedestal");
200 m_h2PedestalCHECK = (SVDHistograms<TH2F>*)m_rootFilePtrCHECK->Get("expert/h2Pedestal");
201
202 TH1F template_pedestal("pedestalDIFF_L@layerL@ladderS@sensor@view@apv",
203 "Pedestal Deviation Distribution in @layer.@ladder.@sensor @view/@side",
204 // 100, -0.5, 0.5);
205 100, -15, 15);
206 // template_pedestal.GetXaxis()->SetTitle("( ref - check ) / ref");
207 template_pedestal.GetXaxis()->SetTitle("(ref - check) (ADC)");
208 m_hPedestalDIFF = new SVDAPVHistograms<TH1F>(template_pedestal);
210 m_hPedestalSummary = new SVDSummaryPlots("pedestalSummary@view",
211 "Number of problematic APV chips due to Pedestal for @view/@side Side");
212
214}
215
217{
219
220 Long64_t nentries = m_treeREF->GetEntriesFast();
221
222 for (Long64_t jentry = 0; jentry < nentries; jentry++) {
223 m_treeREF->GetEntry(jentry);
224 m_treeCHECK->GetEntry(jentry);
226 float diff = 0;
227
228
229 diff = (m_maskREF - m_maskCHECK);// / m_maskREF;
230 m_hMaskDIFF->fill(theVxdID, (int)m_sideREF, (int)m_stripREF / 128, diff);
231 if (m_sideREF == 1) {
234 } else {
237 }
238 m_hMaskSummaryCHECK->fill(theVxdID, (int)m_sideREF, (float)m_maskCHECK);
239
240 diff = (m_noiseREF - m_noiseCHECK);// / m_noiseREF;
241 m_hNoiseDIFF->fill(theVxdID, (int)m_sideREF, (int)m_stripREF / 128, diff);
242
244 m_hCalpeakTimeDIFF->fill(theVxdID, (int)m_sideREF, (int)m_stripREF / 128, diff);
245
246 diff = (m_calPeakADCREF - m_calPeakADCCHECK);// / m_calPeakADCREF;
247 m_hCalpeakADCDIFF->fill(theVxdID, (int)m_sideREF, (int)m_stripREF / 128, diff);
248
249 diff = (m_pedestalREF - m_pedestalCHECK);// / m_pedestalREF;
250 m_hPedestalDIFF->fill(theVxdID, (int)m_sideREF, (int)m_stripREF / 128, diff);
251 }
252
253
254 //call for a geometry instance
256 std::set<Belle2::VxdID> svdLayers = aGeometry.getLayers(VXD::SensorInfoBase::SVD);
257 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
258
259 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) { //loop on Layers
260
261 bool isL3 = false;
262
263 int layer = itSvdLayers->getLayerNumber();
264 printLayerPage(layer);
265
266 if (layer == 3)
267 isL3 = true;
268
269 std::set<Belle2::VxdID> svdLadders = aGeometry.getLadders(*itSvdLayers);
270 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
271
272 while (itSvdLadders != svdLadders.end()) { //loop on Ladders
273
274 std::set<Belle2::VxdID> svdSensors = aGeometry.getSensors(*itSvdLadders);
275 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
276
277 while (itSvdSensors != svdSensors.end()) { //loop on sensors
278 B2DEBUG(1, " svd sensor info " << *itSvdSensors);
279
280
281 int ladder = itSvdSensors->getLadderNumber();
282 int sensor = itSvdSensors->getSensorNumber();
283 Belle2::VxdID theVxdID(layer, ladder, sensor);
284 const SVD::SensorInfo* currentSensorInfo = dynamic_cast<const SVD::SensorInfo*>(&VXD::GeoCache::getInstance().getSensorInfo(
285 theVxdID));
286
287 TList* listEmpty = new TList;
288
289 //noise
290 TList* listNoiseUBAD = new TList;
291 TList* listNoiseUGOOD = new TList;
292 TList* listNoiseVBAD = new TList;
293 TList* listNoiseVGOOD = new TList;
294
295
296 //calpeak
297 TList* listCalpeakADCUBAD = new TList;
298 TList* listCalpeakADCUGOOD = new TList;
299 TList* listCalpeakADCVBAD = new TList;
300 TList* listCalpeakADCVGOOD = new TList;
301
302 //calpeak
303 TList* listCalpeakTimeUGOOD = new TList;
304 TList* listCalpeakTimeVGOOD = new TList;
305
306 //pedestal
307 TList* listPedestalUBAD = new TList;
308 TList* listPedestalUGOOD = new TList;
309 TList* listPedestalVBAD = new TList;
310 TList* listPedestalVGOOD = new TList;
311
312 bool needPlot = false;
313 for (int side = 0; side < 2; side++) {
314
315 int Ncells = currentSensorInfo->getUCells();
316 if (side == 0)
317 Ncells = currentSensorInfo->getVCells();
318
319 int Napv = Ncells / 128;
320
321 for (int m_APV = 0; m_APV < Napv; m_APV++) {
322
323 int problem = 0;
324
325 //mask analysis
326 TH1F* hMask = m_hMaskDIFF->getHistogram(theVxdID, side, m_APV);
327 m_hMaskSummary->fill(theVxdID, side, hMask->GetMean() * 128);
328
329 //noise analysis
330 TH1F* hNoise = m_hNoiseDIFF->getHistogram(theVxdID, side, m_APV);
331 problem = hasAnyProblem(hNoise, m_cutNoise_ave, m_cutNoise_out);
332 if (problem) {
333 needPlot = true;
334 B2INFO("WARNING, ONE APV has Noise problems in: L" << layer << "L" << ladder << "S" << sensor << " side = " << side <<
335 ", APV number = " << m_APV << ", problem ID = " << problem);
336 m_hNoiseSummary->fill(theVxdID, side, 1);
337 if (side == 0)
338 listNoiseVBAD->Add(hNoise);
339 else
340 listNoiseUBAD->Add(hNoise);
341 } else {
342 if (side == 0)
343 listNoiseVGOOD->Add(hNoise);
344 else
345 listNoiseUGOOD->Add(hNoise);
346 }
347
348
349
350 //calpeak analysis
351 TH1F* hCalpeakADC = m_hCalpeakADCDIFF->getHistogram(theVxdID, side, m_APV);
353 if (problem) {
354 needPlot = true;
355 B2INFO("WARNING, ONE APV has CalpeakADC problems in: L" << layer << "L" << ladder << "S" << sensor << " side = " << side <<
356 ", APV number = " << m_APV << " problem ID = " << problem);
357 m_hCalpeakADCSummary->fill(theVxdID, side, 1);
358 if (side == 0)
359 listCalpeakADCVBAD->Add(hCalpeakADC);
360 else
361 listCalpeakADCUBAD->Add(hCalpeakADC);
362 } else {
363 if (side == 0)
364 listCalpeakADCVGOOD->Add(hCalpeakADC);
365 else
366 listCalpeakADCUGOOD->Add(hCalpeakADC);
367 }
368
369 //calpeak plot
370 TH1F* hCalpeakTime = m_hCalpeakTimeDIFF->getHistogram(theVxdID, side, m_APV);
371 if (side == 0)
372 listCalpeakTimeVGOOD->Add(hCalpeakTime);
373 else
374 listCalpeakTimeUGOOD->Add(hCalpeakTime);
375
376
377 //pedestal analysis
378 TH1F* hPedestal = m_hPedestalDIFF->getHistogram(theVxdID, side, m_APV);
380 if (problem) {
381 needPlot = true;
382 B2INFO("WARNING, ONE APV has Pedestal problems in: L" << layer << "L" << ladder << "S" << sensor << " side = " << side <<
383 ", APV number = " << m_APV << " problem ID = " << problem);
384 m_hPedestalSummary->fill(theVxdID, side, 1);
385 if (side == 0)
386 listPedestalVBAD->Add(hPedestal);
387 else
388 listPedestalUBAD->Add(hPedestal);
389 } else {
390 if (side == 0)
391 listPedestalVGOOD->Add(hPedestal);
392 else
393 listPedestalUGOOD->Add(hPedestal);
394 }
395
396
397
398 }
399 }
400 if (needPlot) {
401 printPage(theVxdID, listNoiseUBAD, listNoiseVBAD, listNoiseUGOOD, listNoiseVGOOD, "Noise", isL3);
402 printPage(theVxdID, listCalpeakADCUBAD, listCalpeakADCVBAD, listCalpeakADCUGOOD, listCalpeakADCVGOOD, "CalpeakADC", isL3);
403 printPage(theVxdID, listEmpty, listEmpty, listCalpeakTimeUGOOD, listCalpeakTimeVGOOD, "CalpeakTime", isL3);
404 printPage(theVxdID, listPedestalUBAD, listPedestalVBAD, listPedestalUGOOD, listPedestalVGOOD, "Pedestal", isL3);
405 }
406 ++itSvdSensors;
407 }
408 ++itSvdLadders;
409 }
410 ++itSvdLayers;
411 }
412
416
417}
418
420{
421
422 TCanvas* empty = new TCanvas();
423 TString pdf_open = TString(m_outputPdfName) + "[";
424 empty->Print(pdf_open);
425
426 TCanvas* first = new TCanvas("open_pag1", "test first page");
427 first->cd();
428 TPaveText* pt_title = new TPaveText(.05, .9, .95, 1, "blNDC");
429 char name[50];
430 sprintf(name, "Local Calibration Check Results");
431 pt_title->AddText(name);
432 pt_title->SetTextFont(42);
433 pt_title->SetTextColor(kBlack);
434 pt_title->SetShadowColor(0);
435 pt_title->SetFillColor(10);
436 pt_title->SetBorderSize(0);
437 pt_title->SetTextSize(0.08);
438 pt_title->Draw();
439
440 TPaveText* pt_input_title = new TPaveText(.05, .8, .95, .85);
441 TPaveText* pt_input = new TPaveText(.05, .72, .8, .8);
442 char input[150];
443 sprintf(input, "%s", "input files");
444 pt_input_title->AddText(input);
445 pt_input_title->SetShadowColor(0);
446 pt_input_title->SetBorderSize(0);
447 pt_input_title->SetTextSize(0.03);
448 if (m_idFileNameREF == "refID")
449 sprintf(input, "reference rootfile = %s", m_rootFileNameREF.c_str());
450 else
451 sprintf(input, " reference ID = %s", m_idFileNameREF.c_str());
452 pt_input->AddText(input);
453 ((TText*)pt_input->GetListOfLines()->Last())->SetTextColor(kRed);
454 if (m_idFileNameCHECK == "checkID")
455 sprintf(input, "calibration rootfile = %s", m_rootFileNameCHECK.c_str());
456 else
457 sprintf(input, "calibration ID = %s", m_idFileNameCHECK.c_str());
458 pt_input->AddText(input);
459 ((TText*)pt_input->GetListOfLines()->Last())->SetTextColor(kBlue);
460 pt_input->SetTextSize(0.02);
461 pt_input->SetTextAlign(12);
462 pt_input->SetShadowColor(0);
463 pt_input->SetBorderSize(0);
464 pt_input->SetFillColor(10);
465
466 pt_input_title->Draw();
467 pt_input->Draw();
468
469 TPaveText* pt_cuts_title = new TPaveText(.05, .65, .95, .7);
470 TPaveText* pt_cuts = new TPaveText(.05, .15, .8, .60);
471 char cuts[512];
472 sprintf(cuts, "%s", "selection criteria");
473 pt_cuts_title->AddText(cuts);
474 pt_cuts_title->SetShadowColor(0);
475 pt_cuts_title->SetBorderSize(0);
476 pt_cuts_title->SetTextSize(0.03);
477 sprintf(cuts, " An APV chip is selected as problematic if passes the criteria on Noise or CalPeakADC or Pedestal");
478 pt_cuts->AddText(cuts);
479 // NOISE
480 sprintf(cuts, " Noise: an APV is problematic if 1. or 2. or 3.");
481 pt_cuts->AddText(cuts);
482 sprintf(cuts, " 1. abs(ref_ave - check_ave) > %1.2f ADC", m_cutNoise_ave);
483 pt_cuts->AddText(cuts);
484 sprintf(cuts, " 2. more than %d strips with a value %1.2f ADC higher than the value of the ref calibration", m_cutN_out,
486 pt_cuts->AddText(cuts);
487 sprintf(cuts, " 3. more than %d strips with a value %1.2f ADC lower than the value of the ref calibration", m_cutN_out,
489 pt_cuts->AddText(cuts);
490 // CALPEAK ADC
491 sprintf(cuts, " CalPeakADC: an APV is problematic if 1. or 2. or 3.");
492 pt_cuts->AddText(cuts);
493 sprintf(cuts, " 1. abs(ref_ave - check_ave) > %1.2f ADC", m_cutCalpeakADC_ave);
494 pt_cuts->AddText(cuts);
495 sprintf(cuts, " 2. more than %d strips with a value %1.1f ADC higher than the value of the ref calibration", m_cutN_out,
497 pt_cuts->AddText(cuts);
498 sprintf(cuts, " 3. more than %d strips with a value %1.1f ADC lower than the value of the ref calibration", m_cutN_out,
500 pt_cuts->AddText(cuts);
501 // PEDESTAL
502 sprintf(cuts, " Pedestal: an APV is problematic if 1. or 2. or 3.");
503 pt_cuts->AddText(cuts);
504 sprintf(cuts, " 1. abs(ref_ave - check_ave) > %1.1f ADC", m_cutPedestal_ave);
505 pt_cuts->AddText(cuts);
506 sprintf(cuts, " 2. more than %d strips with a value %1.1f ADC higher than the value of the ref calibration", m_cutN_out,
508 pt_cuts->AddText(cuts);
509 sprintf(cuts, " 3. more than %d strips with a value %1.1f ADC lower than the value of the ref calibration", m_cutN_out,
511 pt_cuts->AddText(cuts);
512 sprintf(cuts,
513 " where:");
514 pt_cuts->AddText(cuts);
515 sprintf(cuts,
516 " - {ref,check}_ave is the variable averaged on one APV chip of the reference or the check calibration");
517 pt_cuts->AddText(cuts);
518 sprintf(cuts,
519 " - 1 2 and 3 are the problem ID printed on screen while running the python script");
520 pt_cuts->AddText(cuts);
521 pt_cuts->SetTextSize(0.02);
522 pt_cuts->SetShadowColor(0);
523 pt_cuts->SetBorderSize(0);
524 pt_cuts->SetFillColor(10);
525 pt_cuts->SetTextAlign(12);
526
527 pt_cuts_title->Draw();
528 pt_cuts->Draw();
529
530 TPaveText* pt_tag_title = new TPaveText(.05, .03, .95, .07);
531 char tag[100];
532 sprintf(tag, "analysis algorithm ID 1.0");
533 pt_tag_title->AddText(tag);
534 // pt_tag_title->SetTextFont(62);
535 pt_tag_title->SetShadowColor(0);
536 pt_tag_title->SetFillColor(18);
537 pt_tag_title->SetBorderSize(0);
538 pt_tag_title->SetTextSize(0.02);
539 pt_tag_title->Draw();
540 first->Print(m_outputPdfName.c_str());
541}
542
544{
545
546 TCanvas* cLayer = new TCanvas();
547 cLayer->cd();
548 TPaveText* pt_title = new TPaveText(.05, .4, .95, 0.6, "blNDC");
549 char name[50];
550 sprintf(name, "Layer %d", layer);
551 pt_title->AddText(name);
552 pt_title->SetTextFont(42);
553 pt_title->SetTextColor(kBlack);
554 pt_title->SetShadowColor(0);
555 pt_title->SetFillColor(10);
556 pt_title->SetBorderSize(0);
557 pt_title->SetTextSize(0.08);
558 pt_title->Draw();
559 cLayer->Print(m_outputPdfName.c_str());
560
561}
562
563void SVDLocalCalibrationsCheckModule::printPage(VxdID theVxdID, TList* listUBAD, TList* listVBAD, TList* listUGOOD,
564 TList* listVGOOD, TString variable, bool isL3)
565{
566
567 TH2F* refU = nullptr;
568 TH2F* refV = nullptr;
569 TH2F* checkU = nullptr;
570 TH2F* checkV = nullptr;
571
572 Int_t minY = 0;
573 Int_t maxY = 0;
574
575 Float_t leftLine = 0;
576 Float_t rightLine = 0;
577 Float_t topLine = 0;
578
579 if (variable == "Noise") {
580 refU = m_h2NoiseREF->getHistogram(theVxdID, 1);
581 refV = m_h2NoiseREF->getHistogram(theVxdID, 0);
582 checkU = m_h2NoiseCHECK->getHistogram(theVxdID, 1);
583 checkV = m_h2NoiseCHECK->getHistogram(theVxdID, 0);
584 // minY = refU->GetYaxis()->GetXmin();
585 // maxY = refU->GetYaxis()->GetXmax();
586 minY = 0;
587 maxY = 6;
588 leftLine = -m_cutNoise_out;
589 rightLine = m_cutNoise_out;
590 topLine = 5;
591 } else if (variable == "CalpeakADC") {
592 refU = m_h2CalpeakADCREF->getHistogram(theVxdID, 1);
593 refV = m_h2CalpeakADCREF->getHistogram(theVxdID, 0);
594 checkU = m_h2CalpeakADCCHECK->getHistogram(theVxdID, 1);
595 checkV = m_h2CalpeakADCCHECK->getHistogram(theVxdID, 0);
596 minY = refU->GetYaxis()->GetXmin();
597 maxY = refU->GetYaxis()->GetXmax();
598 leftLine = -m_cutCalpeakADC_out;
599 rightLine = m_cutCalpeakADC_out;
600 topLine = 15;
601 } else if (variable == "CalpeakTime") {
602 refU = m_h2CalpeakTimeREF->getHistogram(theVxdID, 1);
603 refV = m_h2CalpeakTimeREF->getHistogram(theVxdID, 0);
604 checkU = m_h2CalpeakTimeCHECK->getHistogram(theVxdID, 1);
605 checkV = m_h2CalpeakTimeCHECK->getHistogram(theVxdID, 0);
606 minY = refU->GetYaxis()->GetXmin();
607 maxY = refU->GetYaxis()->GetXmax();
608 } else if (variable == "Pedestal") {
609 refU = m_h2PedestalREF->getHistogram(theVxdID, 1);
610 refV = m_h2PedestalREF->getHistogram(theVxdID, 0);
611 checkU = m_h2PedestalCHECK->getHistogram(theVxdID, 1);
612 checkV = m_h2PedestalCHECK->getHistogram(theVxdID, 0);
613 // minY = refU->GetYaxis()->GetXmin();
614 // maxY = refU->GetYaxis()->GetXmax();
615 minY = 250;
616 maxY = 500;
617 leftLine = -m_cutPedestal_out;
618 rightLine = m_cutPedestal_out;
619 topLine = 25;
620 } else {
621 B2FATAL("The printPage function is not implemented for" << LogVar("variable", variable));
622 }
623 refU->GetYaxis()->SetRangeUser(minY, maxY);
624 refV->GetYaxis()->SetRangeUser(minY, maxY);
625 checkU->GetYaxis()->SetRangeUser(minY, maxY);
626 checkV->GetYaxis()->SetRangeUser(minY, maxY);
627
628 refU->SetMarkerColor(kRed);
629 refV->SetMarkerColor(kRed);
630 checkU->SetMarkerColor(kBlue);
631 checkV->SetMarkerColor(kBlue);
632
633 float min = minY;
634 float max = maxY;
635
636 //create outliers lines
637 TLine lLeft(leftLine, 0, leftLine, topLine);
638 TLine lRight(rightLine, 0, rightLine, topLine);
639 lLeft.SetLineColor(15);
640 lRight.SetLineColor(15);
641 lLeft.SetLineStyle(kDashed);
642 lRight.SetLineStyle(kDashed);
643
644 //create APVlines
645 TLine l1(128, min, 128, max);
646 TLine l2(128 * 2, min, 128 * 2, max);
647 TLine l3(128 * 3, min, 128 * 3, max);
648 TLine l4(128 * 4, min, 128 * 4, max);
649 TLine l5(128 * 5, min, 128 * 5, max);
650 l1.SetLineColor(15);
651 l2.SetLineColor(15);
652 l3.SetLineColor(15);
653 l4.SetLineColor(15);
654 l5.SetLineColor(15);
655 TCanvas* c = new TCanvas();
656 TPaveText* pt_sensorID = new TPaveText(.495, 0.485, .505, 0.505, "blNDC");
657 char name[50];
658 sprintf(name, "%d.%d.%.d", theVxdID.getLayerNumber(), theVxdID.getLadderNumber(), theVxdID.getSensorNumber());
659 pt_sensorID->AddText(name);
660 pt_sensorID->SetTextFont(82);
661 pt_sensorID->SetTextColor(kBlack);
662 pt_sensorID->SetShadowColor(0);
663 pt_sensorID->SetFillColor(10);
664 pt_sensorID->SetBorderSize(0);
665 pt_sensorID->SetTextSize(0.08);
666
667
668 c->Divide(2, 2);
669 c->cd(1);
670 refU->Draw();
671 l1.Draw("same");
672 l2.Draw("same");
673 l3.Draw("same");
674 l4.Draw("same");
675 l5.Draw("same");
676 refU->Draw("same");
677 checkU->Draw("same");
678 m_leg2D->Draw("same");
679
680 c->cd(2);
681 TH1F* objDiff;
682 int count = 0;
683 if (m_plotGoodAPVs) {
684 TIter nextH_uGood(listUGOOD);
685 while ((objDiff = (TH1F*)nextH_uGood())) {
686 objDiff->SetFillStyle(3004);
687 if (count == 0)
688 objDiff->Draw();
689 else
690 objDiff->Draw("same");
691 count++;
692 }
693 }
694 TIter nextH_uBad(listUBAD);
695 while ((objDiff = (TH1F*)nextH_uBad())) {
696 objDiff->SetFillStyle(0);
697 if (count == 0)
698 objDiff->Draw();
699 else
700 objDiff->Draw("same");
701 count++;
702 }
703 if (count > 0) {
704 lLeft.Draw("same");
705 lRight.Draw("same");
706 m_legU->Draw("same");
707 }
708
709 c->cd(3);
710 refV->Draw();
711 l1.Draw("same");
712 l2.Draw("same");
713 l3.Draw("same");
714 if (isL3) {
715 l4.Draw("same");
716 l5.Draw("same");
717 }
718
719 refV->Draw("same");
720 checkV->Draw("same");
721 m_leg2D->Draw("same");
722
723 c->cd(4);
724 TIter nextH_vBad(listVBAD);
725 count = 0;
726 if (m_plotGoodAPVs) {
727 TIter nextH_vGood(listVGOOD);
728 while ((objDiff = (TH1F*)nextH_vGood())) {
729 objDiff->SetFillStyle(3004);
730 if (count == 0)
731 objDiff->Draw();
732 else
733 objDiff->Draw("same");
734 count++;
735 }
736 }
737 while ((objDiff = (TH1F*)nextH_vBad())) {
738 objDiff->SetFillStyle(0);
739 if (count == 0)
740 objDiff->Draw();
741 else
742 objDiff->Draw("same");
743 count++;
744 }
745 if (count > 0) {
746 lLeft.Draw("same");
747 lRight.Draw("same");
748 if (isL3)
749 m_legU->Draw("same");
750 else
751 m_legV->Draw("same");
752 }
753 c->cd();
754 if (variable == "Noise")
755 pt_sensorID->Draw("same");
756 c->Print(m_outputPdfName.c_str());
757
758}
759
760int SVDLocalCalibrationsCheckModule::hasAnyProblem(TH1F* h, float cutAve, float cutCOUNT)
761{
762
763 float average = h->GetMean();
764 if (std::fabs(average) > cutAve)
765 return 1;
766
767 TAxis* xaxis = h->GetXaxis();
768 Int_t bin1 = xaxis->FindBin(-cutCOUNT);
769 Int_t bin2 = xaxis->FindBin(cutCOUNT);
770 if (bin1 > bin2) {
771 int tmp = bin1;
772 bin1 = bin2;
773 bin2 = tmp;
774 }
775
776 B2DEBUG(1, bin1 << " -> " << bin2 << " with " << xaxis->GetNbins() << " bins");
777
778 if (h->Integral(1, bin1) > m_cutN_out - 1) return 2;
779
780 if (h->Integral(bin2, xaxis->GetNbins()) > m_cutN_out - 1) return 3;
781
782 return 0;
783}
784
785
787{
788
790 std::set<Belle2::VxdID> svdLayers = aGeometry.getLayers(VXD::SensorInfoBase::SVD);
791 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
792
793 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) { //loop on Layers
794
795 std::set<Belle2::VxdID> svdLadders = aGeometry.getLadders(*itSvdLayers);
796 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
797
798 while (itSvdLadders != svdLadders.end()) { //loop on Ladders
799
800 std::set<Belle2::VxdID> svdSensors = aGeometry.getSensors(*itSvdLadders);
801 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
802
803 while (itSvdSensors != svdSensors.end()) { //loop on sensors
804
805 int layer = itSvdSensors->getLayerNumber();
806 int ladder = itSvdSensors->getLadderNumber();
807 int sensor = itSvdSensors->getSensorNumber();
808 Belle2::VxdID theVxdID(layer, ladder, sensor);
809 const SVD::SensorInfo* currentSensorInfo = dynamic_cast<const SVD::SensorInfo*>(&VXD::GeoCache::getInstance().getSensorInfo(
810 theVxdID));
811
812 for (int side = 0; side < 2; side++) {
813
814 int Ncells = currentSensorInfo->getUCells();
815 if (side == 0)
816 Ncells = currentSensorInfo->getVCells();
817
818 int Napv = Ncells / 128;
819
820 for (int m_APV = 0; m_APV < Napv; m_APV++) {
821
822 TH1F* h = m_APVhistos->getHistogram(theVxdID, side, m_APV);
823
824 h->SetFillColor(m_apvColors[m_APV]);
825 h->SetLineColor(m_apvColors[m_APV]);
826 h->SetMarkerColor(m_apvColors[m_APV]);
827 }
828 }
829
830 ++itSvdSensors;
831 }
832 ++itSvdLadders;
833 }
834 ++itSvdLayers;
835 }
836
837
838}
839
840
842{
843
844 TPaveText* pt_cuts_title = new TPaveText(.05, .6, .95, .65);
845 TPaveText* pt_cuts = new TPaveText(.15, .5, .85, .55);
846 char cuts[512];
847 sprintf(cuts, "%s", "APV SUMMARY");
848 pt_cuts_title->SetShadowColor(0);
849 pt_cuts_title->SetBorderSize(0);
850 pt_cuts_title->SetTextSize(0.03);
851 pt_cuts_title->AddText(cuts);
852 sprintf(cuts, "each bin of the plots in the next pages contains the number of problematic APV chips of the sensor");
853 pt_cuts->AddText(cuts);
854 sprintf(cuts, "corresponding to the combination of column (ladder number) and row (layer and sensor number)");
855 pt_cuts->AddText(cuts);
856 pt_cuts->SetTextSize(0.02);
857 pt_cuts->SetShadowColor(0);
858 pt_cuts->SetBorderSize(0);
859 pt_cuts->SetFillColor(10);
860 pt_cuts->SetTextAlign(12);
861
862 TCanvas* explain = new TCanvas();
863 pt_cuts_title->Draw();
864 pt_cuts->Draw();
865 explain->Print(m_outputPdfName.c_str());
866
867 TCanvas* noise = new TCanvas();
868 noise->SetGridx();
869 noise->Divide(2, 2);
870 noise->cd(1);
871 m_hNoiseSummary->getHistogram(1)->Draw("colztext");
872 noise->cd(3);
873 m_hNoiseSummary->getHistogram(0)->Draw("colztext");
874 noise->Print(m_outputPdfName.c_str());
875
876 TCanvas* calpeakADC = new TCanvas();
877 calpeakADC->Divide(2, 2);
878 calpeakADC->cd(1);
879 m_hCalpeakADCSummary->getHistogram(1)->Draw("colztext");
880 calpeakADC->cd(3);
881 m_hCalpeakADCSummary->getHistogram(0)->Draw("colztext");
882 calpeakADC->Print(m_outputPdfName.c_str());
883
884
885
886 TCanvas* pedestal = new TCanvas();
887 pedestal->Divide(2, 2);
888 pedestal->cd(1);
889 m_hPedestalSummary->getHistogram(1)->Draw("colztext");
890 pedestal->cd(3);
891 m_hPedestalSummary->getHistogram(0)->Draw("colztext");
892 pedestal->Print(m_outputPdfName.c_str());
893
894
895}
896
898{
899
900 TPaveText* pt_cuts_title = new TPaveText(.05, .6, .95, .65);
901 TPaveText* pt_cuts = new TPaveText(.15, .4, .85, .55);
902 char cuts[512];
903 sprintf(cuts, "%s", "Masked Strips SUMMARY");
904 pt_cuts_title->SetShadowColor(0);
905 pt_cuts_title->SetBorderSize(0);
906 pt_cuts_title->SetTextSize(0.03);
907 pt_cuts_title->AddText(cuts);
908 float nU = 768 * (2 * 7 + 3 * 10 + 4 * 12 + 5 * 16);
909 float nV = 512 * (2 * 7) + 768 * (3 * 10 + 4 * 12 + 5 * 16);
910 sprintf(cuts, "Number of MASKED strips on the u/P side in the REF calibration = %d (%.3f)%%", m_nMaskedUREF,
911 m_nMaskedUREF * 100. / nU);
912 pt_cuts->AddText(cuts);
913 sprintf(cuts, "Number of MASKED strips on the u/P side in the CHECK calibration = %d (%.3f)%%", m_nMaskedUCHECK,
914 m_nMaskedUCHECK * 100. / nU);
915 pt_cuts->AddText(cuts);
916 sprintf(cuts, "Number of MASKED strips on the v/N side in the REF calibration = %d (%.3f)%%", m_nMaskedVREF,
917 m_nMaskedVREF * 100. / nV);
918 pt_cuts->AddText(cuts);
919 sprintf(cuts, "Number of MASKED strips on the v/N side in the CHECK calibration = %d (%.3f)%%", m_nMaskedVCHECK,
920 m_nMaskedVCHECK * 100. / nV);
921 pt_cuts->AddText(cuts);
922 pt_cuts->SetTextSize(0.02);
923 pt_cuts->SetShadowColor(0);
924 pt_cuts->SetBorderSize(0);
925 pt_cuts->SetFillColor(10);
926 pt_cuts->SetTextAlign(12);
927
928 TCanvas* explain = new TCanvas();
929 pt_cuts_title->Draw();
930 pt_cuts->Draw();
931 explain->Print(m_outputPdfName.c_str());
932
933 TCanvas* mask = new TCanvas();
934 mask->SetGridx();
935 mask->Divide(2, 2);
936 mask->cd(1);
937 m_hMaskSummary->getHistogram(1)->Draw("colztext");
938 mask->cd(2);
939 m_hMaskSummaryCHECK->getHistogram(1)->Draw("colztext");
940 mask->cd(3);
941 m_hMaskSummary->getHistogram(0)->Draw("colztext");
942 mask->cd(4);
943 m_hMaskSummaryCHECK->getHistogram(0)->Draw("colztext");
944 mask->Print(m_outputPdfName.c_str());
945
946
947}
948
950{
951
952 TCanvas* empty = new TCanvas();
953 TString pdf_close = TString(m_outputPdfName) + "]";
954 empty->Print(pdf_close);
955
956
957}
958
959
961{
962
963
964 m_legU = new TLegend(0.75, 0.55, 0.89, 0.89);
965 m_legV = new TLegend(0.75, 0.65, 0.89, 0.89);
966 m_legU->SetFillStyle(0);
967 m_legV->SetFillStyle(0);
968
969
970 TH1F* hAPV1 = new TH1F("apv1", "apv 1", 1, 0, 1);
971 hAPV1->SetLineColor(m_apvColors[0]);
972 m_legU->AddEntry(hAPV1, "apv 1", "l");
973 m_legV->AddEntry(hAPV1, "apv 1", "l");
974 TH1F* hAPV2 = new TH1F("apv2", "apv 2", 2, 0, 2);
975 hAPV2->SetLineColor(m_apvColors[1]);
976 hAPV2->SetMarkerColor(m_apvColors[1]);
977 hAPV2->SetMarkerStyle(21);
978 hAPV2->SetMarkerSize(0.5);
979 m_legU->AddEntry(hAPV2, "apv 2", "l");
980 m_legV->AddEntry(hAPV2, "apv 2", "l");
981 TH1F* hAPV3 = new TH1F("apv3", "apv 3", 3, 0, 3);
982 hAPV3->SetLineColor(m_apvColors[2]);
983 m_legU->AddEntry(hAPV3, "apv 3", "l");
984 m_legV->AddEntry(hAPV3, "apv 3", "l");
985 TH1F* hAPV4 = new TH1F("apv4", "apv 4", 4, 0, 4);
986 hAPV4->SetLineColor(m_apvColors[3]);
987 hAPV4->SetMarkerColor(m_apvColors[3]);
988 hAPV4->SetMarkerStyle(21);
989 hAPV4->SetMarkerSize(0.5);
990 m_legU->AddEntry(hAPV4, "apv 4", "l");
991 m_legV->AddEntry(hAPV4, "apv 4", "l");
992 TH1F* hAPV5 = new TH1F("apv5", "apv 5", 5, 0, 5);
993 hAPV5->SetLineColor(m_apvColors[4]);
994 m_legU->AddEntry(hAPV5, "apv 5", "l");
995 TH1F* hAPV6 = new TH1F("apv6", "apv 6", 6, 0, 6);
996 hAPV6->SetLineColor(m_apvColors[5]);
997 m_legU->AddEntry(hAPV6, "apv 6", "l");
998
999 m_leg2D = new TLegend(0.78, 0.75, 0.89, 0.89);
1000 m_leg2D->AddEntry(hAPV2, "ref", "pl");
1001 m_leg2D->AddEntry(hAPV4, "check", "pl");
1002 m_leg2D->SetFillStyle(0);
1003}
1004
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Module()
Constructor.
Definition Module.cc:30
template class for the APV Histograms
H * getHistogram(const VxdID &vxdID, int view, int apv)
get a reference to the histogram for
template class for SVd histograms
SVDHistograms< TH2F > * m_h2CalpeakADCREF
CALPEAKS ADC.
SVDSummaryPlots * m_hCalpeakADCSummary
calpeakADC summary histo
int m_nMaskedUCHECK
number of masked strips in the check calibration (u side)
TFile * m_rootFilePtrCHECK
pointer at the CHECK root file
SVDHistograms< TH2F > * m_h2CalpeakTimeCHECK
calpeakTime VS strip 2D histo
void printPage(VxdID theVxdID, TList *listUBAD, TList *listVBAD, TList *listUGOOD, TList *listVGOOD, TString variable, bool isL3)
print the page relative to a sensor with problematic APVs
int m_cutN_out
maximum number of allowed outliers
int m_nMaskedUREF
number of masked strips in the reference calibration (u side)
SVDAPVHistograms< TH1F > * m_hCalpeakTimeDIFF
calpeakTime histo
SVDLocalCalibrationsCheckModule()
Constructor: Sets the description, the properties and the parameters of the module.
TBranch * b_calPeakADCCHECK
strip calPeakADC (ADC of max pulse)
SVDHistograms< TH2F > * m_h2CalpeakADCCHECK
calpeakADC VS strip 2D histo
void printMaskedSummaryPages()
summary page with Masked strips summary plot
virtual void event() override
perform analysis and Draw pdf Canvas
TBranch * b_calPeakADCREF
strip calPeakADC (ADC of max pulse)
float m_cutPedestal_ave
maximum relative deviation APV-average (pedestal)
SVDSummaryPlots * m_hMaskSummaryCHECK
mask summary histo
TFile * m_rootFilePtrREF
pointer at the REFERENCE root file
float m_cutCalpeakADC_ave
maximum relative deviation APV-average (calpeakADC)
void printLayerPage(int layer)
print layer-number page
SVDSummaryPlots * m_hCalpeakTimeSummary
calpeakTime summary histo
float m_cutCalpeakADC_out
maximum relative deviation strip (calpeakADC)
void printAPVSummaryPages()
summary page with 2D summary plot with problemtic APVs
std::string m_idFileNameCHECK
ID of the xml file name CHECK.
SVDHistograms< TH2F > * m_h2NoiseCHECK
noise VS strip 2D histo
SVDAPVHistograms< TH1F > * m_hPedestalDIFF
pedestal histo
bool m_plotGoodAPVs
if true also the good APVs are plotted on the DIFF canvas
float m_cutNoise_ave
maximum relative deviation APV-average (noise)
TBranch * b_calPeakTimeCHECK
strip calPeakTime (time of max pulse)
virtual void beginRun() override
initialize the TTrees and create SVDHistograms and SVDAPVHistograms
int m_nMaskedVREF
number of masked strips in the reference calibration (v side)
float m_cutNoise_out
maximum relative deviation strip (noise)
void printConfiguration()
print the configuration of the check of the calibration VS a reference calibration
int hasAnyProblem(TH1F *h, float cutAve, float cutCOUNT)
return True if the APV has a problem, given a variable
std::string m_rootFileNameREF
root file name REFERENCE
std::string m_idFileNameREF
ID of the xml file name REFERENCE.
SVDAPVHistograms< TH1F > * m_hCalpeakADCDIFF
calpeakADC histo
SVDHistograms< TH2F > * m_h2PedestalCHECK
pedestal VS strip 2D histo
TBranch * b_calPeakTimeREF
strip calPeakTime (time of max pulse)
int m_nMaskedVCHECK
number of masked strips in the check calibration (v side)
void printFirstPage()
print the first page of the output pdf
void createLegends()
create the TLegends for the plot
SVDAPVHistograms< TH1F > * m_hNoiseDIFF
noise histo
SVDSummaryPlots * m_hPedestalSummary
pedestal summary histo
SVDSummaryPlots * m_hNoiseSummary
noise summary histo
SVDHistograms< TH2F > * m_h2MaskCHECK
mask VS strip 2D histo
void setAPVHistoStyles(SVDAPVHistograms< TH1F > *m_APVhistos)
set style of APV histograms
SVDHistograms< TH2F > * m_h2CalpeakTimeREF
CALPEAKS TIME.
float m_cutPedestal_out
maximum relative deviation strip (pedestal)
class to summarize SVD quantities per sensor and side
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
Definition SensorInfo.h:25
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
Definition GeoCache.h:39
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
Definition GeoCache.cc:176
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a reference to the SensorInfo of a given SensorID.
Definition GeoCache.cc:67
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
Definition GeoCache.cc:204
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition GeoCache.cc:214
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Definition GeoCache.cc:193
int getVCells() const
Return number of pixel/strips in v direction.
int getUCells() const
Return number of pixel/strips in u direction.
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:33
baseType getSensorNumber() const
Get the sensor id.
Definition VxdID.h:100
baseType getLadderNumber() const
Get the ladder id.
Definition VxdID.h:98
baseType getLayerNumber() const
Get the layer id.
Definition VxdID.h:96
Class to store variables with their name which were sent to the logging service.
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
Abstract base class for different kinds of events.