Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

MatrixOfHistograms Class Reference

#include <MatrixOfHistograms.h>

Inheritance diagram for MatrixOfHistograms:

Inheritance graph
[legend]
Collaboration diagram for MatrixOfHistograms:

Collaboration graph
[legend]
List of all members.

Detailed Description

A 2-dimensional collection of 1-dimensional histograms that have the same axis.

A MatrixOfHistograms contains a set of 1-dimensional TH1F histograms; these histograms are (normally) all created by the constructor. The histograms share the same axis binning, and their names and titles are created using two BinningFun objects that at the same time define the number of histograms.

The histogram names will a concatenation of the name given by the user, and the bin names given by the BinningFun objects. The same applies to the title.

A MatrixOfHistograms is a convenient tool to create a large set of histograms at the same time.

Functions exist to add, multiply, and divide sets of histograms. These operations are performed on pairs of corresponding histograms, if possible.

Author: Jenny Böhme, Benno List

Date
2005/11/26 13:51:01
Author
blist

Changelog:

Definition at line 63 of file MatrixOfHistograms.h.

Public Member Functions

 MatrixOfHistograms (const char *name_, const char *title_, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for an empty set of histograms.

 MatrixOfHistograms (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for a set of histograms with equidistant axis binning.

 MatrixOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

 MatrixOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for a set of histograms with non-equidistant axis binning, taking floats.

 MatrixOfHistograms (const char *name_, const char *title_, const Binning &axisbinning_, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for a set of histograms taking a Binning object.

 MatrixOfHistograms (const char *name_, const char *title_, TFile &file, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_)
 Constructor for a set of histograms to be read from a file.

virtual ~MatrixOfHistograms ()
 Virtual destructor.

RegH1FgetSummary (Option_t *option, const ROListPoR &rol)
 Returns a summary histogram.

SetOfHistogramsgetSummarySet (const char *name, const char *title, int idim, Option_t *option, const ROListPoR &rol, const Float_t *xbinmargins=0)
 Returns a set of summary histograms.

virtual SetOfHistogramsgetSet (const char *name, const char *title, int idim, const ROListPoR &rol, int lowbin=0, int highbin=0)
 Returns a histo set, where histos are summed over one dimension of the matrix.

RegH1FgetHisto (IndexType i, IndexType j)
virtual void initHisto (IndexType i, IndexType j)
 Books and registers one histogram with number i.


Private Member Functions

 MatrixOfHistograms (const MatrixOfHistograms &source)
 Private copy constructor, left unimplemented: No copying!

MatrixOfHistogramsoperator= (const MatrixOfHistograms &source)
 Private assignment, left unimplemented: No assignment!


Private Attributes

Binning axisbinning
 The axis binning.


Constructor & Destructor Documentation

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for an empty set of histograms.

Parameters:
name_  Common histogram name
title_  Common histogram title
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 31 of file MatrixOfHistograms.C.

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
Axis_t  xlow,
Axis_t  xup,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for a set of histograms with equidistant axis binning.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xlow  Lower edge (as for TH1F)
xup  Upper edge (as for TH1F)
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 40 of file MatrixOfHistograms.C.

References MatrixOfH::initHistos().

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Double_t *  xbins,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 54 of file MatrixOfHistograms.C.

References MatrixOfH::initHistos().

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Float_t *  xbins,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for a set of histograms with non-equidistant axis binning, taking floats.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 67 of file MatrixOfHistograms.C.

References MatrixOfH::initHistos().

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
const Binning &  axisbinning_,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for a set of histograms taking a Binning object.

Parameters:
name_  Common histogram name
title_  Common histogram title
axisbinning_  Defines the histogram binning
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 80 of file MatrixOfHistograms.C.

References MatrixOfH::initHistos().

MatrixOfHistograms::MatrixOfHistograms const char *  name_,
const char *  title_,
TFile &  file,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_
 

Constructor for a set of histograms to be read from a file.

Parameters:
name_  Common histogram name
title_  Common histogram title
file  An input root file
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms

Definition at line 92 of file MatrixOfHistograms.C.

References MatrixOfH::genBinName(), SetOfH::getBinning(), ROList::getEntries(), SetOfH::getName(), SetOfH::getTitle(), ROList::IndexType, ROListPoR::prol, and ROList::registerObject().


Member Function Documentation

RegH1F * MatrixOfHistograms::getSummary Option_t *  option,
const ROListPoR rol
 

Returns a summary histogram.

The histogram contains on the x-axis a bin number and has as contents the contents or the mean of the individula histograms

Parameters:
option  Option string Possible values:
  • 1: 1-dim summary histo (default)
  • 2: 2-dim histo
  • C: Contents (default) => number 9999
  • M: Mean => number 9998
rol  List where to register the summary histo

Definition at line 142 of file MatrixOfHistograms.C.

References SetOfH::getBinning(), RegH1F::getHistInfo(), getHisto(), SetOfH::getName(), SetOfH::getTitle(), and ROList::IndexType.

SetOfHistograms * MatrixOfHistograms::getSummarySet const char *  name,
const char *  title,
int  idim,
Option_t *  option,
const ROListPoR rol,
const Float_t *  xbinmargins = 0
 

Returns a set of summary histograms.

Each histogram contains on the x-axis a bin number and has as contents the contents or the mean of the individula histograms. One can summarize over the first or second dimension of the matrix.

Parameters:
name  Name of the summary histos
title  Title of the summary histos
idim  Dimension to use for the set (1 or 2)
option  Option string Possible values:
  • 1: 1-dim summary histo (default)
  • 2: 2-dim histo
  • C: Contents (default) => number 9999
  • M: Mean => number 9998
rol  List where to register the summary set
xbinmargins  Set of x binmargins for summary histos

Definition at line 258 of file MatrixOfHistograms.C.

References SetOfH::getBinning(), RegH1F::getHistInfo(), getHisto(), SetOfHistograms::getHisto(), and ROList::IndexType.

SetOfHistograms * MatrixOfHistograms::getSet const char *  name,
const char *  title,
int  idim,
const ROListPoR rol,
int  lowbin = 0,
int  highbin = 0
[virtual]
 

Returns a histo set, where histos are summed over one dimension of the matrix.

Parameters:
name  Name for the summary histos
title  Title for the summary histos
idim  Dimension over which to sum (1 or 2)
rol  List where to register the summary set
lowbin  Optional number of lowest bin to sum
highbin  Optional number of highest bin to sum

Definition at line 207 of file MatrixOfHistograms.C.

References SetOfH::genBinName(), SetOfH::genBinTitle(), SetOfH::getBinning(), getHisto(), and ROList::IndexType.

RegH1F * MatrixOfHistograms::getHisto IndexType  i,
IndexType  j
 

Returns a pointer to the histogram corresponding to bin i of the 1st and bin j of the 2nd binning

Parameters:
i  Bin number of 1st binning
j  Bin number of 2nd binning

Reimplemented from MatrixOfH.

Definition at line 137 of file MatrixOfHistograms.C.

References MatrixOfH::getBinNumber(), and ROList::getEntry().

Referenced by getSet(), getSummary(), and getSummarySet().

void MatrixOfHistograms::initHisto IndexType  i,
IndexType  j
[virtual]
 

Books and registers one histogram with number i.

Parameters:
i  Bin of 1st dimension
j  Bin of 2nd dimension

Implements MatrixOfH.

Definition at line 123 of file MatrixOfHistograms.C.

References axisbinning, MatrixOfH::genBinName(), MatrixOfH::genBinTitle(), MatrixOfH::getBinNumber(), and ROList::registerObject().


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 12:54:51 2006 for SFH by doxygen 1.3.2