1 #ifndef __JCOMPAREHISTOGRAMS__JTESTCHI2_2D__
2 #define __JCOMPAREHISTOGRAMS__JTESTCHI2_2D__
13 namespace JCOMPAREHISTOGRAMS {
33 JTest_t(
"Chi2_2D",
"p-Value(chi2)"),
43 std::istream&
read(std::istream&
in)
override{
58 if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
60 TH2D*
h1 =
dynamic_cast<TH2D*
>(o1);
61 TH2D* h2 =
dynamic_cast<TH2D*
>(o2);
70 ERROR (
"Slice option should be: x, X, y or Y, and not " +
slice);
73 }
else if (!(dynamic_cast<TH1*>(o1) == NULL) && !(dynamic_cast<TH1*>(o2) == NULL)) {
74 ERROR(
"For 1D histograms call JChi2_1D: " << o1->GetName() << endl);
Interface to read input and write output for TObject tests.
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.
std::istream & read(std::istream &in) override
Read test parameters from input.
then for HISTOGRAM in h0 h1
double failuresThreshold
threshold p-value to decide if test is passed.
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
JTestChi2_2D()
Default constructor.
std::string options
options for the ROOT chi2 test.
const std::string resultType
result type
const std::string testName
test name
double threshold
threshold p-value to decide if test is passed.
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
void test(TObject *o1, TObject *o2) override
Applies Chi2 test for two ROOT TH2 histograms.
Implementation of the different Chi2-related tests.
Implementation of the Chi2 test for 2D histograms.