Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

SFEffSetOfHistograms Class Reference

#include <SFEffSetOfHistograms.h>

Inheritance diagram for SFEffSetOfHistograms:

Inheritance graph
[legend]
Collaboration diagram for SFEffSetOfHistograms:

Collaboration graph
[legend]
List of all members.

Detailed Description

A self-filling collection of 1-D histos with the same axis for efficiency calculation.

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

Date
2004/07/15 00:07:02
Author
blist

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

FloatFunxfun
 Function object defining abscissa (what to plot).

BaseCutcut0
 optional Function object defining a cut for histo 1 (0 means: no cut)

BaseCutcut1
 optional Function object defining a cut for histo 1 (0 means: no cut)

BaseCutcut2
 optional Function object defining a cut for histo 1 (0 means: no cut)

FloatFunwfun
 optional Function object defining weight (0 means: weight 1)

FillIteratoriter
 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!

SFEffSetOfHistogramsoperator= (const SFEffSetOfHistograms &source)
 Private assignment operator, left unimplemented: No assignment!

void copy_option (Option_t *div_option_)
 Copies option string.


Constructor & Destructor Documentation

SFEffSetOfHistograms::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.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xlow  Lower edge (as for TH1F)
xup  Upper edge (as for TH1F)
hhl  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot)
cut0_  optional Function object defining a cut for both histos (0 means: no cut)
cut1_  optional Function object defining a cut for histo 1 (0 means: no cut)
cut2_  optional Function object defining a cut for histo 2 (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
iter_  optional Iterator object for more than 1 entry per Fill() call
div_option_  An option. "B" means binomial errors

Definition at line 69 of file SFEffSetOfHistograms.C.

References copy_option().

SFEffSetOfHistograms::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.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
hhl  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot)
cut0_  optional Function object defining a cut for both histos (0 means: no cut)
cut1_  optional Function object defining a cut for histo 1 (0 means: no cut)
cut2_  optional Function object defining a cut for histo 2 (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
iter_  optional Iterator object for more than 1 entry per Fill() call
div_option_  An option. "B" means binomial errors

Definition at line 90 of file SFEffSetOfHistograms.C.

References copy_option().

SFEffSetOfHistograms::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.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
hhl  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot)
cut0_  optional Function object defining a cut for both histos (0 means: no cut)
cut1_  optional Function object defining a cut for histo 1 (0 means: no cut)
cut2_  optional Function object defining a cut for histo 2 (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
iter_  optional Iterator object for more than 1 entry per Fill() call
div_option_  An option. "B" means binomial errors

Definition at line 110 of file SFEffSetOfHistograms.C.

References copy_option().

SFEffSetOfHistograms::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.

Parameters:
name_  Common histogram name
title_  Common histogram title
axisbinning  Defines the histogram binning
hhl  ROList object where "this" will be registered
xfun_  Function object defining abscissa (what to plot)
cut0_  optional Function object defining a cut for both histos (0 means: no cut)
cut1_  optional Function object defining a cut for histo 1 (0 means: no cut)
cut2_  optional Function object defining a cut for histo 2 (0 means: no cut)
wfun_  optional Function object defining weight (0 means: weight 1)
iter_  optional Iterator object for more than 1 entry per Fill() call
div_option_  An option. "B" means binomial errors

Definition at line 130 of file SFEffSetOfHistograms.C.

References copy_option().


Member Function Documentation

void SFEffSetOfHistograms::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
[virtual]
 

Draws all histograms (if they are derived from TH1).

  • pad is usually a TCanvas object and MUST be provided,
  • ps is usually a TPostscript object
  • option is an option string like "HE0"
  • across determines whether the histograms are arranged left-to-right (across=true) or top-to-bottom on the page
  • nx, ny are the number of histos in horizontal (nx) and vertical (ny) direction on a page
  • xmargin, ymargin are the corresponding values used by TPad::Divide.
  • color is passed to TPad::Divide.
  • log determines whether the histos shall be plotted logarithmically.
Parameters:
pad  usually a TCanvas object and MUST be provided
ps  usually a TPostscript object
option  an option string like "HE0"
across  arrange histos left-to-right (true) or top-to-bottom
nx  passed to TPad::Divide.
ny  passed to TPad::Divide.
xmargin  passed to TPad::Divide.
ymargin  passed to TPad::Divide.
color  passed to TPad::Divide.
log  determines whether the histos shall be plotted logarithmically

Definition at line 177 of file SFEffSetOfHistograms.C.

Referenced by Draw().

void SFEffSetOfHistograms::Draw TPad *  pad,
TVirtualPS *  ps,
Option_t *  option,
bool  across,
Int_t  nx,
Int_t  ny,
bool  log
[virtual]
 

Draws all histograms (if they are derived from TH1).

Parameters:
pad  usually a TCanvas object and MUST be provided
ps  usually a TPostscript object
option  an option string like "HE0"
across  arrange histos left-to-right (true) or top-to-bottom
nx  passed to TPad::Divide.
ny  passed to TPad::Divide.
log  determines whether the histos shall be plotted logarithmically

Definition at line 196 of file SFEffSetOfHistograms.C.

References Draw().

void SFEffSetOfHistograms::Fill  )  [virtual]
 

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.


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 12:55:10 2006 for SFH by doxygen 1.3.2