71static std::map<RooAbsData*,int>
_dcc ;
80 cout <<
"Composite storage is not a valid *default* storage type." << endl;
133 TNamed(
name,title), _vars(
"Dataset Variables"), _cachedVars(
"Cached Variables"), _dstore(dstore)
151 <<
"): Data set cannot contain non-fundamental types, ignoring " << var->
GetName()
178 _cachedVars(
"Cached Variables")
201 map<string,RooAbsDataStore*> smap ;
205 smap[itero->first] = dclone->
store() ;
244 delete iter->second ;
365 pc.defineString(
"name",
"Name",0,
"") ;
366 pc.defineString(
"title",
"Title",0,
"") ;
367 pc.defineString(
"cutRange",
"CutRange",0,
"") ;
368 pc.defineString(
"cutSpec",
"CutSpec",0,
"") ;
369 pc.defineObject(
"cutVar",
"CutVar",0,0) ;
370 pc.defineInt(
"evtStart",
"EventRange",0,0) ;
371 pc.defineInt(
"evtStop",
"EventRange",1,2000000000) ;
372 pc.defineObject(
"varSel",
"SelectVars",0,0) ;
373 pc.defineMutex(
"CutVar",
"CutSpec") ;
376 pc.process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
382 const char* cutRange =
pc.getString(
"cutRange",0,
kTRUE) ;
383 const char* cutSpec =
pc.getString(
"cutSpec",0,
kTRUE) ;
385 Int_t nStart =
pc.getInt(
"evtStart",0) ;
386 Int_t nStop =
pc.getInt(
"evtStop",2000000000) ;
389 const char* title =
pc.getString(
"title",0,
kTRUE) ;
394 varSubset.
add(*varSet) ;
400 << arg->
GetName() <<
" not in dataset, ignored" << endl ;
476 << arg->
GetName() <<
" not in dataset, ignored" << endl ;
482 if (cut && strlen(cut)>0) {
505 << arg->
GetName() <<
" not in dataset, ignored" << endl ;
555 strlcpy(buf,varNameList,1024) ;
556 char* varName = strtok(buf,
",:") ;
560 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
563 varName = strtok(0,
",") ;
565 if (varName && !yvar) {
566 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
569 varName = strtok(0,
",") ;
571 if (varName && !zvar) {
572 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varName << endl ;
579 if (xbins<=0 || !xvar->hasMax() || !xvar->
hasMin() ) {
586 if (ybins<=0 || !yvar->hasMax() || !yvar->
hasMin() ) {
594 if (zbins<=0 || !zvar->hasMax() || !zvar->
hasMin() ) {
659 pc.defineString(
"cutRange",
"CutRange",0,
"",
kTRUE) ;
660 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
661 pc.defineObject(
"yvar",
"YVar",0,0) ;
662 pc.defineObject(
"zvar",
"ZVar",0,0) ;
663 pc.allowUndefined() ;
666 pc.process(argList) ;
671 const char* cutSpec =
pc.getString(
"cutString",0,
kTRUE) ;
672 const char* cutRange =
pc.getString(
"cutRange",0,
kTRUE) ;
684 pc.stripCmdList(argList,
"CutRange,CutSpec") ;
693 ownedCmds.
Add(bincmd) ;
694 argList.
Replace(autoRD,bincmd) ;
704 ((
RooCmdArg*)argList.
find(
"YVar"))->subArgs().Replace(autoRDY,bincmd) ;
716 ((
RooCmdArg*)argList.
find(
"ZVar"))->subArgs().Replace(autoRDZ,bincmd) ;
737 string prodName(
"(") ;
743 if (varsArg != 0) catSet2.
add(*varsArg) ;
744 else catSet2.
add(*arg) ;
745 if (prodName.length()>1) {
757 return table(tmp,cuts,opts) ;
781 os << IsA()->GetName() ;
811 if (order==1)
return 0 ;
812 if (order==2)
return 1 ;
830 return moment(var,order,offset,cutSpec,cutRange) ;
873 if (select && select->
eval()==0) continue ;
874 if (cutRange && vars->
allInRange(cutRange)) continue ;
894 coutE(
InputArguments) <<
"RooDataSet::" << methodname <<
"(" <<
GetName() <<
") ERROR: variable : " << extVar.
GetName() <<
" is not of type RooRealVar in data" << endl ;
908 if (!xdata||!ydata)
return 0 ;
912 coutW(
InputArguments) <<
"RooDataSet::" << (corr?
"correlation":
"covariance") <<
"(" <<
GetName() <<
") WARNING: empty dataset, returning zero" << endl ;
920 Double_t xysum(0),xsum(0),ysum(0),x2sum(0),y2sum(0);
924 if (select && select->
eval()==0) continue ;
925 if (cutRange && vars->
allInRange(cutRange)) continue ;
946 if (select)
delete select ;
950 return (xysum-xsum*ysum)/(
sqrt(x2sum-(xsum*xsum))*
sqrt(y2sum-(ysum*ysum))) ;
952 return (xysum-xsum*ysum);
970 varList.
add(*datavar) ;
988 vector<double> xsum(varList.
getSize()) ;
989 vector<double> x2sum(varList.
getSize()) ;
994 if (select && select->
eval()==0) continue ;
995 if (cutRange && dvars->
allInRange(cutRange)) continue ;
1006 *iter2=*iter ; iy=ix ;
1010 xysum(iy,ix) = xysum(ix,iy) ;
1026 xysum(ix,iy) /=
sumEntries(cutSpec, cutRange) ;
1034 (*C)(ix,iy) = xysum(ix,iy)-xsum[ix]*xsum[iy] ;
1036 (*C)(ix,iy) /=
sqrt((x2sum[ix]-(xsum[ix]*xsum[ix]))*(x2sum[iy]-(xsum[iy]*xsum[iy]))) ;
1041 if (select)
delete select ;
1062 name.Append(
"Mean");
1068 TString label(
"<") ;
1105 label.Append(
"_{RMS}");
1161 pc.defineString(
"what",
"What",0,
"MNR") ;
1162 pc.defineString(
"label",
"Label",0,
"") ;
1163 pc.defineDouble(
"xmin",
"Layout",0,0.65) ;
1164 pc.defineDouble(
"xmax",
"Layout",1,0.99) ;
1165 pc.defineInt(
"ymaxi",
"Layout",0,
Int_t(0.95*10000)) ;
1166 pc.defineString(
"formatStr",
"Format",0,
"NELU") ;
1167 pc.defineInt(
"sigDigit",
"Format",0,2) ;
1168 pc.defineInt(
"dummy",
"FormatArgs",0,0) ;
1169 pc.defineString(
"cutRange",
"CutRange",0,
"",
kTRUE) ;
1170 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
1171 pc.defineMutex(
"Format",
"FormatArgs") ;
1174 pc.process(cmdList) ;
1179 const char* label =
pc.getString(
"label") ;
1183 const char* formatStr =
pc.getString(
"formatStr") ;
1184 Int_t sigDigit =
pc.getInt(
"sigDigit") ;
1185 const char* what =
pc.getString(
"what") ;
1187 const char* cutSpec =
pc.getString(
"cutString",0,
kTRUE) ;
1188 const char* cutRange =
pc.getString(
"cutRange",0,
kTRUE) ;
1190 if (
pc.hasProcessed(
"FormatArgs")) {
1192 return statOn(frame,what,label,0,0,
xmin,
xmax,
ymax,cutSpec,cutRange,formatCmd) ;
1203 const char* cutSpec,
const char* cutRange,
const RooCmdArg* formatCmd)
1205 Bool_t showLabel= (label != 0 && strlen(label) > 0);
1207 TString whatStr(what) ;
1209 Bool_t showN = whatStr.Contains(
"N") ;
1210 Bool_t showR = whatStr.Contains(
"R") ;
1211 Bool_t showM = whatStr.Contains(
"M") ;
1219 if(showLabel)
ymin-= dy;
1225 box->SetFillColor(0);
1226 box->SetBorderSize(1);
1227 box->SetTextAlign(12);
1228 box->SetTextSize(0.04F);
1229 box->SetFillStyle(1001);
1233 N.setPlotLabel(
"Entries") ;
1238 TString *rmsText, *meanText, *NText ;
1240 rmsText= rms->
format(sigDigits,options);
1241 meanText= meanv->
format(sigDigits,options);
1242 NText=
N.format(sigDigits,options);
1244 rmsText= rms->
format(*formatCmd);
1245 meanText= meanv->
format(*formatCmd);
1246 NText=
N.format(*formatCmd);
1248 if (showR)
box->AddText(rmsText->Data());
1249 if (showM)
box->AddText(meanText->Data());
1250 if (showN)
box->AddText(NText->Data());
1260 if(showLabel)
box->AddText(label);
1282 if(hdim != plotVars.
getSize()) {
1291 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1296 <<
"\" of type " << var->
ClassName() << endl;
1305 <<
":fillHistogram: WARNING: data does not contain variable: " << realVar->
GetName() << endl;
1310 localVars.
add(*clone);
1313 localVars.
add(*found);
1319 if(0 != cuts && strlen(cuts)) {
1321 if (!select || !select->
ok()) {
1347 << hdim <<
" dimensions" << endl;
1352 vector<string> cutVec ;
1353 if (cutRange && strlen(cutRange)>0) {
1354 if (strchr(cutRange,
',')==0) {
1355 cutVec.push_back(cutRange) ;
1357 const size_t bufSize = strlen(cutRange)+1;
1358 char* buf =
new char[bufSize] ;
1359 strlcpy(buf,cutRange,bufSize) ;
1360 const char* oneRange = strtok(buf,
",") ;
1362 cutVec.push_back(oneRange) ;
1363 oneRange = strtok(0,
",") ;
1374 for(
Int_t i=0; i < nevent; ++i) {
1381 if (select && select->
eval()==0) {
1394 for (icut=0 ; icut<cutVec.size() ; icut++) {
1395 if (arg->
inRange(cutVec[icut].c_str())) {
1396 selectThisArg =
kTRUE ;
1400 if (!selectThisArg) {
1407 if (!selectByRange) {
1434 if (we==0) we =
weight() ;
1453 if(0 != select)
delete select;
1471 <<
" doesn't depend on any variable in this dataset" << endl ;
1490 <<
" is fundamental and does not appear in this dataset" << endl ;
1512 RooRealVar newweight(
"weight",
"weight",-1e9,1e9) ;
1514 subsetVars.
add(newweight) ;
1519 if (createEmptyDataSets) {
1539 if (!propWeightSquared) {
1600 pc.defineString(
"drawOption",
"DrawOption",0,
"P") ;
1601 pc.defineString(
"cutRange",
"CutRange",0,
"",
kTRUE) ;
1602 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
1603 pc.defineString(
"histName",
"Name",0,
"") ;
1604 pc.defineObject(
"cutVar",
"CutVar",0) ;
1605 pc.defineObject(
"binning",
"Binning",0) ;
1606 pc.defineString(
"binningName",
"BinningName",0,
"") ;
1607 pc.defineInt(
"nbins",
"BinningSpec",0,100) ;
1608 pc.defineDouble(
"xlo",
"BinningSpec",0,0) ;
1609 pc.defineDouble(
"xhi",
"BinningSpec",1,1) ;
1610 pc.defineObject(
"asymCat",
"Asymmetry",0) ;
1611 pc.defineObject(
"effCat",
"Efficiency",0) ;
1612 pc.defineInt(
"lineColor",
"LineColor",0,-999) ;
1613 pc.defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1614 pc.defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1615 pc.defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1616 pc.defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
1617 pc.defineDouble(
"markerSize",
"MarkerSize",0,-999) ;
1618 pc.defineInt(
"fillColor",
"FillColor",0,-999) ;
1619 pc.defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1621 pc.defineInt(
"histInvisible",
"Invisible",0,0) ;
1622 pc.defineInt(
"refreshFrameNorm",
"RefreshNorm",0,1) ;
1623 pc.defineString(
"addToHistName",
"AddTo",0,
"") ;
1624 pc.defineDouble(
"addToWgtSelf",
"AddTo",0,1.) ;
1625 pc.defineDouble(
"addToWgtOther",
"AddTo",1,1.) ;
1626 pc.defineDouble(
"xErrorSize",
"XErrorSize",0,1.) ;
1627 pc.defineDouble(
"scaleFactor",
"Rescale",0,1.) ;
1628 pc.defineMutex(
"DataError",
"Asymmetry",
"Efficiency") ;
1629 pc.defineMutex(
"Binning",
"BinningName",
"BinningSpec") ;
1632 pc.process(argList) ;
1641 o.
cuts =
pc.getString(
"cutString") ;
1642 if (
pc.hasProcessed(
"Binning")) {
1644 }
else if (
pc.hasProcessed(
"BinningName")) {
1646 }
else if (
pc.hasProcessed(
"BinningSpec")) {
1670 <<
") INFO: dataset has non-integer weights, auto-selecting SumW2 errors instead of Poisson errors" << endl ;
1676 <<
" to add to in RooPlot" << endl ;
1681 if (!asymCat && !effCat) {
1683 }
else if (asymCat) {
1689 Int_t lineColor =
pc.getInt(
"lineColor") ;
1690 Int_t lineStyle =
pc.getInt(
"lineStyle") ;
1691 Int_t lineWidth =
pc.getInt(
"lineWidth") ;
1692 Int_t markerColor =
pc.getInt(
"markerColor") ;
1693 Int_t markerStyle =
pc.getInt(
"markerStyle") ;
1694 Size_t markerSize =
pc.getDouble(
"markerSize") ;
1695 Int_t fillColor =
pc.getInt(
"fillColor") ;
1696 Int_t fillStyle =
pc.getInt(
"fillStyle") ;
1706 if (
pc.hasProcessed(
"BinningSpec")) {
1734 <<
":plotOn: frame does not specify a plot variable" << endl;
1740 histName.Append(
"_plot");
1754 <<
":plotOn: fillHistogram() failed" << endl;
1771 <<
":plotOn: unable to create a RooHist object" << endl;
1788 coutI(
Plotting) <<
"RooTreeData::plotOn: plotting " << hist->
GetSum() <<
" events out of " << nEnt <<
" total events" << endl ;
1789 graph->setRawEntries(nEnt) ;
1796 if (!
graph->hasIdenticalBinning(*otherGraph)) {
1797 coutE(
Plotting) <<
"RooTreeData::plotOn: ERROR Histogram to be added to, '" << o.
addToHistName <<
"',has different binning" << endl ;
1816 hname.Append(
Form(
"_Cut[%s]",o.
cuts)) ;
1818 graph->SetName(hname.Data()) ;
1859 <<
":plotAsymOn: frame does not specify a plot variable" << endl;
1865 hist1Name.Append(
"_plot1");
1866 TH1F *hist1, *hist2 ;
1867 hist2Name.Append(
"_plot2");
1881 assert(0 != hist1 && 0 != hist2);
1883 TString cuts1,cuts2 ;
1895 <<
":plotAsymOn: createHistogram() failed" << endl;
1915 hname.Append(
Form(
"_Cut[%s]",o.
cuts)) ;
1917 graph->SetName(hname.Data()) ;
1953 <<
":plotEffOn: frame does not specify a plot variable" << endl;
1959 hist1Name.Append(
"_plot1");
1960 TH1F *hist1, *hist2 ;
1961 hist2Name.Append(
"_plot2");
1975 assert(0 != hist1 && 0 != hist2);
1977 TString cuts1,cuts2 ;
1989 <<
":plotEffOn: createHistogram() failed" << endl;
2009 hname.Append(
Form(
"_Cut[%s]",o.
cuts)) ;
2011 graph->SetName(hname.Data()) ;
2042 <<
" is not in dataset and is also not dependent on data set" << endl ;
2049 coutE(
Plotting) <<
"RooTreeData::table(" <<
GetName() <<
") Couldn't deep-clone table category, abort." << endl ;
2053 ownPlotVar =
kTRUE ;
2059 TString tableName(
GetName()) ;
2060 if (cuts && strlen(cuts)) {
2061 tableName.Append(
"(") ;
2062 tableName.Append(cuts) ;
2063 tableName.Append(
")") ;
2069 if (cuts && strlen(cuts)) {
2075 for(
Int_t i=0; i < nevent; ++i) {
2078 if (cutVar && cutVar->
getVal()==0) continue ;
2083 if (ownPlotVar)
delete tableSet ;
2084 if (cutVar)
delete cutVar ;
2120 if (varPtr->
getVal()<lowest) {
2121 lowest = varPtr->
getVal() ;
2123 if (varPtr->
getVal()>highest) {
2124 highest = varPtr->
getVal() ;
2131 Double_t margin = marginFrac*(highest-lowest) ;
2140 Double_t delta = ((highest-mom1)>(mom1-lowest)?(highest-mom1):(mom1-lowest))*(1+marginFrac) ;
2141 lowest = mom1-delta ;
2142 highest = mom1+delta ;
2172 pruneSet.
add(*var) ;
2213 <<
" 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 ;
2240 return anyClient?ret:
kFALSE ;
2286void RooAbsData::Streamer(
TBuffer &R__b)
2334 <<
"Use GetClonedTree() instead or convert to tree storage." << endl;
2335 return (TTree *)
nullptr;
2347 return tmp->CloneTree();
2350 return buffer.
tree().CloneTree();
2374 if (iter.second == obj) {
2375 iter.second =
nullptr;
static std::map< RooAbsData *, int > _dcc
float type_of_call hi(const int &, const int &)
TMatrixTSym< Double_t > TMatrixDSym
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 (of arbitrary type) an...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
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.
virtual Bool_t isFundamental() const
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual Bool_t isDerived() const
TIterator * valueClientIterator() const
virtual Bool_t inRange(const char *) const
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
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 This class defines the in...
virtual Bool_t isShareable() const
virtual RooAbsReal * highBoundFunc() const
virtual RooAbsReal * lowBoundFunc() const
virtual Double_t averageBinWidth() const =0
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
TIterator * typeIterator() const
Return iterator over all defined states.
Roo1DTable * createTable(const char *label) const
Create a table matching the shape of this category.
virtual const char * getLabel() const
Return label string of current state.
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.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
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
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 * dataRealVar(const char *methodname, RooRealVar &extVar) const
Internal method to check if given RooRealVar maps to a RooRealVar in this dataset.
TIterator * _cacheIter
Iterator over dimension variables.
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)
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.
Double_t sigma(RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Double_t corrcov(RooRealVar &x, RooRealVar &y, const char *cutSpec, const char *cutRange, Bool_t corr) const
Internal method to calculate single correlation and covariance elements.
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
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.
Bool_t getRange(RooRealVar &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...
RooRealVar * rmsVar(RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Create a RooRealVar containing the RMS of observable 'var' in this dataset.
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
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)=0
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.
Double_t standMoment(RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate standardized moment.
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 *)
TIterator * _iterator
External variables cached with this data set.
virtual Double_t weight() const =0
static StorageType defaultStorageType
virtual Double_t weightSquared() const =0
Double_t moment(RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
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)
RooRealVar * meanVar(RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Create a RooRealVar containing the mean of observable 'var' in this dataset.
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 void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
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
virtual Int_t numEntries() const
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.
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 ;.
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
Iterator over cached variables.
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
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
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
virtual Double_t getMin(const char *name=0) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
const char * getPlotLabel() const
Get the label associated with the variable.
void setPlotLabel(const char *label)
Set the label associated with this variable.
RooAbsArg * at(Int_t idx) const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
virtual const Text_t * GetName() const
Returns name of object.
RooCategory represents a fundamental (non-derived) discrete value object.
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
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooCompositeDataStore is the abstract base class for data collection that use a TTree as internal sto...
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 consolidates 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 fundamental (non-derived) real valued object.
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 the abstract base class for data collection that use a TTree as internal storage ...
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
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)}
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
Delete a TObjLink object.
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.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
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.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
std::string GetName(const std::string &scope_name)
RooCmdArg Binning(const RooAbsBinning &binning)
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)
static constexpr double s
static constexpr double pc
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
const char * addToHistName
RooAbsData::ErrorType etype
Bool_t correctForBinWidth
static long int sum(long int i)