HitProbTable Class Reference

#include <HitProbTable.h>

List of all members.

Public Member Functions

 HitProbTable ()
virtual ~HitProbTable ()
 ClassDef (HitProbTable, 1)
Double_t LogL (Int_t i, Int_t j)
void FillTable (Int_t i, Int_t j, Double_t val)
Double_t GetSigcorscale ()
void SetSigcorscale (Double_t val)
virtual TH2D * LogLTable ()
virtual void Draw (Option_t *option="")

Private Attributes

Double_t _sigcorscale
Double_t _pvals [NBINS][NBINS]

Static Private Attributes

static const Int_t NBINS = 440

Detailed Description

Definition at line 6 of file HitProbTable.h.


Constructor & Destructor Documentation

HitProbTable::HitProbTable (  ) 

Definition at line 7 of file HitProbTable.cxx.

00007                            : 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 }

virtual HitProbTable::~HitProbTable (  )  [inline, virtual]

Definition at line 12 of file HitProbTable.h.

00012 {}


Member Function Documentation

HitProbTable::ClassDef ( HitProbTable  ,
 
)
void HitProbTable::Draw ( Option_t *  option = ""  )  [virtual]

Definition at line 42 of file HitProbTable.cxx.

References LogLTable().

00042                                         {
00043   
00044   LogLTable()->Draw(option);
00045   
00046 }

void HitProbTable::FillTable ( Int_t  i,
Int_t  j,
Double_t  val 
) [inline]

Definition at line 17 of file HitProbTable.h.

References _pvals.

00017 { _pvals[i][j] = val; }

Double_t HitProbTable::GetSigcorscale (  )  [inline]

Definition at line 19 of file HitProbTable.h.

References _sigcorscale.

Referenced by LogLTable().

00019 { return _sigcorscale; }

Double_t HitProbTable::LogL ( Int_t  i,
Int_t  j 
)

Definition at line 17 of file HitProbTable.cxx.

References _pvals, and NBINS.

Referenced by MCNNRunner::CompareEventsBody(), and LogLTable().

00017                                             {
00018 
00019   if (i<NBINS && j<NBINS && i>=0 && j>=0) {
00020     return _pvals[i][j];
00021   }
00022   else {
00023     // busted!
00024     return -200.0;
00025   }
00026 }

TH2D * HitProbTable::LogLTable (  )  [virtual]

Definition at line 28 of file HitProbTable.cxx.

References GetSigcorscale(), LogL(), and NBINS.

Referenced by Draw().

00028                               {
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 }

void HitProbTable::SetSigcorscale ( Double_t  val  )  [inline]

Definition at line 20 of file HitProbTable.h.

References _sigcorscale.

00020 { _sigcorscale = val; }


Member Data Documentation

Double_t HitProbTable::_pvals[NBINS][NBINS] [private]

Definition at line 29 of file HitProbTable.h.

Referenced by FillTable(), and LogL().

Double_t HitProbTable::_sigcorscale [private]

Definition at line 27 of file HitProbTable.h.

Referenced by GetSigcorscale(), and SetSigcorscale().

const Int_t HitProbTable::NBINS = 440 [static, private]

Definition at line 28 of file HitProbTable.h.

Referenced by LogL(), and LogLTable().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1