#include <Chi2Test_Scatterplot.h>
Definition at line 18 of file Chi2Test_Scatterplot.h.
◆ Chi2Test_Scatterplot()
dqm_algorithms::Chi2Test_Scatterplot::Chi2Test_Scatterplot |
( |
| ) |
|
◆ clone()
◆ execute()
dqm_core::Result * dqm_algorithms::Chi2Test_Scatterplot::execute |
( |
const std::string & |
name, |
|
|
const TObject & |
object, |
|
|
const dqm_core::AlgorithmConfig & |
config |
|
) |
| |
Definition at line 42 of file Chi2Test_Scatterplot.cxx.
46 const TH1 * inputgraph;
48 if(
object.
IsA()->InheritsFrom(
"TH1" )) {
49 inputgraph =
static_cast<const TH1*
>( &
object );
52 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
57 if (inputgraph->GetEntries() < minstat ) {
59 result->tags_[
"InsufficientEntries"] = inputgraph->GetEntries();
71 std::string thresholdname=
"Chi2_per_NDF";
77 catch ( dqm_core::Exception & ex ) {
78 throw dqm_core::BadConfig( ERS_HERE,
name, ex.what(), ex );
83 refhist =
static_cast<TH1 *
>(
config.getReference() );
85 catch ( dqm_core::Exception & ex ) {
86 throw dqm_core::BadRefHist(ERS_HERE,
name,
" Could not retreive reference");
89 if (inputgraph->GetDimension() != refhist->GetDimension() ) {
90 throw dqm_core::BadRefHist( ERS_HERE,
"Dimension",
name );
95 if ((inputgraph->GetNbinsX() != refhist->GetNbinsX()) || (inputgraph->GetNbinsY() != refhist->GetNbinsY())) {
96 throw dqm_core::BadRefHist( ERS_HERE,
"number of bins",
name );
109 std::vector<int>
range;
113 catch( dqm_core::Exception & ex ) {
114 throw dqm_core::BadConfig( ERS_HERE,
name, ex.what(), ex );
122 { inputerr=inputgraph->GetBinError(
n);
123 referr=refhist->GetBinError(
n);
124 errsquared= referr*referr+inputerr*inputerr;
125 val=inputgraph->GetBinContent(
n);
126 refval=refhist->GetBinContent(
n);
127 if (referr >0.00001 && inputerr >0.00001)
128 {chisq=chisq+((
val-refval)*(
val-refval))/errsquared;
138 const double value = (count_ndf > 1) ? (chisq / (count_ndf - 1)) : 0;
146 if (
value <= gthresho ) {
148 }
else if (
value < rthresho ) {
149 result->status_ = dqm_core::Result::Yellow;
154 ERS_DEBUG(2,
"Result: "<<*
result);
◆ printDescription()
void dqm_algorithms::Chi2Test_Scatterplot::printDescription |
( |
std::ostream & |
out | ) |
|
Definition at line 160 of file Chi2Test_Scatterplot.cxx.
163 out<<
"Chi2Test_Scatterplot performs chisq/ndf test on a scatterplot and returns a dqm_result"<<std::endl;
166 out<<
"Mandatory Green/Red Threshold: Chi2_per_NDF to give Green/Red result\n"<<std::endl;
168 out<<
"Optional Parameter: MinStat: Minimum histogram statistics needed to perform Algorithm\n"<<std::endl;
The documentation for this struct was generated from the following files: