1 #ifndef __JTESTCHI2_1D__
2 #define __JTESTCHI2_1D__
34 std::istream&
read(std::istream&
in) {
35 return in >> threshold;
44 std::ostream&
write(std::ostream& out) {
46 out << scientific << setprecision(2) << (
r->passed ?
GREEN :
RED) <<
r->message << endl;
59 if (!(dynamic_cast<TH2*>(o1) == NULL) || !(dynamic_cast<TH2*>(o2) == NULL)) {
60 ERROR(
"For 2D histograms call JTestChi2_2D: " << o1->GetName() << endl);
62 }
else if (!(dynamic_cast<TH1*>(o1) == NULL) && !(
dynamic_cast<TH1*
>(o2) == NULL)) {
64 TH1D*
h1 =
dynamic_cast<TH1D*
>(o1);
65 TH1D* h2 =
dynamic_cast<TH1D*
>(o2);
67 if(h1 -> GetNbinsX() != h2 -> GetNbinsX())
68 ERROR(
"Histograms with different bining. The objects: " << h1 -> GetName() <<
" can not be compared." << endl);
85 if (f -> GetDirectory(path.c_str())==0) f->mkdir(path.c_str());
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
double threshold
threshold p-value to decide if test is passed.
then for HISTOGRAM in h0 h1
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
std::ostream & write(std::ostream &out)
std::istream & read(std::istream &in)
virtual void save(TFile *f, string path)
void test(TObject *o1, TObject *o2)