CMS 3D CMS Logo

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