Jpp  16.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
JCOMPAREHISTOGRAMS::JTestKolmogorovSlice Class Reference

Implementation of the Kolmogorov test for 2D histograms. More...

#include <JTestKolmogorovSlice.hh>

Inheritance diagram for JCOMPAREHISTOGRAMS::JTestKolmogorovSlice:
JCOMPAREHISTOGRAMS::JTest_t JCOMPAREHISTOGRAMS::JTestKolmogorov_t

Public Member Functions

 JTestKolmogorovSlice ()
 Default constructor. More...
 
std::istream & read (std::istream &in) override
 Read test parameters from input. More...
 
void test (TObject *o1, TObject *o2) override
 Applies Kolmogorov test for two ROOT TH2 histograms. More...
 
std::ostream & write (std::ostream &out, const char delimiter= ' ', const bool onlyFailures=false) const
 Write test result to output. More...
 
virtual void save (TFile *f, const std::string &path, const bool onlyFailures=false)
 Writes the test result to root file. More...
 
virtual void clear ()
 Clear results. More...
 
const std::string & getTestName ()
 Get test name. More...
 
const std::string & getResultType ()
 Get result type. More...
 
JTestResult JKolmogorovTest (TH1 *h1, TH1 *h2, double threshold, std::string testName, std::string parameterName)
 Kolmogorov test for 1D histograms. More...
 
JTestResult JKolmogorovTestSlice (TH2 *h1, TH2 *h2, double threshold, double failuresThreshold, std::string testName, std::string parameterName, char slice)
 Kolmogorov test for sliced 2D histograms. More...
 
JTestResult JKolmogorovTest2D (TH2 *h1, TH2 *h2, double threshold, std::string testName, std::string parameterName)
 Kolmogorov test for 2D histograms. More...
 

Public Attributes

std::vector< JTestResultresults
 Buffer to store results of multiple tests.*/. More...
 

Protected Attributes

const std::string testName
 test name More...
 
const std::string resultType
 result type More...
 

Private Attributes

double threshold
 threshold p-value to decide if test is passed. More...
 
double failuresThreshold
 threshold p-value to decide if test is passed. More...
 
char slice
 axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None. More...
 

Detailed Description

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 JKolmogorovTest() test is applied to each slice.
If slice() equals n or N, the histograms are not sliced, and JKolmogorovTest2D() is applied.
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 result produced by JKolmogorovTest() or JKolmogorovTest2D(), which is a p-value.
The parameter threshold() should therefore be a real value between 0 and 1.

Definition at line 25 of file JTestKolmogorovSlice.hh.

Constructor & Destructor Documentation

JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::JTestKolmogorovSlice ( )
inline

Default constructor.

Definition at line 33 of file JTestKolmogorovSlice.hh.

33  :
34  JTest_t("KS_Slice", "p-Value(KS)"),
36  {}
JTest_t(const std::string &name, const std::string &type)
Constructor.
Definition: JTest_t.hh:57

Member Function Documentation

std::istream& JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::read ( std::istream &  in)
inlineoverridevirtual

Read test parameters from input.

Parameters
ininput stream
Returns
input stream

Implements JCOMPAREHISTOGRAMS::JTest_t.

Definition at line 44 of file JTestKolmogorovSlice.hh.

44  {
45  return in >> threshold >> slice >> failuresThreshold;
46  };
double failuresThreshold
threshold p-value to decide if test is passed.
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
char slice
axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None.
double threshold
threshold p-value to decide if test is passed.
void JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::test ( TObject o1,
TObject o2 
)
inlineoverridevirtual

Applies Kolmogorov test for two ROOT TH2 histograms.

Parameters
o1First histogram
o2Second histogram

Implements JCOMPAREHISTOGRAMS::JTest_t.

Definition at line 54 of file JTestKolmogorovSlice.hh.

54  {
55 
56  using namespace std;
57  using namespace JPP;
58 
59  if (!(dynamic_cast<TH2*>(o1) == NULL) && !(dynamic_cast<TH2*>(o2) == NULL)) {
60 
61  TH2D* h1 = dynamic_cast<TH2D*>(o1);
62  TH2D* h2 = dynamic_cast<TH2D*>(o2);
63 
64  if(slice == 'x' || slice == 'X' || slice == 'y' || slice == 'Y'){
65 
67 
68  results.push_back(r);
69 
70  } else {
71  ERROR ("Slice option should be: x, X, y or Y, and not " + slice);
72  }
73 
74  } else if (!(dynamic_cast<TH1*>(o1) == NULL) && !(dynamic_cast<TH1*>(o2) == NULL)) {
75  ERROR("For 1D histograms call JTestKolmogorov_1D: " << o1->GetName() << endl);
76  }
77  };
double failuresThreshold
threshold p-value to decide if test is passed.
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:71
data_type r[M+1]
Definition: JPolint.hh:758
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
Definition: JTest_t.hh:162
#define ERROR(A)
Definition: JMessage.hh:66
JTestResult JKolmogorovTestSlice(TH2 *h1, TH2 *h2, double threshold, double failuresThreshold, std::string testName, std::string parameterName, char slice)
Kolmogorov test for sliced 2D histograms.
const std::string resultType
result type
Definition: JTest_t.hh:167
const std::string testName
test name
Definition: JTest_t.hh:166
char slice
axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None.
double threshold
threshold p-value to decide if test is passed.
std::ostream& JCOMPAREHISTOGRAMS::JTest_t::write ( std::ostream &  out,
const char  delimiter = ' ',
const bool  onlyFailures = false 
) const
inlineinherited

Write test result to output.

Parameters
outoutput stream
delimiterfield delimiter
onlyFailuresif true, write only failures.
Returns
output stream

Definition at line 81 of file JTest_t.hh.

83  {
84 
85  for (std::vector<JTestResult>::const_iterator r = results.begin() ; r != results.end() ; ++r) {
86 
87  if (onlyFailures && r->passed) {
88  continue;
89  }
90 
91  print(out, *r, delimiter, true);
92  }
93 
94  return out;
95  }
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter= ' ', const bool useColors=true)
Print test summary.
data_type r[M+1]
Definition: JPolint.hh:758
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
Definition: JTest_t.hh:162
virtual void JCOMPAREHISTOGRAMS::JTest_t::save ( TFile *  f,
const std::string &  path,
const bool  onlyFailures = false 
)
inlinevirtualinherited

Writes the test result to root file.

Parameters
fA ROOT file
pathPath in root file.
onlyFailuresIf true, write only failures.

Definition at line 113 of file JTest_t.hh.

115  {
116 
117  using namespace std;
118 
119  if (f -> GetDirectory(path.c_str())==0) {
120  f->mkdir(path.c_str());
121  }
122 
123  f->cd(path.c_str());
124 
125  for (vector<JTestResult>::const_iterator r = results.begin() ; r != results.end() ; ++r){
126 
127  if (!onlyFailures || !r->passed){
128  r->obj->Write();
129  }
130  }
131  }
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
data_type r[M+1]
Definition: JPolint.hh:758
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
Definition: JTest_t.hh:162
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DOM<$WORKDIR/ev_configure_domsimulator.txt > RC_DWRT path
virtual void JCOMPAREHISTOGRAMS::JTest_t::clear ( )
inlinevirtualinherited

Clear results.

Definition at line 137 of file JTest_t.hh.

137  {
138  results.clear();
139  }
std::vector< JTestResult > results
Buffer to store results of multiple tests.*/.
Definition: JTest_t.hh:162
const std::string& JCOMPAREHISTOGRAMS::JTest_t::getTestName ( )
inlineinherited

Get test name.

Returns
test name

Definition at line 147 of file JTest_t.hh.

147  {
148  return testName;
149  }
const std::string testName
test name
Definition: JTest_t.hh:166
const std::string& JCOMPAREHISTOGRAMS::JTest_t::getResultType ( )
inlineinherited

Get result type.

Returns
result type

Definition at line 157 of file JTest_t.hh.

157  {
158  return resultType;
159  }
const std::string resultType
result type
Definition: JTest_t.hh:167
JTestResult JCOMPAREHISTOGRAMS::JTestKolmogorov_t::JKolmogorovTest ( TH1 *  h1,
TH1 *  h2,
double  threshold,
std::string  testName,
std::string  parameterName 
)
inlineinherited

Kolmogorov test for 1D histograms.


The input parameter threshold, is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of a Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1.

Parameters
h1First histogram
h2Second historgram
thresholdp-value
parameterNameName of the parameter used to test the histograms
testNameName of the test used to compare the histograms
Returns
Test result

Definition at line 43 of file JTestKolmogorov_t.hh.

43  {
44 
45  using namespace std;
46  using namespace JPP;
47 
48  int n1 = h1 -> GetNbinsX();
49  int n2 = h2 -> GetNbinsX();
50 
51  if(n1 != n2)
52  ERROR("Histograms with different bining. The objects: " << h1 -> GetName() << " can not be compared." << endl);
53 
54  TH2D* h3 = (TH2D*)h1->Clone(h1->GetName()==h2->GetName() ?
55  MAKE_CSTRING(to_string(h1->GetName())) :
56  MAKE_CSTRING(to_string(h1->GetName()) + "_VS_" + to_string(h2->GetName())));
57 
58  bool afunc1 = false;
59  bool afunc2 = false;
60  double s1 = 1./h1->Integral();
61  double s2 = 1./h2->Integral();
62 
63  double ew1, ew2, w1 = 0, w2 = 0;
64 
65  for (int bin = 1; bin <= n1; ++bin){
66  ew1 = h1->GetBinError(bin);
67  ew2 = h2->GetBinError(bin);
68  w1 += ew1*ew1;
69  w2 += ew2*ew2;
70  }
71 
72  double esum1 = 0, esum2 = 0;
73  if (w1 > 0)
74  esum1 = 1./s1/s1/w1;
75  else
76  afunc1 = true;
77  if (w2 > 0)
78  esum2 = 1./s2/s2/w2;
79  else
80  afunc2 = true;
81  if (afunc2 && afunc1) {
82  ERROR("Errors are zero for both histograms\n");
83  }
84 
85  double c1 = 0, c2 = 0;
86 
87  double dmax = 0;
88  for (int bin=1 ; bin<=n1 ; ++bin){
89  c1 += s1*h1->GetBinContent(bin);
90  c2 += s2*h2->GetBinContent(bin);
91  double d = TMath::Abs(c1-c2)*TMath::Sqrt(esum1*esum2/(esum1+esum2));
92  double p = TMath::KolmogorovProb(d);
93  h3->SetBinContent(bin,p);
94  dmax = TMath::Max(dmax,TMath::Abs(c1-c2));
95  }
96 
97  double z;
98 
99  if (afunc1)
100  z = dmax*TMath::Sqrt(esum2);
101  else if (afunc2)
102  z = dmax*TMath::Sqrt(esum1);
103  else
104  z = dmax*TMath::Sqrt(esum1*esum2/(esum1+esum2));
105 
106  double pValue = TMath::KolmogorovProb(z);
107 
108  bool passed;
109 
110  (pValue < threshold ? passed = false : passed = true);
111 
112  JResultTitle title(testName, parameterName, passed , pValue);
113 
114  h3->SetTitle(title.getTitle().c_str());
115 
116  JTestResult r (testName,
117  JRootObjectID(MAKE_STRING(h1->GetDirectory()->GetPath() << h1->GetName())),
118  JRootObjectID(MAKE_STRING(h2->GetDirectory()->GetPath() << h1->GetName())),
119  parameterName, pValue, threshold, h3, passed);
120 
121  return r;
122  };
#define MAKE_CSTRING(A)
Make C-string.
Definition: JPrint.hh:151
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:71
data_type r[M+1]
Definition: JPolint.hh:758
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
#define ERROR(A)
Definition: JMessage.hh:66
TCanvas * c1
Global variables to handle mouse events.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
std::string to_string(const T &value)
Convert value to string.
JTestResult JCOMPAREHISTOGRAMS::JTestKolmogorov_t::JKolmogorovTestSlice ( TH2 *  h1,
TH2 *  h2,
double  threshold,
double  failuresThreshold,
std::string  testName,
std::string  parameterName,
char  slice 
)
inlineinherited

Kolmogorov test for sliced 2D histograms.


The histograms are sliced along the axis specified by the slice parameter. A slice per bin is made.
For each of the slices, the input parameter threshold is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of the Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1. The fraction of failed tests is compared to the input parameter failuresThreshold. If this fraction is larger than failuresThreshold, the test fails.

Parameters
h1First histogram
h2Second histogram
thresholdThreshold value for the test result
failuresThresholdThreshold value for the test result
parameterNameName of the parameter used to test the histograms
testNameName of the test used to compare the histograms
sliceThe axis along which the histogram is sliced.
Returns
Test result.

Definition at line 143 of file JTestKolmogorov_t.hh.

143  {
144 
145  using namespace std;
146  using namespace JPP;
147 
148  int nFailures = 0;
149 
150  JTestResult r;
151 
152  if(slice == 'x' || slice == 'X'){
153 
154  int nSlices1 = h1->GetNbinsX();
155  int nSlices2 = h2->GetNbinsX();
156 
157  TH1* h3 = h1->ProjectionX(h1->GetName()==h2->GetName() ?
158  MAKE_CSTRING(to_string(h1->GetName())) :
159  MAKE_CSTRING(to_string(h1->GetName()) + "_VS_" + to_string(h2->GetName())));
160 
161  if(nSlices1 != nSlices2)
162  ERROR("Histograms with different binning. The objects: " << h1->GetName() << " and " << h2->GetName() << " can not be compared." << endl);
163 
164  for (int i=1 ; i<=nSlices1 ; ++i){
165 
166  std::string sliceName = MAKE_STRING(h1->GetName() + to_string("_") + to_string(i));
167 
168  TH1D* s1 = h1->ProjectionY (sliceName.c_str(),i,i);
169  TH1D* s2 = h2->ProjectionY (sliceName.c_str(),i,i);
170 
171  double p = s1 -> KolmogorovTest (s2);
172 
173  bool passed;
174 
175  (p < threshold ? passed = false : passed = true);
176 
177  if (!passed) nFailures++;
178 
179  h3->SetBinContent(i,p);
180 
181  }
182 
183  bool passed;
184 
185  (nFailures/nSlices1 > failuresThreshold ? passed = false : passed = true);
186 
187  JResultTitle title(testName, parameterName, passed , nFailures);
188 
189  h3->SetTitle(title.getTitle().c_str());
190 
191  r = JTestResult (testName,
192  JRootObjectID(MAKE_STRING(h1->GetDirectory()->GetPath() << h1->GetName())),
193  JRootObjectID(MAKE_STRING(h2->GetDirectory()->GetPath() << h1->GetName())),
194  parameterName, nFailures, failuresThreshold, h3, passed);
195 
196  }else if (slice == 'y' || slice == 'Y'){
197 
198  int nSlices1 = h1->GetNbinsY();
199  int nSlices2 = h2->GetNbinsY();
200 
201  TH1* h3 = h1->ProjectionY(h1->GetName()==h2->GetName() ?
202  MAKE_CSTRING(to_string(h1->GetName())) :
203  MAKE_CSTRING(to_string(h1->GetName()) + "_VS_" + to_string(h2->GetName())));
204 
205  if(nSlices1 != nSlices2)
206  ERROR("Histograms with different binning. The objects: " << h1->GetName() << " can not be compared." << endl);
207 
208  for (int i=1 ; i<=nSlices1 ; ++i){
209 
210  std::string sliceName = MAKE_STRING(h1->GetName() + to_string("_") + to_string(i));
211 
212  TH1D* s1 = h1->ProjectionX (sliceName.c_str(),i,i);
213  TH1D* s2 = h2->ProjectionX (sliceName.c_str(),i,i);
214 
215  double p = s1 -> KolmogorovTest (s2);
216 
217  bool passed;
218 
219  (p < threshold ? passed = false : passed = true);
220 
221  if (!passed) nFailures++;
222 
223  h3->SetBinContent(i,p);
224  }
225 
226  bool passed;
227 
228  (nFailures/nSlices1 > failuresThreshold ? passed = false : passed = true);
229 
230  JResultTitle title(testName, parameterName, passed , nFailures);
231 
232  h3->SetTitle(title.getTitle().c_str());
233 
234  r = JTestResult (testName,
235  JRootObjectID(MAKE_STRING(h1->GetDirectory()->GetPath() << h1->GetName())),
236  JRootObjectID(MAKE_STRING(h2->GetDirectory()->GetPath() << h1->GetName())),
237  parameterName, nFailures, failuresThreshold, h3, passed);
238 
239  }
240 
241  return r;
242  };
#define MAKE_CSTRING(A)
Make C-string.
Definition: JPrint.hh:151
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:71
data_type r[M+1]
Definition: JPolint.hh:758
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
#define ERROR(A)
Definition: JMessage.hh:66
std::string to_string(const T &value)
Convert value to string.
JTestResult JCOMPAREHISTOGRAMS::JTestKolmogorov_t::JKolmogorovTest2D ( TH2 *  h1,
TH2 *  h2,
double  threshold,
std::string  testName,
std::string  parameterName 
)
inlineinherited

Kolmogorov test for 2D histograms.


The input parameter threshold, is used to evaluate whether the test is passed or failed.
The evaluation is done by comparing the threshold value with the result of the Kolmogorov test. The output of a Kolmogorov test is a p-value.
The parameter threshold should therefore be a real value between 0 and 1.

Parameters
h1First histogram
h2Second historgram
thresholdp-value
parameterNameName of the parameter used to test the histograms
testNameName of the test used to compare the histograms
Returns
Test result

Definition at line 260 of file JTestKolmogorov_t.hh.

260  {
261 
262  using namespace std;
263  using namespace JPP;
264 
265  int n1x = h1 -> GetNbinsX();
266  int n2x = h2 -> GetNbinsX();
267  int n1y = h1 -> GetNbinsY();
268  int n2y = h2 -> GetNbinsY();
269 
270  if(n1x != n2x || n1y != n2y)
271  ERROR("Histograms with different bining. The objects: " << h1 -> GetName() << " can not be compared." << endl);
272 
273  if(h1->Integral()==0 || h2->Integral()==0)
274  ERROR("Empty histogram: " << h1 -> GetName() << " can not be compared." << endl);
275 
276  double s1 = 1./h1->Integral();
277  double s2 = 1./h2->Integral();
278 
279  TH2D* h3 = (TH2D*)h1->Clone(h1->GetName()==h2->GetName() ?
280  MAKE_CSTRING(to_string(h1->GetName())) :
281  MAKE_CSTRING(to_string(h1->GetName()) + "_VS_" + to_string(h2->GetName())));
282 
283  bool afunc1 = false;
284  bool afunc2 = false;
285 
286  double ew1, ew2, w1 = 0, w2 = 0;
287 
288  for (int i = 1; i <= n1x; ++i){
289  for (int j = 1; j <= n1y; ++j){
290  ew1 = h1->GetBinError(i,j);
291  ew2 = h2->GetBinError(i,j);
292  w1 += ew1*ew1;
293  w2 += ew2*ew2;
294  }
295  }
296 
297  double esum1 = 0, esum2 = 0;
298  if (w1 > 0)
299  esum1 = 1./s1/s1/w1;
300  else
301  afunc1 = true;
302  if (w2 > 0)
303  esum2 = 1./s2/s2/w2;
304  else
305  afunc2 = true;
306  if (afunc2 && afunc1) {
307  ERROR("Errors are zero for both histograms\n");
308  }
309 
310  double c1 = 0, c2 = 0;
311 
312  double dmax1 = 0;
313  for (int i=1 ; i<=n1x ; ++i){
314  for (int j=1 ; j<=n1y ; ++j){
315  c1 += s1*h1->GetBinContent(i,j);
316  c2 += s2*h2->GetBinContent(i,j);
317  double d = TMath::Abs(c1-c2)*TMath::Sqrt(esum1*esum2/(esum1+esum2));
318  h3->Fill(i,j,d);
319  dmax1 = TMath::Max(dmax1,TMath::Abs(c1-c2));
320  }
321  }
322 
323  c1 = 0, c2 = 0;
324 
325  double dmax2 = 0;
326  for (int j=1 ; j<=n1y ; ++j){
327  for (int i=1 ; i<=n1x ; ++i){
328  c1 += s1*h1->GetBinContent(i,j);
329  c2 += s2*h2->GetBinContent(i,j);
330  double d = TMath::Abs(c1-c2)*TMath::Sqrt(esum1*esum2/(esum1+esum2));
331  h3->Fill(i,j,d);
332  dmax1 = TMath::Max(dmax2,TMath::Abs(c1-c2));
333  }
334  }
335 
336  double dmax = 0.5*(dmax1+dmax2);
337  double z;
338 
339  if (afunc1)
340  z = dmax*TMath::Sqrt(esum2);
341  else if (afunc2)
342  z = dmax*TMath::Sqrt(esum1);
343  else
344  z = dmax*TMath::Sqrt(esum1*esum2/(esum1+esum2));
345 
346  double pValue = TMath::KolmogorovProb(z);
347 
348  for (int i=1 ; i<=n1x ; ++i){
349  for (int j=1 ; j<=n1y ; ++j){
350  h3->SetBinContent(i,j,TMath::KolmogorovProb(0.5 * h3->GetBinContent(i,j)));
351  }
352  }
353 
354  bool passed;
355 
356  (pValue < threshold ? passed = false : passed = true);
357 
358  JResultTitle title(testName, parameterName, passed , pValue);
359 
360  h3->SetTitle(title.getTitle().c_str());
361 
362  JTestResult r (testName,
363  JRootObjectID(MAKE_STRING(h1->GetDirectory()->GetPath() << h1->GetName())),
364  JRootObjectID(MAKE_STRING(h2->GetDirectory()->GetPath() << h1->GetName())),
365  parameterName, pValue, threshold, h3, passed);
366 
367  return r;
368  };
#define MAKE_CSTRING(A)
Make C-string.
Definition: JPrint.hh:151
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:71
data_type r[M+1]
Definition: JPolint.hh:758
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
#define ERROR(A)
Definition: JMessage.hh:66
TCanvas * c1
Global variables to handle mouse events.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
std::string to_string(const T &value)
Convert value to string.
int j
Definition: JPolint.hh:682

Member Data Documentation

double JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::threshold
private

threshold p-value to decide if test is passed.

Definition at line 77 of file JTestKolmogorovSlice.hh.

double JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::failuresThreshold
private

threshold p-value to decide if test is passed.

Definition at line 81 of file JTestKolmogorovSlice.hh.

char JCOMPAREHISTOGRAMS::JTestKolmogorovSlice::slice
private

axis to slice. x or X for x-axis, y or Y for y-axis, n or N for None.

Definition at line 82 of file JTestKolmogorovSlice.hh.

std::vector<JTestResult> JCOMPAREHISTOGRAMS::JTest_t::results
inherited

Buffer to store results of multiple tests.*/.

Definition at line 162 of file JTest_t.hh.

const std::string JCOMPAREHISTOGRAMS::JTest_t::testName
protectedinherited

test name

Definition at line 166 of file JTest_t.hh.

const std::string JCOMPAREHISTOGRAMS::JTest_t::resultType
protectedinherited

result type

Definition at line 167 of file JTest_t.hh.


The documentation for this class was generated from the following file: