104 RooAbsData(
name,title,vars), _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
142 RooAbsData(
name,title,vars), _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
168 map<string,TH1*> histMap,
Double_t wgt) :
170 _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
194 map<string,RooDataHist*> dhistMap,
Double_t wgt) :
196 _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
217 RooAbsData(
name,title,vars), _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
226 <<
"number of dimension variables" << endl ;
274 RooAbsData(
name,title,
RooArgSet(vars,(
RooAbsArg*)
RooCmdConfig::decodeObjOnTheFly(
"RooDataHist::RooDataHist",
"IndexCat",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8))),
275 _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
283 pc.defineObject(
"impHist",
"ImportHisto",0) ;
284 pc.defineInt(
"impDens",
"ImportHisto",0) ;
285 pc.defineObject(
"indexCat",
"IndexCat",0) ;
286 pc.defineObject(
"impSliceHist",
"ImportHistoSlice",0,0,
kTRUE) ;
287 pc.defineString(
"impSliceState",
"ImportHistoSlice",0,
"",
kTRUE) ;
288 pc.defineObject(
"impSliceDHist",
"ImportDataHistSlice",0,0,
kTRUE) ;
289 pc.defineString(
"impSliceDState",
"ImportDataHistSlice",0,
"",
kTRUE) ;
290 pc.defineDouble(
"weight",
"Weight",0,1) ;
291 pc.defineObject(
"dummy1",
"ImportDataHistSliceMany",0) ;
292 pc.defineObject(
"dummy2",
"ImportHistoSliceMany",0) ;
293 pc.defineMutex(
"ImportHisto",
"ImportHistoSlice",
"ImportDataHistSlice") ;
294 pc.defineDependency(
"ImportHistoSlice",
"IndexCat") ;
295 pc.defineDependency(
"ImportDataHistSlice",
"IndexCat") ;
310 TH1* impHist =
static_cast<TH1*
>(
pc.getObject(
"impHist")) ;
311 Bool_t impDens =
pc.getInt(
"impDens") ;
313 const char* impSliceNames =
pc.getString(
"impSliceState",
"",
kTRUE) ;
314 const RooLinkedList& impSliceHistos =
pc.getObjectList(
"impSliceHist") ;
316 const char* impSliceDNames =
pc.getString(
"impSliceDState",
"",
kTRUE) ;
317 const RooLinkedList& impSliceDHistos =
pc.getObjectList(
"impSliceDHist") ;
323 importTH1(vars,*impHist,initWgt, impDens) ;
325 }
else if (indexCat) {
328 if (impSliceHistos.
GetSize()>0) {
331 map<string,TH1*> hmap ;
333 strlcpy(tmp,impSliceNames,1024) ;
334 char* token = strtok(tmp,
",") ;
337 hmap[token] = (
TH1*) hiter->
Next() ;
338 token = strtok(0,
",") ;
344 map<string,RooDataHist*> dmap ;
346 strlcpy(tmp,impSliceDNames,1024) ;
347 char* token = strtok(tmp,
",") ;
351 token = strtok(0,
",") ;
380 Int_t offset[3]{0, 0, 0};
410 Int_t ix(0),iy(0),iz(0) ;
411 for (ix=0 ; ix < xvar->
getBins() ; ix++) {
414 for (iy=0 ; iy < yvar->
getBins() ; iy++) {
417 for (iz=0 ; iz < zvar->
getBins() ; iz++) {
450 for (map<string,TH1*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
453 histo = hiter->second ;
456 if (!indexCat.
lookupType(hiter->first.c_str())) {
458 coutI(
InputArguments) <<
"RooDataHist::importTH1Set(" <<
GetName() <<
") defining state \"" << hiter->first <<
"\" in index category " << indexCat.
GetName() << endl ;
460 if (!icat->
lookupType(hiter->first.c_str())) {
468 <<
"number of continuous variables" << endl ;
505 Int_t ic(0),ix(0),iy(0),iz(0) ;
506 for (ic=0 ; ic < icat->
numBins(0) ; ic++) {
509 for (ix=0 ; ix < xvar->
getBins() ; ix++) {
512 for (iy=0 ; iy < yvar->
getBins() ; iy++) {
515 for (iz=0 ; iz < zvar->
getBins() ; iz++) {
545 for (map<string,RooDataHist*>::iterator diter = dmap.begin() ; diter!=dmap.end() ; ++diter) {
548 if (!indexCat.
lookupType(diter->first.c_str())) {
550 coutI(
InputArguments) <<
"RooDataHist::importDHistSet(" <<
GetName() <<
") defining state \"" << diter->first <<
"\" in index category " << indexCat.
GetName() << endl ;
552 if (!icat->
lookupType(diter->first.c_str())) {
561 for (map<string,RooDataHist*>::iterator diter = dmap.begin() ; diter!=dmap.end() ; ++diter) {
565 icat->
setLabel(diter->first.c_str()) ;
587 const double xlo = theirVar.
getMin();
588 const double xhi = theirVar.
getMax();
602 if (
true ||
fabs(xloAdj - xlo) > tolerance ||
fabs(xhiAdj - xhi) > tolerance) {
603 coutI(
DataHandling)<<
"RooDataHist::adjustBinning(" <<
GetName() <<
"): fit range of variable " << ourVar->
GetName() <<
" expanded to nearest bin boundaries: [" << xlo <<
"," << xhi <<
"] --> [" << xloAdj <<
"," << xhiAdj <<
"]" << endl;
623 if (
fabs(xloAdj - xlo) > tolerance ||
fabs(xhiAdj - xhi) > tolerance) {
624 coutI(
DataHandling)<<
"RooDataHist::adjustBinning(" <<
GetName() <<
"): fit range of variable " << ourVar->
GetName() <<
" expanded to nearest bin boundaries: [" << xlo <<
"," << xhi <<
"] --> [" << xloAdj <<
"," << xhiAdj <<
"]" << endl;
677 for (
const auto real :
_vars) {
683 for (
const auto rvarg :
_vars) {
703 for (
const auto var :
_vars) {
707 for (i=0 ; i<
n ; i++) {
738 if (!fillTree) return ;
744 for (ibin=0 ; ibin<
_arrSize ; ibin++) {
745 Int_t j(0), idx(0), tmp(ibin) ;
747 for (
auto arg2 :
_vars) {
752 theBinVolume *= arglv->getBinWidth(idx) ;
755 _binv[ibin] = theBinVolume ;
769 for (std::vector<const RooAbsBinning*>::const_iterator it =
_lvbins.begin();
771 _binbounds.push_back(std::vector<Double_t>());
773 std::vector<Double_t>& bounds =
_binbounds.back();
774 bounds.reserve(2 * (*it)->numBins());
775 for (
Int_t i = 0; i < (*it)->numBins(); ++i) {
776 bounds.push_back((*it)->binLow(i));
777 bounds.push_back((*it)->binHigh(i));
787 RooAbsData(other,newname),
RooDirItem(), _idxMult(other._idxMult), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(other._pbinvCacheMgr,0), _cache_sum_valid(0)
807 for (
const auto arg :
_vars) {
813 for (
const auto rvarg :
_vars) {
841 _wgt(0), _binValid(0), _curWeight(0), _curVolume(1), _pbinv(0), _pbinvCacheMgr(0,10), _cache_sum_valid(0)
853 _wgt[i] =
h->_wgt[i] ;
877 delete selCacheVars ;
901 coutE(
DataHandling) <<
"RooDataHist::reduceEng(" <<
GetName() <<
") Couldn't deep-clone cut variable, abort," << endl ;
912 for (i=nStart ; i<nevt ; i++) {
926 if (!doSelect) continue ;
928 if (!cloneVar || cloneVar->
getVal()) {
956 vector<const RooAbsBinning*>::iterator iter =
_lvbins.begin() ;
991 Int_t masterIdx(0), i(0) ;
992 vector<RooAbsLValue*>::const_iterator iter =
_lvvars.begin() ;
993 vector<const RooAbsBinning*>::const_iterator biter =
_lvbins.begin() ;
994 for (;iter!=
_lvvars.end() ; ++iter) {
996 masterIdx +=
_idxMult[i++]*(*iter)->getBin(binning) ;
1009 cout <<
"_arrSize = " <<
_arrSize << endl ;
1011 cout <<
"wgt[" << i <<
"] = " <<
_wgt[i] <<
"sumw2[" << i <<
"] = " <<
_sumw2[i] <<
" vol[" << i <<
"] = " <<
_binv[i] << endl ;
1035 <<
":plotOn: frame does not specify a plot variable" << endl;
1042 <<
":plotOn: dataset doesn't contain plot frame variable" << endl;
1087 if (correctForBinSize) {
1126 for (i=ybinLo ; i<=intOrder+ybinLo ; i++) {
1128 if (i>=0 && i<ybinM) {
1132 xarr[i-ybinLo] = realY->
getVal() ;
1133 }
else if (i>=ybinM) {
1135 ibin = 2*ybinM-i-1 ;
1148 cout <<
"RooDataHist interpolating data is" << endl ;
1150 for (
int q=0;
q<=intOrder ;
q++) cout << xarr[
q] <<
" " ;
1151 cout <<
" yarr = " ;
1152 for (
int q=0;
q<=intOrder ;
q++) cout << yarr[
q] <<
" " ;
1188 throw string(
Form(
"RooDataHist::weightError(%s) error type Auto not allowed here",
GetName())) ;
1192 throw string(
Form(
"RooDataHist::weightError(%s) error type Expected not allowed here",
GetName())) ;
1237 Int_t fbinLo = fbinC-intOrder/2 - ((xval<binning->
binCenter(fbinC))?1:0) ;
1244 for (i=fbinLo ; i<=intOrder+fbinLo ; i++) {
1246 if (i>=0 && i<fbinM) {
1251 xarr[i-fbinLo] = dim.
getVal() ;
1253 yarr[i - fbinLo] =
get_wgt(idx);
1254 if (correctForBinSize) yarr[i-fbinLo] /=
_binv[idx] ;
1255 }
else if (i>=fbinM) {
1257 ibin = 2*fbinM-i-1 ;
1260 if (cdfBoundaries) {
1261 xarr[i-fbinLo] = dim.
getMax()+1
e-10*(i-fbinM+1) ;
1262 yarr[i-fbinLo] = 1.0 ;
1266 yarr[i - fbinLo] =
get_wgt(idx);
1267 if (correctForBinSize)
1268 yarr[i - fbinLo] /=
_binv[idx];
1275 if (cdfBoundaries) {
1276 xarr[i-fbinLo] = dim.
getMin()-ibin*(1
e-10) ; ;
1277 yarr[i-fbinLo] = 0.0 ;
1281 yarr[i - fbinLo] =
get_wgt(idx);
1282 if (correctForBinSize)
1283 yarr[i - fbinLo] /=
_binv[idx];
1314 _sumw2[idx] += (sumw2>0?sumw2:wgt*wgt) ;
1380 _sumw2[idx] = wgtErr*wgtErr ;
1395 add(dset,&cutVar,wgt) ;
1426 if (!cloneVar || cloneVar->
getVal()) {
1453 Int_t cache_code = 1 + (correctForBinSize?1:0) + ((correctForBinSize&&inverseBinCor)?1:0) ;
1462 Double_t theBinVolume = correctForBinSize ? (inverseBinCor ? 1/
_binv[i] :
_binv[i]) : 1.0 ;
1501 _vars = *sliceOnlySet ;
1503 delete sliceOnlySet ;
1509 for (
unsigned int i = 0; i <
_vars.
size(); ++i) {
1510 const auto arg =
_vars[i];
1512 if (sumSet.
find(*arg)) {
1516 refBin[i] =
dynamic_cast<RooAbsLValue*
>(arg)->getBin();
1523 for (ibin=0 ; ibin<
_arrSize ; ibin++) {
1525 Int_t idx(0), tmp(ibin), ivar(0) ;
1529 for (
unsigned int i = 0; !skip && i <
_vars.
size(); ++i) {
1532 if (mask[ivar] && idx!=refBin[ivar]) skip=
kTRUE ;
1573 const std::map<
const RooAbsArg*, std::pair<Double_t, Double_t> >& ranges)
1582 _vars = sliceOnlySet;
1589 std::vector<Double_t> rangeLo(
_vars.
getSize(), -std::numeric_limits<Double_t>::infinity());
1590 std::vector<Double_t> rangeHi(
_vars.
getSize(), +std::numeric_limits<Double_t>::infinity());
1592 for (std::size_t i = 0; i <
_vars.
size(); ++i) {
1593 const auto arg =
_vars[i];
1600 refBin[i] = argLV->getBin();
1602 std::map<const RooAbsArg*, std::pair<Double_t, Double_t> >::const_iterator
1603 it = ranges.find(sumsetv ? sumsetv : slicesetv);
1604 if (ranges.end() != it) {
1605 rangeLo[i] = it->second.first;
1606 rangeHi[i] = it->second.second;
1615 for (
int ivar = 0, tmp = ibin; !skip && ivar < int(
_vars.
size()); ++ivar) {
1618 if (mask[ivar] && idx!=refBin[ivar]) skip=
kTRUE;
1625 for (
Int_t ivar = 0, tmp = ibin; ivar < (int)
_vars.
size(); ++ivar) {
1631 if (binHi < rangeLo[ivar] || binLo > rangeHi[ivar]) {
1637 (std::min(rangeHi[ivar], binHi) - std::max(rangeLo[ivar], binLo));
1640 if (0. == corrPartial)
continue;
1641 const Double_t corr = correctForBinSize ? (inverseBinCor ? 1. /
_binv[ibin] :
_binv[ibin] ) : 1.0;
1670 pbinv =
new vector<Double_t>(
_arrSize) ;
1675 for (
const auto v :
_vars) {
1681 for (ibin=0 ; ibin<
_arrSize ; ibin++) {
1682 Int_t j(0), idx(0), tmp(ibin) ;
1684 for (
const auto absArg :
_vars) {
1692 theBinVolume *= arg->getBinWidth(idx) ;
1695 (*pbinv)[ibin] = theBinVolume ;
1730 carry = (t -
n) -
y;
1748 if (cutSpec==0 && cutRange==0) {
1763 if (select && select->
eval()==0.) continue ;
1769 carry = (t - sumw) -
y;
1774 if (select)
delete select ;
1874 coutE(
InputArguments) <<
"RooDataHist::sliceIterator() variable " << sliceArg.
GetName() <<
" is not part of this RooDataHist" << endl ;
1921 for (
const auto arg :
_vars) {
1927 os << arg->GetName() ;
2002 os <<
indent <<
" Observables " <<
_vars << endl ;
2004 os <<
indent <<
" Observables: " ;
2020void RooDataHist::Streamer(
TBuffer &R__b)
2043 RooAbsData::Streamer(R__b);
2044 TTree* X_tree(0) ; R__b >> X_tree;
2045 RooArgSet X_truth ; X_truth.Streamer(R__b);
2046 TString X_blindString ; X_blindString.Streamer(R__b);
2056 RooDirItem::Streamer(R__b);
static void indent(ostringstream &buf, int indent_level)
static unsigned int total
float type_of_call hi(const int &, const int &)
double pow(double, double)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Bool_t inRange(const char *) const
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
virtual RooAbsBinning * clone(const char *name=0) const =0
virtual Double_t binCenter(Int_t bin) const =0
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set category to i-th fit bin, which is the i-th registered state.
virtual Int_t numBins(const char *rangeName) const
Returm the number of fit bins ( = number of types )
const RooCatType * lookupType(Int_t index, Bool_t printError=kFALSE) const
Find our type corresponding to the specified index, or return 0 for no match.
RooFIter fwdIterator() const R__SUGGEST_ALTERNATIVE("begin()
One-time forward iterator.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, Bool_t oneSafe=kFALSE)
The assignment operator sets the value of any argument in our set that also appears in the other set.
Storage_t::size_type size() const
void assignFast(const RooAbsCollection &other, Bool_t setValDirty=kTRUE)
Functional equivalent of operator=() but assumes this and other collection have same layout.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
TIterator * createIterator(Bool_t dir=kIterForward) const R__SUGGEST_ALTERNATIVE("begin()
TIterator-style iteration over contained elements.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
virtual void checkInit() const
virtual void setExternalWeightArray(Double_t *, Double_t *, Double_t *, Double_t *)
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
virtual Double_t weight() const =0
static StorageType defaultStorageType
virtual Double_t weightSquared() const =0
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
virtual Int_t numEntries() const
virtual RooPlot * plotOn(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()) const
Calls RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const ;.
RooAbsDataStore * _dstore
External variables cached with this data set.
Abstract base class for objects that are lvalues, i.e.
virtual void setBin(Int_t ibin, const char *rangeName=0)=0
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
virtual Int_t numBins(const char *rangeName=0) const
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const
virtual Int_t getBins(const char *name=0) const
Get number of bins of currently defined range.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
virtual Int_t getBin(const char *rangeName=0) const
virtual void setBinFast(Int_t ibin, const RooAbsBinning &binning)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values,...
virtual void setRange(Double_t xlo, Double_t xhi)
Change the defined range associated with this binning.
virtual Int_t binNumber(Double_t x) const
Return sequential bin number that contains value x where bin zero is the first bin with an upper boun...
virtual Double_t averageBinWidth() const
virtual Double_t binLow(Int_t bin) const
Return the lower bound of the requested bin.
virtual Int_t rawBinNumber(Double_t x) const
Return sequential bin number that contains value x where bin zero is the first bin that is defined,...
void addUniform(Int_t nBins, Double_t xlo, Double_t xhi)
Add array of nbins uniformly sized bins in range [xlo,xhi].
virtual Double_t binHigh(Int_t bin) const
Return the upper bound of the requested bin.
RooCategory represents a fundamental (non-derived) discrete value object.
virtual const char * getLabel() const
Return label string of current state.
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE)
Set value by specifying the name of the desired state If printError is set, a message will be printed...
Bool_t defineType(const char *label)
Define a state with given name, the lowest available positive integer is assigned as index.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
The RooDataHist is a container class to hold N-dimensional binned data.
std::vector< Double_t > * _pbinv
Double_t sum(Bool_t correctForBinSize, Bool_t inverseCorr=kFALSE) const
Return the sum of the weights of all hist bins.
virtual void printArgs(std::ostream &os) const
Print argument of dataset, i.e. the observable names.
virtual void reset()
Reset all bin weights to zero.
void dump2()
Debug stuff, should go...
void initialize(const char *binningName=0, Bool_t fillTree=kTRUE)
Initialization procedure: allocate weights array, calculate multipliers needed for N-space to 1-dim a...
virtual Double_t weight() const
Int_t _cache_sum_valid
list of bin bounds per dimension
void SetNameTitle(const char *name, const char *title)
Change the title of this RooDataHist.
Double_t _curWeight
Valid bins with current range definition.
friend class RooDataHistSliceIter
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.
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.
virtual Double_t sumEntries() const
Double_t weightSquared() const
RooCacheManager< std::vector< Double_t > > _pbinvCacheMgr
Partial bin volume array.
void checkBinBounds() const
virtual void weightError(Double_t &lo, Double_t &hi, ErrorType etype=Poisson) const
Return the error on current weight.
virtual Int_t numEntries() const
Return the number of bins.
virtual RooAbsData * cacheClone(const RooAbsArg *newCacheOwner, const RooArgSet *newCacheVars, const char *newName=0)
Construct a clone of this dataset that contains only the cached variables.
virtual Double_t get_wgt(const Int_t &idx) const
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
std::vector< const RooAbsBinning * > _lvbins
List of observables casted as RooAbsLValue.
RooDataHist()
Default constructor.
Bool_t * _binValid
Iterator over realVars.
void importTH1Set(const RooArgList &vars, RooCategory &indexCat, std::map< std::string, TH1 * > hmap, Double_t initWgt, Bool_t doDensityCorrection)
Import data from given set of TH1/2/3 into this RooDataHist.
virtual void printValue(std::ostream &os) const
Print value of the dataset, i.e. the sum of weights contained in the dataset.
virtual Bool_t isNonPoissonWeighted() const
Returns true if datasets contains entries with a non-integer weight.
Int_t getIndex(const RooArgSet &coord, Bool_t fast=kFALSE)
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 'xva...
void _adjustBinning(RooRealVar &theirVar, const TAxis &axis, RooRealVar *ourVar, Int_t *offset)
Cache for sum of entries ;.
std::vector< std::vector< Double_t > > _binbounds
List of used binnings associated with lvalues.
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.
void importTH1(const RooArgList &vars, const TH1 &histo, Double_t initWgt, Bool_t doDensityCorrection)
Import data from given TH1/2/3 into this RooDataHist.
virtual const RooArgSet * get() const
Int_t calcTreeIndex() const
Calculate the index for the weights array corresponding to to the bin enclosing the current coordinat...
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details on the dataset contents.
void setAllWeights(Double_t value)
Set all the event weight of all bins to the specified value.
virtual ~RooDataHist()
Destructor.
virtual RooPlot * plotOn(RooPlot *frame, PlotOpt o) const
Back end function to plotting functionality.
void importDHistSet(const RooArgList &vars, RooCategory &indexCat, std::map< std::string, RooDataHist * > dmap, Double_t initWgt)
Import data from given set of TH1/2/3 into this RooDataHist.
std::vector< RooAbsLValue * > _lvvars
Cache manager for arrays of partial bin volumes.
virtual Bool_t valid() const
Return true if currently loaded coordinate is considered valid within the current range definitions o...
void cacheValidEntries()
Cache the datahist entries with bin centers that are inside/outside the current observable definitio.
std::vector< Int_t > _idxMult
void adjustBinning(const RooArgList &vars, const TH1 &href, Int_t *offset=0)
Adjust binning specification on first and optionally second and third observable to binning in given ...
void SetName(const char *name)
Change the name of the RooDataHist.
Double_t _cache_sum
Is cache sum valid.
Double_t binVolume() const
void calculatePartialBinVolume(const RooArgSet &dimSet) const
Fill the transient cache with partial bin volumes with up-to-date values for the partial volume speci...
RooDirItem is a utility base class for RooFit objects that are to be attached to ROOT directories.
void appendToDir(TObject *obj, Bool_t forceMemoryResident=kFALSE)
Append object to directory.
void removeFromDir(TObject *obj)
Remove object from directory it was added to.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
Bool_t getPoissonInterval(Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const
Return a confidence interval for the expected number of events given n observed (unweighted) events.
static const RooHistError & instance()
Return a reference to a singleton object that is created the first time this method is called.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TIterator * MakeIterator(Bool_t forward=kTRUE) const
Create a TIterator for this list.
static Double_t interpolate(Double_t yArr[], Int_t nOrder, Double_t x)
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooAbsRealLValue * getPlotVar() const
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
RooRealVar represents a fundamental (non-derived) real valued object.
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
void setBinning(const RooAbsBinning &binning, const char *name=0)
Add given binning under name 'name' with this variable.
RooTreeDataStore is a TTree-backed data storage.
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
const Double_t * GetArray() const
Class to manage histogram axis.
const TArrayD * GetXbins() const
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual TList * GetList() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
A TTree represents a columnar dataset.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static constexpr double pc
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Bool_t correctForBinWidth