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

CutFlow Class Reference

#include <CutFlow.h>

Inheritance diagram for CutFlow:

Inheritance graph
[legend]
Collaboration diagram for CutFlow:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class that returns the value of a cut depending on an iterator.

The purpose of a CutFlow object is to return the value of a cut whose number is given by an IntFun object (which will normally be a FillIterator). A CutFlow object will normally be used in conjuntion with a RangeIterator to generate a histogram that shows how the number of events evolves when different cuts are applied.

Here is an example how a CutFlow object can be used:

 enum{NCUTS = 3};
 const BaseCut *cutflow[NCUTS];
 const char *cuttitles[NCUTS];
 cutflow[0] = 0;
 cutflow[1] = &(ncentral == 4);
 cutflow[2] = &(*cutflow[1] && nnonvertex == 4);
 
 cuttitles[0] = "No cuts";
 cuttitles[1] = "4 central tracks";
 cuttitles[2] = "... and only 4 nonvertex tracks";
 
 BinningFun& cutflowbinning = *new CutBinning  (NCUTS, cutflow, cuttitles, "cut");
 FillIterator& cutiter = *new RangeIterator (0, NCUTS-1, "cutnumber");
 BaseCut& cutflowcut = *new CutFlow  (NCUTS, cutflow, cutiter, "cutflow");

 h_cutflow        = new SFH1F ("cutflow", "Cut Flow (Events after L4)", cutflowbinning,
                               this, Float(cutiter), cutflowcut);

Author: Benno List, Jenny List

Date
2005/07/20 10:56:41
Author
blist

Changelog:

Definition at line 58 of file CutFlow.h.

Public Member Functions

 CutFlow (int nbins, const BaseCut *cuts[], const IntFunPoR &iter_, const char *name=0)
 Create a CutFlow from an array of pointers to cuts.

 CutFlow (int nbins, BaseCut *cuts[], const IntFunPoR &iter_, const char *name=0)
 Create a CutFlow from an array of pointers to cuts.

virtual bool operator() () const
 Returns the value of the cut with the number given by the iterator.

virtual const FillIteratorgetIterator () const
 Returns pointer to iterator, if any.


Protected Member Functions

virtual ~CutFlow ()
 Protected destructor to ensure creation on the heap.


Private Attributes

std::vector< const BaseCut * > theCuts
const IntFuniter


Constructor & Destructor Documentation

CutFlow::CutFlow int  nbins,
const BaseCut cuts[],
const IntFunPoR iter_,
const char *  name = 0
 

Create a CutFlow from an array of pointers to cuts.

Parameters:
nbins  The number of bins
cuts  The cuts
iter_  The Iterator
name  The object name

Definition at line 28 of file CutFlow.C.

References NamedO::getName().

CutFlow::CutFlow int  nbins,
BaseCut cuts[],
const IntFunPoR iter_,
const char *  name = 0
 

Create a CutFlow from an array of pointers to cuts.

Parameters:
nbins  The number of bins
cuts  The cuts
iter_  The Iterator
name  The object name

Definition at line 43 of file CutFlow.C.

References NamedO::getName().


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