127static std::map<RooAbsData*,int>
_dcc ;
136 cout <<
"Composite storage is not a valid *default* storage type." << endl;
187 _vars(
"Dataset Variables"),
188 _cachedVars(
"Cached Variables"),
202 for (
const auto var : vars) {
203 if (!var->isFundamental()) {
205 <<
"): Data set cannot contain non-fundamental types, ignoring " << var->GetName()
207 throw std::invalid_argument(std::string(
"Only fundamental variables can be placed into datasets. This is violated for ") + var->GetName());
214 for (
auto var :
_vars) {
227 TNamed(newname ? newname : other.GetName(),other.GetTitle()),
229 _cachedVars(
"Cached Variables"),
237 for (
auto var :
_vars) {
246 map<string,RooAbsDataStore*> smap ;
250 smap[itero.first] = dclone->
store();
279 for (
const auto var :
_vars) {
280 var->attachDataSet(*
this) ;
288 map<string,RooAbsDataStore*> smap ;
292 smap[itero.first] = dclone->
store();
339 delete iter->second ;
459 pc.defineString(
"name",
"Name",0,
"") ;
460 pc.defineString(
"title",
"Title",0,
"") ;
461 pc.defineString(
"cutRange",
"CutRange",0,
"") ;
462 pc.defineString(
"cutSpec",
"CutSpec",0,
"") ;
463 pc.defineObject(
"cutVar",
"CutVar",0,0) ;
464 pc.defineInt(
"evtStart",
"EventRange",0,0) ;
465 pc.defineInt(
"evtStop",
"EventRange",1,std::numeric_limits<int>::max()) ;
466 pc.defineObject(
"varSel",
"SelectVars",0,0) ;
467 pc.defineMutex(
"CutVar",
"CutSpec") ;
470 pc.process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
476 const char* cutRange =
pc.getString(
"cutRange",0,
true) ;
477 const char* cutSpec =
pc.getString(
"cutSpec",0,
true) ;
479 Int_t nStart =
pc.getInt(
"evtStart",0) ;
480 Int_t nStop =
pc.getInt(
"evtStop",std::numeric_limits<int>::max()) ;
482 const char*
name =
pc.getString(
"name",0,
true) ;
483 const char* title =
pc.getString(
"title",0,
true) ;
488 varSubset.
add(*varSet) ;
489 for (
const auto arg : varSubset) {
492 << arg->GetName() <<
" not in dataset, ignored" << endl ;
493 varSubset.remove(*arg) ;
504 ret =
reduceEng(varSubset,&cutVarTmp,cutRange,nStart,nStop) ;
508 ret =
reduceEng(varSubset,cutVar,cutRange,nStart,nStop) ;
512 ret =
reduceEng(varSubset,0,cutRange,nStart,nStop) ;
516 if (!ret)
return nullptr;
563 for (
const auto arg : varSubset) {
566 << arg->GetName() <<
" not in dataset, ignored" << endl ;
572 if (cut && strlen(cut)>0) {
574 ret =
reduceEng(varSubset2,&cutVar,0,0,std::numeric_limits<std::size_t>::max());
576 ret =
reduceEng(varSubset2,0,0,0,std::numeric_limits<std::size_t>::max());
596 << arg->GetName() <<
" not in dataset, ignored" << endl ;
601 RooAbsData* ret =
reduceEng(varSubset2,&cutVar,0,0,std::numeric_limits<std::size_t>::max()) ;
634 coutW(
DataHandling) <<
"'RooAbsData::createHistogram' is deprecated and will be removed in ROOT v6.30: "
635 <<
"Use the overload of 'RooAbsData::createHistogram' that takes RooFit command arguments."
639 const auto varNames =
ROOT::Split(varNameList,
",:");
641 RooRealVar* vars[3] = {
nullptr,
nullptr,
nullptr};
643 for (
unsigned int i = 0; i < varNames.size(); ++i) {
645 coutW(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
"): Can only create 3-dimensional histograms. Variable "
646 << i <<
" " << varNames[i] <<
" unused." << std::endl;
652 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varNames[i] << std::endl;
658 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
"): No variable to be histogrammed in list '" << varNameList <<
"'" << std::endl;
662 if (
xbins<=0 || !vars[0]->hasMax() || !vars[0]->hasMin() ) {
669 if (ybins<=0 || !vars[1]->hasMax() || !vars[1]->hasMin() ) {
676 if (zbins<=0 || !vars[2]->hasMax() || !vars[2]->hasMin() ) {
737 const auto varNames =
ROOT::Split(varNameList,
",:");
738 RooRealVar* vars[3] = {
nullptr,
nullptr,
nullptr};
740 for (
unsigned int i = 0; i < varNames.size(); ++i) {
742 coutW(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
"): Can only create 3-dimensional histograms. Variable "
743 << i <<
" " << varNames[i] <<
" unused." << std::endl;
749 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
") ERROR: dataset does not contain an observable named " << varNames[i] << std::endl;
755 coutE(
InputArguments) <<
"RooAbsData::createHistogram(" <<
GetName() <<
"): No variable to be histogrammed in list '" << varNameList <<
"'" << std::endl;
812 pc.defineString(
"cutRange",
"CutRange",0,
"",
true) ;
813 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
814 pc.defineObject(
"yvar",
"YVar",0,0) ;
815 pc.defineObject(
"zvar",
"ZVar",0,0) ;
816 pc.allowUndefined() ;
819 pc.process(argList) ;
824 const char* cutSpec =
pc.getString(
"cutString",0,
true) ;
825 const char* cutRange =
pc.getString(
"cutRange",0,
true) ;
837 pc.stripCmdList(argList,
"CutRange,CutSpec") ;
846 ownedCmds.
Add(bincmd) ;
847 argList.
Replace(autoRD,bincmd) ;
858 ((
RooCmdArg*)argList.
find(
"YVar"))->subArgs().Replace(autoRDY,bincmd) ;
871 ((
RooCmdArg*)argList.
find(
"ZVar"))->subArgs().Replace(autoRDZ,bincmd) ;
893 string prodName(
"(") ;
894 for(
auto * arg : catSet) {
897 if (varsArg != 0) catSet2.
add(*varsArg) ;
898 else catSet2.
add(*arg) ;
899 if (prodName.length()>1) {
902 prodName += arg->GetName() ;
904 coutW(
InputArguments) <<
"RooAbsData::table(" <<
GetName() <<
") non-RooAbsCategory input argument " << arg->GetName() <<
" ignored" << endl ;
910 return table(tmp,cuts,opts) ;
964 if (order==1)
return 0 ;
965 if (order==2)
return 1 ;
982 double offset = order>1 ?
moment(var,1,cutSpec,cutRange) : 0 ;
1002 auto varPtr =
dynamic_cast<const RooRealVar*
>(arg);
1016 std::unique_ptr<RooFormula> select;
1026 if (select && select->eval()==0) continue ;
1027 if (cutRange && vars->
allInRange(cutRange)) continue ;
1048 coutE(
InputArguments) <<
"RooDataSet::" << methodname <<
"(" <<
GetName() <<
") ERROR: variable : " << extVar.
GetName() <<
" is not of type RooRealVar in data" << endl ;
1062 if (!xdata||!ydata)
return 0 ;
1066 coutW(
InputArguments) <<
"RooDataSet::" << (corr?
"correlation":
"covariance") <<
"(" <<
GetName() <<
") WARNING: empty dataset, returning zero" << endl ;
1074 double xysum(0),xsum(0),ysum(0),x2sum(0),y2sum(0);
1078 if (select && select->
eval()==0) continue ;
1079 if (cutRange && vars->
allInRange(cutRange)) continue ;
1100 if (select)
delete select ;
1104 return (xysum-xsum*ysum)/(
sqrt(x2sum-(xsum*xsum))*
sqrt(y2sum-(ysum*ysum))) ;
1106 return (xysum-xsum*ysum);
1116 for(
auto * var : static_range_cast<RooRealVar*>(vars)) {
1121 varList.
add(*datavar) ;
1132 std::unique_ptr<RooFormula> select = cutSpec ? std::make_unique<RooFormula>(
"select",cutSpec,*
get()) :
nullptr;
1135 std::vector<double> xsum(varList.
size()) ;
1136 std::vector<double> x2sum(varList.
size()) ;
1141 if (select && select->eval()==0) continue ;
1142 if (cutRange && dvars->
allInRange(cutRange)) continue ;
1144 for(std::size_t ix = 0; ix < varList.
size(); ++ix) {
1145 auto varx =
static_cast<RooRealVar const&
>(varList[ix]);
1146 xsum[ix] +=
weight() * varx.getVal() ;
1148 x2sum[ix] +=
weight() * varx.getVal() * varx.getVal();
1151 for(std::size_t iy = ix; iy < varList.
size(); ++iy) {
1152 auto vary =
static_cast<RooRealVar const&
>(varList[iy]);
1153 xysum(ix,iy) +=
weight() * varx.getVal() * vary.getVal();
1154 xysum(iy,ix) = xysum(ix,iy) ;
1161 for (std::size_t ix=0 ; ix<varList.
size() ; ix++) {
1166 for (std::size_t iy=0 ; iy<varList.
size() ; iy++) {
1167 xysum(ix,iy) /=
sumEntries(cutSpec, cutRange) ;
1173 for (std::size_t ix=0 ; ix<varList.
size() ; ix++) {
1174 for (std::size_t iy=0 ; iy<varList.
size() ; iy++) {
1175 (*C)(ix,iy) = xysum(ix,iy)-xsum[ix]*xsum[iy] ;
1177 (*C)(ix,iy) /=
std::sqrt((x2sum[ix]-(xsum[ix]*xsum[ix]))*(x2sum[iy]-(xsum[iy]*xsum[iy]))) ;
1198 std::string
name = std::string{var.
GetName()} +
"Mean";
1199 std::string title = std::string{
"Mean of "} + var.
GetTitle();
1201 meanv->setConstant(
false) ;
1204 std::string label =
"<" + std::string{var.
getPlotLabel()} +
">";
1205 meanv->setPlotLabel(label.c_str());
1208 double meanVal=
moment(var,1,0,cutSpec,cutRange) ;
1211 double rmsVal=
sqrt(
moment(var,2,meanVal,cutSpec,cutRange)*
N/(
N-1));
1212 meanv->setVal(meanVal) ;
1213 meanv->setError(
N > 0 ? rmsVal/
sqrt(
N) : 0);
1231 std::string
name(var.
GetName()),title(
"RMS of ") ;
1235 rms->setConstant(
false) ;
1240 rms->setPlotLabel(label.c_str());
1243 double meanVal(
moment(var,1,0,cutSpec,cutRange)) ;
1245 double rmsVal=
sqrt(
moment(var,2,meanVal,cutSpec,cutRange)*
N/(
N-1));
1246 rms->setVal(rmsVal) ;
1247 rms->setError(rmsVal/
sqrt(2*
N));
1295 pc.defineString(
"what",
"What",0,
"MNR") ;
1296 pc.defineString(
"label",
"Label",0,
"") ;
1297 pc.defineDouble(
"xmin",
"Layout",0,0.65) ;
1298 pc.defineDouble(
"xmax",
"Layout",1,0.99) ;
1299 pc.defineInt(
"ymaxi",
"Layout",0,
Int_t(0.95*10000)) ;
1300 pc.defineString(
"formatStr",
"Format",0,
"NELU") ;
1301 pc.defineInt(
"sigDigit",
"Format",0,2) ;
1302 pc.defineInt(
"dummy",
"FormatArgs",0,0) ;
1303 pc.defineString(
"cutRange",
"CutRange",0,
"",
true) ;
1304 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
1305 pc.defineMutex(
"Format",
"FormatArgs") ;
1308 pc.process(cmdList) ;
1313 const char* label =
pc.getString(
"label") ;
1314 double xmin =
pc.getDouble(
"xmin") ;
1315 double xmax =
pc.getDouble(
"xmax") ;
1316 double ymax =
pc.getInt(
"ymaxi") / 10000. ;
1317 const char* formatStr =
pc.getString(
"formatStr") ;
1318 Int_t sigDigit =
pc.getInt(
"sigDigit") ;
1319 const char*
what =
pc.getString(
"what") ;
1321 const char* cutSpec =
pc.getString(
"cutString",0,
true) ;
1322 const char* cutRange =
pc.getString(
"cutRange",0,
true) ;
1324 if (
pc.hasProcessed(
"FormatArgs")) {
1326 return statOn(frame,
what,label,0,0,
xmin,
xmax,
ymax,cutSpec,cutRange,formatCmd) ;
1337 const char* cutSpec,
const char* cutRange,
const RooCmdArg* formatCmd)
1339 bool showLabel= (label !=
nullptr && strlen(label) > 0);
1341 std::string whatStr{
what};
1342 std::transform(whatStr.begin(), whatStr.end(), whatStr.begin(), [](
unsigned char c){ return std::toupper(c); });
1343 bool showN = whatStr.find(
'N') != std::string::npos;
1344 bool showR = whatStr.find(
'R') != std::string::npos;
1345 bool showM = whatStr.find(
'M') != std::string::npos;
1352 double dy(0.06),
ymin(
ymax-nPar*dy);
1353 if(showLabel)
ymin-= dy;
1357 if(!
box)
return nullptr;
1359 box->SetFillColor(0);
1360 box->SetBorderSize(1);
1361 box->SetTextAlign(12);
1362 box->SetTextSize(0.04F);
1363 box->SetFillStyle(1001);
1367 N.setPlotLabel(
"Entries") ;
1372 std::unique_ptr<TString> rmsText, meanText, NText;
1374 rmsText.reset(rms->format(sigDigits,options));
1375 meanText.reset(meanv->format(sigDigits,options));
1376 NText.reset(
N.format(sigDigits,options));
1378 rmsText.reset(rms->format(*formatCmd));
1379 meanText.reset(meanv->format(*formatCmd));
1380 NText.reset(
N.format(*formatCmd));
1382 if (showR)
box->AddText(rmsText->Data());
1383 if (showM)
box->AddText(meanText->Data());
1384 if (showN)
box->AddText(NText->Data());
1387 if(showLabel)
box->AddText(label);
1402 if(
nullptr == hist) {
1409 if(hdim != plotVars.
size()) {
1423 <<
"\" of type " << var->
ClassName() << endl;
1432 <<
":fillHistogram: Data does not contain the variable '" << realVar->
GetName() <<
"'." << endl;
1438 localVars.
add(*clone);
1441 localVars.
add(*found);
1446 std::unique_ptr<RooFormula> select;
1447 if (cuts !=
nullptr && strlen(cuts) > 0) {
1448 select = std::make_unique<RooFormula>(cuts, cuts,
_vars,
false);
1449 if (!select || !select->ok()) {
1474 << hdim <<
" dimensions" << endl;
1479 const auto cutVec =
ROOT::Split(cutRange ? cutRange :
"",
",");
1486 for(
Int_t i=0; i < nevent; ++i) {
1493 if (select && select->eval()==0) {
1499 bool selectByRange = true ;
1501 for (
const auto arg :
_vars) {
1502 bool selectThisArg = false ;
1503 for (
auto const& cut : cutVec) {
1504 if (!cut.empty() && arg->inRange(cut.c_str())) {
1505 selectThisArg = true ;
1509 if (!selectThisArg) {
1510 selectByRange = false ;
1516 if (!selectByRange) {
1543 if (we==0) we =
weight() ;
1578 <<
" doesn't depend on any variable in this dataset" << endl ;
1584 std::unique_ptr<RooArgSet> cloneSet;
1597 <<
" is fundamental and does not appear in this dataset" << endl ;
1609 std::unique_ptr<RooArgSet> vars{splitCat.
getVariables()};
1610 subsetVars.
remove(*vars,
true,
true) ;
1612 subsetVars.
remove(splitCat,
true,
true) ;
1618 RooRealVar newweight(
"weight",
"weight",-1e9,1e9) ;
1620 subsetVars.
add(newweight) ;
1625 if (createEmptyDataSets) {
1626 for (
const auto& nameIdx : *cloneCat) {
1627 RooAbsData* subset =
emptyClone(nameIdx.first.c_str(), nameIdx.first.c_str(), &subsetVars,(addWV?
"weight":0)) ;
1642 if (!propWeightSquared) {
1666 if (!splitCat.dependsOn(*
get())) {
1668 <<
" doesn't depend on any variable in this dataset" << endl ;
1674 std::unique_ptr<RooArgSet> cloneSet;
1675 if (splitCat.isDerived()) {
1681 cloneCat = (
RooAbsCategory*) cloneSet->find(splitCat.GetName()) ;
1687 <<
" is fundamental and does not appear in this dataset" << endl ;
1698 if (splitCat.isDerived()) {
1699 std::unique_ptr<RooArgSet> vars{splitCat.getVariables()};
1700 subsetVars.
remove(*vars,
true,
true) ;
1702 subsetVars.
remove(splitCat,
true,
true) ;
1708 RooRealVar newweight(
"weight",
"weight",-1e9,1e9) ;
1710 subsetVars.
add(newweight) ;
1716 auto getPdfObservables = [
this, &simpdf](
const char * label) {
1719 catPdf->getObservables(this->
get(), obsSet);
1726 for(
const auto& catPair : splitCat) {
1727 allObservables.
add(getPdfObservables(catPair.first.c_str()));
1729 subsetVars.
remove(allObservables,
true,
true);
1733 if (createEmptyDataSets) {
1734 for (
const auto& nameIdx : *cloneCat) {
1737 subsetVarsCat.
add(getPdfObservables(nameIdx.first.c_str()));
1738 RooAbsData* subset =
emptyClone(nameIdx.first.c_str(), nameIdx.first.c_str(), &subsetVarsCat,(addWV?
"weight":0)) ;
1739 dsetList->
Add(subset) ;
1754 dsetList->
Add(subset);
1756 if (!propWeightSquared) {
1862 pc.defineString(
"drawOption",
"DrawOption",0,
"P") ;
1863 pc.defineString(
"cutRange",
"CutRange",0,
"",
true) ;
1864 pc.defineString(
"cutString",
"CutSpec",0,
"") ;
1865 pc.defineString(
"histName",
"Name",0,
"") ;
1866 pc.defineObject(
"cutVar",
"CutVar",0) ;
1867 pc.defineObject(
"binning",
"Binning",0) ;
1868 pc.defineString(
"binningName",
"BinningName",0,
"") ;
1869 pc.defineInt(
"nbins",
"BinningSpec",0,100) ;
1870 pc.defineDouble(
"xlo",
"BinningSpec",0,0) ;
1871 pc.defineDouble(
"xhi",
"BinningSpec",1,1) ;
1872 pc.defineObject(
"asymCat",
"Asymmetry",0) ;
1873 pc.defineObject(
"effCat",
"Efficiency",0) ;
1874 pc.defineInt(
"lineColor",
"LineColor",0,-999) ;
1875 pc.defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1876 pc.defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1877 pc.defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1878 pc.defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
1879 pc.defineDouble(
"markerSize",
"MarkerSize",0,-999) ;
1880 pc.defineInt(
"fillColor",
"FillColor",0,-999) ;
1881 pc.defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1883 pc.defineInt(
"histInvisible",
"Invisible",0,0) ;
1884 pc.defineInt(
"refreshFrameNorm",
"RefreshNorm",0,1) ;
1885 pc.defineString(
"addToHistName",
"AddTo",0,
"") ;
1886 pc.defineDouble(
"addToWgtSelf",
"AddTo",0,1.) ;
1887 pc.defineDouble(
"addToWgtOther",
"AddTo",1,1.) ;
1888 pc.defineDouble(
"xErrorSize",
"XErrorSize",0,1.) ;
1889 pc.defineDouble(
"scaleFactor",
"Rescale",0,1.) ;
1890 pc.defineMutex(
"DataError",
"Asymmetry",
"Efficiency") ;
1891 pc.defineMutex(
"Binning",
"BinningName",
"BinningSpec") ;
1894 pc.process(argList) ;
1903 o.
cuts =
pc.getString(
"cutString") ;
1904 if (
pc.hasProcessed(
"Binning")) {
1906 }
else if (
pc.hasProcessed(
"BinningName")) {
1908 }
else if (
pc.hasProcessed(
"BinningSpec")) {
1909 double xlo =
pc.getDouble(
"xlo") ;
1910 double xhi =
pc.getDouble(
"xhi") ;
1919 o.
cutRange =
pc.getString(
"cutRange",0,
true) ;
1920 o.
histName =
pc.getString(
"histName",0,
true) ;
1932 <<
") INFO: dataset has non-integer weights, auto-selecting SumW2 errors instead of Poisson errors" << endl ;
1938 <<
" to add to in RooPlot" << endl ;
1943 if (!asymCat && !effCat) {
1945 }
else if (asymCat) {
1951 Int_t lineColor =
pc.getInt(
"lineColor") ;
1952 Int_t lineStyle =
pc.getInt(
"lineStyle") ;
1953 Int_t lineWidth =
pc.getInt(
"lineWidth") ;
1954 Int_t markerColor =
pc.getInt(
"markerColor") ;
1955 Int_t markerStyle =
pc.getInt(
"markerStyle") ;
1956 Size_t markerSize =
pc.getDouble(
"markerSize") ;
1957 Int_t fillColor =
pc.getInt(
"fillColor") ;
1958 Int_t fillStyle =
pc.getInt(
"fillStyle") ;
1968 if (
pc.hasProcessed(
"BinningSpec")) {
1996 <<
":plotOn: frame does not specify a plot variable" << endl;
2001 const std::string histName = std::string{
GetName()} +
"_plot";
2002 std::unique_ptr<TH1> hist;
2018 <<
":plotOn: fillHistogram() failed" << endl;
2024 double nomBinWidth ;
2035 <<
":plotOn: unable to create a RooHist object" << endl;
2044 std::unique_ptr<RooAbsData> tmp{
const_cast<RooAbsData*
>(
this)->
reduce(*var)};
2045 nEnt = tmp->sumEntries() ;
2050 coutI(
Plotting) <<
"RooTreeData::plotOn: plotting " << hist->GetSumOfWeights() <<
" events out of " << nEnt <<
" total events" << endl ;
2051 graph->setRawEntries(nEnt) ;
2058 if (!
graph->hasIdenticalBinning(*otherGraph)) {
2059 coutE(
Plotting) <<
"RooTreeData::plotOn: ERROR Histogram to be added to, '" << o.
addToHistName <<
"',has different binning" << endl ;
2073 std::string hname = std::string{
"h_"} +
GetName();
2075 hname += std::string{
"_CutRange["} + o.
cutRange +
"]";
2078 hname += std::string{
"_Cut["} + o.
cuts +
"]";
2080 graph->SetName(hname.c_str()) ;
2116 <<
":plotAsymOn: frame does not specify a plot variable" << endl;
2122 hist1Name +=
"_plot1";
2123 std::unique_ptr<TH1> hist1, hist2;
2124 hist2Name +=
"_plot2";
2138 assert(hist1 && hist2);
2140 std::string cuts1,cuts2 ;
2152 <<
":plotAsymOn: createHistogram() failed" << endl;
2174 graph->SetName(hname.c_str()) ;
2206 <<
":plotEffOn: frame does not specify a plot variable" << endl;
2212 hist1Name +=
"_plot1";
2213 std::unique_ptr<TH1> hist1, hist2;
2214 hist2Name +=
"_plot2";
2228 assert(hist1 && hist2);
2230 std::string cuts1,cuts2 ;
2242 <<
":plotEffOn: createHistogram() failed" << endl;
2264 graph->SetName(hname.c_str()) ;
2286 std::unique_ptr<RooArgSet> tableSet;
2290 <<
" is not in dataset and is also not dependent on data set" << endl ;
2297 coutE(
Plotting) <<
"RooTreeData::table(" <<
GetName() <<
") Couldn't deep-clone table category, abort." << std::endl;
2306 std::unique_ptr<RooFormulaVar> cutVar;
2307 std::string tableName{
GetName()};
2308 if (cuts && strlen(cuts)) {
2313 cutVar = std::make_unique<RooFormulaVar>(
"cutVar",cuts,
_vars) ;
2319 for(
Int_t i=0; i < nevent; ++i) {
2322 if (cutVar && cutVar->getVal()==0) continue ;
2344 auto varPtr =
dynamic_cast<const RooRealVar*
>(arg);
2362 if (varPtr->getVal()<lowest) {
2363 lowest = varPtr->getVal() ;
2365 if (varPtr->getVal()>highest) {
2366 highest = varPtr->getVal() ;
2371 if (symMode==
false) {
2373 double margin = marginFrac*(highest-lowest) ;
2381 double mom1 =
moment(*varPtr,1) ;
2382 double delta = ((highest-mom1)>(mom1-lowest)?(highest-mom1):(mom1-lowest))*(1+marginFrac) ;
2383 lowest = mom1-delta ;
2384 highest = mom1+delta ;
2407 pruneSet.
remove(*usedObs,
true,
true) ;
2410 for(
auto * var : *
get()) {
2412 pruneSet.
add(*var) ;
2417 if (!pruneSet.
empty()) {
2422 for(
auto const* rrv : dynamic_range_cast<RooRealVar*>(*usedObs)) {
2423 if (rrv && !rrv->getBinning().isShareable()) {
2425 RooAbsReal* loFunc = rrv->getBinning().lowBoundFunc() ;
2426 RooAbsReal* hiFunc = rrv->getBinning().highBoundFunc() ;
2433 if (!depObs.
empty()) {
2434 pruneSet.
remove(depObs,
true,
true) ;
2442 pruneSet.
remove(keepObsList,
true,
true) ;
2444 if (!pruneSet.
empty()) {
2448 <<
" 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 ;
2459 bool ret(
true), anyClient(
false) ;
2463 if (!cacheList.
find(client->GetName())) {
2469 return anyClient?ret:false ;
2560 <<
"Use GetClonedTree() instead or convert to tree storage." << endl;
2600 if (iter.second == obj) {
2601 iter.second =
nullptr;
2617 arg->setAttribute(
"global",
true);
2619 if(
auto lval =
dynamic_cast<RooAbsRealLValue*
>(arg)) lval->setConstant(
true);
2657 if (eventWeights.
empty()) {
2662 for (std::size_t i = 0; i < eventWeights.
size(); ++i) {
2665 return kahanWeight.
Sum();
2695 const char *
name)
const
2710 const char *cuts,
const char *
name)
const
2713 static int counter(0);
2715 std::unique_ptr<RooAbsReal> ownedPlotVarX;
2718 if (plotVarX ==
nullptr) {
2722 <<
" is not in dataset and is also not dependent on data set" << std::endl;
2728 plotVarX = ownedPlotVarX.get();
2734 std::unique_ptr<RooAbsReal> ownedPlotVarY;
2737 if (plotVarY ==
nullptr) {
2741 <<
" is not in dataset and is also not dependent on data set" << std::endl;
2747 plotVarY = ownedPlotVarY.get();
2754 std::unique_ptr<RooFormula> select;
2755 if (0 != cuts && strlen(cuts)) {
2756 select = std::make_unique<RooFormula>(cuts, cuts,
_vars);
2757 if (!select->ok()) {
2762 const std::string histName = std::string{
GetName()} +
"_" +
name +
"_" +
Form(
"%08x", counter++);
2774 for (
Int_t i = 0; i < nevent; ++i) {
2777 if (select && select->eval() == 0)
2779 histogram->Fill(plotVarX->getVal(), plotVarY->
getVal(),
weight());
static std::map< RooAbsData *, int > _dcc
static void indent(ostringstream &buf, int indent_level)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
TMatrixTSym< Double_t > TMatrixDSym
Binding & operator=(OUT(*fun)(void))
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void AddIndexed(T input, std::size_t index)
Add input to the sum.
Roo1DTable implements a one-dimensional table.
void fill(RooAbsCategory &cat, double weight=1.0) override
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...
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, bool recurseNonDerived=false) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
TObject * Clone(const char *newname=0) const override
Make a clone of an object using the Streamer facility.
bool recursiveRedirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true)
Recursively replace all servers with the new servers in newSet.
void attachArgs(const RooAbsCollection &set)
Bind this node to objects in set.
RooArgSet * getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
void SetName(const char *name) override
Set the name of the TNamed.
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
bool redirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool isRecursionStep=false)
Replace all direct servers of this object with the new servers in newServerList.
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
RooArgSet * getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual bool isDerived() const
Does value or shape of this arg depend on any other arg?
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.
virtual double averageBinWidth() const =0
virtual bool isUniform() const
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
A space to attach TBranches.
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 remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
bool allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
virtual RooAbsArg * addClone(const RooAbsArg &var, bool silent=false)
Add a clone of the specified argument to list.
Storage_t::size_type size() 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 RooAbsData::CategorySpans getCategoryBatches(std::size_t, std::size_t) const
virtual const RooArgSet * get(Int_t index) const =0
virtual void resetBuffers()=0
virtual const TTree * tree() const
virtual void checkInit() const
virtual RooAbsData::RealSpans getBatches(std::size_t first, std::size_t len) const =0
Retrieve batches for all observables in this data store.
virtual bool changeObservableName(const char *from, const char *to)=0
virtual void setArgStatus(const RooArgSet &set, bool active)=0
virtual RooAbsDataStore * clone(const char *newname=0) const =0
virtual bool hasFilledCache() const
virtual void cacheArgs(const RooAbsArg *cacheOwner, RooArgSet &varSet, const RooArgSet *nset=0, bool skipZeroWeights=false)=0
void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent) const override
Detailed printing interface.
virtual void resetCache()=0
virtual void setDirtyProp(bool flag)
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)=0
virtual Int_t numEntries() const =0
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual double weight() const =0
virtual double sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
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
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Interface for detailed printing of object.
const TNamed * _namePtr
! De-duplicated name pointer. This will be equal for all objects with the same name.
RooAbsData()
Default constructor.
static void setDefaultStorageType(StorageType s)
void SetName(const char *name) override
Set the name of the TNamed.
CategorySpans getCategoryBatches(std::size_t first=0, std::size_t len=std::numeric_limits< std::size_t >::max()) const
double standMoment(const RooRealVar &var, double order, const char *cutSpec=0, const char *cutRange=0) const
Calculate standardized moment.
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.
void setGlobalObservables(RooArgSet const &globalObservables)
Sets the global observables stored in this data.
RooAbsDataStore * store()
std::map< RooFit::Detail::DataKey, RooSpan< const double > > RealSpans
void printClassName(std::ostream &os) const override
Print class name of dataset.
void Draw(Option_t *option="") override
Forward draw command to data store.
virtual bool changeObservableName(const char *from, const char *to)
void printTitle(std::ostream &os) const override
Print title of dataset.
double moment(const RooRealVar &var, double order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
void RecursiveRemove(TObject *obj) override
If one of the TObject we have a referenced to is deleted, remove the reference.
virtual double weightError(ErrorType=Poisson) const
Return the symmetric error on the current weight.
void setDirtyProp(bool flag)
Control propagation of dirty flags from observables in dataset.
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.
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.
TClass * IsA() const override
double sigma(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
virtual void setArgStatus(const RooArgSet &set, bool active)
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...
RealSpans getBatches(std::size_t first=0, std::size_t len=std::numeric_limits< std::size_t >::max()) const
Write information to retrieve data columns into evalData.spans.
virtual void add(const RooArgSet &row, double weight=1, double weightError=0)=0
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 *)
static StorageType defaultStorageType
double corrcov(const RooRealVar &x, const RooRealVar &y, const char *cutSpec, const char *cutRange, bool corr) const
Internal method to calculate single correlation and covariance elements.
bool allClientsCached(RooAbsArg *, const RooArgSet &)
Utility function that determines if all clients of object 'var' appear in given list of cached nodes.
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
RooArgSet _vars
Dimensions of this data set.
bool canSplitFast() const
static bool releaseVars(RooAbsData *)
If return value is true variables can be deleted.
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)
void copyGlobalObservables(const RooAbsData &other)
virtual bool isNonPoissonWeighted() const
bool hasFilledCache() const
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.
double sumEntriesW2() const
Return sum of squared weights of this data.
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
std::map< RooFit::Detail::DataKey, RooSpan< const RooAbsCategory::value_type > > CategorySpans
void convertToVectorStore()
Convert tree-based storage to vector-based storage.
virtual RooSpan< const double > getWeightBatch(std::size_t first, std::size_t len, bool sumW2=false) const =0
Return event weights of all events in range [first, first+len).
RooArgSet _cachedVars
! External variables cached with this data set
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
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())=0
virtual void convertToTreeStore()
Convert vector-based storage to tree-based storage.
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
bool getRange(const RooAbsRealLValue &var, double &lowest, double &highest, double marginFrac=0, bool symMode=false) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
RooAbsData & operator=(const RooAbsData &other)
void SetNameTitle(const char *name, const char *title) override
Set all the TNamed parameters (name and title).
virtual void resetCache()
Internal method – Remove cached function values.
virtual TList * split(const RooAbsCategory &splitCat, bool createEmptyDataSets=false) const
Split dataset into subsets based on states of given splitCat in this dataset.
Int_t defaultPrintContents(Option_t *opt) const override
Define default print options, for a given print style.
std::unique_ptr< RooArgSet > _globalObservables
Snapshot of global observables.
virtual double weightSquared() const =0
TTree * GetClonedTree() const
Return a clone of the TTree which stores the data or create such a tree if vector storage is used.
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 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
std::map< std::string, RooAbsData * > _ownedComponents
Owned external components.
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...
static StorageType getDefaultStorageType()
virtual bool isWeighted() const
void Streamer(TBuffer &) override
Stream an object of class RooAbsData.
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=0, bool skipZeroWeights=false)
Internal method – Cache given set of functions with data.
TMatrixDSym * corrcovMatrix(const RooArgList &vars, const char *cutSpec, const char *cutRange, bool corr) const
Return covariance matrix from data for given list of observables.
RooAbsDataStore * _dstore
Data storage implementation.
void printName(std::ostream &os) const override
Print name of dataset.
const TTree * tree() const
Return a pointer to the TTree which stores the data.
~RooAbsData() override
Destructor.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual double getMax(const char *name=0) const
Get maximum of currently defined range.
virtual const RooAbsBinning & getBinning(const char *name=0, bool verbose=true, bool createOnTheFly=false) const =0
Retrive binning configuration with given name or default binning.
virtual double getMin(const char *name=0) const
Get minimum of currently defined range.
virtual Int_t getBins(const char *name=0) const
Get number of bins of currently defined range.
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
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
double 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.
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 getDouble(Int_t idx) const
Return double stored in slot idx.
Int_t getInt(Int_t idx) const
TObject * Clone(const char *newName=0) const override
Make a clone of an object using the Streamer facility.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
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 ...
bool Replace(const TObject *oldArg, const TObject *newArg)
Replace object 'oldArg' in collection with new object 'newArg'.
void Delete(Option_t *o=0) override
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)
TObject * FindObject(const char *name) const override
Return pointer to obejct with given name.
RooMultiCategory connects several RooAbsCategory objects into a single category.
RooNameReg is a registry for const char* names.
const TNamed * constPtr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
static RooNameReg & instance()
Return reference to singleton instance.
@ kRenamedArg
TNamed flag to indicate that some RooAbsArg has been renamed (flag set in new name)
static void incrementRenameCounter()
The renaming counter has to be incremented every time a RooAbsArg is renamed.
static double infinity()
Return internal infinity representation.
A RooPlot is a plot frame and a container for graphics objects within that frame.
void addObject(TObject *obj, Option_t *drawOptions="", bool invisible=false)
Add a generic object to this plot.
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...
double getFitRangeNEvt() const
Return the number of events in the fit range.
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.
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.
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", bool invisible=false, bool refreshNorm=false)
Add the specified plotable object to our plot.
double getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
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.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
const RooAbsCategoryLValue & indexCat() const
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
A simple container to hold a batch of data values.
constexpr std::span< T >::index_type size() const noexcept
constexpr bool empty() const noexcept
The RooStringView is a wrapper around a C-syle string that can also be constructed from a std::string...
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
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.
2-D histogram with a float per channel (see TH1 documentation)}
Service class for 2-D histogram classes.
The 3-D histogram classes derived from the 1-D histogram classes.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
The TNamed class is the base class for all named ROOT classes.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
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.
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 AutoBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg AxisLabel(const char *name)
RooCmdArg Binning(const RooAbsBinning &binning)
RVec< PromoteType< T > > abs(const RVec< T > &v)
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
static Roo_reg_AGKInteg1D instance
static constexpr double s
static constexpr double pc
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
const double xbins[xbins_n]
const char * addToHistName
RooAbsData::ErrorType etype
static uint64_t sum(uint64_t i)