CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QTest.h
Go to the documentation of this file.
1 #ifndef DQMSERVICES_CORE_Q_CRITERION_H
2 # define DQMSERVICES_CORE_Q_CRITERION_H
3 
5 # include "TProfile2D.h"
6 # include "TProfile.h"
7 # include "TH2F.h"
8 # include "TH1F.h"
9 # include <sstream>
10 # include <string>
11 # include <map>
12 #include <utility>
13 
14 //#include "DQMServices/Core/interface/DQMStore.h"
15 
26 //class AllContentWithinFixedRange; typedef AllContentWithinFixedRange RuleAllContentWithinFixedRange; typedef AllContentWithinFixedRange AllContentWithinFixedRangeROOT;
27 //class AllContentWithinFloatingRange; typedef AllContentWithinFloatingRange RuleAllContentWithinFloatingRange; typedef AllContentWithinFloatingRange AllContentWithinFloatingRangeROOT;
28 class FlatOccupancy1d; using RuleFlatOccupancy1d = FlatOccupancy1d; using FlatOccupancy1dROOT = FlatOccupancy1d;
30 class CSC01; using RuleCSC01 = CSC01; using CSC01ROOT = CSC01;
31 class AllContentAlongDiagonal; using RuleAllContentAlongDiagonal = AllContentAlongDiagonal; using AllContentAlongDiagonalROOT = AllContentAlongDiagonal;
35 
49 {
51 
52 public:
53 
55  int getStatus() const { return status_; }
57  std::string getMessage() const { return message_; }
59  std::string getName() const { return qtname_; }
61  std::string algoName() const { return algoName_; }
63  void setWarningProb(float prob) { warningProb_ = prob; }
64  void setErrorProb(float prob) { errorProb_ = prob; }
67  virtual std::vector<DQMChannel> getBadChannels() const
68  { return std::vector<DQMChannel>(); }
69 
70 protected:
71  QCriterion(std::string qtname) { qtname_ = std::move(qtname); init(); }
73  void init();
74 
75  virtual ~QCriterion() = default;
76 
77  virtual float runTest(const MonitorElement *me);
80 
81  float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv) {
82  assert(qr.qcriterion_ == this);
83  assert(qv.qtname == qtname_);
84 
85  prob_ = runTest(me); // this runTest goes to SimpleTest derivates
86 
90 
91  setMessage(); // this goes to SimpleTest derivates
92 
93  if (verbose_==2) std::cout << " Message = " << message_ << std::endl;
94  if (verbose_==2) std::cout << " Name = " << qtname_ <<
95  " / Algorithm = " << algoName_ <<
96  " / Status = " << status_ <<
97  " / Prob = " << prob_ << std::endl;
98 
99  qv.code = status_;
100  qv.message = message_;
101  qv.qtname = qtname_;
102  qv.algorithm = algoName_;
103  qv.qtresult = prob_;
105 
106  return prob_;
107  }
108 
110  virtual void setMessage() = 0;
111 
114  float prob_;
115  int status_;
119  int verbose_;
120 
121 private:
123  static const float WARNING_PROB_THRESHOLD;
124  static const float ERROR_PROB_THRESHOLD;
125 
127  friend class DQMStore;
129  friend class MonitorElement;
130 };
131 
135 
136 class SimpleTest : public QCriterion
137 {
138 public:
139  SimpleTest(const std::string &name, bool keepBadChannels = false) : QCriterion(name),
140  minEntries_ (0),
141  keepBadChannels_ (keepBadChannels)
142  {}
143 
145  void setMinimumEntries(unsigned n) { minEntries_ = n; }
147  std::vector<DQMChannel> getBadChannels() const override
148  {
149  return keepBadChannels_ ? badChannels_ : QCriterion::getBadChannels();
150  }
151 
152 protected:
153 
155  void setMessage() override
156  {
157  message_.clear();
158  }
159 
160  unsigned minEntries_; //< minimum # of entries needed
161  std::vector<DQMChannel> badChannels_;
163  };
164 
165 
166 //===============================================================//
167 //========= Classes for particular QUALITY TESTS ================//
168 //===============================================================//
169 
170 //===================== Comp2RefEqualH ===================//
171 //== Algorithm for comparing equality of histograms ==//
173 {
174 public:
176  {
177  setAlgoName( getAlgoName() );
178  }
179  static std::string getAlgoName() { return "Comp2RefEqualH"; }
180  float runTest(const MonitorElement*me) override;
181 };
182 
183 //===================== Comp2RefChi2 ===================//
184 // comparison to reference using the chi^2 algorithm
185 class Comp2RefChi2 : public SimpleTest
186 {
187 public:
189  {
190  setAlgoName(getAlgoName());
191  }
192  static std::string getAlgoName() { return "Comp2RefChi2"; }
193  float runTest(const MonitorElement*me) override;
194 
195 protected:
196 
197  void setMessage() override
198  {
199  std::ostringstream message;
200  message << "chi2/Ndof = " << chi2_ << "/" << Ndof_
201  << ", minimum needed statistics = " << minEntries_
202  << " warning threshold = " << this->warningProb_
203  << " error threshold = " << this->errorProb_;
204  message_ = message.str();
205  }
206 
207  // # of degrees of freedom and chi^2 for test
208  int Ndof_; double chi2_;
209 };
210 
211 //===================== Comp2Ref2DChi2 =================//
212 // comparison to reference using the 2D chi^2 algorithm
214 {
215 public:
217  {
218  setAlgoName(getAlgoName());
219  }
220  static std::string getAlgoName() { return "Comp2Ref2DChi2"; }
221  float runTest(const MonitorElement*me) override;
222 
223 protected:
224 
225  void setMessage() override
226  {
227  std::ostringstream message;
228  message << "chi2/Ndof = " << chi2_ << "/" << Ndof_
229  << ", minimum needed statistics = " << minEntries_
230  << " warning threshold = " << this->warningProb_
231  << " error threshold = " << this->errorProb_;
232  message_ = message.str();
233  }
234 
235  // # of degrees of freedom and chi^2 for test
236  int Ndof_; double chi2_;
237 };
238 
239 //===================== Comp2RefKolmogorov ===================//
242 {
243 public:
245  {
246  setAlgoName(getAlgoName());
247  }
248  static std::string getAlgoName() { return "Comp2RefKolmogorov"; }
249 
250  float runTest(const MonitorElement *me) override;
251 };
252 
253 //==================== ContentsXRange =========================//
254 //== Check that histogram contents are between [Xmin, Xmax] ==//
256 {
257 public:
259  {
260  rangeInitialized_ = false;
261  setAlgoName(getAlgoName());
262  }
263  static std::string getAlgoName() { return "ContentsXRange"; }
264  float runTest(const MonitorElement *me) override ;
265 
267  virtual void setAllowedXRange(double xmin, double xmax)
268  {
269  xmin_ = xmin; xmax_ = xmax;
270  rangeInitialized_ = true;
271  }
272 
273 protected:
274  double xmin_;double xmax_;
276 };
277 
278 //==================== ContentsYRange =========================//
279 //== Check that histogram contents are between [Ymin, Ymax] ==//
281 {
282 public:
284  {
285  rangeInitialized_ = false;
286  setAlgoName(getAlgoName());
287  }
288  static std::string getAlgoName() { return "ContentsYRange"; }
289  float runTest(const MonitorElement *me) override;
290 
291  void setUseEmptyBins(unsigned int useEmptyBins) { useEmptyBins_ = useEmptyBins; }
292  virtual void setAllowedYRange(double ymin, double ymax)
293  {
294  ymin_ = ymin; ymax_ = ymax;
295  rangeInitialized_ = true;
296  }
297 
298 protected:
299  double ymin_; double ymax_;
301  unsigned int useEmptyBins_;
302 
303 };
304 
305 //============================== DeadChannel =================================//
307 class DeadChannel : public SimpleTest
308 {
309 public:
311  {
312  rangeInitialized_ = false;
313  setAlgoName(getAlgoName());
314  }
315  static std::string getAlgoName() { return "DeadChannel"; }
316  float runTest(const MonitorElement *me) override;
317 
319  void setThreshold(double ymin)
320  {
321  ymin_ = ymin;
322  rangeInitialized_ = true;
323  }
324 
325 protected:
326  double ymin_;
328 };
329 
330 
331 //==================== NoisyChannel =========================//
333 class NoisyChannel : public SimpleTest
334 {
335 public:
337  {
338  rangeInitialized_ = false;
339  numNeighbors_ = 1;
340  setAlgoName(getAlgoName());
341  }
342  static std::string getAlgoName() { return "NoisyChannel"; }
343  float runTest(const MonitorElement*me) override;
344 
352  void setNumNeighbors(unsigned n) { if (n > 0) numNeighbors_ = n; }
353 
358  void setTolerance(float percentage)
359  {
360  if (percentage >=0)
361  {
362  tolerance_ = percentage;
363  rangeInitialized_ = true;
364  }
365  }
366 
367 protected:
370  double getAverage(int bin, const TH1 *h) const;
371 
372  float tolerance_; /*< tolerance for considering a channel noisy */
373  unsigned numNeighbors_; /*< # of neighboring channels for calculating average to be used
374  for comparison with channel under consideration */
375  bool rangeInitialized_; /*< init-flag for tolerance */
376 };
377 
378 //==================== ContentsWithinExpected =========================//
379 // Check that every TH2 channel has mean, RMS within allowed range.
381 {
382 public:
384  {
385  checkMean_ = checkRMS_ = false;
386  minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
387  checkMeanTolerance_ = false;
388  toleranceMean_ = -1.0;
389  setAlgoName(getAlgoName());
390  }
391  static std::string getAlgoName() { return "ContentsWithinExpected"; }
392  float runTest(const MonitorElement *me) override;
393 
394  void setUseEmptyBins(unsigned int useEmptyBins) {
395  useEmptyBins_ = useEmptyBins;
396  }
397  void setMeanRange(double xmin, double xmax);
398  void setRMSRange(double xmin, double xmax);
399 
401  void setMeanTolerance(float fracTolerance)
402  {
403  if (fracTolerance >= 0.0)
404  {
405  toleranceMean_ = fracTolerance;
406  checkMeanTolerance_ = true;
407  }
408  }
409 
410 protected:
411  bool checkMean_; //< if true, check the mean value
412  bool checkRMS_; //< if true, check the RMS value
413  bool checkMeanTolerance_; //< if true, check mean tolerance
414  float toleranceMean_; //< fractional tolerance on mean (use only if checkMeanTolerance_ = true)
415  float minMean_, maxMean_; //< allowed range for mean (use only if checkMean_ = true)
416  float minRMS_, maxRMS_; //< allowed range for mean (use only if checkRMS_ = true)
417  unsigned int useEmptyBins_;
418 
419 };
420 
421 //==================== MeanWithinExpected =========================//
424 {
425 public:
427  {
428  setAlgoName(getAlgoName());
429  }
430  static std::string getAlgoName() { return "MeanWithinExpected"; }
431  float runTest(const MonitorElement*me) override;
432 
433  void setExpectedMean(double mean) { expMean_ = mean; }
434  void useRange(double xmin, double xmax);
435  void useSigma(double expectedSigma);
436  void useRMS() ;
437 
438 protected:
439  bool useRMS_; //< if true, will use RMS of distribution
440  bool useSigma_; //< if true, will use expected_sigma
441  bool useRange_; //< if true, will use allowed range
442  double sigma_; //< sigma to be used in probability calculation (use only if useSigma_ = true)
443  double expMean_; //< expected mean value (used only if useSigma_ = true or useRMS_ = true)
444  double xmin_, xmax_; //< allowed range for mean (use only if useRange_ = true)
445 
446 };
447 
448 //==================== AllContentWithinFixedRange =========================//
449 /*class AllContentWithinFixedRange : public SimpleTest
450 {
451 public:
452  AllContentWithinFixedRange(const std::string &name) : SimpleTest(name)
453  {
454  setAlgoName(getAlgoName());
455  }
456  static std::string getAlgoName(void) { return "RuleAllContentWithinFixedRange"; }
457  float runTest(const MonitorElement *me);
458 
459  void set_x_min(double x) { x_min = x; }
460  void set_x_max(double x) { x_max = x; }
461  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
462  void set_S_fail(double S) { S_fail = S; }
463  void set_S_pass(double S) { S_pass = S; }
464  double get_epsilon_obs(void) { return epsilon_obs; }
465  double get_S_fail_obs(void) { return S_fail_obs; }
466  double get_S_pass_obs(void) { return S_pass_obs; }
467  int get_result(void) { return result; }
468 
469 protected:
470  TH1F *histogram ; //define Test histo
471  double x_min, x_max;
472  double epsilon_max;
473  double S_fail, S_pass;
474  double epsilon_obs;
475  double S_fail_obs, S_pass_obs;
476  int result;
477 };
478 */
479 //==================== AllContentWithinFloatingRange =========================//
480 /*class AllContentWithinFloatingRange : public SimpleTest
481 {
482 public:
483  AllContentWithinFloatingRange(const std::string &name) : SimpleTest(name)
484  {
485  setAlgoName(getAlgoName());
486  }
487  static std::string getAlgoName(void) { return "RuleAllContentWithinFloatingRange"; }
488 
489  void set_Nrange(int N) { Nrange = N; }
490  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
491  void set_S_fail(double S) { S_fail = S; }
492  void set_S_pass(double S) { S_pass = S; }
493  double get_epsilon_obs(void) { return epsilon_obs; }
494  double get_S_fail_obs(void) { return S_fail_obs; }
495  double get_S_pass_obs(void) { return S_pass_obs; }
496  int get_result(void) { return result; }
497 
498  float runTest(const MonitorElement *me );
499 
500 protected:
501  TH1F *histogram ; //define Test histo
502  int Nrange;
503  double epsilon_max;
504  double S_fail, S_pass;
505  double epsilon_obs;
506  double S_fail_obs, S_pass_obs;
507  int result;
508 };*/
509 
510 //==================== FlatOccupancy1d =========================//
511 #if 0 // FIXME: need to know what parameters to set before runTest!
512 class FlatOccupancy1d : public SimpleTest
513 {
514 public:
515  FlatOccupancy1d(const std::string &name) : SimpleTest(name)
516  {
517  Nbins = 0;
518  FailedBins[0] = 0;
519  FailedBins[1] = 0;
520  setAlgoName(getAlgoName());
521  }
522 
523  ~FlatOccupancy1d(void)
524  {
525  delete [] FailedBins[0];
526  delete [] FailedBins[1];
527  }
528 
529  static std::string getAlgoName(void) { return "RuleFlatOccupancy1d"; }
530 
531  void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
532  void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
533  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
534  void set_S_fail(double S) { S_fail = S; }
535  void set_S_pass(double S) { S_pass = S; }
536  double get_FailedBins(void) { return *FailedBins[1]; } // FIXME: WRONG! OFF BY ONE!?
537  int get_result() { return result; }
538 
539  float runTest(const MonitorElement*me);
540 
541 protected:
542  double *ExclusionMask;
543  double epsilon_min, epsilon_max;
544  double S_fail, S_pass;
545  double *FailedBins[2];
546  int Nbins;
547  int result;
548 };
549 #endif
550 
551 //==================== FixedFlatOccupancy1d =========================//
553 {
554 public:
556  {
557  Nbins = 0;
558  FailedBins[0] = nullptr;
559  FailedBins[1] = nullptr;
560  setAlgoName(getAlgoName());
561  }
562 
564  {
565  if( Nbins > 0 )
566  {
567  delete [] FailedBins[0];
568  delete [] FailedBins[1];
569  }
570  }
571 
572  static std::string getAlgoName() { return "RuleFixedFlatOccupancy1d"; }
573 
574  void set_Occupancy(double level) { b = level; }
575  void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
576  void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
577  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
578  void set_S_fail(double S) { S_fail = S; }
579  void set_S_pass(double S) { S_pass = S; }
580  double get_FailedBins() { return *FailedBins[1]; } // FIXME: WRONG! OFF BY ONE!?
581  int get_result() { return result; }
582 
583  float runTest(const MonitorElement*me) override;
584 
585 protected:
586  double b;
587  double *ExclusionMask;
588  double epsilon_min, epsilon_max;
589  double S_fail, S_pass;
590  double *FailedBins[2];
591  int Nbins;
592  int result;
593 };
594 
595 //==================== CSC01 =========================//
596 class CSC01 : public SimpleTest
597 {
598 public:
600  {
601  setAlgoName(getAlgoName());
602  }
603  static std::string getAlgoName() { return "RuleCSC01"; }
604 
605  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
606  void set_S_fail(double S) { S_fail = S; }
607  void set_S_pass(double S) { S_pass = S; }
608  double get_epsilon_obs() { return epsilon_obs; }
609  double get_S_fail_obs() { return S_fail_obs; }
610  double get_S_pass_obs() { return S_pass_obs; }
611  int get_result() { return result; }
612 
613  float runTest(const MonitorElement*me) override;
614 
615 protected:
616  double epsilon_max;
617  double S_fail, S_pass;
618  double epsilon_obs;
619  double S_fail_obs, S_pass_obs;
620  int result;
621 };
622 
623 //======================== CompareToMedian ====================//
625 {
626 public:
627  //Initialize for TProfile, colRings
629  this->_min = 0.2;
630  this->_max = 3.0;
631  this->_emptyBins = 0;
632  this->_maxMed = 10;
633  this->_minMed = 0;
634  this->nBins = 0;
635  this->_statCut = 0;
636  reset();
637  setAlgoName( getAlgoName() );
638  };
639 
640  ~CompareToMedian() override= default;;
641 
642  static std::string getAlgoName() { return "CompareToMedian"; }
643 
644  float runTest(const MonitorElement *me) override;
645  void setMin(float min){_min = min;};
646  void setMax(float max){_max = max;};
647  void setEmptyBins(int eB){eB > 0 ? _emptyBins = 1 : _emptyBins = 0;};
648  void setMaxMedian(float max){_maxMed = max;};
649  void setMinMedian(float min){_minMed = min;};
650  void setStatCut(float cut){_statCut = (cut > 0) ? cut : 0;};
651 
652 protected :
653  void setMessage() override{
654  std::ostringstream message;
655  message << "Test " << qtname_ << " (" << algoName_
656  << "): Entry fraction within range = " << prob_;
657  message_ = message.str();
658  }
659 
660 private :
661  float _min, _max; //Test values
662  int _emptyBins; //use empty bins
663  float _maxMed,_minMed; //Global max for median&mean
664  float _statCut; //Minimal number of non zero entries needed for the quality test
665 
666  int nBinsX, nBinsY; //Dimensions of hystogram
667 
668  int nBins; //Number of (non empty) bins
669 
670  //Vector contain bin values
671  std::vector<float> binValues;
672 
673  void reset(){binValues.clear();};
674 
675 };
676 //======================== CompareLastFilledBin ====================//
678 {
679 public:
680  //Initialize for TProfile, colRings
682  this->_min = 0.0;
683  this->_max = 1.0;
684  this->_average = 0.0;
685  setAlgoName( getAlgoName() );
686  };
687 
688  ~CompareLastFilledBin() override= default;;
689 
690  static std::string getAlgoName() { return "CompareLastFilledBin"; }
691 
692  float runTest(const MonitorElement *me) override;
693  void setAverage(float average){_average = average;};
694  void setMin(float min){_min = min;};
695  void setMax(float max){_max = max;};
696 
697 
698 protected :
699  void setMessage() override{
700  std::ostringstream message;
701  message << "Test " << qtname_ << " (" << algoName_
702  << "): Last Bin filled with desired value = " << prob_;
703  message_ = message.str();
704  }
705 
706 private :
707  float _min, _max; //Test values
708  float _average;
709 };
710 
711 //==================== AllContentAlongDiagonal =========================//
712 #if 0 // FIXME: need to know what parameters to set before runTest!
713 class AllContentAlongDiagonal : public SimpleTest
714 
715 public:
716  AllContentAlongDiagonal(const std::string &name) : SimpleTest(name)
717  {
718  setAlgoName(getAlgoName());
719  }
720  static std::string getAlgoName(void) { return "RuleAllContentAlongDiagonal"; }
721 
722  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
723  void set_S_fail(double S) { S_fail = S; }
724  void set_S_pass(double S) { S_pass = S; }
725  double get_epsilon_obs() { return epsilon_obs; }
726  double get_S_fail_obs() { return S_fail_obs; }
727  double get_S_pass_obs() { return S_pass_obs; }
728  int get_result() { return result; }
729 
730  //public:
731  //using SimpleTest::runTest;
732  float runTest(const MonitorElement*me);
733 
734 protected:
735  double epsilon_max;
736  double S_fail, S_pass;
737  double epsilon_obs;
738  double S_fail_obs, S_pass_obs;
739  int result;
740 };
741 #endif
742 //==================== CheckVariance =========================//
743 //== Check the variance of a TProfile//
744 class CheckVariance : public SimpleTest
745 {
746  public:
748  {
749  setAlgoName(getAlgoName());
750  }
752  static std::string getAlgoName() { return "CheckVariance"; }
753  float runTest(const MonitorElement *me) override ;
754 };
755 #endif // DQMSERVICES_CORE_Q_CRITERION_H
void setErrorProb(float prob)
Definition: QTest.h:64
static std::string getAlgoName()
Definition: QTest.h:192
void set_epsilon_min(double epsilon)
Definition: QTest.h:576
QCriterion * qcriterion_
Definition: QReport.h:51
void setStatCut(float cut)
Definition: QTest.h:650
FlatOccupancy1d RuleFlatOccupancy1d
Definition: QTest.h:28
double get_S_pass_obs()
Definition: QTest.h:610
double xmin_
Definition: QTest.h:444
Comp2RefEqualH(const std::string &name)
Definition: QTest.h:175
void setAlgoName(std::string name)
set algorithm name
Definition: QTest.h:79
test that histogram contents are above Ymin
Definition: QTest.h:307
double ymin_
ymin - threshold
Definition: QTest.h:326
double epsilon_max
Definition: QTest.h:616
CSC01(const std::string &name)
Definition: QTest.h:599
SimpleTest(const std::string &name, bool keepBadChannels=false)
Definition: QTest.h:139
std::string algorithm
Definition: DQMNet.h:94
FlatOccupancy1d FlatOccupancy1dROOT
Definition: QTest.h:28
bool verbose
void set_ExclusionMask(double *mask)
Definition: QTest.h:575
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:291
void setMin(float min)
Definition: QTest.h:645
double epsilon_obs
Definition: QTest.h:618
double get_FailedBins()
Definition: QTest.h:580
int verbose_
Definition: QTest.h:119
float _statCut
Definition: QTest.h:664
int status_
Definition: QTest.h:115
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram&#39;s X-range)
Definition: QTest.h:267
AllContentAlongDiagonal AllContentAlongDiagonalROOT
Definition: QTest.h:31
void setMessage() override
set status & message after test has run
Definition: QTest.h:155
std::vector< DQMChannel > getBadChannels() const override
get vector of channels that failed test (not always relevant!)
Definition: QTest.h:147
float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv)
Definition: QTest.h:81
double * ExclusionMask
Definition: QTest.h:587
std::string algoName_
name of quality test
Definition: QTest.h:113
static const int WARNING
int get_result()
Definition: QTest.h:611
double S_pass
Definition: QTest.h:617
virtual ~QCriterion()=default
int _emptyBins
Definition: QTest.h:662
double S_pass_obs
Definition: QTest.h:619
void setMax(float max)
Definition: QTest.h:646
void setMin(float min)
Definition: QTest.h:694
virtual std::vector< DQMChannel > getBadChannels() const
Definition: QTest.h:67
static std::string getAlgoName()
Definition: QTest.h:248
std::string qtname_
Definition: QTest.h:112
void setNumNeighbors(unsigned n)
Definition: QTest.h:352
std::string getMessage() const
get message attached to test
Definition: QTest.h:57
void init()
initialize values
Definition: QTest.cc:17
Algorithm for testing if histogram&#39;s mean value is near expected value.
Definition: QTest.h:423
CheckVariance(const std::string &name)
Definition: QTest.h:747
DeadChannel(const std::string &name)
Definition: QTest.h:310
ContentsXRange(const std::string &name)
Definition: QTest.h:258
Check if any channels are noisy compared to neighboring ones.
Definition: QTest.h:333
static std::string getAlgoName()
Definition: QTest.h:220
double epsilon_min
Definition: QTest.h:588
static std::string getAlgoName()
Definition: QTest.h:642
int Ndof_
Definition: QTest.h:208
bool rangeInitialized_
Definition: QTest.h:275
float errorProb_
Definition: QTest.h:117
double get_S_fail_obs()
Definition: QTest.h:609
static std::string getAlgoName()
Definition: QTest.h:430
float _minMed
Definition: QTest.h:663
void setMessage() override
set status & message after test has run
Definition: QTest.h:225
FixedFlatOccupancy1d(const std::string &name)
Definition: QTest.h:555
void setEmptyBins(int eB)
Definition: QTest.h:647
void set_Occupancy(double level)
Definition: QTest.h:574
void set_epsilon_max(double epsilon)
Definition: QTest.h:605
float prob_
name of algorithm
Definition: QTest.h:114
static std::string getAlgoName()
Definition: QTest.h:263
CompareLastFilledBin(const std::string &name)
Definition: QTest.h:681
static const float ERROR_PROB_THRESHOLD
Definition: QTest.h:124
void setTolerance(float percentage)
Definition: QTest.h:358
void setMessage() override
set status & message after test has run
Definition: QTest.h:699
unsigned int useEmptyBins_
Definition: QTest.h:417
T min(T a, T b)
Definition: MathUtil.h:58
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:145
int getStatus() const
(class should be created by DQMStore class)
Definition: QTest.h:55
void reset()
Definition: QTest.h:673
bool checkMeanTolerance_
Definition: QTest.h:413
ContentsWithinExpected(const std::string &name)
Definition: QTest.h:383
void setExpectedMean(double mean)
Definition: QTest.h:433
bool keepBadChannels_
Definition: QTest.h:162
double xmin_
Definition: QTest.h:274
std::string qtname
Definition: DQMNet.h:93
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:394
double sigma_
Definition: QTest.h:442
void setMaxMedian(float max)
Definition: QTest.h:648
std::string message_
quality test status
Definition: QTest.h:116
bin
set the eta bin as selection string.
int result
Definition: QTest.h:620
void set_epsilon_max(double epsilon)
Definition: QTest.h:577
std::vector< float > binValues
Definition: QTest.h:671
void setMessage() override
set status & message after test has run
Definition: QTest.h:197
void setMessage() override
set status & message after test has run
Definition: QTest.h:653
static std::string getAlgoName()
Definition: QTest.h:391
NoisyChannel(const std::string &name)
Definition: QTest.h:336
CompareToMedian(const std::string &name)
Definition: QTest.h:628
virtual void setMessage()=0
set message after test has run
AllContentAlongDiagonal RuleAllContentAlongDiagonal
Definition: QTest.h:31
~FixedFlatOccupancy1d() override
Definition: QTest.h:563
virtual float runTest(const MonitorElement *me)
Definition: QTest.cc:27
double ymin_
Definition: QTest.h:299
void set_S_pass(double S)
Definition: QTest.h:579
std::string algoName() const
get algorithm name
Definition: QTest.h:61
std::vector< DQMChannel > badChannels_
Definition: QTest.h:161
double b
Definition: hdecay.h:120
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:63
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
static std::string getAlgoName()
Definition: QTest.h:315
MeanWithinExpected(const std::string &name)
Definition: QTest.h:426
double get_epsilon_obs()
Definition: QTest.h:608
Comparison to reference using the Kolmogorov algorithm.
Definition: QTest.h:241
float tolerance_
Definition: QTest.h:372
void setVerbose(int verbose)
probability limits for warnings, errors
Definition: QTest.h:118
void setMax(float max)
Definition: QTest.h:695
static std::string getAlgoName()
Definition: QTest.h:572
static std::string getAlgoName()
get algorithm name
Definition: QTest.h:752
void set_S_fail(double S)
Definition: QTest.h:578
bool rangeInitialized_
Definition: QTest.h:300
double expMean_
Definition: QTest.h:443
QCriterion(std::string qtname)
Definition: QTest.h:71
std::vector< DQMChannel > badChannels_
Definition: QReport.h:52
std::string message
Definition: DQMNet.h:92
std::string getName() const
get name of quality test
Definition: QTest.h:59
static const int STATUS_OK
ContentsYRange(const std::string &name)
Definition: QTest.h:283
unsigned minEntries_
Definition: QTest.h:160
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Definition: QTest.h:401
Comp2RefChi2(const std::string &name)
Definition: QTest.h:188
static std::string getAlgoName()
Definition: QTest.h:179
void setThreshold(double ymin)
set Ymin (inclusive) threshold for "dead" channel (default: 0)
Definition: QTest.h:319
void set_S_fail(double S)
Definition: QTest.h:606
bool rangeInitialized_
Definition: QTest.h:327
void setAverage(float average)
Definition: QTest.h:693
virtual void setAllowedYRange(double ymin, double ymax)
Definition: QTest.h:292
float qtresult
Definition: DQMNet.h:91
static std::string getAlgoName()
Definition: QTest.h:603
void reset(double vett[256])
Definition: TPedValues.cc:11
void set_S_pass(double S)
Definition: QTest.h:607
unsigned int useEmptyBins_
Definition: QTest.h:301
float warningProb_
message attached to test
Definition: QTest.h:117
bool rangeInitialized_
Definition: QTest.h:375
Definition: QTest.h:596
def move(src, dest)
Definition: eostools.py:510
Comp2Ref2DChi2(const std::string &name)
Definition: QTest.h:216
float _min
Definition: QTest.h:661
static const int ERROR
static std::string getAlgoName()
Definition: QTest.h:342
void setMinMedian(float min)
Definition: QTest.h:649
static const float WARNING_PROB_THRESHOLD
default "probability" values for setting warnings & errors when running tests
Definition: QTest.h:123
unsigned numNeighbors_
Definition: QTest.h:373
Comp2RefKolmogorov(const std::string &name)
Definition: QTest.h:244
static std::string getAlgoName()
Definition: QTest.h:288
static std::string getAlgoName()
Definition: QTest.h:690