MarlinTPC  1.2.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS > Class Template Reference

A template to create processors wich create 1D or 2D distribution histograms, one histogram per z bin. More...

#include <ZBinTemplateProcessor.h>

Inheritance diagram for marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >:

Classes

struct  HistoNBins2D
 A nested convenience struct which contains the number of bins for both directions of a 2D histogram. More...
 
struct  HistoRange
 A nested convenience struct which contains the minimal and maximal value of a (1D) histogram rage. More...
 
struct  HistoRange2D
 A nested convenience struct which contains two 1D HistoRange objects. More...
 

Public Member Functions

virtual Processor * newProcessor ()
 The newProcessor() function does not make sense for this template class, so it throws an lcio::Exception.
 
virtual void init ()
 Register the AIDA histograms at the AIDAProcessor.
 

Protected Member Functions

 ZBinTemplateProcessor (const std::string &typeName)
 
void fillHistogram (unsigned int histoIndex, float x, float z)
 Fill value x into the histogram set histoIndex. More...
 
void fillHistogram (unsigned int histoIndex, float x, float y, float z)
 Fill the x and y value pair into the 2D histogram set histoIndex. More...
 

Protected Attributes

std::vector< std::vector
< AIDA::IHistogram1D * > > 
_1DHistos
 Vector of 1D histogram vectors.
 
std::vector< std::vector
< AIDA::IHistogram2D * > > 
_2DHistos
 Vector of 2D histogram vectors.
 
std::vector< std::string > _histo1DBaseNames
 Vector of base names for the 1D histograms. More...
 
std::vector< std::string > _histo2DBaseNames
 Vector of base names for the 2D histograms. More...
 
std::vector< std::string > _histo1DTitles
 Vector of titles for the 1D histograms. More...
 
std::vector< std::string > _histo2DTitles
 Vector of titles for the 2D histograms. More...
 
std::vector< HistoRange_histoRanges1D
 Vector of ranges for the 1D histograms.
 
std::vector< HistoRange2D_histoRanges2D
 Vector of ranges for the 2D histograms.
 
std::vector< int > _nBins1D
 Vector with number of bins for the 1D histograms.
 
std::vector< HistoNBins2D_nBins2D
 Vector with number of bins for the 1D histograms.
 
float _minZ
 Minimum z value of lowest bin.
 
float _maxZ
 Maximum z value of highest bin.
 
int _nZBins
 Number of z bins.
 
float _zBinWidth
 Width of a bin, calculated as (_maxZ-_minZ)/_nZBins;.
 

Detailed Description

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
class marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >

A template to create processors wich create 1D or 2D distribution histograms, one histogram per z bin.

In addition one histogram is filled without any z cut.

Usage:

Parameters
MinZMinimum z value of lowest bin in case of z binning (default: 0)
MaxZMaximum z value of highest bin in case of z binning (default: 260)
nZBinsNumber ob bins in z (default: 10)
z binning switched of if 0, only the histogram without z cut is created

As an example you can use HitAndTrackCounterProcessor.

Author
Martin Killenberg, University of Bonn

Member Function Documentation

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
void marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::fillHistogram ( unsigned int  histoIndex,
float  x,
float  z 
)
inlineprotected

Fill value x into the histogram set histoIndex.

The correct z histogram is chosen according to the z value. In addition the histogram without z cut is filled. Throws an lcio::Exception in case the histograms have not been initialised.

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
void marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::fillHistogram ( unsigned int  histoIndex,
float  x,
float  y,
float  z 
)
inlineprotected

Fill the x and y value pair into the 2D histogram set histoIndex.

The correct z histogram is chosen according to the z value. In addition the histogram without z cut is filled. Throws an lcio::Exception in case the histograms have not been initialised.

Member Data Documentation

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
std::vector< std::string > marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::_histo1DBaseNames
protected

Vector of base names for the 1D histograms.

For the z-binned histograms an index is appended, the histogram without z-cut is left wothout index

Referenced by marlintpc::ZBinTemplateProcessor< N_1D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR, N_2D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR >::init().

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
std::vector< std::string > marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::_histo1DTitles
protected

Vector of titles for the 1D histograms.

For the z-binned histograms the z-range is appeded to the title.

Referenced by marlintpc::ZBinTemplateProcessor< N_1D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR, N_2D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR >::init().

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
std::vector< std::string > marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::_histo2DBaseNames
protected

Vector of base names for the 2D histograms.

For the z-binned histograms an index is appended, the histogram without z-cut is left wothout index

Referenced by marlintpc::ZBinTemplateProcessor< N_1D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR, N_2D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR >::init().

template<unsigned int N1DHISTOS, unsigned int N2DHISTOS>
std::vector< std::string > marlintpc::ZBinTemplateProcessor< N1DHISTOS, N2DHISTOS >::_histo2DTitles
protected

Vector of titles for the 2D histograms.

For the z-binned histograms the z-range is appeded to the title.

Referenced by marlintpc::ZBinTemplateProcessor< N_1D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR, N_2D_HISTOS_HIT_TRACK_COUNTER_PROCESSOR >::init().


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