Jpp
|
Implementation of the Kolmogorov test for 2D histograms. More...
#include <JTestKolmogorovSlice.hh>
Public Member Functions | |
JTestKolmogorovSlice () | |
Default constructor. More... | |
std::istream & | read (std::istream &in) override |
Read test parameters from input. More... | |
std::ostream & | write (std::ostream &out, std::string delimiter=" ", bool onlyFailures=false) const override |
Write test result to output. More... | |
void | test (TObject *o1, TObject *o2) override |
Applies Kolmogorov test for two ROOT TH2 histograms. More... | |
virtual void | save (TFile *f, std::string path, bool onlyFailures=false) override |
Writes the test result to root file. More... | |
void | clear () override |
Clear results. More... | |
std::string | getName () override |
Get test name. More... | |
std::string | getParameter () override |
Get parameter name. More... | |
JTestResult | JKolmogorovTest (TH1 *h1, TH1 *h2, double threshold, std::string testName, std::string parameterName) |
Kolmogorov test for 1D histograms. More... | |
JTestResult | JKolmogorovTestSlice (TH2 *h1, TH2 *h2, double threshold, double failuresThreshold, std::string testName, std::string parameterName, char slice) |
Kolmogorov test for sliced 2D histograms. More... | |
JTestResult | JKolmogorovTest2D (TH2 *h1, TH2 *h2, double threshold, std::string testName, std::string parameterName) |
Kolmogorov test for 2D histograms. More... | |
Public Attributes | |
std::vector< JTestResult > | results |
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. x or X for x-axis, y or Y for y-axis, n or N for None. More... | |
const std::string | name = "KS_Slice" |
test name. More... | |
const std::string | parameter = "p-Value(KS)" |
parameter name. More... | |
Implementation of the Kolmogorov test for 2D histograms.
Definition at line 23 of file JTestKolmogorovSlice.hh.
|
inline |
|
inlineoverridevirtual |
Read test parameters from input.
in | input stream |
Implements JTest_t.
Definition at line 39 of file JTestKolmogorovSlice.hh.
|
inlineoverridevirtual |
Write test result to output.
out | output stream |
delimiter | field delimiter |
onlyFailures | If true, write only failures. |
Implements JTest_t.
Definition at line 51 of file JTestKolmogorovSlice.hh.
Applies Kolmogorov test for two ROOT TH2 histograms.
o1 | First histogram |
o2 | Second histogram |
Implements JTest_t.
Definition at line 69 of file JTestKolmogorovSlice.hh.
|
inlineoverridevirtual |
Writes the test result to root file.
f | A ROOT file |
path | Path in root file. |
onlyFailures | If true, write only failures. |
Implements JTest_t.
Definition at line 100 of file JTestKolmogorovSlice.hh.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get parameter name.
Implements JTest_t.
Definition at line 137 of file JTestKolmogorovSlice.hh.
|
inlineinherited |
Kolmogorov test for 1D histograms.
The input parameter threshold, is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of a Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1.
h1 | First histogram |
h2 | Second historgram |
threshold | p-value |
parameterName | Name of the parameter used to test the histograms |
testName | Name of the test used to compare the histograms |
Definition at line 37 of file JTestKolmogorov_t.hh.
|
inlineinherited |
Kolmogorov test for sliced 2D histograms.
The histograms are sliced along the axis specified by the slice parameter. A slice per bin is made.
For each of the slices, the input parameter threshold is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of the Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1. The fraction of failed tests is compared to the input parameter failuresThreshold. If this fraction is larger than failuresThreshold, the test fails.
h1 | First histogram |
h2 | Second histogram |
threshold | Threshold value for the test result |
failuresThreshold | Threshold value for the test result |
parameterName | Name of the parameter used to test the histograms |
testName | Name of the test used to compare the histograms |
slice | The axis along which the histogram is sliced. |
Definition at line 139 of file JTestKolmogorov_t.hh.
|
inlineinherited |
Kolmogorov test for 2D histograms.
The input parameter threshold, is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of a Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1.
h1 | First histogram |
h2 | Second historgram |
threshold | p-value |
parameterName | Name of the parameter used to test the histograms |
testName | Name of the test used to compare the histograms |
Definition at line 260 of file JTestKolmogorov_t.hh.
|
private |
threshold p-value to decide if test is passed.
Definition at line 143 of file JTestKolmogorovSlice.hh.
|
private |
threshold p-value to decide if test is passed.
Definition at line 144 of file JTestKolmogorovSlice.hh.
|
private |
axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None.
Definition at line 145 of file JTestKolmogorovSlice.hh.
|
private |
test name.
Definition at line 146 of file JTestKolmogorovSlice.hh.
|
private |
parameter name.
Definition at line 147 of file JTestKolmogorovSlice.hh.
|
inherited |
Buffer to store results of multiple tests.
Definition at line 251 of file JTest_t.hh.