1 #ifndef DQMSERVICES_CORE_Q_CRITERION_H 2 # define DQMSERVICES_CORE_Q_CRITERION_H 5 # include "TProfile2D.h" 68 {
return std::vector<DQMChannel>(); }
97 " / Prob = " <<
prob_ << std::endl;
141 keepBadChannels_ (keepBadChannels)
200 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
201 <<
", minimum needed statistics = " << minEntries_
228 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
229 <<
", minimum needed statistics = " << minEntries_
260 rangeInitialized_ =
false;
270 rangeInitialized_ =
true;
285 rangeInitialized_ =
false;
295 rangeInitialized_ =
true;
312 rangeInitialized_ =
false;
322 rangeInitialized_ =
true;
338 rangeInitialized_ =
false;
362 tolerance_ = percentage;
363 rangeInitialized_ =
true;
370 double getAverage(
int bin,
const TH1 *
h)
const;
385 checkMean_ = checkRMS_ =
false;
386 minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
387 checkMeanTolerance_ =
false;
388 toleranceMean_ = -1.0;
395 useEmptyBins_ = useEmptyBins;
397 void setMeanRange(
double xmin,
double xmax);
398 void setRMSRange(
double xmin,
double xmax);
403 if (fracTolerance >= 0.0)
405 toleranceMean_ = fracTolerance;
406 checkMeanTolerance_ =
true;
434 void useRange(
double xmin,
double xmax);
435 void useSigma(
double expectedSigma);
511 #if 0 // FIXME: need to know what parameters to set before runTest! 523 ~FlatOccupancy1d(
void)
525 delete [] FailedBins[0];
526 delete [] FailedBins[1];
529 static std::string getAlgoName(
void) {
return "RuleFlatOccupancy1d"; }
531 void set_ExclusionMask(
double *
mask) { ExclusionMask =
mask; }
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]; }
537 int get_result() {
return result; }
542 double *ExclusionMask;
543 double epsilon_min, epsilon_max;
544 double S_fail, S_pass;
545 double *FailedBins[2];
558 FailedBins[0] =
nullptr;
559 FailedBins[1] =
nullptr;
567 delete [] FailedBins[0];
568 delete [] FailedBins[1];
590 double *FailedBins[2];
631 this->_emptyBins = 0;
656 <<
"): Entry fraction within range = " <<
prob_;
684 this->_average = 0.0;
702 <<
"): Last Bin filled with desired value = " <<
prob_;
712 #if 0 // FIXME: need to know what parameters to set before runTest! 713 class AllContentAlongDiagonal :
public SimpleTest 716 AllContentAlongDiagonal(const std::string &name) :
SimpleTest(name)
720 static std::string getAlgoName(
void) {
return "RuleAllContentAlongDiagonal"; }
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; }
736 double S_fail, S_pass;
738 double S_fail_obs, S_pass_obs;
755 #endif // DQMSERVICES_CORE_Q_CRITERION_H
void setErrorProb(float prob)
static std::string getAlgoName()
void set_epsilon_min(double epsilon)
FlatOccupancy1d RuleFlatOccupancy1d
Comp2RefEqualH(const std::string &name)
void setAlgoName(std::string name)
set algorithm name
test that histogram contents are above Ymin
double ymin_
ymin - threshold
CSC01(const std::string &name)
SimpleTest(const std::string &name, bool keepBadChannels=false)
FlatOccupancy1d FlatOccupancy1dROOT
void set_ExclusionMask(double *mask)
void setUseEmptyBins(unsigned int useEmptyBins)
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram's X-range)
AllContentAlongDiagonal AllContentAlongDiagonalROOT
void setMessage() override
set status & message after test has run
std::vector< DQMChannel > getBadChannels() const override
get vector of channels that failed test (not always relevant!)
float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv)
std::string algoName_
name of quality test
virtual ~QCriterion()=default
virtual std::vector< DQMChannel > getBadChannels() const
static std::string getAlgoName()
void setNumNeighbors(unsigned n)
std::string getMessage() const
get message attached to test
void init()
initialize values
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.
static std::string getAlgoName()
static std::string getAlgoName()
void setMessage() override
set status & message after test has run
FixedFlatOccupancy1d(const std::string &name)
void set_Occupancy(double level)
void set_epsilon_max(double epsilon)
float prob_
name of algorithm
static std::string getAlgoName()
CompareLastFilledBin(const std::string &name)
static const float ERROR_PROB_THRESHOLD
void setTolerance(float percentage)
void setMessage() override
set status & message after test has run
unsigned int useEmptyBins_
void setMinimumEntries(unsigned n)
set minimum # of entries needed
int getStatus() const
(class should be created by DQMStore class)
ContentsWithinExpected(const std::string &name)
void setExpectedMean(double mean)
void setUseEmptyBins(unsigned int useEmptyBins)
std::string message_
quality test status
bin
set the eta bin as selection string.
void set_epsilon_max(double epsilon)
void setMessage() override
set status & message after test has run
static std::string getAlgoName()
NoisyChannel(const std::string &name)
virtual void setMessage()=0
set message after test has run
AllContentAlongDiagonal RuleAllContentAlongDiagonal
~FixedFlatOccupancy1d() override
virtual float runTest(const MonitorElement *me)
void set_S_pass(double S)
std::string algoName() const
get algorithm name
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 &)
static std::string getAlgoName()
MeanWithinExpected(const std::string &name)
Comparison to reference using the Kolmogorov algorithm.
void setVerbose(int verbose)
probability limits for warnings, errors
static std::string getAlgoName()
static std::string getAlgoName()
get algorithm name
void set_S_fail(double S)
QCriterion(std::string qtname)
std::vector< DQMChannel > badChannels_
std::string getName() const
get name of quality test
static const int STATUS_OK
ContentsYRange(const std::string &name)
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Comp2RefChi2(const std::string &name)
static std::string getAlgoName()
void setThreshold(double ymin)
set Ymin (inclusive) threshold for "dead" channel (default: 0)
void set_S_fail(double S)
void setAverage(float average)
virtual void setAllowedYRange(double ymin, double ymax)
static std::string getAlgoName()
void reset(double vett[256])
void set_S_pass(double S)
unsigned int useEmptyBins_
float warningProb_
message attached to test
Comp2Ref2DChi2(const std::string &name)
static std::string getAlgoName()
static const float WARNING_PROB_THRESHOLD
default "probability" values for setting warnings & errors when running tests
Comp2RefKolmogorov(const std::string &name)
static std::string getAlgoName()
static std::string getAlgoName()