#include <JTestZero.hh>
Definition at line 22 of file JTestZero.hh.
std::istream& JTestZero::read |
( |
std::istream & |
in | ) |
|
|
inlinevirtual |
Implements JTest_t.
Definition at line 39 of file JTestZero.hh.
double outliersThreshold
Fraction of bins allowed to fail.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
double threshold
threshold p-value to decide if test is passed.
std::ostream& JTestZero::write |
( |
std::ostream & |
out | ) |
|
|
inlinevirtual |
Implements JTest_t.
Definition at line 49 of file JTestZero.hh.
51 out << scientific << setprecision(2) << (
r->passed ?
GREEN :
RED) <<
r->message << endl;
vector< JTestResult > results
Implements JTest_t.
Definition at line 62 of file JTestZero.hh.
64 if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
66 TH2D*
h1 =
dynamic_cast<TH2D*
>(o1);
67 TH2D* h2 =
dynamic_cast<TH2D*
>(o2);
JTestResult JTestZero_2D(TH2 *h1, TH2 *h2, double outliersThreshold, double threshold)
double outliersThreshold
Fraction of bins allowed to fail.
then for HISTOGRAM in h0 h1
double threshold
threshold p-value to decide if test is passed.
vector< JTestResult > results
virtual void JTestZero::save |
( |
TFile * |
f, |
|
|
string |
path |
|
) |
| |
|
inlinevirtual |
Implements JTest_t.
Definition at line 80 of file JTestZero.hh.
84 if (
f -> GetDirectory(
path.c_str())==0)
f->mkdir(
path.c_str());
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
vector< JTestResult > results
void JTestZero::clear |
( |
| ) |
|
|
inlinevirtual |
JTestResult JTestZero_t::JTestZero_2D |
( |
TH2 * |
h1, |
|
|
TH2 * |
h2, |
|
|
double |
outliersThreshold, |
|
|
double |
threshold |
|
) |
| |
|
inlineinherited |
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.
double JTestZero::outliersThreshold |
|
private |
Fraction of bins allowed to fail.
Definition at line 98 of file JTestZero.hh.
double JTestZero::threshold |
|
private |
threshold p-value to decide if test is passed.
Definition at line 99 of file JTestZero.hh.
The documentation for this class was generated from the following file: