529 string path =
"Muons/MuonRecoAnalyzer/" + muonType +
"chi2OverDf";
533 TH1F * chi2Histo_root = chi2Histo->
getTH1F();
534 if(chi2Histo_root->GetEntries()>20){
537 LogTrace(
metname)<<
"chi2 kin test based on fraction for "<<muonType<<endl;
538 int maxBin = chi2Histo_root->GetMaximumBin();
539 if(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX())!=0){
540 double fraction = double(chi2Histo_root->Integral(1,maxBin))/
double(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX()));
549 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
556 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
560 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
565 int qtstatus = myQReportKolmo->
getStatus() ;
567 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
573 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType <<
" because # entries < 20 ";
580 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
584 TH1F * etaHisto_root = etaHisto->
getTH1F();
585 if (etaHisto_root ->GetEntries()>20){
588 LogTrace(
metname)<<
"eta kin test based on fraction for "<<muonType<<endl;
589 double binSize = (etaHisto_root->GetXaxis()->GetXmax()-etaHisto_root->GetXaxis()->GetXmin())/etaHisto_root->GetNbinsX();
590 int binZero = int((0-etaHisto_root->GetXaxis()->GetXmin())/binSize);
591 if(etaHisto_root->Integral(1,binZero-1)!=0 && etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())!=0){
592 double symmetryFactor =
593 double(etaHisto_root->Integral(1,binZero-1)) /
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX()));
594 double errSymmetryFactor =
595 symmetryFactor*
sqrt(1.0/
double(etaHisto_root->Integral(1,binZero-1)) + 1.0/
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())));
597 LogTrace(
metname)<<
"eta errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
600 else tParameter=double(-symmetryFactor+
etaExpected)/errSymmetryFactor;
601 LogTrace(
metname)<<
"eta tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
609 LogTrace(
metname)<<
"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
616 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
621 LogTrace(
metname)<<
"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
626 int qtstatus = myQReportKolmo->
getStatus() ;
628 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
634 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType <<
" because # entries < 20 ";
641 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
645 TH1F * phiHisto_root = phiHisto->
getTH1F();
646 if(phiHisto_root ->GetEntries()>20){
649 LogTrace(
metname)<<
"phi kin test based on fraction for "<<muonType<<endl;
650 double binSize = (phiHisto_root->GetXaxis()->GetXmax()-phiHisto_root->GetXaxis()->GetXmin())/phiHisto_root->GetNbinsX();
651 int binZero = int((0-phiHisto_root->GetXaxis()->GetXmin())/binSize);
652 if(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())!=0 && phiHisto_root->Integral(1,binZero)!=0){
653 double symmetryFactor =
654 double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) / double(phiHisto_root->Integral(1,binZero));
655 double errSymmetryFactor =
656 symmetryFactor*
sqrt(1.0/
double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) + 1.0/double(phiHisto_root->Integral(1,binZero)));
658 LogTrace(
metname)<<
"phi errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
661 else tParameter=double(-symmetryFactor+
phiExpected)/errSymmetryFactor;
662 LogTrace(
metname)<<
"phi tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
670 LogTrace(
metname)<<
"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
677 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
682 LogTrace(
metname)<<
"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
687 int qtstatus = myQReportKolmo->
getStatus() ;
689 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
695 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType <<
" because # entries < 20 ";
700 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"pt";
704 TH1F * ptHisto_root = ptHisto->
getTH1F();
705 if(ptHisto_root ->GetEntries()>20){
708 LogTrace(
metname)<<
"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
715 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
720 LogTrace(
metname)<<
"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
725 int qtstatus = myQReportKolmo->
getStatus() ;
727 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
732 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType <<
" because # entries < 20 ";
737 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"q";
741 TH1F * qHisto_root = qHisto->
getTH1F();
742 if(qHisto_root ->GetEntries()>20){
745 LogTrace(
metname)<<
"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
752 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
757 LogTrace(
metname)<<
"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
762 int qtstatus = myQReportKolmo->
getStatus() ;
764 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
769 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