Definition at line 183 of file QTest.h.
Reimplemented from QCriterion.
Definition at line 163 of file QTest.cc.
References HLT_FULL_cff::chi2, HLT_FULL_cff::constraint, gather_cfg::cout, MonitorElement::DQM_KIND_TH1D, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH1S, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::getRefRootObject(), MonitorElement::getRefTH1D(), MonitorElement::getRefTH1F(), MonitorElement::getRefTH1S(), MonitorElement::getRefTProfile(), MonitorElement::getRootObject(), MonitorElement::getTH1D(), MonitorElement::getTH1F(), MonitorElement::getTH1S(), MonitorElement::getTProfile(), h, i, MonitorElement::kind(), ndof, combinedConstraintHelpers::sum2(), and groupFilesInBlocks::temp.
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;
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;
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
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH1D * getTH1D(void) const
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