Jpp
18.4.0
the software that should make you happy
|
Implementation of the Chi2 test for 2D histograms. More...
#include <JTestChi2_Slice2D.hh>
Public Member Functions | |
JTestChi2_Slice2D () | |
Default constructor. More... | |
void | test (const TObject *o1, const TObject *o2) override |
Applies Chi2 test for two ROOT TH2 histograms. More... | |
std::istream & | read (std::istream &in) override |
Read test parameters from input. More... | |
virtual std::ostream & | write (std::ostream &out, const char delimiter= ' ', const bool onlyFailures=false) const |
Write test result to output. More... | |
virtual void | save (TFile *f, const std::string &path, const bool onlyFailures=false) const |
Writes the test result to root file. More... | |
const std::string & | getTestName () const |
Get test name. More... | |
const std::string & | getResultType () const |
Get result type. More... | |
Protected Attributes | |
const std::string | testName |
test name More... | |
const std::string | resultType |
test result type More... | |
Private Attributes | |
double | threshold |
threshold p-value to decide if test is passed. More... | |
double | failuresThreshold |
threshold p-value to decide if test is passed. More... | |
char | slice |
axis to slice. More... | |
std::string | options |
options for the ROOT chi2 test. More... | |
Implementation of the Chi2 test for 2D histograms.
This class is derived from the abstract class JTest_t(). For a general description of the implementation of this and other tests derived from JTest_t(), see its documentation.
The parameter slice() can have the values x, X, y or Y. The histograms are sliced along the corresponding axis, and the JChi2Test() test is applied to each slice.
The input parameter threshold
, is used to evaluate whether the test is passed or failed for each slice.
The evaluation is done by comparing the threshold
value with the result produced by the Chi2 test for each slice. The output of JChi2Test() is a p-value.
The parameter threshold
should therefore be a real value between 0 and 1.
Definition at line 32 of file JTestChi2_Slice2D.hh.
|
inline |
Default constructor.
Definition at line 40 of file JTestChi2_Slice2D.hh.
|
inlineoverridevirtual |
Applies Chi2 test for two ROOT TH2 histograms.
o1 | First histogram |
o2 | Second histogram |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 51 of file JTestChi2_Slice2D.hh.
|
inlineoverridevirtual |
Read test parameters from input.
in | input stream |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 161 of file JTestChi2_Slice2D.hh.
|
inlinevirtualinherited |
Write test result to output.
out | output stream |
delimiter | field delimiter |
onlyFailures | if true, write only failures. |
Definition at line 84 of file JTest_t.hh.
|
inlinevirtualinherited |
Writes the test result to root file.
f | A ROOT file |
path | Path in root file. |
onlyFailures | If true, write only failures. |
Definition at line 108 of file JTest_t.hh.
|
inlineinherited |
|
inlineinherited |
Get result type.
Definition at line 146 of file JTest_t.hh.
|
private |
threshold p-value to decide if test is passed.
Definition at line 185 of file JTestChi2_Slice2D.hh.
|
private |
threshold p-value to decide if test is passed.
Definition at line 186 of file JTestChi2_Slice2D.hh.
|
private |
axis to slice.
Definition at line 187 of file JTestChi2_Slice2D.hh.
|
private |
options for the ROOT chi2 test.
Definition at line 188 of file JTestChi2_Slice2D.hh.
|
protectedinherited |
test name
Definition at line 180 of file JTest_t.hh.
|
protectedinherited |
test result type
Definition at line 181 of file JTest_t.hh.