#include <SFSetOfHistograms.h>
Inheritance diagram for SFSetOfHistograms:
Like a SetOfHistograms, a SFSetOfHistograms 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 a BinningFun object that at the same time defines the number of histograms.
The histogram names will a concatenation of the name given by the user, and the bin name given by the BinningFun. The same applies to the title.
A SFSetOfHistograms is a self-filling set of histograms, NOT a set of self-filling histograms (which is a SFROList). This means that instead of calling a Fill() of each histogram, the SFSetOfHistograms object uses the BinningFun object to determine which of the histograms gets an entry, and then makes the entry in just that histogram.
A typical application of a SFSetOfHistograms is to generate a set of mass histograms depending on some kinematic quantity like t or W, to measure cross sections in different kinematic bins.
Using SFSetOfHistograms makes it unnecessary to define cut objects like "t between 0.05 and 0.1"
Author: Benno List, Jenny Böhme
Changelog:
Definition at line 61 of file SFSetOfHistograms.h.
Public Member Functions | |
SFSetOfHistograms (const char *name_, const char *title_, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning_, const FillIteratorPoR &iter_=0) | |
Constructor for a set of empty histograms. | |
SFSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning_, const FillIteratorPoR &iter_=0) | |
Constructor for a set of histograms with equidistant axis binning. | |
SFSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning_, const FillIteratorPoR &iter_=0) | |
Constructor for a set of histograms with non-equidistant axis binning, taking doubles. | |
SFSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning_, const FillIteratorPoR &iter_=0) | |
Constructor for a set of histograms with non-equidistant axis binning, taking floats. | |
SFSetOfHistograms (const char *name_, const char *title_, const Binning &axisbinning, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut_, const FloatFunPoR &wfun_, const BinningFunPoR &binning_, const FillIteratorPoR &iter_=0) | |
Constructor taking a Binning object. | |
virtual | ~SFSetOfHistograms () |
Virtual destructor. | |
virtual void | Fill () |
The Self-filler method. | |
FloatFun * | getXFun () const |
Returns a pointer to the abscissa 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) |
Checks consistency of iterator of function object with FillIterator. | |
Protected Attributes | |
FloatFun * | xfun |
Function object defining abscissa (what to plot). | |
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 | |
SFSetOfHistograms (const SFSetOfHistograms &source) | |
Private copy constructor, left unimplemented: No copying! | |
SFSetOfHistograms & | operator= (const SFSetOfHistograms &source) |
Private assignment operator, left unimplemented: No assignment! |
|
Constructor for a set of empty histograms.
Definition at line 33 of file SFSetOfHistograms.C. References checkIterators(). |
|
Constructor for a set of histograms with equidistant axis binning.
Definition at line 47 of file SFSetOfHistograms.C. References checkIterators(). |
|
Constructor for a set of histograms with non-equidistant axis binning, taking doubles.
Definition at line 64 of file SFSetOfHistograms.C. References checkIterators(). |
|
Constructor for a set of histograms with non-equidistant axis binning, taking floats.
Definition at line 80 of file SFSetOfHistograms.C. References checkIterators(). |
|
Constructor taking a Binning object.
Definition at line 96 of file SFSetOfHistograms.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 BinningFun object to see into which histogram to make an entry, then evaluates the xfun object to get the abscissa and the wfun object to obtain the weight. Optionally, the iter object serves as iterator. Implements SFO. Definition at line 114 of file SFSetOfHistograms.C. References cut, SetOfH::getBinning(), ROList::getEntry(), BinningFun::isExclusive(), iter, FillIterator::next(), FillIterator::reset(), wfun, and xfun. |
|
Checks consistency of iterators.
Definition at line 216 of file SFSetOfHistograms.C. References checkOneIterator(), checkTwoIterators(), cut, SetOfH::getBinning(), wfun, and xfun. Referenced by SFSetOfHistograms(). |
|
Checks consistency of iterators of two function objects.
Definition at line 172 of file SFSetOfHistograms.C. Referenced by checkIterators(). |
|
Checks consistency of iterator of function object with FillIterator.
Definition at line 186 of file SFSetOfHistograms.C. References NamedO::getName(), and iter. Referenced by checkIterators(). |