#include <SFH2F.h>
Inheritance diagram for SFH2F:
A self-filling SFH2F object is a TH2F that registers itself in a ROList histogram list when it is created. It has a Fill(S) method that fills one or several entries into the histogram. It uses FloatFun and BaseCut objects to know what to fill, and possibly FillIterator objects in the case that several entries are to be made in one Fill() call.
Author: Jenny Böhme, Benno List
Changelog:
Definition at line 49 of file SFH2F.h.
Public Member Functions | |
SFH2F (const char *name, const char *title, Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Axis_t ylow, Axis_t yup, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor with equidistant x and y binnings. | |
SFH2F (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, Axis_t ylow, Axis_t yup, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor with non-equidistant x and equidistant y binnings. | |
SFH2F (const char *name, const char *title, Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, const Double_t *ybins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor with equidistant x and non-equidistant y binnings. | |
SFH2F (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor with non-equidistant x and y binnings taking doubles. | |
SFH2F (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Int_t nbinsy, const Float_t *ybins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor with non-equidistant x and y binnings taking floats. | |
SFH2F (const char *name, const char *title, const Binning &xbinning, const Binning &ybinning, const ROListPoR &hhl, const FloatFunPoR &xfun_, const FloatFunPoR &yfun_, const BaseCutPoR &cut_=0, const FloatFunPoR &wfun_=0, const FillIteratorPoR &iter_=0) | |
Constructor taking 2 Binning objects. | |
virtual void | Fill () |
The Self-filler method. | |
FloatFun * | getXFun () const |
Returns a pointer to the abscissa function object. | |
FloatFun * | getYFun () const |
Returns a pointer to the ordinate function object. | |
BaseCut * | getCut () const |
Returns a pointer to the cut function object. | |
FloatFun * | getWFun () const |
Returns a pointer to the weight function object. | |
FillIterator * | getIter () const |
Returns a pointer to the iterator object. | |
Protected Member Functions | |
void | checkIterators (const char *name) |
Checks consistency of iterators. | |
template<class Fun1, class Fun2> void | checkTwoIterators (const char *name, const char *fun1name, Fun1 *fun1, const char *fun2name, Fun2 *fun2) |
Checks consistency of iterators of two function objects. | |
template<class Fun> void | checkOneIterator (const char *name, const char *funname, Fun *fun) |
Function object. | |
Protected Attributes | |
FloatFun * | xfun |
Function object defining abscissa (what to plot on x). | |
FloatFun * | yfun |
Function object defining ordinate (what to plot on y). | |
BaseCut * | cut |
optional Function object defining a cut (0 means: no cut) | |
FloatFun * | wfun |
optional Function object defining weight (0 means: weight 1) | |
FillIterator * | iter |
optional Iterator object for more than 1 entry per Fill() call | |
Private Member Functions | |
SFH2F (const SFH2F &source) | |
Private copy constructor, left unimplemented: No copying! | |
SFH2F & | operator= (const SFH2F &source) |
Private assignment operator, left unimplemented: No assignment! |
|
Constructor with equidistant x and y binnings.
Definition at line 36 of file SFH2F.C. References checkIterators(). |
|
Constructor with non-equidistant x and equidistant y binnings.
Definition at line 52 of file SFH2F.C. References checkIterators(). |
|
Constructor with equidistant x and non-equidistant y binnings.
Definition at line 68 of file SFH2F.C. References checkIterators(). |
|
Constructor with non-equidistant x and y binnings taking doubles.
Definition at line 84 of file SFH2F.C. References checkIterators(). |
|
Constructor with non-equidistant x and y binnings taking floats.
Definition at line 99 of file SFH2F.C. References checkIterators(). |
|
Constructor taking 2 Binning objects.
Definition at line 114 of file SFH2F.C. References checkIterators(). |
|
The Self-filler method. Fill() evaluates the cut object to see whether an event fulfills the cut defined by the cut object, then evaluates the xfun object to get the abscissa, yfun to obtain the ordinate, and the wfun object to obtain the weight. Optionally, the iter object serves as iterator. Implements SFO. Definition at line 133 of file SFH2F.C. References cut, iter, FillIterator::next(), FillIterator::reset(), wfun, xfun, and yfun. |
|
Checks consistency of iterators.
Definition at line 190 of file SFH2F.C. References checkOneIterator(), checkTwoIterators(), cut, wfun, xfun, and yfun. Referenced by SFH2F(). |
|
Checks consistency of iterators of two function objects. Function object 2
Definition at line 146 of file SFH2F.C. Referenced by checkIterators(). |
|
Function object.
Definition at line 160 of file SFH2F.C. References NamedO::getName(), and iter. Referenced by checkIterators(). |