1 #ifndef DQMSERVICES_CORE_Q_CRITERION_H 2 # define DQMSERVICES_CORE_Q_CRITERION_H 5 # include "TProfile2D.h" 67 {
return std::vector<DQMChannel>(); }
96 " / Prob = " <<
prob_ << std::endl;
140 keepBadChannels_ (keepBadChannels)
199 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
200 <<
", minimum needed statistics = " << minEntries_
227 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
228 <<
", minimum needed statistics = " << minEntries_
259 rangeInitialized_ =
false;
269 rangeInitialized_ =
true;
284 rangeInitialized_ =
false;
294 rangeInitialized_ =
true;
311 rangeInitialized_ =
false;
321 rangeInitialized_ =
true;
337 rangeInitialized_ =
false;
361 tolerance_ = percentage;
362 rangeInitialized_ =
true;
369 double getAverage(
int bin,
const TH1 *
h)
const;
384 checkMean_ = checkRMS_ =
false;
385 minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
386 checkMeanTolerance_ =
false;
387 toleranceMean_ = -1.0;
394 useEmptyBins_ = useEmptyBins;
396 void setMeanRange(
double xmin,
double xmax);
397 void setRMSRange(
double xmin,
double xmax);
402 if (fracTolerance >= 0.0)
404 toleranceMean_ = fracTolerance;
405 checkMeanTolerance_ =
true;
433 void useRange(
double xmin,
double xmax);
434 void useSigma(
double expectedSigma);
510 #if 0 // FIXME: need to know what parameters to set before runTest! 522 ~FlatOccupancy1d(
void)
524 delete [] FailedBins[0];
525 delete [] FailedBins[1];
528 static std::string getAlgoName(
void) {
return "RuleFlatOccupancy1d"; }
530 void set_ExclusionMask(
double *
mask) { ExclusionMask =
mask; }
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]; }
536 int get_result() {
return result; }
541 double *ExclusionMask;
542 double epsilon_min, epsilon_max;
543 double S_fail, S_pass;
544 double *FailedBins[2];
566 delete [] FailedBins[0];
567 delete [] FailedBins[1];
589 double *FailedBins[2];
630 this->_emptyBins = 0;
655 <<
"): Entry fraction within range = " <<
prob_;
683 this->_average = 0.0;
701 <<
"): Last Bin filled with desired value = " <<
prob_;
711 #if 0 // FIXME: need to know what parameters to set before runTest! 712 class AllContentAlongDiagonal :
public SimpleTest 715 AllContentAlongDiagonal(const std::string &name) :
SimpleTest(name)
719 static std::string getAlgoName(
void) {
return "RuleAllContentAlongDiagonal"; }
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; }
735 double S_fail, S_pass;
737 double S_fail_obs, S_pass_obs;
754 #endif // DQMSERVICES_CORE_Q_CRITERION_H
ContentsWithinExpected ContentsWithinExpectedROOT
void setErrorProb(float prob)
std::string getMessage(void) const
get message attached to test
void set_epsilon_min(double epsilon)
FixedFlatOccupancy1d FixedFlatOccupancy1dROOT
static std::string getAlgoName(void)
get algorithm name
static std::string getAlgoName(void)
Comp2RefEqualH(const std::string &name)
void setAlgoName(std::string name)
set algorithm name
std::string getName(void) const
get name of quality test
test that histogram contents are above Ymin
double ymin_
ymin - threshold
CSC01(const std::string &name)
SimpleTest(const std::string &name, bool keepBadChannels=false)
void set_ExclusionMask(double *mask)
void setUseEmptyBins(unsigned int useEmptyBins)
Comp2Ref2DChi2 Comp2Ref2DChi2ROOT
static std::string getAlgoName(void)
FlatOccupancy1d FlatOccupancy1dROOT
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram's X-range)
void setMessage(void)
set status & message after test has run
float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv)
FlatOccupancy1d RuleFlatOccupancy1d
std::string algoName_
name of quality test
Comp2RefChi2 Comp2RefChi2ROOT
static std::string getAlgoName(void)
virtual std::vector< DQMChannel > getBadChannels(void) const
get vector of channels that failed test (not always relevant!)
NoisyChannel NoisyChannelROOT
void setNumNeighbors(unsigned n)
static std::string getAlgoName(void)
Algorithm for testing if histogram's mean value is near expected value.
CheckVariance(const std::string &name)
DeadChannel(const std::string &name)
ContentsXRange(const std::string &name)
Check if any channels are noisy compared to neighboring ones.
AllContentAlongDiagonal RuleAllContentAlongDiagonal
Comp2RefEqualH Comp2RefEqualHROOT
ContentsXRange ContentsXRangeROOT
CompareToMedian CompareToMedianROOT
virtual void setMessage(void)
set status & message after test has run
CompareLastFilledBin CompareLastFilledBinROOT
FixedFlatOccupancy1d RuleFixedFlatOccupancy1d
CheckVariance CheckVarianceROOT
FixedFlatOccupancy1d(const std::string &name)
Comp2RefKolmogorov Comp2RefKolmogorovROOT
void set_Occupancy(double level)
static std::string getAlgoName(void)
void set_epsilon_max(double epsilon)
static std::string getAlgoName(void)
float prob_
name of algorithm
std::string algoName(void) const
get algorithm name
CompareLastFilledBin(const std::string &name)
static const float ERROR_PROB_THRESHOLD
void setTolerance(float percentage)
unsigned int useEmptyBins_
static std::string getAlgoName(void)
void setMinimumEntries(unsigned n)
set minimum # of entries needed
MeanWithinExpected MeanWithinExpectedROOT
virtual std::vector< DQMChannel > getBadChannels(void) const
ContentsWithinExpected(const std::string &name)
void setExpectedMean(double mean)
AllContentAlongDiagonal AllContentAlongDiagonalROOT
void setUseEmptyBins(unsigned int useEmptyBins)
std::string message_
quality test status
bin
set the eta bin as selection string.
static std::string getAlgoName(void)
void set_epsilon_max(double epsilon)
int getStatus(void) const
(class should be created by DQMStore class)
NoisyChannel(const std::string &name)
virtual float runTest(const MonitorElement *me)
void set_S_pass(double S)
std::vector< DQMChannel > badChannels_
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
double S(const TLorentzVector &, const TLorentzVector &)
MeanWithinExpected(const std::string &name)
Comparison to reference using the Kolmogorov algorithm.
static std::string getAlgoName(void)
void init(void)
initialize values
void setVerbose(int verbose)
probability limits for warnings, errors
static std::string getAlgoName(void)
void set_S_fail(double S)
static std::string getAlgoName(void)
DeadChannel DeadChannelROOT
QCriterion(std::string qtname)
std::vector< DQMChannel > badChannels_
static const int STATUS_OK
ContentsYRange(const std::string &name)
ContentsYRange ContentsYRangeROOT
virtual ~QCriterion(void)
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Comp2RefChi2(const std::string &name)
void setThreshold(double ymin)
set Ymin (inclusive) threshold for "dead" channel (default: 0)
void setMessage(void)
set status & message after test has run
void set_S_fail(double S)
void setAverage(float average)
~FixedFlatOccupancy1d(void)
virtual void setAllowedYRange(double ymin, double ymax)
void reset(double vett[256])
void set_S_pass(double S)
unsigned int useEmptyBins_
float warningProb_
message attached to test
double get_FailedBins(void)
Comp2Ref2DChi2(const std::string &name)
virtual void setMessage(void)=0
set message after test has run
static std::string getAlgoName(void)
static std::string getAlgoName(void)
static const float WARNING_PROB_THRESHOLD
default "probability" values for setting warnings & errors when running tests
Comp2RefKolmogorov(const std::string &name)
void setMessage(void)
set status & message after test has run