527 string path =
"Muons/MuonRecoAnalyzer/" + muonType +
"chi2OverDf";
531 TH1F * chi2Histo_root = chi2Histo->
getTH1F();
532 if(chi2Histo_root->GetEntries()>20){
535 LogTrace(
metname)<<
"chi2 kin test based on fraction for "<<muonType<<endl;
536 int maxBin = chi2Histo_root->GetMaximumBin();
537 if(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX())!=0){
538 double fraction = double(chi2Histo_root->Integral(1,maxBin))/
double(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX()));
547 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
554 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
558 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
563 int qtstatus = myQReportKolmo->
getStatus() ;
565 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
571 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType <<
" because # entries < 20 ";
578 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
582 TH1F * etaHisto_root = etaHisto->
getTH1F();
583 if (etaHisto_root ->GetEntries()>20){
586 LogTrace(
metname)<<
"eta kin test based on fraction for "<<muonType<<endl;
587 double binSize = (etaHisto_root->GetXaxis()->GetXmax()-etaHisto_root->GetXaxis()->GetXmin())/etaHisto_root->GetNbinsX();
588 int binZero = int((0-etaHisto_root->GetXaxis()->GetXmin())/binSize);
589 if(etaHisto_root->Integral(1,binZero-1)!=0 && etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())!=0){
590 double symmetryFactor =
591 double(etaHisto_root->Integral(1,binZero-1)) /
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX()));
592 double errSymmetryFactor =
593 symmetryFactor*
sqrt(1.0/
double(etaHisto_root->Integral(1,binZero-1)) + 1.0/
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())));
595 LogTrace(
metname)<<
"eta errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
598 else tParameter=double(-symmetryFactor+
etaExpected)/errSymmetryFactor;
599 LogTrace(
metname)<<
"eta tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
607 LogTrace(
metname)<<
"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
614 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
619 LogTrace(
metname)<<
"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
624 int qtstatus = myQReportKolmo->
getStatus() ;
626 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
632 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType <<
" because # entries < 20 ";
639 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
643 TH1F * phiHisto_root = phiHisto->
getTH1F();
644 if(phiHisto_root ->GetEntries()>20){
647 LogTrace(
metname)<<
"phi kin test based on fraction for "<<muonType<<endl;
648 double binSize = (phiHisto_root->GetXaxis()->GetXmax()-phiHisto_root->GetXaxis()->GetXmin())/phiHisto_root->GetNbinsX();
649 int binZero = int((0-phiHisto_root->GetXaxis()->GetXmin())/binSize);
650 if(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())!=0 && phiHisto_root->Integral(1,binZero)!=0){
651 double symmetryFactor =
652 double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) / double(phiHisto_root->Integral(1,binZero));
653 double errSymmetryFactor =
654 symmetryFactor*
sqrt(1.0/
double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) + 1.0/double(phiHisto_root->Integral(1,binZero)));
656 LogTrace(
metname)<<
"phi errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
659 else tParameter=double(-symmetryFactor+
phiExpected)/errSymmetryFactor;
660 LogTrace(
metname)<<
"phi tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
668 LogTrace(
metname)<<
"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
675 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
680 LogTrace(
metname)<<
"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
685 int qtstatus = myQReportKolmo->
getStatus() ;
687 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
693 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType <<
" because # entries < 20 ";
698 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"pt";
702 TH1F * ptHisto_root = ptHisto->
getTH1F();
703 if(ptHisto_root ->GetEntries()>20){
706 LogTrace(
metname)<<
"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
713 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
718 LogTrace(
metname)<<
"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
723 int qtstatus = myQReportKolmo->
getStatus() ;
725 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
730 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType <<
" because # entries < 20 ";
735 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"q";
739 TH1F * qHisto_root = qHisto->
getTH1F();
740 if(qHisto_root ->GetEntries()>20){
743 LogTrace(
metname)<<
"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
750 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
755 LogTrace(
metname)<<
"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
760 int qtstatus = myQReportKolmo->
getStatus() ;
762 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
767 LogTrace(
metname) <<
"[MuonTestSummary]: Test of q Kin not performed for "<< muonType <<
" because # entries < 20 ";
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * KolmogorovTestSummaryMap
const std::string & getMessage(void) const
get message attached to test
MonitorElement * kinematicsSummaryMap
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
TH1F * getTH1F(void) const
float getQTresult(void) const
get test result i.e. prob value
MonitorElement * chi2TestSummaryMap