Jpp 20.0.0-rc.2
the software that should make you happy
|
Implementation of the Kolmogorov test for 2D histograms. More...
#include <JTestKolmogorov_Slice2D.hh>
Public Member Functions | |
JTestKolmogorov_Slice2D () | |
Default constructor. | |
void | check (const TH1 *h1, const TH1 *h2) const |
Check if given input histograms have equal binning. | |
TH1 & | getProjectionOntoSlicedAxis (const TH2 &h, const char *const name="projection", const Int_t firstBin=0, const Int_t lastBin=-1, const Option_t *option="") const |
Get projection of given 2D histogram onto sliced axis. | |
TH1 & | getProjection (const TH2 &h, const char *const name="projection", const Int_t firstBin=0, const Int_t lastBin=-1, const Option_t *option="") const |
Get projection of given 2D histogram onto non-sliced axis. | |
void | test (const TObject *o1, const TObject *o2) override |
Tests the statistical compatibility of two ROOT TObjects. | |
std::istream & | read (std::istream &in) override |
Read test parameters from input. | |
virtual std::ostream & | write (std::ostream &out, const char delimiter=' ', const bool onlyFailures=false) const |
Write test result to output. | |
virtual void | save (TFile *f, const std::string &path, const bool onlyFailures=false) const |
Writes the test result to root file. | |
const std::string & | getTestName () const |
Get test name. | |
const std::string & | getResultType () const |
Get result type. | |
Protected Types | |
typedef TH1D *(TH2::*) | pFunction(const char *, Int_t, Int_t, Option_t *) const |
Type definition of pointer to TH2 member function for projection. | |
Protected Attributes | |
pFunction | mfp1 |
Pointer to TH2 member method for projections onto the sliced axis. | |
pFunction | mfp2 |
Pointer to TH2 member method for projections onto the non-sliced axis. | |
std::unique_ptr< JTest_t > | pTest1D |
Unique pointer to 1D test variant. | |
double | threshold |
threshold value to decide if test has passed. | |
double | failuresThreshold |
threshold value to decide if test has passed. | |
char | slice |
Axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None. | |
const std::string | testName |
test name | |
const std::string | resultType |
test result type | |
Implementation of the Kolmogorov 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.
This test compares two 2D histograms. If the parameter slice
equals x, X y or Y, the histograms are sliced along the corresponding axis, and the Kolmogorov test is applied to each slice.
The input parameter threshold
, is used to evaluate whether the test is passed or failed for each slice or for the full 2D distribution.
The evaluation is done by comparing the threshold
value with the resulting p-value.
The parameter threshold
should therefore be a real value between 0 and 1.
Definition at line 33 of file JTestKolmogorov_Slice2D.hh.
|
protectedinherited |
Type definition of pointer to TH2
member function for projection.
Definition at line 260 of file JTestSlice2D.hh.
|
inline |
Default constructor.
Definition at line 41 of file JTestKolmogorov_Slice2D.hh.
|
inlineinherited |
Check if given input histograms have equal binning.
h1 | first histogram |
h2 | second histogram |
Definition at line 66 of file JTestSlice2D.hh.
|
inlineinherited |
Get projection of given 2D histogram onto sliced axis.
h | histogram |
name | name |
firstBin | first bin |
lastBin | last bin |
option | option |
Definition at line 105 of file JTestSlice2D.hh.
|
inlineinherited |
Get projection of given 2D histogram onto non-sliced axis.
h | histogram |
name | name |
firstBin | first bin |
lastBin | last bin |
option | option |
Definition at line 133 of file JTestSlice2D.hh.
|
inlineoverridevirtualinherited |
Tests the statistical compatibility of two ROOT TObjects.
o1 | First object |
o2 | Second object |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 157 of file JTestSlice2D.hh.
|
inlineoverridevirtualinherited |
Read test parameters from input.
in | input stream |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 219 of file JTestSlice2D.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 |
|
protectedinherited |
Pointer to TH2
member method for projections onto the sliced axis.
Definition at line 262 of file JTestSlice2D.hh.
|
protectedinherited |
Pointer to TH2
member method for projections onto the non-sliced axis.
Definition at line 263 of file JTestSlice2D.hh.
|
protectedinherited |
Unique pointer to 1D test variant.
Definition at line 265 of file JTestSlice2D.hh.
|
protectedinherited |
threshold value to decide if test has passed.
Definition at line 267 of file JTestSlice2D.hh.
|
protectedinherited |
threshold value to decide if test has passed.
Definition at line 268 of file JTestSlice2D.hh.
|
protectedinherited |
Axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None.
Definition at line 269 of file JTestSlice2D.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.