1 #ifndef DQMSERVICES_CORE_Q_CRITERION_H 2 # define DQMSERVICES_CORE_Q_CRITERION_H 5 # include "TProfile2D.h" 69 {
return std::vector<DQMChannel>(); }
98 " / Prob = " <<
prob_ << std::endl;
142 keepBadChannels_ (keepBadChannels)
201 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
202 <<
", minimum needed statistics = " << minEntries_
229 message <<
"chi2/Ndof = " << chi2_ <<
"/" << Ndof_
230 <<
", minimum needed statistics = " << minEntries_
261 rangeInitialized_ =
false;
271 rangeInitialized_ =
true;
286 rangeInitialized_ =
false;
296 rangeInitialized_ =
true;
313 rangeInitialized_ =
false;
323 rangeInitialized_ =
true;
339 rangeInitialized_ =
false;
363 tolerance_ = percentage;
364 rangeInitialized_ =
true;
371 double getAverage(
int bin,
const TH1 *
h)
const;
372 double getAverage2D(
int binX,
int binY,
const TH2 *h)
const;
387 rangeInitialized_ =
false;
416 toleranceNoisy_ = factorNoisy;
417 rangeInitialized_ =
true;
424 toleranceDead_ = factorDead;
425 rangeInitialized_ =
true;
451 double getNeighborSum(
unsigned groupx,
unsigned groupy,
unsigned Xblocks,
unsigned Yblocks,
unsigned neighborsX,
unsigned neighborsY,
const TH1 *
h)
const;
452 double getNeighborSigma(
double average,
unsigned groupx,
unsigned groupy,
unsigned Xblocks,
unsigned Yblocks,
unsigned neighborsX,
unsigned neighborsY,
const TH1 *h)
const;
478 checkMean_ = checkRMS_ =
false;
479 minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
480 checkMeanTolerance_ =
false;
481 toleranceMean_ = -1.0;
488 useEmptyBins_ = useEmptyBins;
490 void setMeanRange(
double xmin,
double xmax);
491 void setRMSRange(
double xmin,
double xmax);
496 if (fracTolerance >= 0.0)
498 toleranceMean_ = fracTolerance;
499 checkMeanTolerance_ =
true;
527 void useRange(
double xmin,
double xmax);
528 void useSigma(
double expectedSigma);
604 #if 0 // FIXME: need to know what parameters to set before runTest! 616 ~FlatOccupancy1d(
void)
618 delete [] FailedBins[0];
619 delete [] FailedBins[1];
622 static std::string getAlgoName(
void) {
return "RuleFlatOccupancy1d"; }
624 void set_ExclusionMask(
double *
mask) { ExclusionMask =
mask; }
626 void set_epsilon_max(
double epsilon) { epsilon_max =
epsilon; }
627 void set_S_fail(
double S) { S_fail =
S; }
628 void set_S_pass(
double S) { S_pass =
S; }
629 double get_FailedBins(
void) {
return *FailedBins[1]; }
630 int get_result() {
return result; }
635 double *ExclusionMask;
636 double epsilon_min, epsilon_max;
637 double S_fail, S_pass;
638 double *FailedBins[2];
651 FailedBins[0] =
nullptr;
652 FailedBins[1] =
nullptr;
660 delete [] FailedBins[0];
661 delete [] FailedBins[1];
683 double *FailedBins[2];
724 this->_emptyBins = 0;
749 <<
"): Entry fraction within range = " <<
prob_;
777 this->_average = 0.0;
795 <<
"): Last Bin filled with desired value = " <<
prob_;
805 #if 0 // FIXME: need to know what parameters to set before runTest! 806 class AllContentAlongDiagonal :
public SimpleTest 809 AllContentAlongDiagonal(const std::string &name) :
SimpleTest(name)
813 static std::string getAlgoName(
void) {
return "RuleAllContentAlongDiagonal"; }
816 void set_S_fail(
double S) { S_fail =
S; }
817 void set_S_pass(
double S) { S_pass =
S; }
818 double get_epsilon_obs() {
return epsilon_obs; }
819 double get_S_fail_obs() {
return S_fail_obs; }
820 double get_S_pass_obs() {
return S_pass_obs; }
821 int get_result() {
return result; }
829 double S_fail, S_pass;
831 double S_fail_obs, S_pass_obs;
848 #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)
void setXMax(unsigned xMax)
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.
ContentSigma(const std::string &name)
static std::string getAlgoName()
void setYMax(unsigned yMax)
static std::string getAlgoName()
void setMessage() override
set status & message after test has run
FixedFlatOccupancy1d(const std::string &name)
void setYMin(unsigned yMin)
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 setNumNeighborsX(unsigned ncx)
void setMessage() override
set status & message after test has run
void setToleranceNoisy(float factorNoisy)
Check the sigma of each bin against the rest of the chamber by a factor of tolerance/.
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 setNumYblocks(unsigned ncy)
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)
void setNoisy(bool noisy)
QCriterion(std::string qtname)
void setNumNeighborsY(unsigned ncy)
std::vector< DQMChannel > badChannels_
std::string getName() const
get name of quality test
static const int STATUS_OK
ContentsYRange(const std::string &name)
void setXMin(unsigned xMin)
static std::string getAlgoName()
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 setNumXblocks(unsigned ncx)
void setAverage(float average)
void setToleranceDead(float factorDead)
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()