MinosCompactResult Class Reference

#include <MinosCompactResult.h>

List of all members.

Public Member Functions

 MinosCompactResult (const MinosAnalysisResult *result)
 ~MinosCompactResult ()
void Calculate ()

Public Attributes

std::vector< ComparisonResult * > _resultVec
float f100
float f50
float wf50
float f20
float wf20
float f10
float e20all
float y20all
float f20all
float e20
float y100
float y50
float y20
float y10
float q100
float q50
float q20
float q10
float n80pc
float q80pc
float y80pc
float f80pc

Detailed Description

Definition at line 8 of file MinosCompactResult.h.


Constructor & Destructor Documentation

MinosCompactResult::MinosCompactResult ( const MinosAnalysisResult result  ) 

Definition at line 8 of file MinosCompactResult.cxx.

References _resultVec, Calculate(), and MinosAnalysisResult::ResultList.

00009 {
00010 
00011   const int nresults = (int)(result->ResultList->GetEntries());
00012   for(int ires = 0; ires< nresults; ires++){
00013     ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00014     ComparisonResult* clonedResult = new ComparisonResult(cResult);
00015     _resultVec.push_back(clonedResult);
00016   }
00017 
00018   Calculate();
00019 
00020   return;
00021 
00022 }

MinosCompactResult::~MinosCompactResult (  ) 

Definition at line 130 of file MinosCompactResult.cxx.

References _resultVec.

00130                                        {
00131 
00132   _resultVec.clear();
00133   
00134 }


Member Function Documentation

void MinosCompactResult::Calculate (  ) 

Definition at line 24 of file MinosCompactResult.cxx.

References _resultVec, count, e20, e20all, ComparisonResult::eNu, f10, f100, f20, f20all, f50, f80pc, ComparisonResult::fractionQMatched, ComparisonResult::idact, n80pc, q10, q100, q20, q50, q80pc, wf20, wf50, ComparisonResult::y, y10, y100, y20, y20all, y50, and y80pc.

Referenced by MinosCompactResult().

00024                                   {
00025   int nresults = _resultVec.size();
00026 
00027   n80pc = 0;
00028   float n80count = 0;
00029   float y80pc=0.;
00030   float q80pc=0.;
00031   for(int ires = 0; ires<nresults; ires++){
00032     const ComparisonResult* cResult = _resultVec[ires];
00033     if(cResult->fractionQMatched>0.8){
00034       n80count+=1.;
00035       if(cResult->idact==1){
00036         n80pc++;
00037         y80pc+=cResult->y;
00038         q80pc+=cResult->fractionQMatched;
00039       }
00040     }
00041   }
00042   if(n80count>0){
00043     y80pc = y80pc/n80count;
00044     q80pc = q80pc/n80count;
00045     f80pc = n80pc/n80count;
00046   }
00047 
00048 
00049   
00050   for(int i=0; i<4;i++){
00051     int   count=0;
00052     float wcount=0.;
00053     float wcountcc=0.;
00054     int   countall=0;
00055     float yall = 0.;
00056     float eall = 0.;
00057     float ymean =0.;
00058     float qmean =0.;
00059     float emean =0.;
00060     int nbest =10;
00061     if(i==1)nbest=20;
00062     if(i==2)nbest=50;
00063     if(i==3)nbest=100;
00064     if(nbest>nresults)nbest=nresults;
00065     for(int ires = 0; ires<nbest; ires++){
00066       const ComparisonResult* cResult = _resultVec[ires];
00067       if(cResult->idact==0)wcount=wcount+1.0; 
00068       float wgt = 0;
00069       if(cResult->idact==1){
00070         countall++;
00071         yall +=cResult->y;
00072         eall +=cResult->eNu;
00073         float sinLE = 0.;
00074         if(cResult->eNu>0)sinLE = sin(1.27*0.0025*735.0/cResult->eNu);
00075         wgt      = 0.5*sinLE*sinLE;
00076         wcount   += wgt;
00077       }
00078       if(cResult->idact==1&&cResult->y<0.5){
00079         count++;
00080         ymean+=cResult->y;
00081         emean+=cResult->eNu;
00082         qmean+=cResult->fractionQMatched;
00083         wcountcc += wgt;
00084       }
00085     }
00086     if(count>0){
00087       ymean = ymean/count;
00088       qmean = qmean/count;
00089       emean = emean/count;
00090       eall  = eall/countall;
00091       yall  = yall/countall;
00092     }
00093     if(i==0){
00094       f10 = count/(float)nbest;
00095       y10 = ymean;
00096       q10 = qmean;
00097     }
00098     if(i==1){
00099       f20 = count/(float)nbest;
00100       f20all = countall/(float)nbest;
00101       y20 = ymean;
00102       q20 = qmean;
00103       e20 = emean;
00104       e20all = eall;
00105       y20all = yall;
00106       wf20 = 0;
00107       if(wcount>0)wf20 = wcountcc/wcount;
00108     }
00109     if(i==2){
00110       f50 = count/(float)nbest;
00111       y50 = ymean;
00112       q50 = qmean;
00113       wf50 = 0.;
00114       if(wcount>0)wf50=wcountcc/wcount;
00115     }
00116     if(i==3){
00117       f100 = count/(float)nbest;
00118       y100 = ymean;
00119       q100 = qmean;
00120     }    
00121   }
00122 
00123   return;
00124 }


Member Data Documentation

Definition at line 17 of file MinosCompactResult.h.

Referenced by Calculate(), MinosCompactResult(), and ~MinosCompactResult().

Definition at line 28 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 25 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 23 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 18 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 21 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 27 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 19 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 42 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 39 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 37 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 34 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 36 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 35 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 40 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 22 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 20 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 32 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 29 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 31 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 26 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 30 of file MinosCompactResult.h.

Referenced by Calculate().

Definition at line 41 of file MinosCompactResult.h.

Referenced by Calculate().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1