BCH2D Class Reference

#include <BCH2D.h>

List of all members.


Detailed Description

A class for handling 2D distributions.

Author:
Daniel Kollar

Kevin Kröninger

Version:
1.0
Date:
08.2008 This class contains a TH2D histogram and some additional functions. It is used for marginalized distributions.

Definition at line 32 of file BCH2D.h.


Public Member Functions

Constructors and destructors


 BCH2D ()
 ~BCH2D ()
Member functions (miscellaneous methods)


void CalculateIntegratedHistogram ()
void Draw (int options=0)
TGraph * GetBandGraph (TH2D *h, double level1, double level2)
TGraph ** GetBandGraphs (TH2D *h, int &n)
TGraph ** GetBandGraphs (TH2D *h)
double GetLevel (double p)
std::vector< double > GetLevelBoundary (TH2D *h, double level)
TGraph * GetLowestBandGraph (TH2D *h)
TGraph * GetLowestBandGraph (TH2D *h, std::vector< int > nint)
std::vector< int > GetNIntervalsY (TH2D *h, int &nfoundmax)
void Print (const char *filename, int options=0, int ww=0, int wh=0)
Member functions (get)


TH2D * GetHistogram ()
void GetMean (double &mean)
void GetMode (double &mode)
Member functions (set)


void SetGlobalMode (double mode[2])
void SetHistogram (TH2D *hist)

Private Attributes

TH2D * fHistogram
TH1D * fIntegratedHistogram
double fMode [2]
int fModeFlag

Constructor & Destructor Documentation

BCH2D::BCH2D (  ) 

The default constructor.

Definition at line 20 of file BCH2D.cxx.

BCH2D::~BCH2D (  ) 

The default destructor.

Definition at line 31 of file BCH2D.cxx.


Member Function Documentation

void BCH2D::CalculateIntegratedHistogram (  ) 

Definition at line 345 of file BCH2D.cxx.

void BCH2D::Draw ( int  options = 0  ) 

Draw 2-d distribution into the active canvas

Parameters:
options explanation to come

Definition at line 82 of file BCH2D.cxx.

TGraph * BCH2D::GetBandGraph ( TH2D *  h,
double  level1,
double  level2 
)

Definition at line 562 of file BCH2D.cxx.

TGraph ** BCH2D::GetBandGraphs ( TH2D *  h,
int &  n 
)

Definition at line 404 of file BCH2D.cxx.

TGraph** BCH2D::GetBandGraphs ( TH2D *  h  ) 

TH2D* BCH2D::GetHistogram (  )  [inline]

Returns:
The 2D histogram.

Definition at line 58 of file BCH2D.h.

double BCH2D::GetLevel ( double  p  ) 

Definition at line 382 of file BCH2D.cxx.

std::vector< double > BCH2D::GetLevelBoundary ( TH2D *  h,
double  level 
)

Definition at line 535 of file BCH2D.cxx.

TGraph * BCH2D::GetLowestBandGraph ( TH2D *  h  ) 

Definition at line 483 of file BCH2D.cxx.

TGraph * BCH2D::GetLowestBandGraph ( TH2D *  h,
std::vector< int >  nint 
)

Definition at line 491 of file BCH2D.cxx.

void BCH2D::GetMean ( double &  mean  ) 

Returns:
The mean of the distribution.

void BCH2D::GetMode ( double &  mode  ) 

Returns:
The mode of the distribution

Definition at line 43 of file BCH2D.cxx.

std::vector< int > BCH2D::GetNIntervalsY ( TH2D *  h,
int &  nfoundmax 
)

Returns the number of intervals as a function of x

Parameters:
h The histogram.
nfoundmax The maximum number of intervals.
Returns:
A vector containing the number of intervals for all bins in x.

Definition at line 445 of file BCH2D.cxx.

void BCH2D::Print ( const char *  filename,
int  options = 0,
int  ww = 0,
int  wh = 0 
)

Print 2-d histogram to file

Parameters:
filename The filename
ww canvas size in pixels along X
ww canvas size in pixels along Y If ww and wh are set to 0, default ROOT canvas size is used. For explanation of the parameter options see the Draw() method.

Definition at line 60 of file BCH2D.cxx.

void BCH2D::SetGlobalMode ( double  mode[2]  )  [inline]

Set global mode.

Parameters:
The global mode.

Definition at line 86 of file BCH2D.h.

void BCH2D::SetHistogram ( TH2D *  hist  )  [inline]

Set the 2D histogram.

Definition at line 79 of file BCH2D.h.


Member Data Documentation

TH2D* BCH2D::fHistogram [private]

The 2D histogram

Definition at line 153 of file BCH2D.h.

TH1D* BCH2D::fIntegratedHistogram [private]

The integrated 2D histogram

Definition at line 158 of file BCH2D.h.

double BCH2D::fMode[2] [private]

Global mode

Definition at line 163 of file BCH2D.h.

int BCH2D::fModeFlag [private]

"Is there a global mode?" flag

Definition at line 168 of file BCH2D.h.


Generated on Mon Sep 15 17:04:29 2008 for Bayesian Analysis Toolkit by  doxygen 1.5.6