Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ChopHelp.cxx

Go to the documentation of this file.
00001 #include "ChopHelp.h"
00002 #include <TString.h>
00003 #include <iostream>
00004 
00005 ClassImp(ChopHelp)
00006 
00007 ChopHelp::ChopHelp() 
00008 : nchop(0),
00009   ncandidates(0),
00010   chopph(0),
00011   candph(0),
00012   nelements(0),
00013   matchmatrix(0),
00014   chopmatch(0),
00015   estpurity(0),
00016   estcompleteness(0)
00017 {
00018 }
00019 
00020 ChopHelp::ChopHelp(Int_t chops, Int_t cands) 
00021 : nchop(chops),
00022   ncandidates(cands),
00023   chopph(new Float_t[nchop]),
00024   candph(new Float_t[ncandidates]),
00025   nelements(nchop*ncandidates),
00026   matchmatrix(new Float_t[nelements]),
00027   chopmatch(new Float_t[ncandidates]),
00028   estpurity(new Float_t[ncandidates]),
00029   estcompleteness(new Float_t[ncandidates])
00030 {
00031 }
00032 
00033 ChopHelp::~ChopHelp()
00034 {
00035   if(chopph) delete [] chopph;
00036   if(candph) delete [] candph;
00037   if(matchmatrix) delete [] matchmatrix;
00038   if(chopmatch) delete [] chopmatch;
00039   if(estpurity) delete [] estpurity;
00040   if(estcompleteness) delete [] estcompleteness;
00041 }
00042 
00043 void ChopHelp::Print(const Option_t*) const
00044 {
00045   std::cout << "ChopHelp" << std::endl;
00046   std::cout << "nchop: " << nchop << std::endl;
00047   std::cout << "ncand: " << ncandidates << std::endl;
00048   for(int i=0; i<ncandidates; i++) {
00049     for(int j=0;j<nchop;j++) {
00050       std::cout << Form("%8.1f ",matchmatrix[i*nchop + j]);
00051     }  
00052     std::cout << Form("| %8.1f ",candph[i]);
00053     std::cout << Form("pur %4.2f ",estpurity[i]);
00054     std::cout << Form("com %4.2f ",estcompleteness[i]);
00055       std::cout << std::endl;
00056   }
00057   
00058   for(int j=0;j<nchop;j++)  std::cout << "----------" ;
00059   std::cout << std::endl;
00060   for(int j=0;j<nchop;j++) {
00061     std::cout << Form("%8.1f ",chopph[j]);
00062   }  
00063   std::cout << std::endl;
00064 }

Generated on Mon Feb 15 11:06:31 2010 for loon by  doxygen 1.3.9.1