72static std::map<RooAbsData*,int>
_dcc ;
81 cout <<
"Composite storage is not a valid *default* storage type." << endl;
112 return (
_dcc[data]==0) ;
132 TNamed(
name,title), _vars(
"Dataset Variables"), _cachedVars(
"Cached Variables"), _dstore(dstore)
150 <<
"): Data set cannot contain non-fundamental types, ignoring " << var->
GetName()
172 TNamed(newname?newname:other.GetName(),other.GetTitle()),
174 _cachedVars(
"Cached Variables")
181 for (
const auto var :
_vars) {
190 map<string,RooAbsDataStore*> smap ;
194 smap[itero.first] = dclone->
store();
213 RooPrintable::operator=(other);
220 for (
const auto var :
_vars) {
229 map<string,RooAbsDataStore*> smap ;
233 smap[itero.first] = dclone->
store();
266 delete iter->second ;
392 pc.
defineInt(
"evtStart",
"EventRange",0,0) ;
393 pc.
defineInt(
"evtStop",
"EventRange",1,std::numeric_limits<int>::max()) ;
398 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
408 Int_t nStop = pc.
getInt(
"evtStop",std::numeric_limits<int>::max()) ;
416 varSubset.
add(*varSet) ;
417 for (
const auto arg : varSubset) {
419 coutW(InputArguments) <<
"RooAbsData::reduce(" <<
GetName() <<
") WARNING: variable "
420 << arg->GetName() <<
" not in dataset, ignored" << endl ;
490 for (
const auto arg : varSubset) {
492 coutW(InputArguments) <<
"RooAbsData::reduce(" <<
GetName() <<
") WARNING: variable "
493 << arg->GetName() <<
" not in dataset, ignored" << endl ;
498 if (cut && strlen(cut)>0) {
500 return reduceEng(varSubset2,&cutVar,0,0,std::numeric_limits<std::size_t>::max(),
kFALSE) ;
502 return reduceEng(varSubset2,0,0,0,std::numeric_limits<std::size_t>::max(),
kFALSE) ;
520 coutW(InputArguments) <<
"RooAbsData::reduce(" <<
GetName() <<
") WARNING: variable "
521 << arg->
GetName() <<
" not in dataset, ignored" << endl ;
527 return reduceEng(varSubset2,&cutVar,0,0,std::numeric_limits<std::size_t>::max(),
kFALSE) ;
571 strlcpy(buf,varNameList,1024) ;
572 char* varName = strtok(buf,
",:") ;
576 coutE(InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
579 varName = strtok(0,
",") ;
581 if (varName && !yvar) {
582 coutE(InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
585 varName = strtok(0,
",") ;
587 if (varName && !zvar) {
588 coutE(InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
595 if (xbins<=0 || !xvar->hasMax() || !xvar->
hasMin() ) {
602 if (ybins<=0 || !yvar->hasMax() || !yvar->
hasMin() ) {
610 if (zbins<=0 || !zvar->hasMax() || !zvar->
hasMin() ) {
709 ownedCmds.
Add(bincmd) ;
710 argList.
Replace(autoRD,bincmd) ;
720 ((
RooCmdArg*)argList.
find(
"YVar"))->subArgs().Replace(autoRDY,bincmd) ;
732 ((
RooCmdArg*)argList.
find(
"ZVar"))->subArgs().Replace(autoRDZ,bincmd) ;
753 string prodName(
"(") ;
759 if (varsArg != 0) catSet2.
add(*varsArg) ;
760 else catSet2.
add(*arg) ;
761 if (prodName.length()>1) {
766 coutW(InputArguments) <<
"RooAbsData::table(" <<
GetName() <<
") non-RooAbsCategory input argument " << arg->
GetName() <<
" ignored" << endl ;
773 return table(tmp,cuts,opts) ;
797 os << IsA()->GetName() ;
827 if (order==1)
return 0 ;
828 if (order==2)
return 1 ;
846 return moment(var,order,offset,cutSpec,cutRange) ;
861 coutE(InputArguments) <<
"RooDataSet::moment(" <<
GetName() <<
") ERROR: unknown variable: " << var.
GetName() << endl ;
865 auto varPtr =
dynamic_cast<const RooRealVar*
>(arg);
868 coutE(InputArguments) <<
"RooDataSet::moment(" <<
GetName() <<
") ERROR: variable " << var.
GetName() <<
" is not of type RooRealVar" << endl ;
874 coutE(InputArguments) <<
"RooDataSet::moment(" <<
GetName() <<
") WARNING: empty dataset" << endl ;
879 std::unique_ptr<RooFormula> select;
890 if (select && select->eval()==0) continue ;
891 if (cutRange && vars->
allInRange(cutRange)) continue ;
906 coutE(InputArguments) <<
"RooDataSet::" << methodname <<
"(" <<
GetName() <<
") ERROR: variable : " << extVar.
GetName() <<
" is not in data" << endl ;
911 coutE(InputArguments) <<
"RooDataSet::" << methodname <<
"(" <<
GetName() <<
") ERROR: variable : " << extVar.
GetName() <<
" is not of type RooRealVar in data" << endl ;
925 if (!xdata||!ydata)
return 0 ;
929 coutW(InputArguments) <<
"RooDataSet::" << (corr?
"correlation":
"covariance") <<
"(" <<
GetName() <<
") WARNING: empty dataset, returning zero" << endl ;
937 Double_t xysum(0),xsum(0),ysum(0),x2sum(0),y2sum(0);
941 if (select && select->
eval()==0) continue ;
942 if (cutRange && vars->
allInRange(cutRange)) continue ;
946 ysum +=
weight()*ydata->getVal() ;
949 y2sum +=
weight()*ydata->getVal()*ydata->getVal() ;
963 if (select)
delete select ;
967 return (xysum-xsum*ysum)/(
sqrt(x2sum-(xsum*xsum))*
sqrt(y2sum-(ysum*ysum))) ;
969 return (xysum-xsum*ysum);
987 varList.
add(*datavar) ;
994 coutW(InputArguments) <<
"RooDataSet::covariance(" <<
GetName() <<
") WARNING: empty dataset, returning zero" << endl ;
1005 vector<double> xsum(varList.
getSize()) ;
1006 vector<double> x2sum(varList.
getSize()) ;
1011 if (select && select->
eval()==0) continue ;
1012 if (cutRange && dvars->
allInRange(cutRange)) continue ;
1023 *iter2=*iter ; iy=ix ;
1027 xysum(iy,ix) = xysum(ix,iy) ;
1043 xysum(ix,iy) /=
sumEntries(cutSpec, cutRange) ;
1051 (*C)(ix,iy) = xysum(ix,iy)-xsum[ix]*xsum[iy] ;
1053 (*C)(ix,iy) /=
sqrt((x2sum[ix]-(xsum[ix]*xsum[ix]))*(x2sum[iy]-(xsum[iy]*xsum[iy]))) ;
1058 if (select)
delete select ;
1079 name.Append(
"Mean");
1185 pc.
defineInt(
"dummy",
"FormatArgs",0,0) ;
1196 const char* label = pc.
getString(
"label") ;
1200 const char* formatStr = pc.
getString(
"formatStr") ;
1209 return statOn(frame,
what,label,0,0,
xmin,
xmax,
ymax,cutSpec,cutRange,formatCmd) ;
1220 const char* cutSpec,
const char* cutRange,
const RooCmdArg* formatCmd)
1222 Bool_t showLabel= (label != 0 && strlen(label) > 0);
1236 if(showLabel)
ymin-= dy;
1242 box->SetFillColor(0);
1243 box->SetBorderSize(1);
1244 box->SetTextAlign(12);
1245 box->SetTextSize(0.04F);
1246 box->SetFillStyle(1001);
1250 N.setPlotLabel(
"Entries") ;
1255 TString *rmsText, *meanText, *NText ;
1257 rmsText= rms->
format(sigDigits,options);
1258 meanText= meanv->
format(sigDigits,options);
1259 NText=
N.format(sigDigits,options);
1261 rmsText= rms->
format(*formatCmd);
1262 meanText= meanv->
format(*formatCmd);
1263 NText=
N.format(*formatCmd);
1265 if (showR)
box->AddText(rmsText->
Data());
1266 if (showM)
box->AddText(meanText->
Data());
1267 if (showN)
box->AddText(NText->
Data());
1277 if(showLabel)
box->AddText(label);
1293 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: no valid histogram to fill" << endl;
1299 if(hdim != plotVars.
getSize()) {
1300 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: plotVars has the wrong dimension" << endl;
1308 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1313 <<
"\" of type " << var->
ClassName() << endl;
1322 <<
":fillHistogram: Data does not contain the variable '" << realVar->
GetName() <<
"'." << endl;
1328 localVars.
add(*clone);
1331 localVars.
add(*found);
1336 std::unique_ptr<RooFormula> select;
1337 if (cuts !=
nullptr && strlen(cuts) > 0) {
1339 if (!select || !select->ok()) {
1340 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: invalid cuts \"" << cuts <<
"\"" << endl;
1363 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: cannot fill histogram with "
1364 << hdim <<
" dimensions" << endl;
1369 vector<string> cutVec ;
1370 if (cutRange && strlen(cutRange)>0) {
1371 if (strchr(cutRange,
',')==0) {
1372 cutVec.push_back(cutRange) ;
1374 const size_t bufSize = strlen(cutRange)+1;
1375 char* buf =
new char[bufSize] ;
1376 strlcpy(buf,cutRange,bufSize) ;
1377 const char* oneRange = strtok(buf,
",") ;
1379 cutVec.push_back(oneRange) ;
1380 oneRange = strtok(0,
",") ;
1391 for(
Int_t i=0; i < nevent; ++i) {
1398 if (select && select->eval()==0) {
1406 for (
const auto arg :
_vars) {
1409 for (icut=0 ; icut<cutVec.size() ; icut++) {
1410 if (arg->inRange(cutVec[icut].c_str())) {
1411 selectThisArg =
kTRUE ;
1415 if (!selectThisArg) {
1422 if (!selectByRange) {
1449 if (we==0) we =
weight() ;
1483 coutE(InputArguments) <<
"RooTreeData::split(" <<
GetName() <<
") ERROR category " << splitCat.
GetName()
1484 <<
" doesn't depend on any variable in this dataset" << endl ;
1494 coutE(InputArguments) <<
"RooTreeData::split(" <<
GetName() <<
") Couldn't deep-clone splitting category, abort." << endl ;
1502 coutE(InputArguments) <<
"RooTreeData::split(" <<
GetName() <<
") ERROR category " << splitCat.
GetName()
1503 <<
" is fundamental and does not appear in this dataset" << endl ;
1525 RooRealVar newweight(
"weight",
"weight",-1e9,1e9) ;
1527 subsetVars.
add(newweight) ;
1532 if (createEmptyDataSets) {
1533 for (
const auto& nameIdx : *cloneCat) {
1534 RooAbsData* subset =
emptyClone(nameIdx.first.c_str(), nameIdx.first.c_str(), &subsetVars,(addWV?
"weight":0)) ;
1549 if (!propWeightSquared) {
1637 pc.
defineInt(
"nbins",
"BinningSpec",0,100) ;
1642 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1643 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1644 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1645 pc.
defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1646 pc.
defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
1648 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1649 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1651 pc.
defineInt(
"histInvisible",
"Invisible",0,0) ;
1652 pc.
defineInt(
"refreshFrameNorm",
"RefreshNorm",0,1) ;
1658 pc.
defineMutex(
"DataError",
"Asymmetry",
"Efficiency") ;
1659 pc.
defineMutex(
"Binning",
"BinningName",
"BinningSpec") ;
1699 coutI(InputArguments) <<
"RooAbsData::plotOn(" <<
GetName()
1700 <<
") INFO: dataset has non-integer weights, auto-selecting SumW2 errors instead of Poisson errors" << endl ;
1706 <<
" to add to in RooPlot" << endl ;
1711 if (!asymCat && !effCat) {
1713 }
else if (asymCat) {
1764 <<
":plotOn: frame does not specify a plot variable" << endl;
1770 histName.
Append(
"_plot");
1784 <<
":plotOn: fillHistogram() failed" << endl;
1801 <<
":plotOn: unable to create a RooHist object" << endl;
1818 coutI(Plotting) <<
"RooTreeData::plotOn: plotting " << hist->
GetSum() <<
" events out of " << nEnt <<
" total events" << endl ;
1819 graph->setRawEntries(nEnt) ;
1826 if (!
graph->hasIdenticalBinning(*otherGraph)) {
1827 coutE(Plotting) <<
"RooTreeData::plotOn: ERROR Histogram to be added to, '" << o.
addToHistName <<
"',has different binning" << endl ;
1889 <<
":plotAsymOn: frame does not specify a plot variable" << endl;
1895 hist1Name.Append(
"_plot1");
1896 TH1F *hist1, *hist2 ;
1897 hist2Name.
Append(
"_plot2");
1911 assert(0 != hist1 && 0 != hist2);
1925 <<
":plotAsymOn: createHistogram() failed" << endl;
1983 <<
":plotEffOn: frame does not specify a plot variable" << endl;
1989 hist1Name.Append(
"_plot1");
1990 TH1F *hist1, *hist2 ;
1991 hist2Name.
Append(
"_plot2");
2005 assert(0 != hist1 && 0 != hist2);
2019 <<
":plotEffOn: createHistogram() failed" << endl;
2072 <<
" is not in dataset and is also not dependent on data set" << endl ;
2079 coutE(Plotting) <<
"RooTreeData::table(" <<
GetName() <<
") Couldn't deep-clone table category, abort." << endl ;
2083 ownPlotVar =
kTRUE ;
2090 if (cuts && strlen(cuts)) {
2099 if (cuts && strlen(cuts)) {
2105 for(
Int_t i=0; i < nevent; ++i) {
2108 if (cutVar && cutVar->
getVal()==0) continue ;
2113 if (ownPlotVar)
delete tableSet ;
2114 if (cutVar)
delete cutVar ;
2129 coutE(InputArguments) <<
"RooDataSet::getRange(" <<
GetName() <<
") ERROR: unknown variable: " << var.
GetName() << endl ;
2133 auto varPtr =
dynamic_cast<const RooRealVar*
>(arg);
2136 coutE(InputArguments) <<
"RooDataSet::getRange(" <<
GetName() <<
") ERROR: variable " << var.
GetName() <<
" is not of type RooRealVar" << endl ;
2142 coutE(InputArguments) <<
"RooDataSet::getRange(" <<
GetName() <<
") WARNING: empty dataset" << endl ;
2151 if (varPtr->getVal()<lowest) {
2152 lowest = varPtr->getVal() ;
2154 if (varPtr->getVal()>highest) {
2155 highest = varPtr->getVal() ;
2162 Double_t margin = marginFrac*(highest-lowest) ;
2171 Double_t delta = ((highest-mom1)>(mom1-lowest)?(highest-mom1):(mom1-lowest))*(1+marginFrac) ;
2172 lowest = mom1-delta ;
2173 highest = mom1+delta ;
2203 pruneSet.
add(*var) ;
2243 cxcoutI(Optimization) <<
"RooTreeData::optimizeReadingForTestStatistic(" <<
GetName() <<
"): Observables " << pruneSet
2244 <<
" in dataset are either not used at all, orserving exclusively p.d.f nodes that are now cached, disabling reading of these observables for TTree" << endl ;
2262 if (!cacheList.
find(client->GetName())) {
2268 return anyClient?ret:
kFALSE ;
2314void RooAbsData::Streamer(
TBuffer &R__b)
2361 coutW(InputArguments) <<
"RooAbsData::tree(" <<
GetName() <<
") WARNING: is not of StorageType::Tree. "
2362 <<
"Use GetClonedTree() instead or convert to tree storage." << endl;
2363 return (
TTree *)
nullptr;
2402 if (iter.second == obj) {
2403 iter.second =
nullptr;
static std::map< RooAbsData *, int > _dcc
TMatrixTSym< Double_t > TMatrixDSym
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
Roo1DTable implements a one-dimensional table.
virtual void fill(RooAbsCategory &cat, Double_t weight=1.0)
Increment the counter of the table slot with the name corresponding to that of the current category s...
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Recursively replace all servers with the new servers in newSet.
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
void SetName(const char *name)
Set the name of the TNamed.
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
virtual Bool_t isShareable() const
If true (default), the range definition can be shared across clones of a RooRealVar.
virtual RooAbsReal * highBoundFunc() const
Return pointer to RooAbsReal parameterized upper bound, if any.
virtual RooAbsReal * lowBoundFunc() const
Return pointer to RooAbsReal parameterized lower bound, if any.
virtual Double_t averageBinWidth() const =0
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual const char * getCurrentLabel() const
Return label string of current state.
const std::string & lookupName(value_type index) const
Get the name corresponding to the given index.
Roo1DTable * createTable(const char *label) const
Create a table matching the shape of this category.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
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 attachBuffers(const RooArgSet &extObs)=0
virtual Bool_t hasFilledCache() const
virtual Bool_t changeObservableName(const char *from, const char *to)=0
virtual const RooArgSet * get(Int_t index) const =0
virtual void resetBuffers()=0
virtual const TTree * tree() const
virtual void cacheArgs(const RooAbsArg *cacheOwner, RooArgSet &varSet, const RooArgSet *nset=0, Bool_t skipZeroWeights=kFALSE)=0
void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TString indent) const
Detailed printing interface.
virtual void checkInit() const
virtual RooAbsDataStore * clone(const char *newname=0) const =0
virtual void setDirtyProp(Bool_t flag)
virtual void resetCache()=0
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)=0
virtual void setArgStatus(const RooArgSet &set, Bool_t active)=0
virtual Int_t numEntries() const =0
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooRealVar * meanVar(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Create a RooRealVar containing the mean of observable 'var' in this dataset.
virtual const RooArgSet * get() const
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
RooAbsData()
Default constructor.
static void setDefaultStorageType(StorageType s)
virtual Bool_t changeObservableName(const char *from, const char *to)
RooRealVar * dataRealVar(const char *methodname, const RooRealVar &extVar) const
Internal method to check if given RooRealVar maps to a RooRealVar in this dataset.
virtual Roo1DTable * table(const RooArgSet &catSet, const char *cuts="", const char *opts="") const
Construct table for product of categories in catSet.
RooAbsDataStore * store()
virtual Double_t weightError(ErrorType etype=Poisson) const
Return error on current weight (dummy implementation returning zero)
static Bool_t releaseVars(RooAbsData *)
If return value is true variables can be deleted.
TMatrixDSym * corrcovMatrix(const RooArgList &vars, const char *cutSpec, const char *cutRange, Bool_t corr) const
Return covariance matrix from data for given list of observables.
virtual Bool_t isNonPoissonWeighted() const
virtual TList * split(const RooAbsCategory &splitCat, Bool_t createEmptyDataSets=kFALSE) const
Split dataset into subsets based on states of given splitCat in this dataset.
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual RooPlot * 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())
Add a box with statistics information to the specified frame.
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
virtual TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cuts="", const char *cutRange=0) const
Loop over columns of our tree data and fill the input histogram.
TH1 * 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
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
virtual RooPlot * plotEffOn(RooPlot *frame, const RooAbsCategoryLValue &effCat, PlotOpt o) const
Create and fill a histogram with the efficiency N[1] / ( N[1] + N[0] ), where N(1/0) is the number of...
virtual void optimizeReadingWithCaching(RooAbsArg &arg, const RooArgSet &cacheList, const RooArgSet &keepObsList)
Prepare dataset for use with cached constant terms listed in 'cacheList' of expression 'arg'.
static void claimVars(RooAbsData *)
virtual Double_t weight() const =0
static StorageType defaultStorageType
virtual Double_t weightSquared() const =0
Double_t standMoment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate standardized moment.
virtual Bool_t isWeighted() const
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())
Create a reduced copy of this dataset.
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
virtual void printName(std::ostream &os) const
Print name of dataset.
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
Create and fill a histogram with the asymmetry N[+] - N[-] / ( N[+] + N[-] ), where N(+/-) is the num...
RooAbsData * getSimData(const char *idxstate)
virtual void Draw(Option_t *option="")
Forward draw command to data store.
virtual RooAbsData * reduceEng(const RooArgSet &varSubset, const RooFormulaVar *cutVar, const char *cutRange=0, std::size_t nStart=0, std::size_t=std::numeric_limits< std::size_t >::max(), Bool_t copyCache=kTRUE)=0
RooRealVar * rmsVar(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Create a RooRealVar containing the RMS of observable 'var' in this dataset.
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
Double_t corrcov(const RooRealVar &x, const RooRealVar &y, const char *cutSpec, const char *cutRange, Bool_t corr) const
Internal method to calculate single correlation and covariance elements.
void convertToVectorStore()
Convert tree-based storage to vector-based storage.
virtual void add(const RooArgSet &row, Double_t weight=1, Double_t weightError=0)=0
Bool_t getRange(const RooAbsRealLValue &var, Double_t &lowest, Double_t &highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
virtual void convertToTreeStore()
Convert vector-based storage to tree-based storage.
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default print options, for a given print style.
RooAbsData & operator=(const RooAbsData &other)
Double_t moment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
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
virtual void resetCache()
Internal method – Remove cached function values.
Bool_t hasFilledCache() const
TTree * GetClonedTree() const
Return a clone of the TTree which stores the data or create such a tree if vector storage is used.
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=0, Bool_t skipZeroWeights=kFALSE)
Internal method – Cache given set of functions with data.
void attachBuffers(const RooArgSet &extObs)
virtual RooAbsData * emptyClone(const char *newName=0, const char *newTitle=0, const RooArgSet *vars=0, const char *wgtVarName=0) const =0
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
virtual void printClassName(std::ostream &os) const
Print class name of dataset.
std::map< std::string, RooAbsData * > _ownedComponents
static StorageType getDefaultStorageType()
Bool_t canSplitFast() const
virtual void printTitle(std::ostream &os) const
Print title of dataset.
RooAbsDataStore * _dstore
External variables cached with this data set.
const TTree * tree() const
Return a pointer to the TTree which stores the data.
Bool_t allClientsCached(RooAbsArg *, const RooArgSet &)
Utility function that determines if all clients of object 'var' appear in given list of cached nodes.
void setDirtyProp(Bool_t flag)
Control propagation of dirty flags from observables in dataset.
virtual ~RooAbsData()
Destructor.
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 const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
Retrive binning configuration with given name or default binning.
virtual Int_t numBins(const char *rangeName=0) const
TH1 * createHistogram(const char *name, 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
void setConstant(Bool_t value=kTRUE)
Bool_t hasMin(const char *name=0) const
Check if variable has a lower bound.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
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.
const char * getPlotLabel() const
Get the label associated with the variable.
void setPlotLabel(const char *label)
Set the label associated with this variable.
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.
Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to non-owning set.
RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add clone of specified element to an owning set.
RooCategory is an object to represent discrete states.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Double_t getDouble(Int_t idx) const
Int_t getInt(Int_t idx) const
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
void allowUndefined(Bool_t flag=kTRUE)
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
RooCompositeDataStore combines several disjunct datasets into one.
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
TObject * find(const char *name) const
Return pointer to object with given name in collection.
virtual void Add(TObject *arg)
Bool_t Replace(const TObject *oldArg, const TObject *newArg)
Replace object 'oldArg' in collection with new object 'newArg'.
RooMultiCategory connects several RooAbsCategory objects into a single category.
static Double_t infinity()
Return internal infinity representation.
A RooPlot is a plot frame and a container for graphics objects within that frame.
TAttMarker * getAttMarker(const char *name=0) const
Return a pointer to the marker attributes of the named object in this plot, or zero if the named obje...
void addObject(TObject *obj, Option_t *drawOptions="", Bool_t invisible=kFALSE)
Add a generic object to this plot.
Double_t getFitRangeNEvt() const
Return the number of events in the fit range.
Double_t getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
TAttFill * getAttFill(const char *name=0) const
Return a pointer to the fill attributes of the named object in this plot, or zero if the named object...
RooAbsRealLValue * getPlotVar() const
TAttLine * getAttLine(const char *name=0) const
Return a pointer to the line attributes of the named object in this plot, or zero if the named object...
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
TObject * findObject(const char *name, const TClass *clas=0) const
Find the named object in our list of items and return a pointer to it.
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
RooRealVar represents a variable that can be changed from the outside.
void setError(Double_t value)
TString * format(const RooCmdArg &formatArg) const
Format contents of RooRealVar for pretty printing on RooPlot parameter boxes.
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
static void destroy(const TObject *obj)
Register deletion of object 'obj'.
static void create(const TObject *obj)
Register creation of object 'obj'.
RooTreeDataStore is a TTree-backed data storage.
RooVectorDataStore uses std::vectors to store data columns.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
1-D histogram with a float per channel (see TH1 documentation)}
TH1 is the base class of all histogram classes in ROOT.
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetDimension() const
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual TArrayD * GetSumw2()
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Service class for 2-Dim histogram classes.
The 3-D histogram classes derived from the 1-D histogram classes.
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
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 TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
A Pave (see TPave) with text, lines or/and boxes inside.
const char * Data() const
void ToUpper()
Change string to upper case.
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg AxisLabel(const char *name)
RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1)
RooCmdArg Binning(const RooAbsBinning &binning)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
const char * addToHistName
RooAbsData::ErrorType etype
Bool_t correctForBinWidth
static uint64_t sum(uint64_t i)