Runs test for sliced 2D histograms. 
  121     if(slice == 
'x' || slice == 
'X'){
 
  123       int nSlices1 = 
h1->GetNbinsX();
 
  124       int nSlices2 = h2->GetNbinsX();
 
  126       TH1* h3 = 
h1->ProjectionX(
h1->GetName()==h2->GetName() ?
 
  130       if(nSlices1 != nSlices2)
 
  131         ERROR(
"Histograms with different binning. The objects: " << 
h1->GetName() << 
" and " << h2->GetName() << 
" can not be compared." << endl);
 
  133       for (
int i=1 ; i<=nSlices1 ; ++i){
 
  137         TH1D* s1 = 
h1->ProjectionY (sliceName.c_str(),i,i);
 
  138         TH1D* s2 = h2->ProjectionY (sliceName.c_str(),i,i);
 
  140         double R = s1->Integral();
 
  141         double T = s2->Integral();
 
  147         bool a = ((T/
R)*s1->GetBinContent(1) - s2->GetBinContent(1)) < 0;
 
  151         for (
int i = 2 ; i<s1->GetNbinsX() ; ++i){
 
  153           bool b = ((T/
R)*s1->GetBinContent(i) - s2->GetBinContent(i)) < 0;
 
  163         double N = 1 + 2*p*q/(p+q) ;
 
  164         double s = sqrt( 2*p*q*(2*p*q-p-q)/(p+q)/(p+q)/(p+q-1) );
 
  169         (fabs(d) > threshold ? passed = 
false : passed = 
true);
 
  171         if (!passed) nFailures++;
 
  173         h3->SetBinContent(i,fabs(d));
 
  179       (nFailures/nSlices1 > failuresThreshold ? passed = 
false : passed = 
true);
 
  181       JResultTitle title(testName, parameterName, passed , nFailures);
 
  183       h3->SetTitle(title.getTitle().c_str());
 
  186                         string (
h1->GetDirectory()->GetPath()).append(
h1->GetName()),
 
  187                         string (h2->GetDirectory()->GetPath()).append(h2->GetName()),
 
  188                         h1->GetDirectory()->GetFile()->GetName(),
 
  189                         h2->GetDirectory()->GetFile()->GetName(),
 
  190                         parameterName, nFailures, failuresThreshold, h3, passed);
 
  192     }
else if (slice == 
'y' || slice == 
'Y'){
 
  194       int nSlices1 = 
h1->GetNbinsX();
 
  195       int nSlices2 = h2->GetNbinsX();
 
  197       TH1* h3 = 
h1->ProjectionY(
h1->GetName()==h2->GetName() ?
 
  201       if(nSlices1 != nSlices2)
 
  202         ERROR(
"Histograms with different binning. The objects: " << 
h1->GetName() << 
" and " << h2->GetName() << 
" can not be compared." << endl);
 
  204       for (
int i=1 ; i<=nSlices1 ; ++i){
 
  208         TH1D* s1 = 
h1->ProjectionX (sliceName.c_str(),i,i);
 
  209         TH1D* s2 = h2->ProjectionX (sliceName.c_str(),i,i);
 
  211         double R = s1->Integral();
 
  212         double T = s2->Integral();
 
  218         bool a = ((T/
R)*s1->GetBinContent(1) - s2->GetBinContent(1)) < 0;
 
  222         for (
int i = 2 ; i<s1->GetNbinsX() ; ++i){
 
  224           bool b = ((T/
R)*s1->GetBinContent(i) - s2->GetBinContent(i)) < 0;
 
  234         double N = 1 + 2*p*q/(p+q) ;
 
  235         double s = sqrt( 2*p*q*(2*p*q-p-q)/(p+q)/(p+q)/(p+q-1) );
 
  240         (fabs(d) > threshold ? passed = 
false : passed = 
true);
 
  242         if (!passed) nFailures++;
 
  244         h3->SetBinContent(i,fabs(d));
 
  250       (nFailures/nSlices1 > failuresThreshold ? passed = 
false : passed = 
true);
 
  252       JResultTitle title(testName, parameterName, passed , nFailures);
 
  254       h3->SetTitle(title.getTitle().c_str());
 
  257                         string (
h1->GetDirectory()->GetPath()).append(
h1->GetName()),
 
  258                         string (h2->GetDirectory()->GetPath()).append(h2->GetName()),
 
  259                         h1->GetDirectory()->GetFile()->GetName(),
 
  260                         h2->GetDirectory()->GetFile()->GetName(),
 
  261                         parameterName, nFailures, failuresThreshold, h3, passed);
 
Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived c...
 
#define MAKE_CSTRING(A)
Make C-string. 
 
then for HISTOGRAM in h0 h1
 
Structure containing the result of the test. 
 
#define MAKE_STRING(A)
Make string. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable NORTH set_variable EAST set_variable SOUTH set_variable WEST set_variable WORKDIR tmp set_variable R set_variable CT set_variable YMAX set_variable YMIN if do_usage *then usage $script[distance] fi case set_variable R
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
alias put_queue eval echo n
 
std::string to_string(const T &value)
Convert value to string. 
 
then usage $script[input file[working directory[option]]] nWhere option can be N