ROOT » ROOFIT » ROOFITCORE » RooDataHist

class RooDataHist: public RooAbsData, public RooDirItem



RooDataSet is a container class to hold N-dimensional binned data. Each bins central coordinates in N-dimensional space are represented by a RooArgSet of RooRealVar, RooCategory or RooStringVar objects, thus data can be binned in real and/or discrete dimensions


Function Members (Methods)

public:
virtual~RooDataHist()
voidTObject::AbstractMethod(const char* method) const
virtual voidadd(const RooArgSet& row, Double_t wgt = 1.)
virtual voidadd(const RooArgSet& row, Double_t weight, Double_t sumw2)
voidadd(const RooAbsData& dset, const RooFormulaVar* cutVar = 0, Double_t weight = 1.)
voidadd(const RooAbsData& dset, const char* cut, Double_t weight = 1.)
voidRooAbsData::addOwnedComponent(const char* idxlabel, RooAbsData& data)
virtual voidTObject::AppendPad(Option_t* option = "")
voidRooAbsData::attachBuffers(const RooArgSet& extObs)
Double_tbinVolume() const
Double_tbinVolume(const RooArgSet& bin)
virtual voidTObject::Browse(TBrowser* b)
Bool_tRooAbsData::canSplitFast() const
virtual Bool_tRooAbsData::changeObservableName(const char* from, const char* to)
voidRooAbsData::checkInit() const
static voidRooAbsData::claimVars(RooAbsData*)
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
voidRooAbsData::convertToVectorStore()
virtual voidTNamed::Copy(TObject& named) const
Double_tRooAbsData::correlation(RooRealVar& x, RooRealVar& y, const char* cutSpec = 0, const char* cutRange = 0) const
TMatrixDSym*RooAbsData::correlationMatrix(const char* cutSpec = 0, const char* cutRange = 0) const
TMatrixDSym*RooAbsData::correlationMatrix(const RooArgList& vars, const char* cutSpec = 0, const char* cutRange = 0) const
Double_tRooAbsData::covariance(RooRealVar& x, RooRealVar& y, const char* cutSpec = 0, const char* cutRange = 0) const
TMatrixDSym*RooAbsData::covarianceMatrix(const char* cutSpec = 0, const char* cutRange = 0) const
TMatrixDSym*RooAbsData::covarianceMatrix(const RooArgList& vars, const char* cutSpec = 0, const char* cutRange = 0) const
TH1*RooAbsData::createHistogram(const char* name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) const
TH1*RooAbsData::createHistogram(const char* varNameList, Int_t xbins = 0, Int_t ybins = 0, Int_t zbins = 0) 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
virtual Int_tRooAbsData::defaultPrintContents(Option_t* opt) const
static ostream&RooPrintable::defaultPrintStream(ostream* os = 0)
virtual RooPrintable::StyleOptionRooPrintable::defaultPrintStyle(Option_t* opt) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidRooAbsData::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voiddump2()
virtual RooAbsData*emptyClone(const char* newName = 0, const char* newTitle = 0, const RooArgSet* vars = 0, const char* = 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 voidRooAbsData::fill()
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TH1*RooAbsData::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
static RooAbsData::StorageTypeRooAbsData::getDefaultStorageType()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tgetIndex(const RooArgSet& coord, Bool_t fast = kFALSE)
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_tRooAbsData::getRange(RooRealVar& var, Double_t& lowest, Double_t& highest, Double_t marginFrac = 0, Bool_t symMode = kFALSE) const
RooAbsData*RooAbsData::getSimData(const char* idxstate)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
Bool_tRooAbsData::hasFilledCache() const
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
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tisNonPoissonWeighted() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tisWeighted() const
Bool_tTObject::IsZombie() const
Double_tRooAbsData::kurtosis(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
Double_tRooAbsData::mean(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
RooRealVar*RooAbsData::meanVar(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
Double_tRooAbsData::moment(RooRealVar& var, Double_t order, const char* cutSpec = 0, const char* cutRange = 0) const
Double_tRooAbsData::moment(RooRealVar& var, Double_t order, Double_t offset, const char* cutSpec = 0, const char* cutRange = 0) const
static voidRooPrintable::nameFieldLength(Int_t newLen)
virtual Bool_tTObject::Notify()
virtual Int_tnumEntries() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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 = "")
virtual RooPlot*plotOn(RooPlot* frame, RooAbsData::PlotOpt o) const
virtual voidTObject::Pop()
virtual voidRooAbsData::Print(Option_t* options = 0) const
virtual voidRooPrintable::printAddress(ostream& os) const
virtual voidprintArgs(ostream& os) const
virtual voidRooAbsData::printClassName(ostream& os) const
virtual voidRooPrintable::printExtras(ostream& os) const
virtual voidprintMultiline(ostream& os, Int_t content, Bool_t verbose = kFALSE, TString indent = "") const
virtual voidRooAbsData::printName(ostream& os) const
virtual voidRooPrintable::printStream(ostream& os, Int_t contents, RooPrintable::StyleOption style, TString indent = "") const
virtual voidRooAbsData::printTitle(ostream& os) const
virtual voidRooPrintable::printTree(ostream& os, TString indent = "") const
virtual voidprintValue(ostream& os) 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(const RooCmdArg& arg1, const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg())
static Bool_tRooAbsData::releaseVars(RooAbsData*)
voidremoveSelfFromDir()
virtual voidreset()
voidTObject::ResetBit(UInt_t f)
voidRooAbsData::resetBuffers()
RooRealVar*RooAbsData::rmsVar(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
RooDataHist()
RooDataHist(const RooDataHist& other, const char* newname = 0)
RooDataHist(const char* name, const char* title, const RooArgSet& vars, const char* binningName = 0)
RooDataHist(const char* name, const char* title, const RooArgSet& vars, const RooAbsData& data, Double_t initWgt = 1.)
RooDataHist(const char* name, const char* title, const RooArgList& vars, const TH1* hist, Double_t initWgt = 1.)
RooDataHist(const char* name, const char* title, const RooArgList& vars, RooCategory& indexCat, map<string,TH1*> histMap, Double_t initWgt = 1.)
RooDataHist(const char* name, const char* title, const RooArgList& vars, RooCategory& indexCat, map<string,RooDataHist*> dhistMap, Double_t wgt = 1.)
RooDataHist(const char* name, const char* title, const RooArgList& vars, const RooCmdArg& arg1, const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg())
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidset(Double_t weight, Double_t wgtErr = -1)
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)
static voidRooAbsData::setDefaultStorageType(RooAbsData::StorageType s)
voidRooAbsData::setDirtyProp(Bool_t flag)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetName(const char* name)
virtual voidSetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
Double_tRooAbsData::sigma(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
virtual Int_tTNamed::Sizeof() const
Double_tRooAbsData::skewness(RooRealVar& var, const char* cutSpec = 0, const char* cutRange = 0) const
TIterator*sliceIterator(RooAbsArg& sliceArg, const RooArgSet& otherArgs)
virtual TList*RooAbsData::split(const RooAbsCategory& splitCat, Bool_t createEmptyDataSets = kFALSE) const
Double_tRooAbsData::standMoment(RooRealVar& var, Double_t order, const char* cutSpec = 0, const char* cutRange = 0) const
virtual RooPlot*RooAbsData::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*RooAbsData::statOn(RooPlot* frame, const char* what, const char* label = "", Int_t sigDigits = 2, Option_t* options = "NELU", Double_t xmin = 0.14999999999999999, Double_t xmax = 0.65000000000000002, Double_t ymax = 0.84999999999999998, const char* cutSpec = 0, const char* cutRange = 0, const RooCmdArg* formatCmd = 0)
RooAbsDataStore*RooAbsData::store()
const RooAbsDataStore*RooAbsData::store() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
Double_tsum(Bool_t correctForBinSize, Bool_t inverseCorr = kFALSE) const
Double_tsum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t correctForBinSize, Bool_t inverseCorr = kFALSE)
Double_tsum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t correctForBinSize, Bool_t inverseCorr, const map<const RooAbsArg*,pair<Double_t,Double_t> >& ranges)
virtual Double_tsumEntries() const
virtual Double_tsumEntries(const char* cutSpec, const char* cutRange = 0) const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual Roo1DTable*RooAbsData::table(const RooArgSet& catSet, const char* cuts = "", const char* opts = "") const
virtual Roo1DTable*RooAbsData::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*RooAbsData::tree() const
virtual voidTObject::UseCurrentStyle()
virtual Bool_tvalid() const
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, Bool_t cdfBoundaries = kFALSE, Bool_t oneSafe = kFALSE)
virtual Double_tweightError(RooAbsData::ErrorType etype = Poisson) const
virtual voidweightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = Poisson) const
virtual Double_tweightSquared() 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:
voidadjustBinning(const RooArgList& vars, TH1& href, Int_t* offset = 0)
Bool_tRooAbsData::allClientsCached(RooAbsArg*, const RooArgSet&)
voidRooDirItem::appendToDir(TObject* obj, Bool_t forceMemoryResident = kFALSE)
virtual voidRooAbsData::attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
virtual voidRooAbsData::cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const RooArgSet* nset = 0, Bool_t skipZeroWeights = kFALSE)
virtual RooAbsData*cacheClone(const RooAbsArg* newCacheOwner, const RooArgSet* newCacheVars, const char* newName = 0)
voidcacheValidEntries()
Int_tcalcTreeIndex() const
voidcalculatePartialBinVolume(const RooArgSet& dimSet) const
voidcheckBinBounds() const
Double_tRooAbsData::corrcov(RooRealVar& x, RooRealVar& y, const char* cutSpec, const char* cutRange, Bool_t corr) const
TMatrixDSym*RooAbsData::corrcovMatrix(const RooArgList& vars, const char* cutSpec, const char* cutRange, Bool_t corr) const
RooRealVar*RooAbsData::dataRealVar(const char* methodname, RooRealVar& extVar) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidimportDHistSet(const RooArgList& vars, RooCategory& indexCat, map<string,RooDataHist*> dmap, Double_t initWgt)
voidimportTH1(const RooArgList& vars, TH1& histo, Double_t initWgt, Bool_t doDensityCorrection)
voidimportTH1Set(const RooArgList& vars, RooCategory& indexCat, map<string,TH1*> hmap, Double_t initWgt, Bool_t doDensityCorrection)
voidinitialize(const char* binningName = 0, Bool_t fillTree = kTRUE)
Double_tinterpolateDim(RooRealVar& dim, const RooAbsBinning* binning, Double_t xval, Int_t intOrder, Bool_t correctForBinSize, Bool_t cdfBoundaries)
voidTObject::MakeZombie()
virtual voidRooAbsData::optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& cacheList, const RooArgSet& keepObsList)
virtual RooPlot*RooAbsData::plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& asymCat, RooAbsData::PlotOpt o) const
virtual RooPlot*RooAbsData::plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& effCat, RooAbsData::PlotOpt o) const
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)
virtual voidRooAbsData::resetCache()
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)
voidsetAllWeights(Double_t value)
virtual voidRooAbsData::setArgStatus(const RooArgSet& set, Bool_t active)

Data Members

public:
static RooAbsData::ErrorTypeRooAbsData::Auto
static RooAbsData::ErrorTypeRooAbsData::Expected
static RooAbsData::ErrorTypeRooAbsData::None
static RooAbsData::ErrorTypeRooAbsData::Poisson
static RooAbsData::ErrorTypeRooAbsData::SumW2
static RooAbsData::StorageTypeRooAbsData::Tree
static RooAbsData::StorageTypeRooAbsData::Vector
static RooPrintable::ContentsOptionRooPrintable::kAddress
static RooPrintable::ContentsOptionRooPrintable::kArgs
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static RooPrintable::ContentsOptionRooPrintable::kClassName
static RooPrintable::ContentsOptionRooPrintable::kCollectionHeader
static RooPrintable::ContentsOptionRooPrintable::kExtras
static TObject::EStatusBitsTObject::kHasUUID
static RooPrintable::StyleOptionRooPrintable::kInline
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static RooPrintable::ContentsOptionRooPrintable::kName
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static RooPrintable::StyleOptionRooPrintable::kSingleLine
static RooPrintable::StyleOptionRooPrintable::kStandard
static RooPrintable::ContentsOptionRooPrintable::kTitle
static RooPrintable::StyleOptionRooPrintable::kTreeStructure
static RooPrintable::ContentsOptionRooPrintable::kValue
static RooPrintable::StyleOptionRooPrintable::kVerbose
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Int_t_arrSizeSize of the weight array
Bool_t*_binValid! Valid bins with current range definition
vector<vector<Double_t> >_binbounds! list of bin bounds per dimension
Double_t*_binv[_arrSize] Bin volume array
TIterator*RooAbsData::_cacheIter! Iterator over cached variables
Double_t_cache_sum! Cache for sum of entries ;
Int_t_cache_sum_valid! Is cache sum valid
RooArgSetRooAbsData::_cachedVars! External variables cached with this data set
Int_t_curIndexCurrent index
Double_t_curSumW2Current sum of weights^2
Double_t_curVolumeVolume of bin enclosing current coordinate
Double_t_curWeightWeight associated with the current coordinate
Double_t_curWgtErrHiError on weight associated with the current coordinate
Double_t_curWgtErrLoError on weight associated with the current coordinate
TDirectory*RooDirItem::_dir! Associated directory
RooAbsDataStore*RooAbsData::_dstoreData storage implementation
Double_t*_errHi[_arrSize] High-side error on weight array
Double_t*_errLo[_arrSize] Low-side error on weight array
vector<Int_t>_idxMultMultiplier jump table for index calculation
TIterator*RooAbsData::_iterator! Iterator over dimension variables
vector<const RooAbsBinning*>_lvbins! List of used binnings associated with lvalues
vector<RooAbsLValue*>_lvvars! List of observables casted as RooAbsLValue
static Int_tRooPrintable::_nameLength
map<string,RooAbsData*>RooAbsData::_ownedComponentsOwned external components
vector<Double_t>*_pbinv! Partial bin volume array
RooCacheManager<vector<Double_t> >_pbinvCacheMgr! Cache manager for arrays of partial bin volumes
TIterator*_realIter! Iterator over realVars
RooArgSet_realVarsReal dimensions of the dataset
Double_t*_sumw2[_arrSize] Sum of weights^2
RooArgSetRooAbsData::_varsDimensions of this data set
Double_t*_wgt[_arrSize] Weight array
static RooAbsData::StorageTypeRooAbsData::defaultStorageType
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RooDataHist()
 Default constructor
RooDataHist(const char* name, const char* title, const RooArgSet& vars, const char* binningName = 0)
 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 initWgt = 1.)
 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, RooCategory& indexCat, map<string,TH1*> histMap, Double_t initWgt = 1.)
 Constructor of a data hist from a map of TH1,TH2 or TH3 that are collated into a x+1 dimensional
 RooDataHist where the added dimension is a category that labels the input source as defined
 in the histMap argument. The state names used in histMap must correspond to predefined states
 'indexCat'

 The RooArgList 'vars' defines the dimensions of the histogram.
 The ranges and number of bins are taken from the input histogram and must be the same in all histograms
RooDataHist(const char* name, const char* title, const RooArgList& vars, RooCategory& indexCat, map<string,RooDataHist*> dhistMap, Double_t wgt = 1.)
 Constructor of a data hist from a map of RooDataHists that are collated into a x+1 dimensional
 RooDataHist where the added dimension is a category that labels the input source as defined
 in the histMap argument. The state names used in histMap must correspond to predefined states
 'indexCat'

 The RooArgList 'vars' defines the dimensions of the histogram.
 The ranges and number of bins are taken from the input histogram and must be the same in all histograms
RooDataHist(const char* name, const char* title, const RooArgList& vars, const TH1* hist, Double_t initWgt = 1.)
 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'
RooDataHist(const char* name, const char* title, const RooArgList& vars, const RooCmdArg& arg1, const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg())
 Constructor of a binned dataset 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.

 This constructor takes the following optional arguments

 Import(TH1&, Bool_t impDens) -- Import contents of the given TH1/2/3 into this binned dataset. The
                                 ranges and binning of the binned dataset are automatically adjusted to
                                 match those of the imported histogram.

                                 Please note: for TH1& with unequal binning _only_,
                                 you should decide if you want to import the absolute bin content,
                                 or the bin content expressed as density. The latter is default and will
                                 result in the same histogram as the original TH1. For certain type of
                                 bin contents (containing efficiencies, asymmetries, or ratio is general)
                                 you should import the absolute value and set impDens to kFALSE


 Weight(Double_t)          -- Apply given weight factor when importing histograms

 Index(RooCategory&)       -- Prepare import of multiple TH1/1/2/3 into a N+1 dimensional RooDataHist
                              where the extra discrete dimension labels the source of the imported histogram
                              If the index category defines states for which no histogram is be imported
                              the corresponding bins will be left empty.

 Import(const char*, TH1&) -- Import a THx to be associated with the given state name of the index category
                              specified in Index(). If the given state name is not yet defined in the index
                              category it will be added on the fly. The import command can be specified
                              multiple times.
 Import(map<string,TH1*>&) -- As above, but allows specification of many imports in a single operation

void importTH1(const RooArgList& vars, TH1& histo, Double_t initWgt, Bool_t doDensityCorrection)
 Import data from given TH1/2/3 into this RooDataHist
void importTH1Set(const RooArgList& vars, RooCategory& indexCat, map<string,TH1*> hmap, Double_t initWgt, Bool_t doDensityCorrection)
 Import data from given set of TH1/2/3 into this RooDataHist. The category indexCat labels the sources
 in the constructed RooDataHist. The stl map provides the mapping between the indexCat state labels
 and the import source
void importDHistSet(const RooArgList& vars, RooCategory& indexCat, map<string,RooDataHist*> dmap, Double_t initWgt)
 Import data from given set of TH1/2/3 into this RooDataHist. The category indexCat labels the sources
 in the constructed RooDataHist. The stl map provides the mapping between the indexCat state labels
 and the import source
void adjustBinning(const RooArgList& vars, TH1& href, Int_t* offset = 0)
 Adjust binning specification on first and optionally second and third
 observable to binning in given reference TH1. Used by constructors
 that import data from an external TH1
void initialize(const char* binningName = 0, Bool_t fillTree = kTRUE)
 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
void checkBinBounds() const
RooDataHist(const RooDataHist& other, const char* newname = 0)
 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 RooAbsArg* newCacheOwner, const RooArgSet* newCacheVars, const char* newName = 0)
 Construct a clone of this dataset that contains only the cached variables
RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange = 0, Int_t nStart = 0, Int_t nStop = 2000000000, Bool_t copyCache = kTRUE)
 Implementation of RooAbsData virtual method that drives the RooAbsData::reduce() methods
~RooDataHist()
 Destructor
Int_t getIndex(const RooArgSet& coord, Bool_t fast = kFALSE)
Int_t calcTreeIndex() const
 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, RooAbsData::PlotOpt o) const
 Back end function to plotting functionality. Plot RooDataHist on given
 frame in mode specified by plot options 'o'. The main purpose of
 this function is to match the specified binning on 'o' to the
 internal binning of the plot observable in this RooDataHist.
Double_t weightSquared() const
Double_t weight(const RooArgSet& bin, Int_t intOrder = 1, Bool_t correctForBinSize = kFALSE, Bool_t cdfBoundaries = kFALSE, Bool_t oneSafe = kFALSE)
 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
void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = Poisson) const
 Return the error on current weight
Double_t interpolateDim(RooRealVar& dim, const RooAbsBinning* binning, Double_t xval, Int_t intOrder, Bool_t correctForBinSize, Bool_t cdfBoundaries)
 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. Add the sum of weights squared
 for the bin by 'sumw2' rather than wgt^2
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. Associate errors
 [wgtErrLo,wgtErrHi] with the event weight on this bin.
void set(Double_t weight, Double_t wgtErr = -1)
 Increment the weight of the bin enclosing the coordinates
 given by 'row' by the specified amount. Associate errors
 [wgtErrLo,wgtErrHi] with the event weight on this bin.
void set(const RooArgSet& row, Double_t weight, Double_t wgtErr = -1)
 Increment the weight of the bin enclosing the coordinates
 given by 'row' by the specified amount. Associate errors
 [wgtErrLo,wgtErrHi] with the event weight on this bin.
void add(const RooAbsData& dset, const char* cut, Double_t weight = 1.)
 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 = 0, Double_t weight = 1.)
 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, Bool_t inverseCorr = kFALSE) const
 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, Bool_t inverseCorr = kFALSE)
 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
Double_t sum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t correctForBinSize, Bool_t inverseCorr, const map<const RooAbsArg*,pair<Double_t,Double_t> >& ranges)
 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)),
 or the fraction of it that falls inside the range rangeName,
 making the return value the integral over the function
 represented by this histogram

 If correctForBinSize is not specified, the weights are multiplied by the
 fraction of the bin volume that falls inside the range, i.e. a factor or
 binVolumeInRange/totalBinVolume.
void calculatePartialBinVolume(const RooArgSet& dimSet) const
 Fill the transient cache with partial bin volumes with up-to-date
 values for the partial volume specified by observables 'dimSet'
Int_t numEntries() const
 Return the number of bins
Double_t sumEntries() const
Double_t sumEntries(const char* cutSpec, const char* cutRange = 0) const
 Return the sum of weights in all entries matching cutSpec (if specified)
 and in named range cutRange (if specified)
 Return the
void reset()
 Reset all bin weights to zero
const RooArgSet* get(Int_t masterIdx) const
 Return an argset with the bin center coordinates for
 bin sequential number 'masterIdx'. For iterative use.
const RooArgSet* get(const RooArgSet& coord) const
 Return a RooArgSet with center coordinates of the bin
 enclosing the point 'coord'
Double_t binVolume(const RooArgSet& bin)
 Return the volume of the bin enclosing coordinates 'coord'
void setAllWeights(Double_t value)
 Set all the event weight of all bins to the specified value
TIterator* sliceIterator(RooAbsArg& sliceArg, const RooArgSet& otherArgs)
 Create an iterator over all bins in a slice defined by the subset of observables
 listed in sliceArg. The position of the slice is given by otherArgs
void SetName(const char* name)
 Change the name of the RooDataHist
void SetNameTitle(const char* name, const char* title)
 Change the title of this RooDataHist
void printValue(ostream& os) const
 Print value of the dataset, i.e. the sum of weights contained in the dataset
void printArgs(ostream& os) const
 Print argument of dataset, i.e. the observable names
void cacheValidEntries()
 Cache the datahist entries with bin centers that are inside/outside the
 current observable definitio
Bool_t valid() const
 Return true if currently loaded coordinate is considered valid within
 the current range definitions of all observables
Bool_t isNonPoissonWeighted() const
 Returns true if datasets contains entries with a non-integer weight
void printMultiline(ostream& os, Int_t content, Bool_t verbose = kFALSE, TString indent = "") const
 Print the details on the dataset contents
void Streamer(TBuffer& )
 Stream an object of class RooDataHist.
TObject* Clone(const char* newname = 0) const
{ return new RooDataHist(*this,newname?newname:GetName()) ; }
RooAbsData* emptyClone(const char* newName = 0, const char* newTitle = 0, const RooArgSet* vars = 0, const char* = 0) const
 Return empty clone of this RooDataHist
void add(const RooArgSet& row, Double_t wgt = 1.)
 Add one ore more rows of data
const RooArgSet* get() const
 Return set with coordinates of center of current bin
Bool_t isWeighted() const
 Return true as all histograms have in principle events weight != 1
Double_t weight() const
 Return weight of current bin
Double_t binVolume() const
{ return _curVolume ; }
void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = Poisson) const
void removeSelfFromDir()
{ removeFromDir(this) ; }