Jpp
17.1.0
the software that should make you happy
|
Implementation of the different Chi2-related tests. More...
#include <JTestChi2_t.hh>
Public Member Functions | |
JTestChi2_t () | |
Default constructor. More... | |
JTestResult | JChi2Test (TH1 *h1, TH1 *h2, double threshold, std::string testName, std::string parameterName, std::string options) |
Chi2 test for 1D histograms. More... | |
JTestResult | JChi2TestSlice (TH2 *h1, TH2 *h2, double threshold, double failuresThreshold, std::string testName, std::string parameterName, std::string options, char slice) |
Chi2 test for sliced 2D histograms. More... | |
JTestResult | JChi2TestBin_2D (TH2 *h1, TH2 *h2, double outliersThreshold, double chi2Threshold, std::string testName, std::string parameterName) |
Bin-by-Bin Chi2 comparison of 2D histograms. More... | |
Implementation of the different Chi2-related tests.
Definition at line 21 of file JTestChi2_t.hh.
|
inline |
|
inline |
Chi2 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 Chi2 test. The output of a Chi2 test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1.
h1 | First histogram |
h2 | Second histogram |
threshold | 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 |
options | ROOT options for the test. |
Definition at line 45 of file JTestChi2_t.hh.
|
inline |
Chi2 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 Chi2 test. The output of a Chi2 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 fraction of failed tests. |
parameterName | Name of the parameter used to test the histograms |
testName | Name of the test used to compare the histograms |
options | ROOT options for the test. |
slice | The axis along which the histogram is sliced. |
Definition at line 115 of file JTestChi2_t.hh.
|
inline |
Bin-by-Bin Chi2 comparison of 2D histograms.
The Chi distance between h1 and h2 is calculated for each bin, and compared to the chi2Threshold() parameter.
If the calculated Chi distance is above this threshold, the test is passed for that bin.
If the fraction of failures is above the input parameter outliersThreshold(), the test is failed.
h1 | First object |
h2 | Second object |
outliersThreshold | fraction of bins allowed to fail the test |
chi2Threshold | 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 231 of file JTestChi2_t.hh.