ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/UHHAnalysis/SFrameTools/src/HypothesisStatistics.cxx
Revision: 1.2
Committed: Thu Nov 1 17:29:17 2012 UTC (12 years, 6 months ago) by peiffer
Content type: text/plain
Branch: MAIN
CVS Tags: Makefile, v1-00, Feb-15-2013-v1, Feb-14-2013, Feb-07-2013-v1, Jan-17-2013-v2, Jan-17-2013-v1, Jan-16-2012-v1, Jan-09-2012-v2, Jan-09-2012-v1, Dec-26-2012-v1, Dec-20-2012-v1, Dec-17-2012-v1, Nov-30-2012-v2, Nov-30-2012-v1, HEAD
Changes since 1.1: +1 -1 lines
Log Message:
some fixes

File Contents

# User Rev Content
1 peiffer 1.1 #include "include/HypothesisStatistics.h"
2    
3     HypothesisStatistics::HypothesisStatistics(std::string name):
4     m_logger ( name.c_str() ){
5    
6     Reset();
7    
8     }
9    
10     void HypothesisStatistics::Reset(){
11     m_ntotal=0;
12     m_identical=0;
13     m_toplep_identical=0;
14     m_tophad_identical=0;
15     }
16    
17    
18     void HypothesisStatistics::FillHyps(ReconstructionHypothesis *hyp1, ReconstructionHypothesis *hyp2){
19    
20     m_ntotal++;
21     if(hyp1==hyp2) m_identical++;
22     if(hyp1->toplep_v4() == hyp2->toplep_v4()) m_toplep_identical++;
23     if(hyp1->tophad_v4() == hyp2->tophad_v4()) m_tophad_identical++;
24    
25     }
26    
27     void HypothesisStatistics::PrintStatistics(){
28     m_logger << INFO << "-------------------------- Reconstruction Hypothesis Statistics -------------------------"<< SLogger::endmsg;
29     m_logger << INFO << "number of analysed events: " << m_ntotal << SLogger::endmsg;
30 peiffer 1.2 m_logger << INFO << "hypotheses are identical: " << 100.*(double)m_identical/((double)m_ntotal)<< "%" << SLogger::endmsg;
31 peiffer 1.1 m_logger << INFO << "leptonic tops are identical: " << 100.*(double)m_toplep_identical/((double)m_ntotal)<< "%" << SLogger::endmsg;
32     m_logger << INFO << "hadronic tops are identical: " << 100.*(double)m_tophad_identical/((double)m_ntotal)<< "%" << SLogger::endmsg;
33    
34     }