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;
502 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
506 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
511 int qtstatus = myQReportKolmo->
getStatus() ;
513 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
519 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType <<
" because # entries < 20 ";
526 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
530 TH1F * etaHisto_root = etaHisto->
getTH1F();
531 if (etaHisto_root ->GetEntries()>20){
534 LogTrace(
metname)<<
"eta kin test based on fraction for "<<muonType<<endl;
535 double binSize = (etaHisto_root->GetXaxis()->GetXmax()-etaHisto_root->GetXaxis()->GetXmin())/etaHisto_root->GetNbinsX();
536 int binZero = int((0-etaHisto_root->GetXaxis()->GetXmin())/binSize);
537 if(etaHisto_root->Integral(1,binZero-1)!=0 && etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())!=0){
538 double symmetryFactor =
539 double(etaHisto_root->Integral(1,binZero-1)) /
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX()));
540 double errSymmetryFactor =
541 symmetryFactor*
sqrt(1.0/
double(etaHisto_root->Integral(1,binZero-1)) + 1.0/
double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())));
543 LogTrace(
metname)<<
"eta errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
546 else tParameter=double(-symmetryFactor+
etaExpected)/errSymmetryFactor;
547 LogTrace(
metname)<<
"eta tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
555 LogTrace(
metname)<<
"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
562 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
567 LogTrace(
metname)<<
"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
572 int qtstatus = myQReportKolmo->
getStatus() ;
574 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
580 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType <<
" because # entries < 20 ";
587 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
591 TH1F * phiHisto_root = phiHisto->
getTH1F();
592 if(phiHisto_root ->GetEntries()>20){
595 LogTrace(
metname)<<
"phi kin test based on fraction for "<<muonType<<endl;
596 double binSize = (phiHisto_root->GetXaxis()->GetXmax()-phiHisto_root->GetXaxis()->GetXmin())/phiHisto_root->GetNbinsX();
597 int binZero = int((0-phiHisto_root->GetXaxis()->GetXmin())/binSize);
598 if(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())!=0 && phiHisto_root->Integral(1,binZero)!=0){
599 double symmetryFactor =
600 double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) / double(phiHisto_root->Integral(1,binZero));
601 double errSymmetryFactor =
602 symmetryFactor*
sqrt(1.0/
double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) + 1.0/double(phiHisto_root->Integral(1,binZero)));
604 LogTrace(
metname)<<
"phi errSymmetryFactor for "<<muonType<<
" : "<<errSymmetryFactor<<endl;
607 else tParameter=double(-symmetryFactor+
phiExpected)/errSymmetryFactor;
608 LogTrace(
metname)<<
"phi tParameter for "<<muonType<<
" : "<<tParameter<<
" (expected < 1.95)" <<endl;
616 LogTrace(
metname)<<
"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
623 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
628 LogTrace(
metname)<<
"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
633 int qtstatus = myQReportKolmo->
getStatus() ;
635 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
641 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType <<
" because # entries < 20 ";
646 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"pt";
650 TH1F * ptHisto_root = ptHisto->
getTH1F();
651 if(ptHisto_root ->GetEntries()>20){
654 LogTrace(
metname)<<
"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
661 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
666 LogTrace(
metname)<<
"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
671 int qtstatus = myQReportKolmo->
getStatus() ;
673 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
678 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType <<
" because # entries < 20 ";
683 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"q";
687 TH1F * qHisto_root = qHisto->
getTH1F();
688 if(qHisto_root ->GetEntries()>20){
691 LogTrace(
metname)<<
"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
698 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
703 LogTrace(
metname)<<
"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
708 int qtstatus = myQReportKolmo->
getStatus() ;
710 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
715 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
tuple path
else: Piece not in the list, fine.
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
TH1F * getTH1F(void) const
float getQTresult(void) const
get test result i.e. prob value
MonitorElement * chi2TestSummaryMap