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

HitProbTable.cxx

Go to the documentation of this file.
00001 #include <iostream>
00002 #include "MCNNAnalysis/HitProbTable.h"
00003 
00004 ClassImp(HitProbTable)
00005 
00006 
00007 HitProbTable::HitProbTable() : TObject() {
00008 
00009   for (Int_t i = 0; i < NBINS; i++) {
00010     for (Int_t j = 0; j < NBINS; j++) {
00011       _pvals[i][j] = 0;
00012     }
00013   }
00014 }
00015 
00016 
00017 Double_t HitProbTable::LogL(Int_t i, Int_t j) {
00018 
00019   if (i<NBINS&&j<NBINS) {
00020     return _pvals[i][j];
00021   }
00022   else {
00023     // busted!
00024     return -200.0;
00025   }
00026 }
00027 
00028 TH2D* HitProbTable::LogLTable() {
00029 
00030   Double_t ss = GetSigcorscale();
00031   Double_t p;
00032   TH2D* LLT = new TH2D("LLT","Table of Log Likelihoods",NBINS,0,NBINS*ss,NBINS,0,NBINS*ss);
00033   for (Int_t i = 1; i <= NBINS; i++) {
00034     for (Int_t j = 1; j <= NBINS; j++) {
00035       p = LogL(i-1,j-1);
00036       LLT->SetBinContent(i,j,p);
00037     }
00038   }
00039   return LLT;
00040 }
00041 
00042 void HitProbTable::Draw(Option_t* option) {
00043   
00044   LogLTable()->Draw(option);
00045   
00046 }

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