1 #ifndef __JCOMPAREHISTOGRAMS__JTESTSIGNIFICANCE_T__
2 #define __JCOMPAREHISTOGRAMS__JTESTSIGNIFICANCE_T__
17 namespace JCOMPAREHISTOGRAMS {
64 if(h1 -> GetNbinsX() != h2 -> GetNbinsX())
65 ERROR(
"Histograms with different bining. The objects: " << h1 -> GetName() <<
" can not be compared." << endl);
68 T* h3 = (
T*)h1->Clone(h1->GetName()==h2->GetName() ?
76 for (
int i=0 ; i < h1->GetNbinsX() ; ++i){
77 for (
int j=0 ;
j< h1->GetNbinsY() ; ++
j){
78 for (
int k=0 ;
k< h1->GetNbinsZ() ; ++
k){
80 double a = h1->GetBinContent(i+1,
j+1,
k+1);
81 double b = h2->GetBinContent(i+1,
j+1,
k+1);
84 S += fabs((a - K*b)/sqrt(a + K*K*b));
90 S /= (h1->GetNbinsX()*h1->GetNbinsY()*h1->GetNbinsZ());
94 (S < threshold ? passed =
false : passed =
true);
98 h3->SetTitle(title.
getTitle().c_str());
103 parameterName, S , threshold, h3, passed);
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
static const uint32_t K[64]
Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived c...
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary class to handle file name, ROOT directory and object name.
#define MAKE_STRING(A)
Make string.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
JTestSignificance_t()
Default constructor.
std::string to_string(const T &value)
Convert value to string.
Structure containing the result of the test.
JTestResult JSignificanceTest(T *h1, T *h2, double threshold, double K, std::string testName, std::string parameterName)
Significance test for histograms.
std::string getTitle()
Returns a standard string to be used as title of a graphical root object.