174 << me-> getFullname() <<
"\n";
203 <<
" ME does not contain TH1F/TH1S/TH1D/TProfile, exiting\n";
208 int ncx1 = h->GetXaxis()->GetNbins();
209 int ncx2 = ref_->GetXaxis()->GetNbins();
214 <<
" different number of channels! ("
215 << ncx1 <<
", " << ncx2 <<
"), exiting\n";
223 int i, i_start, i_end;
224 double chi2 = 0.;
int ndof = 0;
int constraint = 0;
229 i_start = h->GetXaxis()->GetFirst();
230 i_end = h->GetXaxis()->GetLast();
235 double sum1=0, sum2=0;
236 for (i=i_start; i<=i_end; i++)
238 sum1 += h->GetBinContent(i);
239 sum2 += ref_->GetBinContent(i);
247 <<
" Test Histogram " << h->GetName()
248 <<
" is empty, exiting\n";
255 <<
" Ref Histogram " << ref_->GetName()
256 <<
" is empty, exiting\n";
260 double bin1, bin2, err1, err2,
temp;
261 for (i=i_start; i<=i_end; i++)
263 bin1 = h->GetBinContent(i)/sum1;
264 bin2 = ref_->GetBinContent(i)/sum2;
265 if (bin1 ==0 && bin2==0)
272 err1=h->GetBinError(i); err2=ref_->GetBinError(i);
273 if (err1 == 0 && err2 == 0)
277 <<
" bins with non-zero content and zero error, exiting\n";
280 err1*=err1 ; err2*=err2;
281 err1/=sum1*sum1 ; err2/=sum2*sum2;
282 chi2 +=temp*temp/(err1+err2);
286 return TMath::Prob(0.5*chi2,
int(0.5*ndof));
TH1F * getRefTH1F(void) const
TH1S * getTH1S(void) const
TH1D * getTH1D(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Kind kind(void) const
Get the type of the monitor element.
TObject * getRootObject(void) const
TH1F * getTH1F(void) const
TProfile * getRefTProfile(void) const
static std::string getAlgoName(void)
TProfile * getTProfile(void) const
TObject * getRefRootObject(void) const
TH1S * getRefTH1S(void) const
TH1D * getRefTH1D(void) const