1 #ifndef __JCOMPAREHISTOGRAMS__JTESTCHI2_BIN__
2 #define __JCOMPAREHISTOGRAMS__JTESTCHI2_BIN__
13 namespace JCOMPAREHISTOGRAMS {
29 JTest_t(
"Chi2_Bin",
"Outliers[%]"),
39 std::istream&
read(std::istream&
in)
override{
55 if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
57 TH2D*
h1 =
dynamic_cast<TH2D*
>(o1);
58 TH2D* h2 =
dynamic_cast<TH2D*
>(o2);
void test(TObject *o1, TObject *o2) override
Tests the statistical compatibility of two ROOT 2D histograms.
Interface to read input and write output for TObject tests.
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.
then for HISTOGRAM in h0 h1
JTestChi2_Bin()
Default constructor.
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
double chi2Threshold
threshold p-value to decide if test is passed for a bin.
Implementation of a bin-by-bin Chi2 test for 2D histograms.
const std::string resultType
result type
const std::string testName
test name
std::istream & read(std::istream &in) override
Read test parameters from input.
Structure containing the result of the test.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
double outliersThreshold
fraction of bins allowed to fail the test.
Implementation of the different Chi2-related tests.