9#include <svd/modules/svdCalibration/SVDLocalCalibrationsCheckModule.h>
10#include <vxd/geometry/GeoCache.h>
11#include <svd/geometry/SensorInfo.h>
33 setDescription(
"Module to produce a list of histograms showing the uploaded calibration constants");
36 addParam(
"outputPdfName",
m_outputPdfName,
"output pdf filename", std::string(
"SVDLocalCalibrationsCheck.pdf"));
38 std::string(
"refID"));
40 std::string(
"checkID"));
42 std::string(
"SVDLocalCalibrationsMonitor_ref.root"));
44 std::string(
"SVDLocalCalibrationsMonitor_check.root"));
48 addParam(
"cutNoise_average",
m_cutNoise_ave,
"Max deviation of average noise per APV, in ADC",
float(0.1));
59 B2INFO(
"SVD Local Calibration Check Configuration");
60 B2INFO(
"-----------------------------------------");
62 B2INFO(
"- input files:");
65 B2INFO(
"- output file:");
68 B2INFO(
"- analysis parameters:");
69 B2INFO(
" outliers (Noise, Pedestal, CalPeakADC)");
70 B2INFO(
" max allowed outliers = " <<
m_cutN_out);
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");
80 B2INFO(
"--------------------------------------------------------------");
89 gStyle->SetOptStat(0);
90 gStyle->SetLegendBorderSize(0);
91 gStyle->SetTextFont(42);
141 TH1F template_mask(
"maskDIFF_L@layerL@ladderS@sensor@view@apv",
142 "Mask Deviation Distribution in @layer.@ladder.@sensor @view/@side",
146 template_mask.GetXaxis()->SetTitle(
"ref - check");
156 TH1F template_noise(
"noiseDIFF_L@layerL@ladderS@sensor@view@apv",
157 "Noise Deviation Distribution in @layer.@ladder.@sensor @view/@side",
161 template_noise.GetXaxis()->SetTitle(
"ref - check (ADC)");
173 TH1F template_calpeakTime(
"calpeakTimeDIFF_L@layerL@ladderS@sensor@view@apv",
175 "CalPeakTime Deviation Distribution in @layer.@ladder.@sensor @view/@side",
177 template_calpeakTime.GetXaxis()->SetTitle(
"( ref - check ) / ref");
181 "Number of problematic APV chips due to CalPeakTime for @view/@side Side for @view/@side Side");
187 TH1F template_calpeakADC(
"calpeakADCDIFF_L@layerL@ladderS@sensor@view@apv",
189 "CalPeakADC Deviation Distribution in @layer.@ladder.@sensor @view/@side",
191 template_calpeakADC.GetXaxis()->SetTitle(
"ref - check (ADC)");
195 "Number of problematic APV chips due to CalPeakADC for @view/@side Side");
202 TH1F template_pedestal(
"pedestalDIFF_L@layerL@ladderS@sensor@view@apv",
203 "Pedestal Deviation Distribution in @layer.@ladder.@sensor @view/@side",
207 template_pedestal.GetXaxis()->SetTitle(
"(ref - check) (ADC)");
211 "Number of problematic APV chips due to Pedestal for @view/@side Side");
220 Long64_t nentries =
m_treeREF->GetEntriesFast();
222 for (Long64_t jentry = 0; jentry < nentries; jentry++) {
257 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
259 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) {
263 int layer = itSvdLayers->getLayerNumber();
269 std::set<Belle2::VxdID> svdLadders = aGeometry.
getLadders(*itSvdLayers);
270 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
272 while (itSvdLadders != svdLadders.end()) {
274 std::set<Belle2::VxdID> svdSensors = aGeometry.
getSensors(*itSvdLadders);
275 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
277 while (itSvdSensors != svdSensors.end()) {
278 B2DEBUG(1,
" svd sensor info " << *itSvdSensors);
281 int ladder = itSvdSensors->getLadderNumber();
282 int sensor = itSvdSensors->getSensorNumber();
287 TList* listEmpty =
new TList;
290 TList* listNoiseUBAD =
new TList;
291 TList* listNoiseUGOOD =
new TList;
292 TList* listNoiseVBAD =
new TList;
293 TList* listNoiseVGOOD =
new TList;
297 TList* listCalpeakADCUBAD =
new TList;
298 TList* listCalpeakADCUGOOD =
new TList;
299 TList* listCalpeakADCVBAD =
new TList;
300 TList* listCalpeakADCVGOOD =
new TList;
303 TList* listCalpeakTimeUGOOD =
new TList;
304 TList* listCalpeakTimeVGOOD =
new TList;
307 TList* listPedestalUBAD =
new TList;
308 TList* listPedestalUGOOD =
new TList;
309 TList* listPedestalVBAD =
new TList;
310 TList* listPedestalVGOOD =
new TList;
312 bool needPlot =
false;
313 for (
int side = 0; side < 2; side++) {
315 int Ncells = currentSensorInfo->
getUCells();
319 int Napv = Ncells / 128;
321 for (
int m_APV = 0; m_APV < Napv; m_APV++) {
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);
338 listNoiseVBAD->Add(hNoise);
340 listNoiseUBAD->Add(hNoise);
343 listNoiseVGOOD->Add(hNoise);
345 listNoiseUGOOD->Add(hNoise);
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);
359 listCalpeakADCVBAD->Add(hCalpeakADC);
361 listCalpeakADCUBAD->Add(hCalpeakADC);
364 listCalpeakADCVGOOD->Add(hCalpeakADC);
366 listCalpeakADCUGOOD->Add(hCalpeakADC);
372 listCalpeakTimeVGOOD->Add(hCalpeakTime);
374 listCalpeakTimeUGOOD->Add(hCalpeakTime);
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);
386 listPedestalVBAD->Add(hPedestal);
388 listPedestalUBAD->Add(hPedestal);
391 listPedestalVGOOD->Add(hPedestal);
393 listPedestalUGOOD->Add(hPedestal);
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);
422 TCanvas* empty =
new TCanvas();
424 empty->Print(pdf_open);
426 TCanvas* first =
new TCanvas(
"open_pag1",
"test first page");
428 TPaveText* pt_title =
new TPaveText(.05, .9, .95, 1,
"blNDC");
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);
440 TPaveText* pt_input_title =
new TPaveText(.05, .8, .95, .85);
441 TPaveText* pt_input =
new TPaveText(.05, .72, .8, .8);
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);
452 pt_input->AddText(input);
453 ((TText*)pt_input->GetListOfLines()->Last())->SetTextColor(kRed);
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);
466 pt_input_title->Draw();
469 TPaveText* pt_cuts_title =
new TPaveText(.05, .65, .95, .7);
470 TPaveText* pt_cuts =
new TPaveText(.05, .15, .8, .60);
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);
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);
491 sprintf(cuts,
" CalPeakADC: an APV is problematic if 1. or 2. or 3.");
492 pt_cuts->AddText(cuts);
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);
502 sprintf(cuts,
" Pedestal: an APV is problematic if 1. or 2. or 3.");
503 pt_cuts->AddText(cuts);
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);
514 pt_cuts->AddText(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);
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);
527 pt_cuts_title->Draw();
530 TPaveText* pt_tag_title =
new TPaveText(.05, .03, .95, .07);
532 sprintf(tag,
"analysis algorithm ID 1.0");
533 pt_tag_title->AddText(tag);
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();
546 TCanvas* cLayer =
new TCanvas();
548 TPaveText* pt_title =
new TPaveText(.05, .4, .95, 0.6,
"blNDC");
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);
564 TList* listVGOOD, TString variable,
bool isL3)
567 TH2F* refU =
nullptr;
568 TH2F* refV =
nullptr;
569 TH2F* checkU =
nullptr;
570 TH2F* checkV =
nullptr;
575 Float_t leftLine = 0;
576 Float_t rightLine = 0;
579 if (variable ==
"Noise") {
591 }
else if (variable ==
"CalpeakADC") {
596 minY = refU->GetYaxis()->GetXmin();
597 maxY = refU->GetYaxis()->GetXmax();
601 }
else if (variable ==
"CalpeakTime") {
606 minY = refU->GetYaxis()->GetXmin();
607 maxY = refU->GetYaxis()->GetXmax();
608 }
else if (variable ==
"Pedestal") {
621 B2FATAL(
"The printPage function is not implemented for" <<
LogVar(
"variable", variable));
623 refU->GetYaxis()->SetRangeUser(minY, maxY);
624 refV->GetYaxis()->SetRangeUser(minY, maxY);
625 checkU->GetYaxis()->SetRangeUser(minY, maxY);
626 checkV->GetYaxis()->SetRangeUser(minY, maxY);
628 refU->SetMarkerColor(kRed);
629 refV->SetMarkerColor(kRed);
630 checkU->SetMarkerColor(kBlue);
631 checkV->SetMarkerColor(kBlue);
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);
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);
655 TCanvas* c =
new TCanvas();
656 TPaveText* pt_sensorID =
new TPaveText(.495, 0.485, .505, 0.505,
"blNDC");
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);
677 checkU->Draw(
"same");
684 TIter nextH_uGood(listUGOOD);
685 while ((objDiff = (TH1F*)nextH_uGood())) {
686 objDiff->SetFillStyle(3004);
690 objDiff->Draw(
"same");
694 TIter nextH_uBad(listUBAD);
695 while ((objDiff = (TH1F*)nextH_uBad())) {
696 objDiff->SetFillStyle(0);
700 objDiff->Draw(
"same");
720 checkV->Draw(
"same");
724 TIter nextH_vBad(listVBAD);
727 TIter nextH_vGood(listVGOOD);
728 while ((objDiff = (TH1F*)nextH_vGood())) {
729 objDiff->SetFillStyle(3004);
733 objDiff->Draw(
"same");
737 while ((objDiff = (TH1F*)nextH_vBad())) {
738 objDiff->SetFillStyle(0);
742 objDiff->Draw(
"same");
754 if (variable ==
"Noise")
755 pt_sensorID->Draw(
"same");
763 float average = h->GetMean();
764 if (std::fabs(average) > cutAve)
767 TAxis* xaxis = h->GetXaxis();
768 Int_t bin1 = xaxis->FindBin(-cutCOUNT);
769 Int_t bin2 = xaxis->FindBin(cutCOUNT);
776 B2DEBUG(1, bin1 <<
" -> " << bin2 <<
" with " << xaxis->GetNbins() <<
" bins");
778 if (h->Integral(1, bin1) >
m_cutN_out - 1)
return 2;
780 if (h->Integral(bin2, xaxis->GetNbins()) >
m_cutN_out - 1)
return 3;
791 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
793 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) {
795 std::set<Belle2::VxdID> svdLadders = aGeometry.
getLadders(*itSvdLayers);
796 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
798 while (itSvdLadders != svdLadders.end()) {
800 std::set<Belle2::VxdID> svdSensors = aGeometry.
getSensors(*itSvdLadders);
801 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
803 while (itSvdSensors != svdSensors.end()) {
805 int layer = itSvdSensors->getLayerNumber();
806 int ladder = itSvdSensors->getLadderNumber();
807 int sensor = itSvdSensors->getSensorNumber();
812 for (
int side = 0; side < 2; side++) {
814 int Ncells = currentSensorInfo->
getUCells();
818 int Napv = Ncells / 128;
820 for (
int m_APV = 0; m_APV < Napv; m_APV++) {
822 TH1F* h = m_APVhistos->
getHistogram(theVxdID, side, m_APV);
844 TPaveText* pt_cuts_title =
new TPaveText(.05, .6, .95, .65);
845 TPaveText* pt_cuts =
new TPaveText(.15, .5, .85, .55);
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);
862 TCanvas* explain =
new TCanvas();
863 pt_cuts_title->Draw();
867 TCanvas* noise =
new TCanvas();
876 TCanvas* calpeakADC =
new TCanvas();
877 calpeakADC->Divide(2, 2);
886 TCanvas* pedestal =
new TCanvas();
887 pedestal->Divide(2, 2);
900 TPaveText* pt_cuts_title =
new TPaveText(.05, .6, .95, .65);
901 TPaveText* pt_cuts =
new TPaveText(.15, .4, .85, .55);
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,
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,
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,
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,
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);
928 TCanvas* explain =
new TCanvas();
929 pt_cuts_title->Draw();
933 TCanvas* mask =
new TCanvas();
952 TCanvas* empty =
new TCanvas();
954 empty->Print(pdf_close);
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);
970 TH1F* hAPV1 =
new TH1F(
"apv1",
"apv 1", 1, 0, 1);
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);
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);
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);
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);
994 m_legU->AddEntry(hAPV5,
"apv 5",
"l");
995 TH1F* hAPV6 =
new TH1F(
"apv6",
"apv 6", 6, 0, 6);
997 m_legU->AddEntry(hAPV6,
"apv 6",
"l");
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");
void setDescription(const std::string &description)
Sets the description of the module.
template class for the APV Histograms
H * getHistogram(const VxdID &vxdID, int view, int apv)
get a reference to the histogram for
void fill(const VxdID &vxdID, int view, int apv, Types ... args)
fill the histogram for
template class for SVd histograms
H * getHistogram(const VxdID &vxdID, int view)
get a reference to the histogram for
SVDHistograms< TH2F > * m_h2CalpeakADCREF
CALPEAKS ADC.
SVDHistograms< TH2F > * m_h2NoiseREF
NOISES.
SVDSummaryPlots * m_hCalpeakADCSummary
calpeakADC summary histo
TLegend * m_legV
legend of V-side plot
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
UInt_t m_sideREF
sensor side
SVDAPVHistograms< TH1F > * m_hMaskDIFF
mask histo
int m_cutN_out
maximum number of allowed outliers
TBranch * b_sideCHECK
sensor side
float m_noiseElCHECK
strip noise (e-)
int m_nMaskedUREF
number of masked strips in the reference calibration (u side)
float m_pulseWidthCHECK
strip pulse width
SVDAPVHistograms< TH1F > * m_hCalpeakTimeDIFF
calpeakTime histo
SVDLocalCalibrationsCheckModule()
Constructor: Sets the description, the properties and the parameters of the module.
UInt_t m_runREF
run number
TBranch * b_calPeakADCCHECK
strip calPeakADC (ADC of max pulse)
SVDHistograms< TH2F > * m_h2CalpeakADCCHECK
calpeakADC VS strip 2D histo
UInt_t m_layerCHECK
layer number
SVDSummaryPlots * m_hMaskSummary
mask summary 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_pedestalCHECK
strip pedestal
float m_cutPedestal_ave
maximum relative deviation APV-average (pedestal)
float m_calPeakTimeCHECK
strip peak time
SVDSummaryPlots * m_hMaskSummaryCHECK
mask summary histo
TBranch * b_pedestalREF
strip pedestal
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
TLegend * m_leg2D
legend of the 2D plot
TTree * m_treeREF
pointer at REF tree
SVDSummaryPlots * m_hCalpeakTimeSummary
calpeakTime summary histo
TBranch * b_pulseWidthREF
strip pulse width
UInt_t m_runCHECK
run number
float m_cutCalpeakADC_out
maximum relative deviation strip (calpeakADC)
std::string m_outputPdfName
output pdf filename
TBranch * b_layerCHECK
layer number
TBranch * b_pedestalCHECK
strip pedestal
void printAPVSummaryPages()
summary page with 2D summary plot with problemtic APVs
std::string m_idFileNameCHECK
ID of the xml file name CHECK.
TBranch * b_noiseElCHECK
strip noise (e-)
UInt_t m_sensorREF
sensor number
TBranch * b_ladderREF
ladder number
TLegend * m_legU
legend of U-side plot
TBranch * b_sideREF
sensor side
TBranch * b_stripCHECK
strip number
SVDHistograms< TH2F > * m_h2NoiseCHECK
noise VS strip 2D histo
SVDAPVHistograms< TH1F > * m_hPedestalDIFF
pedestal histo
float m_calPeakTimeREF
strip peak time
TBranch * b_runREF
run number
bool m_plotGoodAPVs
if true also the good APVs are plotted on the DIFF canvas
TBranch * b_gainCHECK
strip gain
TBranch * b_noiseElREF
strip noise (e-)
TBranch * b_stripREF
strip number
float m_gainCHECK
strip gain
float m_cutNoise_ave
maximum relative deviation APV-average (noise)
float m_calPeakADCCHECK
strip max peak ADC
TBranch * b_calPeakTimeCHECK
strip calPeakTime (time of max pulse)
UInt_t m_ladderREF
ladder number
float m_pulseWidthREF
strip pulse width
virtual void beginRun() override
initialize the TTrees and create SVDHistograms and SVDAPVHistograms
TBranch * b_gainREF
strip gain
int m_nMaskedVREF
number of masked strips in the reference calibration (v side)
TBranch * b_ladderCHECK
ladder number
TBranch * b_layerREF
layer number
UInt_t m_sensorCHECK
sensor number
float m_maskREF
strip mask 0/1
UInt_t m_stripREF
strip number
float m_cutNoise_out
maximum relative deviation strip (noise)
TTree * m_treeCHECK
pointer at CHECK tree
float m_noiseREF
strip noise (ADC)
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
TBranch * b_sensorCHECK
sensor number
std::string m_rootFileNameREF
root file name REFERENCE
float m_calPeakADCREF
strip max peak ADC
std::string m_idFileNameREF
ID of the xml file name REFERENCE.
SVDAPVHistograms< TH1F > * m_hCalpeakADCDIFF
calpeakADC histo
SVDHistograms< TH2F > * m_h2PedestalREF
PEDESTALS.
SVDHistograms< TH2F > * m_h2PedestalCHECK
pedestal VS strip 2D histo
TBranch * b_noiseCHECK
strip noise (ADC)
TBranch * b_calPeakTimeREF
strip calPeakTime (time of max pulse)
TBranch * b_pulseWidthCHECK
strip pulse width
TBranch * b_sensorREF
sensor number
int m_nMaskedVCHECK
number of masked strips in the check calibration (v side)
float m_noiseElREF
strip noise (e-)
const int m_apvColors[6]
color palette
void printFirstPage()
print the first page of the output pdf
TBranch * b_noiseREF
strip noise (ADC)
TBranch * b_maskCHECK
strip mask 0/1
UInt_t m_layerREF
layer number
UInt_t m_stripCHECK
strip number
UInt_t m_sideCHECK
sensor side
void createLegends()
create the TLegends for the plot
float m_maskCHECK
strip mask 0/1
TBranch * b_runCHECK
run number
std::string m_rootFileNameCHECK
root file name CHECK
SVDAPVHistograms< TH1F > * m_hNoiseDIFF
noise histo
SVDSummaryPlots * m_hPedestalSummary
pedestal summary histo
SVDSummaryPlots * m_hNoiseSummary
noise summary histo
float m_pedestalREF
strip pedestal
SVDHistograms< TH2F > * m_h2MaskCHECK
mask VS strip 2D histo
UInt_t m_ladderCHECK
ladder number
void setAPVHistoStyles(SVDAPVHistograms< TH1F > *m_APVhistos)
set style of APV histograms
TBranch * b_maskREF
strip mask 0/1
float m_gainREF
strip gain
void printLastPage()
print last empty page
SVDHistograms< TH2F > * m_h2CalpeakTimeREF
CALPEAKS TIME.
SVDHistograms< TH2F > * m_h2MaskREF
MASKS.
float m_cutPedestal_out
maximum relative deviation strip (pedestal)
float m_noiseCHECK
strip noise (ADC)
class to summarize SVD quantities per sensor and side
void fill(int layer, int ladder, int sensor, int view, float value)
fill the histogram for
TH2F * getHistogram(int view)
get a reference to the histogram for
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
static GeoCache & getInstance()
Return a reference to the singleton instance.
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
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.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
Class to store variables with their name which were sent to the logging service.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.