MarlinTPC
1.2.0
|
A template to create processors wich create 1D or 2D distribution histograms, one histogram per z bin. More...
#include <ZBinTemplateProcessor.h>
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;. | |
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:
ZBinTemplateProcessor.cc
in your .cc file: ZBinTemplateProcessor::init()
in your init function! This is needed because the AIDA histograms are registered here. The fillHistogram will throw and lcio::Exception
if ZBinTemplateProcessor::init() has not been called. MinZ | Minimum z value of lowest bin in case of z binning (default: 0) |
MaxZ | Maximum z value of highest bin in case of z binning (default: 260) |
nZBins | Number 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.
|
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.
|
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.
|
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().
|
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().
|
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().
|
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().