#include <SFEffSetOfHistograms.h>
Inheritance diagram for SFEffSetOfHistograms:
Like a SetOfHistograms, a SFEffSetOfHistograms 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 automatically.
Three histos are booked, one using BaseCut object cut1, one using cut2, the third will be an efficiency derived by dividing histo2 by histo1.
Author: Benno List, Jenny Böhme
Changelog:
Definition at line 39 of file SFEffSetOfHistograms.h.
Public Member Functions | |
SFEffSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut0_, const BaseCutPoR &cut1_, const BaseCutPoR &cut2_, const FloatFunPoR &wfun_, const FillIteratorPoR &iter_=0, Option_t *div_option_=0) | |
Constructor for a set of histograms with equidistant axis binning. | |
SFEffSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut0_, const BaseCutPoR &cut1_, const BaseCutPoR &cut2_, const FloatFunPoR &wfun_, const FillIteratorPoR &iter_=0, Option_t *div_option_=0) | |
Constructor for a set of histograms with non-equidistant axis binning, taking doubles. | |
SFEffSetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut0_, const BaseCutPoR &cut1_, const BaseCutPoR &cut2_, const FloatFunPoR &wfun_, const FillIteratorPoR &iter_=0, Option_t *div_option_=0) | |
Constructor for a set of histograms with non-equidistant axis binning, taking floats. | |
SFEffSetOfHistograms (const char *name_, const char *title_, const Binning &axisbinning, const ROListPoR &hhl, const FloatFunPoR &xfun_, const BaseCutPoR &cut0_, const BaseCutPoR &cut1_, const BaseCutPoR &cut2_, const FloatFunPoR &wfun_, const FillIteratorPoR &iter_=0, Option_t *div_option_=0) | |
Constructor taking a Binning object. | |
virtual | ~SFEffSetOfHistograms () |
Virtual destructor. | |
virtual void | Draw (TPad *pad, TVirtualPS *ps=0, Option_t *option=0, bool across=true, Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0, bool log=false) |
Draws all histograms (if they are derived from TH1). | |
virtual void | Draw (TPad *pad, TVirtualPS *ps, Option_t *option, bool across, Int_t nx, Int_t ny, bool log) |
Draws all histograms (if they are derived from TH1). | |
virtual void | Draw (Option_t *option=0) |
Draws the efficiency histo onto an existing pad. | |
virtual void | Fill () |
The Self-filler method. | |
virtual void | Divide () |
Divides histo 2 by histo 1 to get an efficiency histo 3. | |
Protected Member Functions | |
void | checkIterators (const char *name) |
Protected Attributes | |
FloatFun * | xfun |
Function object defining abscissa (what to plot). | |
BaseCut * | cut0 |
optional Function object defining a cut for histo 1 (0 means: no cut) | |
BaseCut * | cut1 |
optional Function object defining a cut for histo 1 (0 means: no cut) | |
BaseCut * | cut2 |
optional Function object defining a cut for histo 1 (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 | |
char * | div_option |
An option. "B" means binomial errors. | |
Private Member Functions | |
SFEffSetOfHistograms (const SFEffSetOfHistograms &source) | |
Private copy constructor, left unimplemented: No copying! | |
SFEffSetOfHistograms & | operator= (const SFEffSetOfHistograms &source) |
Private assignment operator, left unimplemented: No assignment! | |
void | copy_option (Option_t *div_option_) |
Copies option string. |
|
Constructor for a set of histograms with equidistant axis binning.
Definition at line 69 of file SFEffSetOfHistograms.C. References copy_option(). |
|
Constructor for a set of histograms with non-equidistant axis binning, taking doubles.
Definition at line 90 of file SFEffSetOfHistograms.C. References copy_option(). |
|
Constructor for a set of histograms with non-equidistant axis binning, taking floats.
Definition at line 110 of file SFEffSetOfHistograms.C. References copy_option(). |
|
Constructor taking a Binning object.
Definition at line 130 of file SFEffSetOfHistograms.C. References copy_option(). |
|
Draws all histograms (if they are derived from TH1).
Definition at line 177 of file SFEffSetOfHistograms.C. Referenced by Draw(). |
|
Draws all histograms (if they are derived from TH1).
Definition at line 196 of file SFEffSetOfHistograms.C. References Draw(). |
|
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 154 of file SFEffSetOfHistograms.C. References cut0, cut1, cut2, ROList::getEntry(), iter, FillIterator::next(), FillIterator::reset(), wfun, and xfun. |