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();
286 TList* listEmpty =
new TList;
289 TList* listNoiseUBAD =
new TList;
290 TList* listNoiseUGOOD =
new TList;
291 TList* listNoiseVBAD =
new TList;
292 TList* listNoiseVGOOD =
new TList;
296 TList* listCalpeakADCUBAD =
new TList;
297 TList* listCalpeakADCUGOOD =
new TList;
298 TList* listCalpeakADCVBAD =
new TList;
299 TList* listCalpeakADCVGOOD =
new TList;
302 TList* listCalpeakTimeUGOOD =
new TList;
303 TList* listCalpeakTimeVGOOD =
new TList;
306 TList* listPedestalUBAD =
new TList;
307 TList* listPedestalUGOOD =
new TList;
308 TList* listPedestalVBAD =
new TList;
309 TList* listPedestalVGOOD =
new TList;
311 bool needPlot =
false;
312 for (
int side = 0; side < 2; side++) {
314 int Ncells = currentSensorInfo->
getUCells();
318 int Napv = Ncells / 128;
320 for (
int m_APV = 0; m_APV < Napv; m_APV++) {
333 B2INFO(
"WARNING, ONE APV has Noise problems in: L" << layer <<
"L" << ladder <<
"S" << sensor <<
" side = " << side <<
334 ", APV number = " << m_APV <<
", problem ID = " << problem);
337 listNoiseVBAD->Add(hNoise);
339 listNoiseUBAD->Add(hNoise);
342 listNoiseVGOOD->Add(hNoise);
344 listNoiseUGOOD->Add(hNoise);
354 B2INFO(
"WARNING, ONE APV has CalpeakADC problems in: L" << layer <<
"L" << ladder <<
"S" << sensor <<
" side = " << side <<
355 ", APV number = " << m_APV <<
" problem ID = " << problem);
358 listCalpeakADCVBAD->Add(hCalpeakADC);
360 listCalpeakADCUBAD->Add(hCalpeakADC);
363 listCalpeakADCVGOOD->Add(hCalpeakADC);
365 listCalpeakADCUGOOD->Add(hCalpeakADC);
371 listCalpeakTimeVGOOD->Add(hCalpeakTime);
373 listCalpeakTimeUGOOD->Add(hCalpeakTime);
381 B2INFO(
"WARNING, ONE APV has Pedestal problems in: L" << layer <<
"L" << ladder <<
"S" << sensor <<
" side = " << side <<
382 ", APV number = " << m_APV <<
" problem ID = " << problem);
385 listPedestalVBAD->Add(hPedestal);
387 listPedestalUBAD->Add(hPedestal);
390 listPedestalVGOOD->Add(hPedestal);
392 listPedestalUGOOD->Add(hPedestal);
400 printPage(theVxdID, listNoiseUBAD, listNoiseVBAD, listNoiseUGOOD, listNoiseVGOOD,
"Noise", isL3);
401 printPage(theVxdID, listCalpeakADCUBAD, listCalpeakADCVBAD, listCalpeakADCUGOOD, listCalpeakADCVGOOD,
"CalpeakADC", isL3);
402 printPage(theVxdID, listEmpty, listEmpty, listCalpeakTimeUGOOD, listCalpeakTimeVGOOD,
"CalpeakTime", isL3);
403 printPage(theVxdID, listPedestalUBAD, listPedestalVBAD, listPedestalUGOOD, listPedestalVGOOD,
"Pedestal", isL3);
421 TCanvas* empty =
new TCanvas();
423 empty->Print(pdf_open);
425 TCanvas* first =
new TCanvas(
"open_pag1",
"test first page");
427 TPaveText* pt_title =
new TPaveText(.05, .9, .95, 1,
"blNDC");
429 sprintf(name,
"Local Calibration Check Results");
430 pt_title->AddText(name);
431 pt_title->SetTextFont(42);
432 pt_title->SetTextColor(kBlack);
433 pt_title->SetShadowColor(0);
434 pt_title->SetFillColor(10);
435 pt_title->SetBorderSize(0);
436 pt_title->SetTextSize(0.08);
439 TPaveText* pt_input_title =
new TPaveText(.05, .8, .95, .85);
440 TPaveText* pt_input =
new TPaveText(.05, .72, .8, .8);
442 sprintf(input,
"%s",
"input files");
443 pt_input_title->AddText(input);
444 pt_input_title->SetShadowColor(0);
445 pt_input_title->SetBorderSize(0);
446 pt_input_title->SetTextSize(0.03);
451 pt_input->AddText(input);
452 ((TText*)pt_input->GetListOfLines()->Last())->SetTextColor(kRed);
457 pt_input->AddText(input);
458 ((TText*)pt_input->GetListOfLines()->Last())->SetTextColor(kBlue);
459 pt_input->SetTextSize(0.02);
460 pt_input->SetTextAlign(12);
461 pt_input->SetShadowColor(0);
462 pt_input->SetBorderSize(0);
463 pt_input->SetFillColor(10);
465 pt_input_title->Draw();
468 TPaveText* pt_cuts_title =
new TPaveText(.05, .65, .95, .7);
469 TPaveText* pt_cuts =
new TPaveText(.05, .15, .8, .60);
471 sprintf(cuts,
"%s",
"selection criteria");
472 pt_cuts_title->AddText(cuts);
473 pt_cuts_title->SetShadowColor(0);
474 pt_cuts_title->SetBorderSize(0);
475 pt_cuts_title->SetTextSize(0.03);
476 sprintf(cuts,
" An APV chip is selected as problematic if passes the criteria on Noise or CalPeakADC or Pedestal");
477 pt_cuts->AddText(cuts);
479 sprintf(cuts,
" Noise: an APV is problematic if 1. or 2. or 3.");
480 pt_cuts->AddText(cuts);
481 sprintf(cuts,
" 1. abs(ref_ave - check_ave) > %1.2f ADC",
m_cutNoise_ave);
482 pt_cuts->AddText(cuts);
483 sprintf(cuts,
" 2. more than %d strips with a value %1.2f ADC higher than the value of the ref calibration",
m_cutN_out,
485 pt_cuts->AddText(cuts);
486 sprintf(cuts,
" 3. more than %d strips with a value %1.2f ADC lower than the value of the ref calibration",
m_cutN_out,
488 pt_cuts->AddText(cuts);
490 sprintf(cuts,
" CalPeakADC: an APV is problematic if 1. or 2. or 3.");
491 pt_cuts->AddText(cuts);
493 pt_cuts->AddText(cuts);
494 sprintf(cuts,
" 2. more than %d strips with a value %1.1f ADC higher than the value of the ref calibration",
m_cutN_out,
496 pt_cuts->AddText(cuts);
497 sprintf(cuts,
" 3. more than %d strips with a value %1.1f ADC lower than the value of the ref calibration",
m_cutN_out,
499 pt_cuts->AddText(cuts);
501 sprintf(cuts,
" Pedestal: an APV is problematic if 1. or 2. or 3.");
502 pt_cuts->AddText(cuts);
504 pt_cuts->AddText(cuts);
505 sprintf(cuts,
" 2. more than %d strips with a value %1.1f ADC higher than the value of the ref calibration",
m_cutN_out,
507 pt_cuts->AddText(cuts);
508 sprintf(cuts,
" 3. more than %d strips with a value %1.1f ADC lower than the value of the ref calibration",
m_cutN_out,
510 pt_cuts->AddText(cuts);
513 pt_cuts->AddText(cuts);
515 " - {ref,check}_ave is the variable averaged on one APV chip of the reference or the check calibration");
516 pt_cuts->AddText(cuts);
518 " - 1 2 and 3 are the problem ID printed on screen while running the python script");
519 pt_cuts->AddText(cuts);
520 pt_cuts->SetTextSize(0.02);
521 pt_cuts->SetShadowColor(0);
522 pt_cuts->SetBorderSize(0);
523 pt_cuts->SetFillColor(10);
524 pt_cuts->SetTextAlign(12);
526 pt_cuts_title->Draw();
529 TPaveText* pt_tag_title =
new TPaveText(.05, .03, .95, .07);
531 sprintf(tag,
"analysis algorithm ID 1.0");
532 pt_tag_title->AddText(tag);
534 pt_tag_title->SetShadowColor(0);
535 pt_tag_title->SetFillColor(18);
536 pt_tag_title->SetBorderSize(0);
537 pt_tag_title->SetTextSize(0.02);
538 pt_tag_title->Draw();
545 TCanvas* cLayer =
new TCanvas();
547 TPaveText* pt_title =
new TPaveText(.05, .4, .95, 0.6,
"blNDC");
549 sprintf(name,
"Layer %d", layer);
550 pt_title->AddText(name);
551 pt_title->SetTextFont(42);
552 pt_title->SetTextColor(kBlack);
553 pt_title->SetShadowColor(0);
554 pt_title->SetFillColor(10);
555 pt_title->SetBorderSize(0);
556 pt_title->SetTextSize(0.08);
563 TList* listVGOOD, TString variable,
bool isL3)
566 TH2F* refU =
nullptr;
567 TH2F* refV =
nullptr;
568 TH2F* checkU =
nullptr;
569 TH2F* checkV =
nullptr;
574 Float_t leftLine = 0;
575 Float_t rightLine = 0;
578 if (variable ==
"Noise") {
590 }
else if (variable ==
"CalpeakADC") {
595 minY = refU->GetYaxis()->GetXmin();
596 maxY = refU->GetYaxis()->GetXmax();
600 }
else if (variable ==
"CalpeakTime") {
605 minY = refU->GetYaxis()->GetXmin();
606 maxY = refU->GetYaxis()->GetXmax();
607 }
else if (variable ==
"Pedestal") {
620 B2FATAL(
"The printPage function is not implemented for" <<
LogVar(
"variable", variable));
622 refU->GetYaxis()->SetRangeUser(minY, maxY);
623 refV->GetYaxis()->SetRangeUser(minY, maxY);
624 checkU->GetYaxis()->SetRangeUser(minY, maxY);
625 checkV->GetYaxis()->SetRangeUser(minY, maxY);
627 refU->SetMarkerColor(kRed);
628 refV->SetMarkerColor(kRed);
629 checkU->SetMarkerColor(kBlue);
630 checkV->SetMarkerColor(kBlue);
636 TLine lLeft(leftLine, 0, leftLine, topLine);
637 TLine lRight(rightLine, 0, rightLine, topLine);
638 lLeft.SetLineColor(15);
639 lRight.SetLineColor(15);
640 lLeft.SetLineStyle(kDashed);
641 lRight.SetLineStyle(kDashed);
644 TLine l1(128, min, 128, max);
645 TLine l2(128 * 2, min, 128 * 2, max);
646 TLine l3(128 * 3, min, 128 * 3, max);
647 TLine l4(128 * 4, min, 128 * 4, max);
648 TLine l5(128 * 5, min, 128 * 5, max);
654 TCanvas* c =
new TCanvas();
655 TPaveText* pt_sensorID =
new TPaveText(.495, 0.485, .505, 0.505,
"blNDC");
658 pt_sensorID->AddText(name);
659 pt_sensorID->SetTextFont(82);
660 pt_sensorID->SetTextColor(kBlack);
661 pt_sensorID->SetShadowColor(0);
662 pt_sensorID->SetFillColor(10);
663 pt_sensorID->SetBorderSize(0);
664 pt_sensorID->SetTextSize(0.08);
676 checkU->Draw(
"same");
683 TIter nextH_uGood(listUGOOD);
684 while ((objDiff = (TH1F*)nextH_uGood())) {
685 objDiff->SetFillStyle(3004);
689 objDiff->Draw(
"same");
693 TIter nextH_uBad(listUBAD);
694 while ((objDiff = (TH1F*)nextH_uBad())) {
695 objDiff->SetFillStyle(0);
699 objDiff->Draw(
"same");
719 checkV->Draw(
"same");
723 TIter nextH_vBad(listVBAD);
726 TIter nextH_vGood(listVGOOD);
727 while ((objDiff = (TH1F*)nextH_vGood())) {
728 objDiff->SetFillStyle(3004);
732 objDiff->Draw(
"same");
736 while ((objDiff = (TH1F*)nextH_vBad())) {
737 objDiff->SetFillStyle(0);
741 objDiff->Draw(
"same");
753 if (variable ==
"Noise")
754 pt_sensorID->Draw(
"same");
762 float average = h->GetMean();
763 if (std::fabs(average) > cutAve)
766 TAxis* xaxis = h->GetXaxis();
767 Int_t bin1 = xaxis->FindBin(-cutCOUNT);
768 Int_t bin2 = xaxis->FindBin(cutCOUNT);
775 B2DEBUG(1, bin1 <<
" -> " << bin2 <<
" with " << xaxis->GetNbins() <<
" bins");
777 if (h->Integral(1, bin1) >
m_cutN_out - 1)
return 2;
779 if (h->Integral(bin2, xaxis->GetNbins()) >
m_cutN_out - 1)
return 3;
790 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
792 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) {
794 std::set<Belle2::VxdID> svdLadders = aGeometry.
getLadders(*itSvdLayers);
795 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
797 while (itSvdLadders != svdLadders.end()) {
799 std::set<Belle2::VxdID> svdSensors = aGeometry.
getSensors(*itSvdLadders);
800 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
802 while (itSvdSensors != svdSensors.end()) {
804 int layer = itSvdSensors->getLayerNumber();
805 int ladder = itSvdSensors->getLadderNumber();
806 int sensor = itSvdSensors->getSensorNumber();
810 for (
int side = 0; side < 2; side++) {
812 int Ncells = currentSensorInfo->
getUCells();
816 int Napv = Ncells / 128;
818 for (
int m_APV = 0; m_APV < Napv; m_APV++) {
820 TH1F* h = m_APVhistos->
getHistogram(theVxdID, side, m_APV);
842 TPaveText* pt_cuts_title =
new TPaveText(.05, .6, .95, .65);
843 TPaveText* pt_cuts =
new TPaveText(.15, .5, .85, .55);
845 sprintf(cuts,
"%s",
"APV SUMMARY");
846 pt_cuts_title->SetShadowColor(0);
847 pt_cuts_title->SetBorderSize(0);
848 pt_cuts_title->SetTextSize(0.03);
849 pt_cuts_title->AddText(cuts);
850 sprintf(cuts,
"each bin of the plots in the next pages contains the number of problematic APV chips of the sensor");
851 pt_cuts->AddText(cuts);
852 sprintf(cuts,
"corresponding to the combination of column (ladder number) and row (layer and sensor number)");
853 pt_cuts->AddText(cuts);
854 pt_cuts->SetTextSize(0.02);
855 pt_cuts->SetShadowColor(0);
856 pt_cuts->SetBorderSize(0);
857 pt_cuts->SetFillColor(10);
858 pt_cuts->SetTextAlign(12);
860 TCanvas* explain =
new TCanvas();
861 pt_cuts_title->Draw();
865 TCanvas* noise =
new TCanvas();
874 TCanvas* calpeakADC =
new TCanvas();
875 calpeakADC->Divide(2, 2);
884 TCanvas* pedestal =
new TCanvas();
885 pedestal->Divide(2, 2);
898 TPaveText* pt_cuts_title =
new TPaveText(.05, .6, .95, .65);
899 TPaveText* pt_cuts =
new TPaveText(.15, .4, .85, .55);
901 sprintf(cuts,
"%s",
"Masked Strips SUMMARY");
902 pt_cuts_title->SetShadowColor(0);
903 pt_cuts_title->SetBorderSize(0);
904 pt_cuts_title->SetTextSize(0.03);
905 pt_cuts_title->AddText(cuts);
906 float nU = 768 * (2 * 7 + 3 * 10 + 4 * 12 + 5 * 16);
907 float nV = 512 * (2 * 7) + 768 * (3 * 10 + 4 * 12 + 5 * 16);
908 sprintf(cuts,
"Number of MASKED strips on the u/P side in the REF calibration = %d (%.3f)%%",
m_nMaskedUREF,
910 pt_cuts->AddText(cuts);
911 sprintf(cuts,
"Number of MASKED strips on the u/P side in the CHECK calibration = %d (%.3f)%%",
m_nMaskedUCHECK,
913 pt_cuts->AddText(cuts);
914 sprintf(cuts,
"Number of MASKED strips on the v/N side in the REF calibration = %d (%.3f)%%",
m_nMaskedVREF,
916 pt_cuts->AddText(cuts);
917 sprintf(cuts,
"Number of MASKED strips on the v/N side in the CHECK calibration = %d (%.3f)%%",
m_nMaskedVCHECK,
919 pt_cuts->AddText(cuts);
920 pt_cuts->SetTextSize(0.02);
921 pt_cuts->SetShadowColor(0);
922 pt_cuts->SetBorderSize(0);
923 pt_cuts->SetFillColor(10);
924 pt_cuts->SetTextAlign(12);
926 TCanvas* explain =
new TCanvas();
927 pt_cuts_title->Draw();
931 TCanvas* mask =
new TCanvas();
950 TCanvas* empty =
new TCanvas();
952 empty->Print(pdf_close);
962 m_legU =
new TLegend(0.75, 0.55, 0.89, 0.89);
963 m_legV =
new TLegend(0.75, 0.65, 0.89, 0.89);
968 TH1F* hAPV1 =
new TH1F(
"apv1",
"apv 1", 1, 0, 1);
970 m_legU->AddEntry(hAPV1,
"apv 1",
"l");
971 m_legV->AddEntry(hAPV1,
"apv 1",
"l");
972 TH1F* hAPV2 =
new TH1F(
"apv2",
"apv 2", 2, 0, 2);
975 hAPV2->SetMarkerStyle(21);
976 hAPV2->SetMarkerSize(0.5);
977 m_legU->AddEntry(hAPV2,
"apv 2",
"l");
978 m_legV->AddEntry(hAPV2,
"apv 2",
"l");
979 TH1F* hAPV3 =
new TH1F(
"apv3",
"apv 3", 3, 0, 3);
981 m_legU->AddEntry(hAPV3,
"apv 3",
"l");
982 m_legV->AddEntry(hAPV3,
"apv 3",
"l");
983 TH1F* hAPV4 =
new TH1F(
"apv4",
"apv 4", 4, 0, 4);
986 hAPV4->SetMarkerStyle(21);
987 hAPV4->SetMarkerSize(0.5);
988 m_legU->AddEntry(hAPV4,
"apv 4",
"l");
989 m_legV->AddEntry(hAPV4,
"apv 4",
"l");
990 TH1F* hAPV5 =
new TH1F(
"apv5",
"apv 5", 5, 0, 5);
992 m_legU->AddEntry(hAPV5,
"apv 5",
"l");
993 TH1F* hAPV6 =
new TH1F(
"apv6",
"apv 6", 6, 0, 6);
995 m_legU->AddEntry(hAPV6,
"apv 6",
"l");
997 m_leg2D =
new TLegend(0.78, 0.75, 0.89, 0.89);
998 m_leg2D->AddEntry(hAPV2,
"ref",
"pl");
999 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 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.
static const SensorInfoBase & get(Belle2::VxdID id)
Return a reference to the SensorInfo of a given SensorID.
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.