#include <ZDCPercentEvents_UnderThreshold.h>
◆ ZDCPercentEvents_UnderThreshold()
dqm_algorithms::ZDCPercentEvents_UnderThreshold::ZDCPercentEvents_UnderThreshold |
( |
| ) |
|
|
inline |
◆ calculatePercentage()
double dqm_algorithms::ZDCPercentageThreshTests::calculatePercentage |
( |
const TH1 * |
hist, |
|
|
dqm_core::Result * |
result |
|
) |
| |
|
inherited |
Definition at line 140 of file ZDCPercentageThreshTests.cxx.
149 Double_t
N = (
m_name ==
"XthBin_NormalizeToFirstBin")?
hist->GetBinContent(1) :
hist->GetEntries();
152 ERS_INFO(
"Histogram " <<
hist->GetName() <<
" has zero entries. Percentage calculation fails.");
153 result->tags_[
"Empty_Histogram_found_N_Entries"] =
N;
159 Double_t hit_under_selection = 0;
161 if (
m_name ==
"XthBin" ||
m_name ==
"XthBin_NormalizeToFirstBin"){
164 else if (
m_name ==
"UnderThreshold"){
165 hit_under_selection +=
hist->GetBinContent(1);
169 if(
i>
hist->GetNbinsX()){
170 ERS_INFO(
"For histogram " <<
hist->GetName() <<
", the user input threshold " <<
m_thresh <<
" is out of range (larger than max value). Percentage calculation fails.");
171 result->tags_[
"Config_error_maximum_bin_exceed_looking_for_bin_number"] =
i;
175 hit_under_selection +=
hist->GetBinContent(
i);
179 else if (
m_name ==
"AboveThreshold"){
180 hit_under_selection +=
hist->GetBinContent(
hist->GetNbinsX()+1);
181 int i =
hist->GetNbinsX()+1;
185 ERS_INFO(
"For histogram " <<
hist->GetName() <<
", the user input threshold " <<
m_thresh <<
" is out of range (smaller than min value). Percentage calculation fails.");
186 result->tags_[
"Config_error_minimum_bin_below_one"] =
i;
190 hit_under_selection +=
hist->GetBinContent(
i);
◆ clone()
dqm_core::Algorithm * dqm_algorithms::ZDCPercentageThreshTests::clone |
( |
| ) |
|
|
virtualinherited |
◆ execute()
dqm_core::Result * dqm_algorithms::ZDCPercentageThreshTests::execute |
( |
const std::string & |
name, |
|
|
const TObject & |
data, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
|
virtualinherited |
Definition at line 63 of file ZDCPercentageThreshTests.cxx.
68 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
70 if (
hist->GetDimension() >= 2 ){
71 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension >= 2 " );
74 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
85 catch ( dqm_core::Exception & ex ) {
86 throw dqm_core::BadConfig( ERS_HERE,
name, ex.what(), ex );
91 throw dqm_core::BadConfig( ERS_HERE,
name,
"required parameter BinNum is not provided!" );
93 throw dqm_core::BadConfig( ERS_HERE,
name,
"required parameter Thresh is not provided!" );
98 throw dqm_core::BadConfig( ERS_HERE,
name,
"thresholds m_redTh and m_greenTh must be in the range [0,1]! Threshold(s) out of range." );
103 throw dqm_core::BadConfig( ERS_HERE,
name,
"m_redTh must be above or equal to m_greenTh!" );
108 ERS_INFO(
"Histogram does not satisfy MinStat requirement " <<
hist->GetName());
110 result->tags_[
"InsufficientEntries"] =
hist->GetEntries();
113 ERS_DEBUG(1,
"Statistics: "<<
hist->GetEntries()<<
" entries ");
129 result->status_ = dqm_core::Result::Yellow;
◆ printDescription()
void dqm_algorithms::ZDCPercentageThreshTests::printDescription |
( |
std::ostream & |
out | ) |
|
|
virtualinherited |
Definition at line 199 of file ZDCPercentageThreshTests.cxx.
204 message +=
"Description: Retrieve the percent of entries in the x-th bin and compare it with user defined green and red Threshold\n";
205 }
else if (
m_name ==
"XthBin_NormalizeToFirstBin"){
206 message +=
"Description: Retrieve the percent of entries in the x-th bin, normalized to #entries in the first bin, and compare it with user defined green and red Threshold\n";
207 }
else if (
m_name ==
"AboveThreshold"){
208 message +=
"Description: Compute the percent of entries above a threshold and compare it with user defined green and red Threshold\n";
209 }
else if (
m_name ==
"UnderThreshold"){
210 message +=
"Description: Compute the percent of entries under a threshold and compare it with user defined green and red Threshold\n";
212 message +=
" Green if below green Threshold; red if above red Threshold\n";
214 message +=
"Mandatory Green/Red Threshold: PercentBar: Percent bar imposed upon #entries passing selection";
215 if (
m_name ==
"XthBin" ||
m_name ==
"XthBin_NormalizeToFirstBin"){
216 message +=
"Mandatory Parameter: BinNum = number of the bin we impose check on\n";
217 }
else if (
m_name ==
"AboveThreshold" ||
m_name ==
"UnderThreshold"){
218 message +=
"Mandatory Parameter: Thresh = threshold\n";
220 message +=
"Optional Parameters: MinStat = Minimum histogram statistics needed to perform Algorithm\n";
◆ m_binNum
int dqm_algorithms::ZDCPercentageThreshTests::m_binNum {} |
|
privateinherited |
◆ m_greenTh
double dqm_algorithms::ZDCPercentageThreshTests::m_greenTh {} |
|
privateinherited |
◆ m_minstat
double dqm_algorithms::ZDCPercentageThreshTests::m_minstat {} |
|
privateinherited |
◆ m_name
std::string dqm_algorithms::ZDCPercentageThreshTests::m_name |
|
privateinherited |
◆ m_redTh
double dqm_algorithms::ZDCPercentageThreshTests::m_redTh {} |
|
privateinherited |
◆ m_thresh
double dqm_algorithms::ZDCPercentageThreshTests::m_thresh {} |
|
privateinherited |
The documentation for this struct was generated from the following file: