475 string path =
"Muons/MuonRecoAnalyzer/" + muonType +
"chi2OverDf";
479 TH1F * chi2Histo_root = chi2Histo->
getTH1F();
480 if(chi2Histo_root->GetEntries()>20){
483 LogTrace(
metname)<<
"chi2 kin test based on fraction for "<<muonType<<endl;
484 int maxBin = chi2Histo_root->GetMaximumBin();
485 if(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX())!=0){
486 double fraction = double(chi2Histo_root->Integral(1,maxBin))/
double(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX()));
495 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
501 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
505 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
510 int qtstatus = myQReportKolmo->
getStatus() ;
511 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
517 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType <<
" because # entries < 20 ";
524 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
528 TH1F * etaHisto_root = etaHisto->
getTH1F();
529 if (etaHisto_root ->GetEntries()>20){
532 LogTrace(
metname)<<
"eta kin test based on fraction for "<<muonType<<endl;
533 double binSize = (etaHisto_root->GetXaxis()->GetXmax()-etaHisto_root->GetXaxis()->GetXmin())/etaHisto_root->GetNbinsX();
534 int binZero =
int((0-etaHisto_root->GetXaxis()->GetXmin())/binSize);
535 if(etaHisto_root->Integral(1,binZero-1)!=0 && etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())!=0){
536 double symmetryFactor =
537 double(etaHisto_root->Integral(1,binZero-1)) /
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX()));
538 double errSymmetryFactor =
539 symmetryFactor*
sqrt(1.0/
double(etaHisto_root->Integral(1,binZero-1)) + 1.0/
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())));
541 LogTrace(
metname)<<
"eta errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
544 else tParameter=double(-symmetryFactor+
etaExpected)/errSymmetryFactor;
545 LogTrace(
metname)<<
"eta tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
553 LogTrace(
metname)<<
"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
559 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
564 LogTrace(
metname)<<
"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
569 int qtstatus = myQReportKolmo->
getStatus() ;
570 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
576 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType <<
" because # entries < 20 ";
583 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
587 TH1F * phiHisto_root = phiHisto->
getTH1F();
588 if(phiHisto_root ->GetEntries()>20){
591 LogTrace(
metname)<<
"phi kin test based on fraction for "<<muonType<<endl;
592 double binSize = (phiHisto_root->GetXaxis()->GetXmax()-phiHisto_root->GetXaxis()->GetXmin())/phiHisto_root->GetNbinsX();
593 int binZero =
int((0-phiHisto_root->GetXaxis()->GetXmin())/binSize);
594 if(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())!=0 && phiHisto_root->Integral(1,binZero)!=0){
595 double symmetryFactor =
596 double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) / double(phiHisto_root->Integral(1,binZero));
597 double errSymmetryFactor =
598 symmetryFactor*
sqrt(1.0/
double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) + 1.0/double(phiHisto_root->Integral(1,binZero)));
600 LogTrace(
metname)<<
"phi errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
603 else tParameter=double(-symmetryFactor+
phiExpected)/errSymmetryFactor;
604 LogTrace(
metname)<<
"phi tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
612 LogTrace(
metname)<<
"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
618 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
623 LogTrace(
metname)<<
"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
628 int qtstatus = myQReportKolmo->
getStatus() ;
629 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
635 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType <<
" because # entries < 20 ";
640 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"pt";
644 TH1F * ptHisto_root = ptHisto->
getTH1F();
645 if(ptHisto_root ->GetEntries()>20){
648 LogTrace(
metname)<<
"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
654 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
659 LogTrace(
metname)<<
"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
664 int qtstatus = myQReportKolmo->
getStatus() ;
665 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
670 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType <<
" because # entries < 20 ";
675 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"q";
679 TH1F * qHisto_root = qHisto->
getTH1F();
680 if(qHisto_root ->GetEntries()>20){
683 LogTrace(
metname)<<
"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
689 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
694 LogTrace(
metname)<<
"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
699 int qtstatus = myQReportKolmo->
getStatus() ;
700 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
705 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
MonitorElement * kinematicsSummaryMap
bin
set the eta bin as selection string.
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
float getQTresult() const
get test result i.e. prob value
MonitorElement * chi2TestSummaryMap