#include <JTestZero_t.hh>
Definition at line 20 of file JTestZero_t.hh.
JTestZero_t::JTestZero_t |
( |
| ) |
|
|
inline |
JTestResult JTestZero_t::JTestZero_2D |
( |
TH2 * |
h1, |
|
|
TH2 * |
h2, |
|
|
double |
outliersThreshold, |
|
|
double |
threshold |
|
) |
| |
|
inline |
Definition at line 37 of file JTestZero_t.hh.
39 int nx1 =
h1->GetNbinsX();
40 int nx2 = h2->GetNbinsX();
41 int ny1 =
h1->GetNbinsY();
42 int ny2 = h2->GetNbinsY();
44 if(nx1 != nx2 || ny1 != ny2)
45 ERROR(
"Histograms with different binning. The objects: " <<
h1->GetName() <<
" can not be compared." << endl);
47 TH2D* h3 = (TH2D*)
h1->Clone(
h1->GetName()==h2->GetName() ?
56 for (
int i=1 ; i<nx1+1 ; ++i){
57 for (
int j=1 ;
j<ny1+1 ; ++
j){
59 double m =
h1 -> GetBinContent(i,
j);
60 double n = h2 -> GetBinContent(i,
j);
62 double p1 = 1 - ROOT::Math::poisson_cdf(m,1);
63 double p2 = 1 - ROOT::Math::poisson_cdf(n,1);
65 cout <<
"m " << m <<
" pm " << p1 <<
" n " << n <<
" pn " << p2 << endl;
67 if ((p1 > threshold && p2 < threshold) ||
68 (p1 < threshold && p2 > threshold)){
70 failures+=1./(nx1*ny1);
75 (failures > outliersThreshold ? r.
passed =
false : r.
passed =
true);
78 " HA: " <<
h1->GetUniqueID() <<
" " <<
h1->GetName() <<
79 " HB: " << h2->GetUniqueID() <<
" " << h2->GetName() <<
80 " Threshold: " << outliersThreshold <<
" Result: " << failures <<
" " << (r.
passed ?
"PASSED" :
"FAILED"));
84 h3->SetTitle(title.getTitle().c_str());
#define MAKE_CSTRING(A)
Make C-string.
then for HISTOGRAM in h0 h1
#define MAKE_STRING(A)
Make string.
alias put_queue eval echo n
std::string to_string(const T &value)
Convert value to string.
The documentation for this class was generated from the following file: