library: libRooFit
#include "RooDataHist.h"

RooDataHist


class description - header file - source file
viewCVS header - viewCVS source

class RooDataHist: public RooTreeData, public RooDirItem

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
RooDataHist()
RooDataHist(const RooDataHist& other, const char* newname = "0")
RooDataHist(const char* name, const char* title, const RooArgSet& vars)
RooDataHist(const char* name, const char* title, const RooArgSet& vars, const RooAbsData& data, Double_t initWgt = 1.0)
RooDataHist(const char* name, const char* title, const RooArgList& vars, const TH1* hist, Double_t initWgt = 1.0)
virtual~RooDataHist()
voidTObject::AbstractMethod(const char* method) const
virtual voidadd(const RooArgSet& row, Double_t weight = 1.0)
virtual voidadd(const RooArgSet& row, Double_t weight, Double_t sumw2)
voidadd(const RooAbsData& dset, const RooFormulaVar* cutVar = 0, Double_t weight = 1.0)
voidadd(const RooAbsData& dset, const char* cut, Double_t weight = 1.0)
virtual RooAbsArg*RooTreeData::addColumn(RooAbsArg& var)
virtual RooArgSet*RooTreeData::addColumns(const RooArgList& varList)
virtual voidTObject::AppendPad(Option_t* option = "")
Double_tbinVolume() const
Double_tbinVolume(const RooArgSet& bin)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*Clone(const char* newname = "0") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
TH1*RooAbsData::createHistogram(const char* name, const RooAbsRealLValue& xvar, const RooCmdArg& arg1 = RooCmdArg::none, const RooCmdArg& arg2 = RooCmdArg::none, const RooCmdArg& arg3 = RooCmdArg::none, const RooCmdArg& arg4 = RooCmdArg::none, const RooCmdArg& arg5 = RooCmdArg::none, const RooCmdArg& arg6 = RooCmdArg::none, const RooCmdArg& arg7 = RooCmdArg::none, const RooCmdArg& arg8 = RooCmdArg::none) const
static ostream&RooPrintable::defaultStream(ostream* os = 0)
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
voidRooTreeData::dump()
virtual voidTObject::Dump() const
voiddump2()
virtual RooAbsData*emptyClone(const char* newName = "0", const char* newTitle = "0", const RooArgSet* vars = 0) const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidRooTreeData::fill()
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TH1*RooTreeData::fillHistogram(TH1* hist, const RooArgList& plotVars, const char* cuts = "", const char* cutRange = "0") const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual const RooArgSet*get() const
virtual const RooArgSet*get(Int_t masterIdx) const
virtual const RooArgSet*get(const RooArgSet& coord) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Bool_tRooTreeData::getRange(RooRealVar& var, Double_t& lowest, Double_t& highest) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
static voidRooPrintable::inLinePrint(ostream& os, const TNamed& named)
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tisWeighted() const
Bool_tTObject::IsZombie() const
RooPrintable::PrintOptionRooPrintable::lessVerbose(RooPrintable::PrintOption opt) const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
RooRealVar*RooTreeData::meanVar(RooRealVar& var, const char* cutSpec = "0", const char* cutRange = "0") const
Double_tRooTreeData::moment(RooRealVar& var, Double_t order, Double_t offset = 0, const char* cutSpec = "0", const char* cutRange = "0") const
virtual Bool_tTObject::Notify()
virtual Int_tnumEntries(Bool_t useWeights = kFALSE) const
static voidRooPrintable::oneLinePrint(ostream& os, const TNamed& named)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
RooDataHist&operator=(const RooDataHist&)
virtual voidTObject::Paint(Option_t* option = "")
RooPrintable::PrintOptionRooPrintable::parseOptions(Option_t* options) const
virtual RooPlot*RooTreeData::plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& asymCat, RooTreeData::PlotOpt o) const
virtual RooPlot*plotOn(RooPlot* frame, RooTreeData::PlotOpt o) const
virtual voidTObject::Pop()
virtual voidRooAbsData::Print(Option_t* options = "0") const
virtual voidRooTreeData::printToStream(ostream& os, RooPrintable::PrintOption opt, TString indent) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
RooAbsData*RooAbsData::reduce(const char* cut)
RooAbsData*RooAbsData::reduce(const RooFormulaVar& cutVar)
RooAbsData*RooAbsData::reduce(const RooArgSet& varSubset, const char* cut = "0")
RooAbsData*RooAbsData::reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVar)
RooAbsData*RooAbsData::reduce(RooCmdArg arg1, RooCmdArg arg2 = RooCmdArg(), RooCmdArg arg3 = RooCmdArg(), RooCmdArg arg4 = RooCmdArg(), RooCmdArg arg5 = RooCmdArg(), RooCmdArg arg6 = RooCmdArg(), RooCmdArg arg7 = RooCmdArg(), RooCmdArg arg8 = RooCmdArg())
virtual voidreset()
voidTObject::ResetBit(UInt_t f)
RooRealVar*RooTreeData::rmsVar(RooRealVar& var, const char* cutSpec = "0", const char* cutRange = "0") const
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
Int_tRooTreeData::Scan(const char* varexp = "", const char* selection = "", Option_t* option = "", Int_t nentries = 1000000000, Int_t firstentry = 0)
voidset(const RooArgSet& row, Double_t weight, Double_t wgtErr = -1)
voidset(const RooArgSet& row, Double_t weight, Double_t wgtErrLo, Double_t wgtErrHi)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual TList*RooTreeData::split(const RooAbsCategory& splitCat) const
virtual RooPlot*RooTreeData::statOn(RooPlot* frame, const RooCmdArg& arg1 = RooCmdArg::none, const RooCmdArg& arg2 = RooCmdArg::none, const RooCmdArg& arg3 = RooCmdArg::none, const RooCmdArg& arg4 = RooCmdArg::none, const RooCmdArg& arg5 = RooCmdArg::none, const RooCmdArg& arg6 = RooCmdArg::none, const RooCmdArg& arg7 = RooCmdArg::none, const RooCmdArg& arg8 = RooCmdArg::none)
virtual RooPlot*RooTreeData::statOn(RooPlot* frame, const char* what, const char* label = "", Int_t sigDigits = 2, Option_t* options = "NELU", Double_t xmin = 0.15, Double_t xmax = 0.65, Double_t ymax = 0.85, const char* cutSpec = "0", const char* cutRange = "0", const RooCmdArg* formatCmd = 0)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
Double_tsum(Bool_t correctForBinSize) const
Double_tsum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t correctForBinSize)
virtual Double_tsumEntries(const char* cutSpec = "0", const char* cutRange = "0") const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual Roo1DTable*RooTreeData::table(const RooAbsCategory& cat, const char* cuts = "", const char* opts = "") const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
const TTree&RooTreeData::tree() const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Double_tweight() const
Double_tweight(const RooArgSet& bin, Int_t intOrder = 1, Bool_t correctForBinSize = kFALSE)
virtual Double_tweightError(RooAbsData::ErrorType etype = Poisson) const
virtual voidweightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = Poisson) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
RooDataHist(const char* name, const char* title, RooDataHist* h, const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange, Int_t nStart, Int_t nStop, Bool_t copyCache)
voidRooDirItem::appendToDir(TObject* obj, Bool_t forceMemoryResident = kFALSE)
virtual voidRooTreeData::cacheArgs(RooArgSet& varSet, const RooArgSet* nset = 0)
virtual RooAbsData*cacheClone(const RooArgSet* newCacheVars, const char* newName = "0")
const TTree&RooTreeData::cacheTree() const
Int_tcalcTreeIndex() const
voidcalculatePartialBinVolume(const RooArgSet& dimSet) const
voidRooTreeData::checkInit() const
voidRooTreeData::createTree(const char* name, const char* title)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tRooTreeData::Fill()
Int_tRooTreeData::getBranchBufferSize() const
Stat_tRooTreeData::GetEntries() const
Int_tRooTreeData::GetEntry(Int_t entry = 0, Int_t getall = 0)
voidRooTreeData::initCache(const RooArgSet& cachedVars)
voidinitialize(Bool_t fillTree = kTRUE)
Double_tinterpolateDim(RooRealVar& dim, Double_t xval, Int_t intOrder, Bool_t correctForBinSize)
voidRooTreeData::loadValues(const char* filename, const char* treename, RooFormulaVar* cutVar = 0)
voidRooTreeData::loadValues(const RooTreeData* t, RooFormulaVar* select = 0, const char* rangeName = "0", Int_t nStart = 0, Int_t nStop = 2000000000)
voidRooTreeData::loadValues(const TTree* t, RooFormulaVar* cutVar = 0, const char* rangeName = "0", Int_t nStart = 0, Int_t nStop = 2000000000)
voidTObject::MakeZombie()
virtual RooAbsData*reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange = "0", Int_t nStart = 0, Int_t nStop = 2000000000, Bool_t copyCache = kTRUE)
voidRooDirItem::removeFromDir(TObject* obj)
voidRooTreeData::Reset(Option_t* option = "0")
virtual voidRooTreeData::resetCache()
Int_tRooTreeData::ScanCache(const char* varexp = "", const char* selection = "", Option_t* option = "", Int_t nentries = 1000000000, Int_t firstentry = 0)
virtual voidRooTreeData::setArgStatus(const RooArgSet& set, Bool_t active)
voidRooTreeData::setBranchBufferSize(Int_t size)
voidRooAbsData::setDirtyProp(Bool_t flag)
voidRooTreeData::treePrint()

Data Members

public:
enum RooAbsData::ErrorType { Poisson
SumW2
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
enum RooPrintable::PrintOption { InLine
OneLine
Standard
Shape
Verbose
};
protected:
Int_t_arrSizeSize of the weight array
Int_t*_idxMult! Multiplier jump table for index calculation
Double_t*_wgt[_arrSize] Weight array
Double_t*_errLo[_arrSize] Low-side error on weight array
Double_t*_errHi[_arrSize] High-side error on weight array
Double_t*_sumw2[_arrSize] Sum of weights^2
Double_t*_binv[_arrSize] Bin volume array
RooArgSet_realVarsReal dimensions of the dataset
TIterator*_realIter! Iterator over realVars
Double_t_curWeightWeight associated with the current coordinate
Double_t_curWgtErrLoError on weight associated with the current coordinate
Double_t_curWgtErrHiError on weight associated with the current coordinate
Double_t_curSumW2Current sum of weights^2
Double_t_curVolumeVolume of bin enclosing current coordinate
Int_t_curIndexCurrent index
Double_t*_pbinv! Partial bin volume array
RooNameSet_pbinvCache! Partial bin volume definition currently cached
TTree*RooTreeData::_treeTTree holding the data points
TTree*RooTreeData::_cacheTree! TTree holding the cached function values
Bool_tRooTreeData::_defCtor! Was object constructed with default ctor?
RooArgSetRooTreeData::_truthTruth variables
TStringRooTreeData::_blindStringBlinding string (optionally read from ASCII files)
static Int_tRooTreeData::_defTreeBufSize
RooArgSetRooAbsData::_varsDimensions of this data set
RooArgSetRooAbsData::_cachedVars! External variables cached with this data set
TIterator*RooAbsData::_iterator! Iterator over dimension variables
TIterator*RooAbsData::_cacheIter! Iterator over cached variables
Bool_tRooAbsData::_doDirtyPropSwitch do (de)activate dirty state propagation when loading a data point
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
TDirectory*RooDirItem::_dir! Do not persist

Class Description

RooDataHist()
 Default constructor
RooDataHist(const char *name, const char *title, const RooArgSet& vars)
 Constructor of an empty data hist from a RooArgSet defining the dimensions
 of the data space. The range and number of bins in each dimensions are taken
 from getMin()getMax(),getBins() of each RooAbsArg representing that
 dimension.

 For real dimensions, the fit range and number of bins can be set independently
 of the plot range and number of bins, but it is advisable to keep the
 ratio of the plot bin width and the fit bin width an integer value.
 For category dimensions, the fit ranges always comprises all defined states
 and each state is always has its individual bin

 To effective achive binning of real dimensions with variable bins sizes,
 construct a RooThresholdCategory of the real dimension to be binned variably.
 Set the thresholds at the desired bin boundaries, and construct the
 data hist as function of the threshold category instead of the real variable.
RooDataHist(const char *name, const char *title, const RooArgSet& vars, const RooAbsData& data, Double_t weight)
 Constructor of a data hist from an existing data collection (binned or unbinned)
 The RooArgSet 'vars' defines the dimensions of the histogram. 
 The range and number of bins in each dimensions are taken
 from getMin()getMax(),getBins() of each RooAbsArg representing that
 dimension.

 For real dimensions, the fit range and number of bins can be set independently
 of the plot range and number of bins, but it is advisable to keep the
 ratio of the plot bin width and the fit bin width an integer value.
 For category dimensions, the fit ranges always comprises all defined states
 and each state is always has its individual bin

 To effective achive binning of real dimensions with variable bins sizes,
 construct a RooThresholdCategory of the real dimension to be binned variably.
 Set the thresholds at the desired bin boundaries, and construct the
 data hist as function of the threshold category instead of the real variable.

 If the constructed data hist has less dimensions that in source data collection,
 all missing dimensions will be projected.
RooDataHist(const char *name, const char *title, const RooArgList& vars, const TH1* hist, Double_t weight)
 Constructor of a data hist from an TH1,TH2 or TH3
 The RooArgSet 'vars' defines the dimensions of the histogram. The ranges
 and number of bins are taken from the input histogram, and the corresponding
 values are set accordingly on the arguments in 'vars'
void initialize(Bool_t fillTree)
 Initialization procedure: allocate weights array, calculate
 multipliers needed for N-space to 1-dim array jump table,
 and fill the internal tree with all bin center coordinates
RooDataHist(const RooDataHist& other, const char* newname)
 Copy constructor
RooDataHist(const char* name, const char* title, RooDataHist* h, const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange, Int_t nStart, Int_t nStop, Bool_t copyCache)
 Constructor of a data hist from (part of) an existing data hist. The dimensions
 of the data set are defined by the 'vars' RooArgSet, which can be identical
 to 'dset' dimensions, or a subset thereof. Reduced dimensions will be projected
 in the output data hist. The optional 'cutVar' formula variable can used to 
 select the subset of bins to be copied.

 For most uses the RooAbsData::reduce() wrapper function, which uses this constructor, 
 is the most convenient way to create a subset of an existing data
RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName)
RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange, Int_t nStart, Int_t nStop, Bool_t /*copyCache*/)
 Implementation of RooAbsData virtual method that drives the RooAbsData::reduce() methods
~RooDataHist()
 Destructor
Int_t calcTreeIndex()
 Calculate the index for the weights array corresponding to 
 to the bin enclosing the current coordinates of the internal argset
void dump2()
 Debug stuff, should go...
RooPlot * plotOn(RooPlot *frame, PlotOpt o)
Double_t weight(const RooArgSet& bin, Int_t intOrder, Bool_t correctForBinSize)
 Return the weight at given coordinates with optional
 interpolation. If intOrder is zero, the weight
 for the bin enclosing the coordinates
 contained in 'bin' is returned. For higher values,
 the result is interpolated in the real dimensions 
 of the dataset
 
cout << " weight(" << GetName() << ")
void weightError(Double_t& lo, Double_t& hi, ErrorType etype)
 Return error on current weight
Double_t interpolateDim(RooRealVar& dim, Double_t xval, Int_t intOrder, Bool_t correctForBinSize)
 Perform boundary safe 'intOrder'-th interpolation of weights in dimension 'dim'
 at current value 'xval'
void add(const RooArgSet& row, Double_t weight, Double_t sumw2)
 Increment the weight of the bin enclosing the coordinates
 given by 'row' by the specified amount
void set(const RooArgSet& row, Double_t weight, Double_t wgtErrLo, Double_t wgtErrHi)
 Increment the weight of the bin enclosing the coordinates
 given by 'row' by the specified amount
void set(const RooArgSet& row, Double_t weight, Double_t wgtErr)
 Increment the weight of the bin enclosing the coordinates
 given by 'row' by the specified amount
void add(const RooAbsData& dset, const char* cut, Double_t weight)
 Add all data points contained in 'dset' to this data set with given weight.
 Optional cut string expression selects the data points to be added and can
 reference any variable contained in this data set
void add(const RooAbsData& dset, const RooFormulaVar* cutVar, Double_t weight)
 Add all data points contained in 'dset' to this data set with given weight.
 Optional RooFormulaVar pointer selects the data points to be added.
Double_t sum(Bool_t correctForBinSize)
 Return the sum of the weights of all hist bins.

 If correctForBinSize is specified, the sum of weights
 is multiplied by the N-dimensional bin volume,
 making the return value the integral over the function
 represented by this histogram
Double_t sum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t correctForBinSize)
 Return the sum of the weights of a multi-dimensional slice of the histogram
 by summing only over the dimensions specified in sumSet.

 The coordinates of all other dimensions are fixed to those given in sliceSet

 If correctForBinSize is specified, the sum of weights
 is multiplied by the M-dimensional bin volume, (M = N(sumSet)),
 making the return value the integral over the function
 represented by this histogram
void calculatePartialBinVolume(const RooArgSet& dimSet)
 Allocate cache if not yet existing
Int_t numEntries(Bool_t useWeights)
 Return the number of bins (useWeights=false) or
 the sum of the weights of all bins (useWeight=true)
Double_t sumEntries(const char* cutSpec, const char* cutRange)
void reset()
 Reset all bin weights to zero
const RooArgSet* get(Int_t masterIdx)
 Return an argset with the bin center coordinates for 
 bin sequential number 'masterIdx'. For iterative use.
const RooArgSet* get(const RooArgSet& coord)
Double_t binVolume(const RooArgSet& coord)
TObject* Clone(const char* newname=0)
{ return new RooDataHist(*this,newname?newname:GetName()) ; }
RooAbsData* emptyClone(const char* newName=0, const char* newTitle=0, const RooArgSet*vars=0)
void add(const RooArgSet& row, Double_t weight=1.0)
 Add one ore more rows of data
{ add(row,weight,-1.) ; }
const RooArgSet* get()
{ return &_vars ; }
Bool_t isWeighted()
{ return kTRUE ; }
Double_t binVolume()
{ return _curVolume ; }
void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Poisson)

Last update: Sat Dec 9 09:57:36 2006
Copyright (c) 2000-2005, Regents of the University of California *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.