4 #include "Math/ProbFuncMathCore.h" 17 errorProb_ = ERROR_PROB_THRESHOLD;
18 warningProb_ = WARNING_PROB_THRESHOLD;
19 setAlgoName(
"NO_ALGORITHM");
21 message_ =
"NO_MESSAGE";
61 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D, exiting\n";
65 if (!rangeInitialized_) {
67 setAllowedXRange(h->GetXaxis()->GetXmin(), h->GetXaxis()->GetXmax());
71 int ncx = h->GetXaxis()->GetNbins();
81 for (bin = first; bin <=
last; ++
bin) {
82 double contents = h->GetBinContent(bin);
83 double x = h->GetBinCenter(bin);
85 if (x < xmin_ || x > xmax_)
92 return (sum - fail) / sum;
119 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D, exiting\n";
123 if (!rangeInitialized_ || !h->GetXaxis())
125 int ncx = h->GetXaxis()->GetNbins();
136 for (bin = first; bin <=
last; ++
bin) {
137 double contents = h->GetBinContent(bin);
138 bool failure =
false;
139 failure = (contents < ymin_ || contents > ymax_);
142 badChannels_.push_back(
chan);
147 return 1. * (ncx - fail) / ncx;
150 for (bin = first; bin <=
last; ++
bin) {
151 double contents = h->GetBinContent(bin);
152 bool failure =
false;
154 failure = (contents < ymin_ || contents > ymax_);
159 return 1. * (ncx - fail) / ncx;
167 badChannels_.clear();
203 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D/TH2F/TH2S/TH2D, exiting\n";
211 if (!rangeInitialized_ || !h1->GetXaxis())
213 int ncx = h1->GetXaxis()->GetNbins();
219 for (bin = first; bin <=
last; ++
bin) {
220 double contents = h1->GetBinContent(bin);
221 bool failure =
false;
222 failure = contents <= ymin_;
225 badChannels_.push_back(
chan);
230 return 1. * (ncx - fail) / ncx;
235 else if (h2 !=
nullptr) {
236 int ncx = h2->GetXaxis()->GetNbins();
237 int ncy = h2->GetYaxis()->GetNbins();
240 for (
int cx = 1; cx <= ncx; ++cx) {
241 for (
int cy = 1; cy <= ncy; ++cy) {
242 double contents = h2->GetBinContent(h2->GetBin(cx, cy));
243 bool failure =
false;
244 failure = contents <= ymin_;
246 DQMChannel chan(cx, cy, 0, contents, h2->GetBinError(h2->GetBin(cx, cy)));
247 badChannels_.push_back(chan);
253 return 1. * (ncx * ncy - fail) / (ncx * ncy);
257 <<
" TH1/TH2F are NULL, exiting\n";
268 badChannels_.clear();
283 nbins = me->
getTH1F()->GetXaxis()->GetNbins();
288 nbins = me->
getTH1S()->GetXaxis()->GetNbins();
293 nbins = me->
getTH1D()->GetXaxis()->GetNbins();
298 nbinsX = me->
getTH2F()->GetXaxis()->GetNbins();
304 nbinsX = me->
getTH2S()->GetXaxis()->GetNbins();
310 nbinsX = me->
getTH2F()->GetXaxis()->GetNbins();
316 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D or TH2F/TH2S/TH2D, exiting\n";
332 if (!rangeInitialized_ || !h->GetXaxis()) {
335 for (bin = first; bin <=
last; ++
bin) {
336 double contents = h->GetBinContent(bin);
337 double average = getAverage(bin, h);
338 bool failure =
false;
345 badChannels_.push_back(
chan);
350 return 1. * (nbins - fail) / nbins;
351 }
else if (h2 !=
nullptr) {
352 for (binY = first; binY <= lastY; ++binY) {
353 for (binX = first; binX <= lastX; ++binX) {
354 double contents = h2->GetBinContent(binX, binY);
355 double average = getAverage2D(binX, binY, h2);
356 bool failure =
false;
362 badChannels_.push_back(
chan);
367 return 1. * ((nbinsX *
nbinsY) - fail) / (nbinsX *
nbinsY);
372 <<
" TH1/TH2F are NULL, exiting\n";
381 int ncx = h->GetXaxis()->GetNbins();
383 int bin_start, bin_end;
387 bin_start = bin - numNeighbors_;
388 bin_end = bin + numNeighbors_;
390 if (bin_start < first) {
391 add_right = first - bin_start;
393 bin_end += add_right;
399 add_left = bin_end - ncx;
401 bin_start -= add_left;
402 if (bin_start < first)
406 sum += h->Integral(bin_start, bin_end);
407 sum -= h->GetBinContent(bin);
410 if (dimension > h->GetNbinsX())
411 dimension = h->GetNbinsX();
413 return sum / (dimension - 1);
421 int ncx = h2->GetXaxis()->GetNbins();
422 int ncy = h2->GetYaxis()->GetNbins();
424 int neighborsX, neighborsY;
425 neighborsX = numNeighbors_;
426 neighborsY = numNeighbors_;
427 int bin_startX, bin_endX;
430 int bin_startY, bin_endY;
434 bin_startX = binX - neighborsX;
435 bin_endX = binX + neighborsX;
437 if (bin_startX < firstX) {
438 add_rightX = firstX - bin_startX;
440 bin_endX += add_rightX;
445 if (bin_endX > ncx) {
446 add_leftX = bin_endX - ncx;
448 bin_startX -= add_leftX;
449 if (bin_startX < firstX)
453 bin_startY = binY - neighborsY;
454 bin_endY = binY + neighborsY;
456 if (bin_startY < firstY) {
457 add_topY = firstY - bin_startY;
459 bin_endY += add_topY;
464 if (bin_endY > ncy) {
465 add_downY = bin_endY - ncy;
467 bin_startY -= add_downY;
468 if (bin_startY < firstY)
472 sum += h2->Integral(bin_startX, bin_endX, bin_startY, bin_endY);
473 sum -= h2->GetBinContent(binX, binY);
475 int dimensionX = 2 * neighborsX + 1;
476 int dimensionY = 2 * neighborsY + 1;
478 if (dimensionX > h2->GetNbinsX())
479 dimensionX = h2->GetNbinsX();
480 if (dimensionY > h2->GetNbinsY())
481 dimensionY = h2->GetNbinsY();
483 return sum / (dimensionX * dimensionY - 1);
493 badChannels_.clear();
508 nbinsX = me->
getTH1F()->GetXaxis()->GetNbins();
509 nbinsY = me->
getTH1F()->GetYaxis()->GetNbins();
514 nbinsX = me->
getTH1S()->GetXaxis()->GetNbins();
515 nbinsY = me->
getTH1S()->GetYaxis()->GetNbins();
520 nbinsX = me->
getTH1D()->GetXaxis()->GetNbins();
521 nbinsY = me->
getTH1D()->GetYaxis()->GetNbins();
526 nbinsX = me->
getTH2F()->GetXaxis()->GetNbins();
527 nbinsY = me->
getTH2F()->GetYaxis()->GetNbins();
532 nbinsX = me->
getTH2S()->GetXaxis()->GetNbins();
533 nbinsY = me->
getTH2S()->GetYaxis()->GetNbins();
538 nbinsX = me->
getTH2D()->GetXaxis()->GetNbins();
539 nbinsY = me->
getTH2D()->GetYaxis()->GetNbins();
544 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D or TH2F/TH2S/TH2D, exiting\n";
550 if (!rangeInitialized_ || !h->GetXaxis())
558 unsigned XBlocks = numXblocks_;
559 unsigned YBlocks = numYblocks_;
560 unsigned neighborsX = numNeighborsX_;
561 unsigned neighborsY = numNeighborsY_;
562 unsigned Xbinnum = 1;
563 unsigned Ybinnum = 1;
567 if (neighborsX == 999) {
570 if (neighborsY == 999) {
577 if (xMin_ != 0 && xMax_ != 0) {
578 if ((xMax_ <= nbinsX) && (xMin_ <= xMax_)) {
579 nbinsX = xMax_ - xMin_ + 1;
585 if (yMin_ != 0 && yMax_ != 0) {
586 if ((yMax_ <= nbinsY) && (yMin_ <= yMax_)) {
587 nbinsY = yMax_ - yMin_ + 1;
593 if (neighborsX * 2 >= nbinsX) {
594 if (nbinsX % 2 == 0) {
595 neighborsX = nbinsX / 2 - 1;
597 neighborsX = (nbinsX - 1) / 2;
601 if (neighborsY * 2 >= nbinsY) {
602 if (nbinsY % 2 == 0) {
603 neighborsY = nbinsY / 2 - 1;
605 neighborsY = (nbinsY - 1) / 2;
609 if (XBlocks == 999) {
612 if (YBlocks == 999) {
616 Xbinnum = nbinsX / XBlocks;
617 Ybinnum = nbinsY / YBlocks;
618 for (
unsigned groupx = 0; groupx < XBlocks; ++groupx) {
619 for (
unsigned groupy = 0; groupy < YBlocks; ++groupy) {
621 for (
unsigned binx = 0; binx < Xbinnum; ++binx) {
622 for (
unsigned biny = 0; biny < Ybinnum; ++biny) {
623 if (groupx * Xbinnum + xMin + binx <= xMax && groupy * Ybinnum + yMin + biny <= yMax) {
624 blocksum +=
abs(h->GetBinContent(groupx * Xbinnum + xMin + binx, groupy * Ybinnum + yMin + biny));
629 double sum = getNeighborSum(groupx, groupy, XBlocks, YBlocks, neighborsX, neighborsY, h);
632 if (neighborsX > groupx) {
633 XWidth = neighborsX + groupx + 1;
634 }
else if (neighborsX > (XBlocks - (groupx + 1))) {
635 XWidth = (XBlocks - groupx) + neighborsX;
637 XWidth = 2 * neighborsX + 1;
639 if (neighborsY > groupy) {
640 YWidth = neighborsY + groupy + 1;
641 }
else if (neighborsY > (YBlocks - (groupy + 1))) {
642 YWidth = (YBlocks - groupy) + neighborsY;
644 YWidth = 2 * neighborsY + 1;
647 double average = sum / (XWidth * YWidth - 1);
648 double sigma = getNeighborSigma(average, groupx, groupy, XBlocks, YBlocks, neighborsX, neighborsY, h);
650 sigma -= (average - blocksum) * (average - blocksum);
651 double sigma_2 =
sqrt(sigma) /
sqrt(XWidth * YWidth - 2);
652 double sigma_real = sigma_2 / (XWidth * YWidth - 1);
654 double avg_uncrt = 3 * sigma_real;
656 double probNoisy = ROOT::Math::poisson_cdf_c(blocksum - 1, average + avg_uncrt);
657 double probDead = ROOT::Math::poisson_cdf(blocksum, average - avg_uncrt);
658 double thresholdNoisy = ROOT::Math::normal_cdf_c(toleranceNoisy_);
659 double thresholdDead = ROOT::Math::normal_cdf(-1 * toleranceDead_);
661 int failureNoisy = 0;
665 if (noisy_ && dead_) {
666 if (blocksum > average) {
667 failureNoisy = probNoisy < thresholdNoisy;
669 failureDead = probDead < thresholdDead;
672 if (blocksum > average) {
673 failureNoisy = probNoisy < thresholdNoisy;
676 if (blocksum < average) {
677 failureDead = probDead < thresholdDead;
688 if (failureNoisy || failureDead) {
695 return 1. * ((XBlocks * YBlocks) - fail) / (XBlocks * YBlocks);
705 const TH1*
h)
const {
707 unsigned nbinsX = h->GetXaxis()->GetNbins();
708 unsigned nbinsY = h->GetYaxis()->GetNbins();
713 unsigned Xbinnum = 1;
714 unsigned Ybinnum = 1;
719 if (xMin_ != 0 && xMax_ != 0) {
720 if ((xMax_ <= nbinsX) && (xMin_ <= xMax_)) {
721 nbinsX = xMax_ - xMin_ + 1;
726 if (yMin_ != 0 && yMax_ != 0) {
727 if ((yMax_ <= nbinsY) && (yMin_ <= yMax_)) {
728 nbinsY = yMax_ - yMin_ + 1;
734 if (Xblocks == 999) {
737 if (Yblocks == 999) {
741 Xbinnum = nbinsX / Xblocks;
742 Ybinnum = nbinsY / Yblocks;
744 unsigned xLow, xHi, yLow, yHi;
745 if (groupx > neighborsX) {
746 xLow = (groupx - neighborsX) * Xbinnum + xMin;
753 xHi = (groupx + 1 + neighborsX) * Xbinnum + xMin;
757 if (groupy > neighborsY) {
758 yLow = (groupy - neighborsY) * Ybinnum + yMin;
765 yHi = (groupy + 1 + neighborsY) * Ybinnum + yMin;
770 for (
unsigned xbin = xLow; xbin <= xHi; ++xbin) {
771 for (
unsigned ybin = yLow; ybin <= yHi; ++ybin) {
772 sum += h->GetBinContent(xbin, ybin);
786 const TH1*
h)
const {
788 unsigned nbinsX = h->GetXaxis()->GetNbins();
789 unsigned nbinsY = h->GetYaxis()->GetNbins();
794 unsigned Xbinnum = 1;
795 unsigned Ybinnum = 1;
798 if (xMin_ != 0 && xMax_ != 0) {
799 if ((xMax_ <= nbinsX) && (xMin_ <= xMax_)) {
800 nbinsX = xMax_ - xMin_ + 1;
805 if (yMin_ != 0 && yMax_ != 0) {
806 if ((yMax_ <= nbinsY) && (yMin_ <= yMax_)) {
807 nbinsY = yMax_ - yMin_ + 1;
812 if (Xblocks == 999) {
815 if (Yblocks == 999) {
819 Xbinnum = nbinsX / Xblocks;
820 Ybinnum = nbinsY / Yblocks;
822 unsigned xLow, xHi, yLow, yHi;
823 for (
unsigned x_block_count = 0; x_block_count <= 2 * neighborsX; ++x_block_count) {
824 for (
unsigned y_block_count = 0; y_block_count <= 2 * neighborsY; ++y_block_count) {
826 if (groupx + x_block_count > neighborsX) {
827 xLow = (groupx + x_block_count - neighborsX) * Xbinnum + xMin;
834 xHi = xLow + Xbinnum;
838 if (groupy + y_block_count > neighborsY) {
839 yLow = (groupy + y_block_count - neighborsY) * Ybinnum + yMin;
846 yHi = yLow + Ybinnum;
851 for (
unsigned x_block_bin = xLow; x_block_bin <= xHi; ++x_block_bin) {
852 for (
unsigned y_block_bin = yLow; y_block_bin <= yHi; ++y_block_bin) {
853 block_sum += h->GetBinContent(x_block_bin, y_block_bin);
856 sigma += (average - block_sum) * (average - block_sum);
868 badChannels_.clear();
884 ncx = me->
getTH2F()->GetXaxis()->GetNbins();
885 ncy = me->
getTH2F()->GetYaxis()->GetNbins();
890 ncx = me->
getTH2S()->GetXaxis()->GetNbins();
891 ncy = me->
getTH2S()->GetYaxis()->GetNbins();
896 ncx = me->
getTH2D()->GetXaxis()->GetNbins();
897 ncy = me->
getTH2D()->GetYaxis()->GetNbins();
913 std::cout <<
"QTest:ContentsWithinExpected" 914 <<
" ME does not contain TH2F/TH2S/TH2D/TPROFILE/TPROFILE2D, exiting\n";
922 if (checkMeanTolerance_) {
924 for (
int cx = 1; cx <= ncx; ++cx) {
925 for (
int cy = 1; cy <= ncy; ++cy) {
927 sum += h->GetBinContent(h->GetBin(cx, cy));
930 sum += h->GetBinContent(h->GetBin(cx, cy));
933 sum += h->GetBinContent(h->GetBin(cx, cy));
936 if (me->
getTProfile()->GetBinEntries(h->GetBin(cx)) >= minEntries_ / (ncx)) {
937 sum += h->GetBinContent(h->GetBin(cx));
941 if (me->
getTProfile2D()->GetBinEntries(h->GetBin(cx, cy)) >= minEntries_ / (ncx * ncy)) {
942 sum += h->GetBinContent(h->GetBin(cx, cy));
950 average = sum / nsum;
956 for (
int cx = 1; cx <= ncx; ++cx) {
957 for (
int cy = 1; cy <= ncy; ++cy) {
958 bool failMean =
false;
959 bool failRMS =
false;
960 bool failMeanTolerance =
false;
963 me->
getTProfile()->GetBinEntries(h->GetBin(cx)) < minEntries_ / (ncx))
967 me->
getTProfile2D()->GetBinEntries(h->GetBin(cx, cy)) < minEntries_ / (ncx * ncy))
971 double mean = h->GetBinContent(h->GetBin(cx, cy));
972 failMean = (mean < minMean_ || mean > maxMean_);
976 double rms = h->GetBinError(h->GetBin(cx, cy));
977 failRMS = (rms < minRMS_ || rms > maxRMS_);
980 if (checkMeanTolerance_) {
981 double mean = h->GetBinContent(h->GetBin(cx, cy));
982 failMeanTolerance = (
std::abs(mean - average) > toleranceMean_ *
std::abs(average));
985 if (failMean || failRMS || failMeanTolerance) {
987 DQMChannel chan(cx, cy, 0, h->GetBinContent(h->GetBin(cx, cy)), h->GetBinError(h->GetBin(cx, cy)));
988 badChannels_.push_back(chan);
990 DQMChannel chan(cx, cy, 0, h->GetBinContent(h->GetBin(cx, cy)), h->GetBinError(h->GetBin(cx, cy)));
991 badChannels_.push_back(chan);
993 DQMChannel chan(cx, cy, 0, h->GetBinContent(h->GetBin(cx, cy)), h->GetBinError(h->GetBin(cx, cy)));
994 badChannels_.push_back(chan);
997 cx, cy,
int(me->
getTProfile()->GetBinEntries(h->GetBin(cx))), 0, h->GetBinError(h->GetBin(cx)));
998 badChannels_.push_back(chan);
1003 h->GetBinContent(h->GetBin(cx, cy)),
1004 h->GetBinError(h->GetBin(cx, cy)));
1005 badChannels_.push_back(chan);
1011 return 1. * (ncx * ncy - fail) / (ncx * ncy);
1017 ncx = me->
getTH2F()->GetXaxis()->GetNbins();
1018 ncy = me->
getTH2F()->GetYaxis()->GetNbins();
1021 ncx = me->
getTH2S()->GetXaxis()->GetNbins();
1022 ncy = me->
getTH2S()->GetYaxis()->GetNbins();
1025 ncx = me->
getTH2D()->GetXaxis()->GetNbins();
1026 ncy = me->
getTH2D()->GetYaxis()->GetNbins();
1030 std::cout <<
"QTest:ContentsWithinExpected AS" 1031 <<
" ME does not contain TH2F/TH2S/TH2D, exiting\n";
1037 for (
int cx = 1; cx <= ncx; ++cx) {
1038 for (
int cy = 1; cy <= ncy; ++cy) {
1039 bool failure =
false;
1040 double Content = h->GetBinContent(h->GetBin(cx, cy));
1042 failure = (Content < minMean_ || Content > maxMean_);
1047 return 1. * (ncx * ncy - fail) / (ncx * ncy);
1054 std::cout <<
"QTest:ContentsWitinExpected" 1055 <<
" Illogical range: (" << xmin <<
", " << xmax <<
"\n";
1065 std::cout <<
"QTest:ContentsWitinExpected" 1066 <<
" Illogical range: (" << xmin <<
", " << xmax <<
"\n";
1095 if (minEntries_ != 0 && me->
getEntries() < minEntries_)
1107 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1S/TH1D, exiting\n";
1112 double mean = h->GetMean();
1113 if (mean <= xmax_ && mean >= xmin_)
1117 }
else if (useSigma_) {
1119 double chi = (h->GetMean() - expMean_) / sigma_;
1120 return TMath::Prob(chi * chi, 1);
1124 <<
" Error, sigma_ is zero, exiting\n";
1127 }
else if (useRMS_) {
1128 if (h->GetRMS() != 0.) {
1129 double chi = (h->GetMean() - expMean_) / h->GetRMS();
1130 return TMath::Prob(chi * chi, 1);
1134 <<
" Error, RMS is zero, exiting\n";
1140 <<
" Error, neither Range, nor Sigma, nor RMS, exiting\n";
1147 useSigma_ = useRMS_ =
false;
1153 <<
" Illogical range: (" << xmin_ <<
", " << xmax_ <<
"\n";
1157 useRMS_ = useRange_ =
false;
1158 sigma_ = expectedSigma;
1162 <<
" Expected sigma = " << sigma_ <<
"\n";
1167 useSigma_ = useRange_ =
false;
1183 badChannels_.clear();
1193 std::cout <<
"\tMin = " << _min <<
"; Max = " << _max <<
"\n";
1194 std::cout <<
"\tMinMedian = " << _minMed <<
"; MaxMedian = " << _maxMed <<
"\n";
1195 std::cout <<
"\tUseEmptyBins = " << (_emptyBins ?
"Yes" :
"No") <<
"\n";
1202 std::cout <<
"QTest:ContentsWithinExpected" 1203 <<
" ME does not contain TPROFILE2D, exiting\n";
1207 nBinsX = h->GetNbinsX();
1208 nBinsY = h->GetNbinsY();
1213 for (
int binX = 1; binX <= nBinsX; binX++) {
1216 for (
int binY = 1; binY <= nBinsY; binY++) {
1217 int bin = h->GetBin(binX, binY);
1218 auto content = (double)h->GetBinContent(bin);
1219 if (
content == 0 && !_emptyBins)
1224 if (binValues.empty())
1226 nbins += binValues.size();
1229 if (!binValues.empty()) {
1230 int medPos = (
int)binValues.size() / 2;
1231 nth_element(binValues.begin(), binValues.begin() + medPos, binValues.end());
1232 median = *(binValues.begin() + medPos);
1238 std::cout <<
"QTest: Median is 0; the fixed cuts: [" << _minMed <<
"; " << _maxMed <<
"] are used\n";
1240 for (
int binY = 1; binY <= nBinsY; binY++) {
1241 int bin = h->GetBin(binX, binY);
1242 auto content = (double)h->GetBinContent(bin);
1248 badChannels_.push_back(
chan);
1256 if (median * entries < _statCut)
1260 if (median > _maxMed || median < _minMed) {
1261 for (
int binY = 1; binY <= nBinsY; binY++) {
1262 int bin = h->GetBin(binX, binY);
1263 auto content = (double)h->GetBinContent(bin);
1268 badChannels_.push_back(
chan);
1275 float minCut = median * _min;
1276 float maxCut = median * _max;
1277 for (
int binY = 1; binY <= nBinsY; binY++) {
1278 int bin = h->GetBin(binX, binY);
1279 auto content = (double)h->GetBinContent(bin);
1285 badChannels_.push_back(
chan);
1293 std::cout <<
"QTest:CompareToMedian: Histogram is empty" << std::endl;
1317 std::cout <<
"\tMin = " << _min <<
"; Max = " << _max <<
"\n";
1325 std::cout <<
"QTest:ContentsWithinExpected" 1326 <<
" ME does not contain TH1F or TH2F, exiting\n";
1334 if (h1 !=
nullptr) {
1335 lastBinX = h1->FindLastBinAbove(_average, 1);
1336 lastBinVal = h1->GetBinContent(lastBinX);
1337 if (h1->GetEntries() == 0 || lastBinVal < 0)
1339 }
else if (h2 !=
nullptr) {
1340 lastBinX = h2->FindLastBinAbove(_average, 1);
1341 lastBinY = h2->FindLastBinAbove(_average, 2);
1342 if (h2->GetEntries() == 0 || lastBinX < 0 || lastBinY < 0)
1344 lastBinVal = h2->GetBinContent(h2->GetBin(lastBinX, lastBinY));
1347 std::cout <<
"QTest:" << getAlgoName() <<
" Histogram does not exist" << std::endl;
1351 std::cout <<
"Min and Max values " << _min <<
" " << _max <<
" Av value " << _average <<
" lastBinX " << lastBinX
1352 <<
" lastBinY " << lastBinY <<
" lastBinVal " << lastBinVal << std::endl;
1353 if (lastBinVal > _min && lastBinVal <= _max)
1362 badChannels_.clear();
1384 <<
" ME " << me->
getFullname() <<
" does not contain TH1F/TH1D/TPROFILE, exiting\n";
1388 int ncx = h->GetXaxis()->GetNbins();
1398 double avg = sum / ncx;
1402 sum2 += (contents - avg) * (contents - avg);
1405 double Variance = TMath::Sqrt(sum2 / ncx);
virtual TH2D * getTH2D() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double getAverage(int bin, const TH1 *h) const
virtual TH2F * getTH2F() const
double getAverage2D(int binX, int binY, const TH2 *h) const
virtual TH1F * getTH1F() const
Kind kind() const
Get the type of the monitor element.
void setRMSRange(double xmin, double xmax)
set expected value for mean
void useSigma(double expectedSigma)
float runTest(const MonitorElement *me) override
float runTest(const MonitorElement *me) override
virtual TH1S * getTH1S() const
const std::string getFullname() const
get full name of ME including Pathname
float runTest(const MonitorElement *me) override
void init()
initialize values
virtual double getEntries() const
get # of entries
Abs< T >::type abs(const T &t)
static const int DID_NOT_RUN
static const float ERROR_PROB_THRESHOLD
float runTest(const MonitorElement *me) override
virtual TProfile2D * getTProfile2D() const
float runTest(const MonitorElement *me) override
virtual TH2S * getTH2S() const
void useRange(double xmin, double xmax)
double getNeighborSigma(double average, unsigned groupx, unsigned groupy, unsigned Xblocks, unsigned Yblocks, unsigned neighborsX, unsigned neighborsY, const TH1 *h) const
float runTest(const MonitorElement *me) override
virtual TProfile * getTProfile() const
virtual TH1D * getTH1D() const
virtual float runTest(const MonitorElement *me)
float runTest(const MonitorElement *me) override
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
void setMeanRange(double xmin, double xmax)
set expected value for mean
double getNeighborSum(unsigned groupx, unsigned groupy, unsigned Xblocks, unsigned Yblocks, unsigned neighborsX, unsigned neighborsY, const TH1 *h) const
for each bin get sum of the surrounding neighbors
float runTest(const MonitorElement *me) override
TObject * getRootObject() const override
float runTest(const MonitorElement *me) override
uint32_t dimension(pat::CandKinResolution::Parametrization parametrization)
Returns the number of free parameters in a parametrization (3 or 4)
void reset(double vett[256])
static const float WARNING_PROB_THRESHOLD
default "probability" values for setting warnings & errors when running tests
void raiseDQMError(const char *context, const char *fmt,...)