124#include <unordered_map> 
  135      std::cout << 
"Composite storage is not a valid *default* storage type." << std::endl;
 
 
  160      throw std::runtime_error(
"RooAbsData::initializeVars(): the variables are already initialized!");
 
  164   for (
const auto var : vars) {
 
  165      if (!var->isFundamental()) {
 
  166         coutE(InputArguments) << 
"RooAbsDataStore::initialize(" << 
GetName()
 
  167                               << 
"): Data set cannot contain non-fundamental types, ignoring " << var->GetName()
 
  169         throw std::invalid_argument(std::string(
"Only fundamental variables can be placed into datasets. This is violated for ") + var->GetName());
 
  176   for (
auto var : 
_vars) {
 
  187  _vars(
"Dataset Variables"),
 
  188  _cachedVars(
"Cached Variables"),
 
 
  213   for (
auto var : 
_vars) {
 
  214      var->attachArgs(
_vars);
 
  217   if (!
other._ownedComponents.empty()) {
 
  221      std::map<std::string, RooAbsDataStore *> 
smap;
 
 
  250     _cachedVars{
"Cached Variables"}
 
 
  260   RooPrintable::operator=(
other);
 
 
  269  if (
other._globalObservables) {
 
 
  307  bool ret =  
_dstore->changeObservableName(from,to) ;
 
 
  374  _dstore->setArgStatus(set,active) ;
 
 
  411  pc.
defineInt(
"evtStart",
"EventRange",0,0) ;
 
  412  pc.
defineInt(
"evtStop",
"EventRange",1,std::numeric_limits<int>::max()) ;
 
  413  pc.
defineSet(
"varSel",
"SelectVars",0,
nullptr) ;
 
  423  const char* cutRange = pc.
getString(
"cutRange",
nullptr,
true) ;
 
  427  int nStop = pc.
getInt(
"evtStop",std::numeric_limits<int>::max()) ;
 
  430  const char* title = pc.
getString(
"title",
nullptr,
true) ;
 
  438        coutW(InputArguments) << 
"RooAbsData::reduce(" << 
GetName() << 
") WARNING: variable " 
  439            << arg->GetName() << 
" not in dataset, ignored" << std::endl ;
 
  447  std::unique_ptr<RooAbsData> 
ret;
 
  459  if (!
ret) 
return nullptr;
 
  462  if (title) 
ret->SetTitle(title) ;
 
  464  ret->copyGlobalObservables(*
this);
 
 
  478  ret->copyGlobalObservables(*
this);
 
 
  490  ret->copyGlobalObservables(*
this);
 
 
  508      coutW(InputArguments) << 
"RooAbsData::reduce(" << 
GetName() << 
") WARNING: variable " 
  509             << arg->GetName() << 
" not in dataset, ignored" << std::endl ;
 
  514  std::unique_ptr<RooAbsData> 
ret;
 
  515  if (cut && 
strlen(cut)>0) {
 
  521  ret->copyGlobalObservables(*
this);
 
 
  538      coutW(InputArguments) << 
"RooAbsData::reduce(" << 
GetName() << 
") WARNING: variable " 
  539             << arg->GetName() << 
" not in dataset, ignored" << std::endl ;
 
  545  ret->copyGlobalObservables(*
this);
 
 
  607  RooRealVar* vars[3] = {
nullptr, 
nullptr, 
nullptr};
 
  609  for (
unsigned int i = 0; i < 
varNames.size(); ++i) {
 
  611      coutW(InputArguments) << 
"RooAbsData::createHistogram(" << 
GetName() << 
"): Can only create 3-dimensional histograms. Variable " 
  612          << i << 
" " << 
varNames[i] << 
" unused." << std::endl;
 
  618      coutE(InputArguments) << 
"RooAbsData::createHistogram(" << 
GetName() << 
") ERROR: dataset does not contain an observable named " << 
varNames[i] << std::endl;
 
  624    coutE(InputArguments) << 
"RooAbsData::createHistogram(" << 
GetName() << 
"): No variable to be histogrammed in list '" << 
varNameList << 
"'" << std::endl;
 
 
  694  const char* cutRange = pc.
getString(
"cutRange",
nullptr,
true) ;
 
  722    std::unique_ptr<RooCmdArg> 
autoRDY{
static_cast<RooCmdArg*
>((
static_cast<RooCmdArg*
>(argList.
find(
"YVar")))->subArgs().find(
"AutoRangeData"))};
 
  735    std::unique_ptr<RooCmdArg> 
autoRDZ{
static_cast<RooCmdArg*
>((
static_cast<RooCmdArg*
>(argList.
find(
"ZVar")))->subArgs().find(
"AutoRangeData"))};
 
 
  764  for(
auto * arg : 
catSet) {
 
  773      coutW(InputArguments) << 
"RooAbsData::table(" << 
GetName() << 
") non-RooAbsCategory input argument " << arg->GetName() << 
" ignored" << std::endl ;
 
 
  833  if (order==1) 
return 0 ;
 
  834  if (order==2) 
return 1 ;
 
 
  867    coutE(InputArguments) << 
"RooDataSet::moment(" << 
GetName() << 
") ERROR: unknown variable: " << var.
GetName() << std::endl;
 
  874    coutE(InputArguments) << 
"RooDataSet::moment(" << 
GetName() << 
") ERROR: variable " << var.
GetName() << 
" is not of type RooRealVar" << std::endl ;
 
  880    coutE(InputArguments) << 
"RooDataSet::moment(" << 
GetName() << 
") WARNING: empty dataset" << std::endl ;
 
  885  std::unique_ptr<RooFormula> 
select;
 
 
  912    coutE(InputArguments) << 
"RooDataSet::" << 
methodname << 
"(" << 
GetName() << 
") ERROR: variable : " << 
extVar.GetName() << 
" is not in data" << std::endl ;
 
  917    coutE(InputArguments) << 
"RooDataSet::" << 
methodname << 
"(" << 
GetName() << 
") ERROR: variable : " << 
extVar.GetName() << 
" is not of type RooRealVar in data" << std::endl ;
 
 
  935    coutW(InputArguments) << 
"RooDataSet::" << (
corr?
"correlation":
"covariance") << 
"(" << 
GetName() << 
") WARNING: empty dataset, returning zero" << std::endl ;
 
  940  std::unique_ptr<RooFormula> 
select;
 
 
  998    coutW(InputArguments) << 
"RooDataSet::covariance(" << 
GetName() << 
") WARNING: empty dataset, returning zero" << std::endl ;
 
 1003  std::unique_ptr<RooFormula> 
select = 
cutSpec ? std::make_unique<RooFormula>(
"select",
cutSpec,*
get()) : 
nullptr;
 
 1043  auto C = std::make_unique<TMatrixDSym>(
varList.size()) ;
 
 
 1069  std::string 
name = std::string{var.
GetName()} + 
"Mean";
 
 1070  std::string title = std::string{
"Mean of "} + var.
GetTitle();
 
 1072  meanv->setConstant(
false) ;
 
 1075  std::string label = 
"<" + std::string{var.
getPlotLabel()} + 
">";
 
 1076  meanv->setPlotLabel(label.c_str());
 
 
 1103  std::string title(
"RMS         of ");
 
 1107  rms->setConstant(
false) ;
 
 1112  rms->setPlotLabel(label.c_str());
 
 
 1171  pc.
defineInt(
"ymaxi",
"Layout",0,
int(0.95*10000)) ;
 
 1174  pc.
defineInt(
"dummy",
"FormatArgs",0,0) ;
 
 1185  const char* label = pc.
getString(
"label") ;
 
 1194  const char* cutRange = pc.
getString(
"cutRange",
nullptr,
true) ;
 
 1198    return statOn(frame,
what,label,0,
nullptr,
xmin,
xmax,
ymax,
cutSpec,cutRange,
formatCmd) ;
 
 
 1230  if(!
box) 
return nullptr;
 
 1232  box->SetFillColor(0);
 
 1233  box->SetBorderSize(1);
 
 1234  box->SetTextAlign(12);
 
 1235  box->SetTextSize(0.04F);
 
 1236  box->SetFillStyle(1001);
 
 1240  N.setPlotLabel(
"Entries") ;
 
 1242  meanv->setPlotLabel(
"Mean") ;
 
 1244  rms->setPlotLabel(
"RMS") ;
 
 
 1268  if(
nullptr == hist) {
 
 1269    coutE(InputArguments) << 
ClassName() << 
"::" << 
GetName() << 
":fillHistogram: no valid histogram to fill" << std::endl;
 
 1276    coutE(InputArguments) << 
ClassName() << 
"::" << 
GetName() << 
":fillHistogram: plotVars has the wrong dimension" << std::endl;
 
 1290      << 
"\" of type " << var->
ClassName() << std::endl;
 
 1296      assert(
nullptr != clone);
 
 1299            << 
":fillHistogram: Data does not contain the variable '" << 
realVar->GetName() << 
"'." << std::endl;
 
 1313  std::unique_ptr<RooFormula> 
select;
 
 1314  if (cuts != 
nullptr && 
strlen(cuts) > 0) {
 
 1315    select = std::make_unique<RooFormula>(cuts, cuts, 
_vars, 
false);
 
 1317      coutE(InputArguments) << 
ClassName() << 
"::" << 
GetName() << 
":fillHistogram: invalid cuts \"" << cuts << 
"\"" << std::endl;
 
 1340    coutE(InputArguments) << 
ClassName() << 
"::" << 
GetName() << 
":fillHistogram: cannot fill histogram with " 
 1341    << 
hdim << 
" dimensions" << std::endl;
 
 1353  for(
int i=0; i < nevent; ++i) {
 
 1368      for (
const auto arg : 
_vars) {
 
 1370        for (
auto const& cut : 
cutVec) {
 
 1371          if (!cut.empty() && arg->inRange(cut.c_str())) {
 
 
 1435struct SplittingSetup {
 
 1439   bool addWeightVar = 
false;
 
 1444   SplittingSetup setup;
 
 1448      oocoutE(&
data, InputArguments) << 
"RooTreeData::split(" << 
data.GetName() << 
") ERROR category " 
 1449                                     << 
splitCat.GetName() << 
" doesn't depend on any variable in this dataset" 
 1461      if (!setup.cloneCat) {
 
 1462         oocoutE(&
data, InputArguments) << 
"RooTreeData::split(" << 
data.GetName() << 
") ERROR category " 
 1463                                        << 
splitCat.GetName() << 
" is fundamental and does not appear in this dataset" 
 1470   setup.subsetVars.
add(*
data.get());
 
 1472      std::unique_ptr<RooArgSet> vars{
splitCat.getVariables()};
 
 1473      setup.subsetVars.
remove(*vars, 
true, 
true);
 
 1480   setup.addWeightVar = 
data.isWeighted();
 
 1486                                   std::function<std::unique_ptr<RooAbsData>(
const char *label)> 
createEmptyData)
 
 1488   auto dsetList = std::make_unique<TList>();
 
 1492      for (
const auto &
nameIdx : cloneCat) {
 
 1500   for (
int i = 0; i < 
data.numEntries(); ++i) {
 
 1550   if (!setup.cloneCat)
 
 1553   auto createEmptyData = [&](
const char *label) -> std::unique_ptr<RooAbsData> {
 
 1554      return std::unique_ptr<RooAbsData>{
 
 1555         emptyClone(label, label, &setup.subsetVars, setup.addWeightVar ? 
"weight" : 
nullptr)};
 
 
 1584   if (!setup.cloneCat)
 
 1604   auto createEmptyData = [&](
const char *label) -> std::unique_ptr<RooAbsData> {
 
 1608      return std::unique_ptr<RooAbsData>{
 
 
 1718  pc.
defineInt(
"nbins",
"BinningSpec",0,100) ;
 
 1723  pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
 
 1724  pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
 
 1725  pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
 
 1726  pc.
defineInt(
"markerColor",
"MarkerColor",0,-999) ;
 
 1727  pc.
defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
 
 1729  pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
 
 1730  pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
 
 1732  pc.
defineInt(
"histInvisible",
"Invisible",0,0) ;
 
 1733  pc.
defineInt(
"refreshFrameNorm",
"RefreshNorm",0,1) ;
 
 1739  pc.
defineMutex(
"DataError",
"Asymmetry",
"Efficiency") ;
 
 1740  pc.
defineMutex(
"Binning",
"BinningName",
"BinningSpec") ;
 
 1780      coutI(InputArguments) << 
"RooAbsData::plotOn(" << 
GetName()
 
 1781             << 
") INFO: dataset has non-integer weights, auto-selecting SumW2 errors instead of Poisson errors" << std::endl ;
 
 1787           << 
" to add to in RooPlot" << std::endl ;
 
 
 
 1838  if(
nullptr == frame) {
 
 1843  if(
nullptr == var) {
 
 1845    << 
":plotOn: frame does not specify a plot variable" << std::endl;
 
 1850  const std::string histName = std::string{
GetName()} + 
"_plot";
 
 1851  std::unique_ptr<TH1> hist;
 
 1867    << 
":plotOn: fillHistogram() failed" << std::endl;
 
 1882  if(
nullptr == graph) {
 
 1884    << 
":plotOn: unable to create a RooHist object" << std::endl;
 
 1894    nEnt = tmp->sumEntries() ;
 
 1899    coutI(Plotting) << 
"RooTreeData::plotOn: plotting " << hist->GetSumOfWeights() << 
" events out of " << 
nEnt << 
" total events" << std::endl ;
 
 1908      coutE(Plotting) << 
"RooTreeData::plotOn: ERROR Histogram to be added to, '" << o.
addToHistName << 
"',has different binning" << std::endl ;
 
 1927      hname += std::string{
"_Cut["} + o.
cuts + 
"]";
 
 
 1958  if(
nullptr == frame) {
 
 1963  if(
nullptr == var) {
 
 1965    << 
":plotAsymOn: frame does not specify a plot variable" << std::endl;
 
 1973  std::unique_ptr<TH1> 
hist1;
 
 1974  std::unique_ptr<TH1> 
hist2;
 
 2004    << 
":plotAsymOn: createHistogram() failed" << std::endl;
 
 
 2051  if(
nullptr == frame) {
 
 2056  if(
nullptr == var) {
 
 2058    << 
":plotEffOn: frame does not specify a plot variable" << std::endl;
 
 2066  std::unique_ptr<TH1> 
hist1;
 
 2067  std::unique_ptr<TH1> 
hist2;
 
 2097    << 
":plotEffOn: createHistogram() failed" << std::endl;
 
 
 2141  std::unique_ptr<RooArgSet> 
tableSet;
 
 2145      << 
" is not in dataset and is also not dependent on data set" << std::endl ;
 
 2150    tableSet = std::make_unique<RooArgSet>();
 
 2152      coutE(Plotting) << 
"RooTreeData::table(" << 
GetName() << 
") Couldn't deep-clone table category, abort." << std::endl;
 
 2161  std::unique_ptr<RooFormulaVar> 
cutVar;
 
 2163  if (cuts && 
strlen(cuts)) {
 
 2168    cutVar = std::make_unique<RooFormulaVar>(
"cutVar",cuts,
_vars) ;
 
 2174  for(
int i=0; i < nevent; ++i) {
 
 
 2195    coutE(InputArguments) << 
"RooDataSet::getRange(" << 
GetName() << 
") ERROR: unknown variable: " << var.
GetName() << std::endl ;
 
 2202    coutE(InputArguments) << 
"RooDataSet::getRange(" << 
GetName() << 
") ERROR: variable " << var.
GetName() << 
" is not of type RooRealVar" << std::endl ;
 
 2208    coutE(InputArguments) << 
"RooDataSet::getRange(" << 
GetName() << 
") WARNING: empty dataset" << std::endl ;
 
 
 2265  for(
auto * var : *
get()) {
 
 2278      if (
rrv && !
rrv->getBinning().isShareable()) {
 
 2302    cxcoutI(Optimization) << 
"RooTreeData::optimizeReadingForTestStatistic(" << 
GetName() << 
"): Observables " << 
pruneSet 
 2303             << 
" 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" << std::endl ;
 
 
 2319    if (!
cacheList.find(client->GetName())) {
 
 
 2369   if (
R__b.IsReading()) {
 
 
 2402  return _dstore->hasFilledCache() ;
 
 
 2415      coutW(InputArguments) << 
"RooAbsData::tree(" << 
GetName() << 
") WARNING: is not of StorageType::Tree. " 
 2416                            << 
"Use GetClonedTree() instead or convert to tree storage." << std::endl;
 
 
 2453    if (iter.second == obj) {
 
 2454      iter.second = 
nullptr;
 
 
 2470    arg->setAttribute(
"global",
true);
 
 
 2515  for (std::size_t i = 0; i < 
eventWeights.size(); ++i) {
 
 
 2546                                  const char *
name)
 const 
 
 2561                                  const char *cuts, 
const char *
name)
 const 
 2564   static int counter(0);
 
 2572         coutE(InputArguments) << 
GetName() << 
"::createHistogram: Argument " << 
var1.GetName()
 
 2573                               << 
" is not in dataset and is also not dependent on data set" << std::endl;
 
 2591         coutE(InputArguments) << 
GetName() << 
"::createHistogram: Argument " << 
var2.GetName()
 
 2592                               << 
" is not in dataset and is also not dependent on data set" << std::endl;
 
 2605   std::unique_ptr<RooFormula> 
select;
 
 2606   if (
nullptr != cuts && 
strlen(cuts)) {
 
 2607      select = std::make_unique<RooFormula>(cuts, cuts, 
_vars);
 
 2613   const std::string histName = std::string{
GetName()} + 
"_" + 
name  + 
"_" + 
Form(
"%08x", counter++);
 
 2619      coutE(DataHandling) << 
GetName() << 
"::createHistogram: unable to create a new histogram" << std::endl;
 
 2625   for (
int i = 0; i < nevent; ++i) {
 
 
 2641   using Map = std::unordered_map<std::string, RooAbsData::ErrorType>;
 
 2649      std::stringstream 
msg;
 
 2650      msg << 
"Unsupported error type type passed to DataError(). " 
 2651             "Supported decay types are : \"Poisson\", \"SumW2\", \"Auto\", \"Expected\", and None.";
 
 2652      throw std::invalid_argument(
msg.str());
 
 2654   return found->second;
 
 
 
 
static void indent(ostringstream &buf, int indent_level)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
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
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
 
const_iterator begin() const
 
const_iterator end() const
 
Common abstract base class for objects that represent a value and a "shape" in RooFit.
 
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=nullptr, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
 
bool recursiveRedirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true)
Recursively replace all servers with the new servers in newSet.
 
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
 
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
 
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
 
Abstract base class for RooRealVar binning definitions.
 
virtual double averageBinWidth() const =0
 
Abstract base class for objects that represent a discrete value that can be set from the outside,...
 
A space to attach TBranches.
 
virtual const char * getCurrentLabel() const
Return label string of current state.
 
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.
 
RooAbsArg * find(const char *name) const
Find object with given name in list.
 
Abstract base class for a data collection.
 
virtual RooAbsData::CategorySpans getCategoryBatches(std::size_t, std::size_t) const
 
virtual RooAbsData::RealSpans getBatches(std::size_t first, std::size_t len) const =0
Retrieve batches for all observables in this data store.
 
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.
 
virtual const RooArgSet * get() const
 
RooRealVar * meanVar(const RooRealVar &var, const char *cutSpec=nullptr, const char *cutRange=nullptr) const
Create a RooRealVar containing the mean of observable 'var' in this dataset.
 
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
 
RooFit::OwningPtr< TMatrixDSym > corrcovMatrix(const RooArgList &vars, const char *cutSpec, const char *cutRange, bool corr) const
Return covariance matrix from data for given list of observables.
 
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.
 
std::map< RooFit::Detail::DataKey, std::span< const double > > RealSpans
 
void setGlobalObservables(RooArgSet const &globalObservables)
Sets the global observables stored in this data.
 
RooAbsDataStore * store()
 
void printClassName(std::ostream &os) const override
Print class name of dataset.
 
RooRealVar * rmsVar(const RooRealVar &var, const char *cutSpec=nullptr, const char *cutRange=nullptr) const
Create a RooRealVar containing the RMS of observable 'var' in this dataset.
 
double standMoment(const RooRealVar &var, double order, const char *cutSpec=nullptr, const char *cutRange=nullptr) const
Calculate standardized moment.
 
virtual RooPlot * statOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Add a box with statistics information to the specified frame.
 
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.
 
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.
 
std::map< RooFit::Detail::DataKey, std::span< const RooAbsCategory::value_type > > CategorySpans
 
virtual RooFit::OwningPtr< TList > split(const RooAbsCategory &splitCat, bool createEmptyDataSets=false) const
Split the dataset into subsets based on states of a categorical variable in this dataset.
 
virtual TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cuts="", const char *cutRange=nullptr) const
Loop over columns of our tree data and fill the input histogram.
 
virtual void setArgStatus(const RooArgSet &set, bool active)
 
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=nullptr, bool skipZeroWeights=false)
Internal method – Cache given set of functions with data.
 
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 optimizeReadingWithCaching(RooAbsArg &arg, const RooArgSet &cacheList, const RooArgSet &keepObsList)
Prepare dataset for use with cached constant terms listed in 'cacheList' of expression 'arg'.
 
static StorageType defaultStorageType
 
virtual std::span< 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).
 
virtual std::unique_ptr< RooAbsData > reduceEng(const RooArgSet &varSubset, const RooFormulaVar *cutVar, const char *cutRange=nullptr, std::size_t nStart=0, std::size_t=std::numeric_limits< std::size_t >::max()) const =0
 
RooFit::OwningPtr< RooAbsData > reduce(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create a reduced copy of this dataset.
 
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.
 
std::unique_ptr< RooAbsDataStore > _dstore
Data storage implementation.
 
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
 
RooArgSet _vars
Dimensions of this data set.
 
bool canSplitFast() const
 
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...
 
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
 
RooAbsData * getSimData(const char *idxstate)
 
void copyGlobalObservables(const RooAbsData &other)
 
virtual bool isNonPoissonWeighted() const
 
bool hasFilledCache() const
 
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.
 
void convertToVectorStore()
Convert tree-based storage to vector-based storage.
 
bool getRange(const RooAbsRealLValue &var, double &lowest, double &highest, double marginFrac=0.0, bool symMode=false) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
 
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 void convertToTreeStore()
Convert vector-based storage to tree-based storage.
 
double moment(const RooRealVar &var, double order, const char *cutSpec=nullptr, const char *cutRange=nullptr) const
Calculate moment of requested order.
 
RooAbsData & operator=(const RooAbsData &other)
 
virtual RooFit::OwningPtr< RooAbsData > emptyClone(const char *newName=nullptr, const char *newTitle=nullptr, const RooArgSet *vars=nullptr, const char *wgtVarName=nullptr) const =0
 
void SetNameTitle(const char *name, const char *title) override
Set all the TNamed parameters (name and title).
 
void copyImpl(const RooAbsData &other, const char *newname)
 
virtual void resetCache()
Internal method – Remove cached function values.
 
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.
 
void attachBuffers(const RooArgSet &extObs)
 
std::map< std::string, RooAbsData * > _ownedComponents
Owned external components.
 
static StorageType getDefaultStorageType()
 
void Streamer(TBuffer &) override
Stream an object of class RooAbsData.
 
void printName(std::ostream &os) const override
Print name of dataset.
 
static ErrorType errorTypeFromString(std::string const &name)
Convert a string to the value of the RooAbsData::ErrorType enum with the same name.
 
const TTree * tree() const
Return a pointer to the TTree which stores the data.
 
TH1 * createHistogram(const char *name, const RooAbsRealLValue &xvar, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
 
void initializeVars(RooArgSet const &vars)
 
~RooAbsData() override
Destructor.
 
Abstract interface for all probability density functions.
 
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
 
virtual const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const =0
Retrieve binning configuration with given name or default binning.
 
TH1 * createHistogram(const char *name, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
 
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
 
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
 
Abstract base class for objects that represent a real value and implements functionality common to al...
 
const char * getPlotLabel() const
Get the label associated with the variable.
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
 
Object to represent discrete states.
 
Named container for two doubles, two integers two object points and three string pointers that can be...
 
RooLinkedList const & subArgs() const
Return list of sub-arguments in this RooCmdArg.
 
TObject * Clone(const char *newName=nullptr) const override
Make a clone of an object using the Streamer facility.
 
Configurable parser for RooCmdArg named arguments.
 
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
 
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
 
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
 
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
 
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
 
static void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
 
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
 
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
 
bool ok(bool verbose) const
Return true of parsing was successful.
 
bool defineObject(const char *name, const char *argName, int setNum, const TObject *obj=nullptr, bool isArray=false)
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 convEmptyToNull=false) const
Return string property registered with name 'name'.
 
bool defineString(const char *name, const char *argName, int stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
 
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
 
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
 
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
 
TObject * getObject(const char *name, TObject *obj=nullptr) const
Return TObject property registered with name 'name'.
 
Combines several disjunct datasets into one.
 
Container class to hold N-dimensional binned data.
 
Container class to hold unbinned data.
 
Graphical representation of binned data based on the TGraphAsymmErrors class.
 
void setRawEntries(double n)
 
bool hasIdenticalBinning(const RooHist &other) const
Return true if binning of this RooHist is identical to that of 'other'.
 
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
 
bool Replace(const TObject *oldArg, const TObject *newArg)
Replace object 'oldArg' in collection with new object 'newArg'.
 
void Delete(Option_t *o=nullptr) 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)
 
Connects several RooAbsCategory objects into a single category.
 
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 constexpr double infinity()
Return internal infinity representation.
 
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.
 
TObject * findObject(const char *name, const TClass *tClass=nullptr) const
Find the named object in our list of items and return a pointer to it.
 
double getFitRangeNEvt() const
Return the number of events in the fit range.
 
RooAbsRealLValue * getPlotVar() const
 
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 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.
 
void setYAxisLabel(const char *label)
 
A 'mix-in' base class that define the standard RooFit plotting and printing methods.
 
Variable that can be changed from the outside.
 
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
 
The RooStringView is a wrapper around a C-style string that can also be constructed from a std::strin...
 
static void destroy(const TObject *obj)
Register deletion of object 'obj'.
 
static void create(const TObject *obj)
Register creation of object 'obj'.
 
TTree-backed data storage.
 
Uses std::vector to store data columns.
 
Buffer base class used for serializing objects.
 
void SetName(const char *name="") override
Set graph name.
 
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.
 
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 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.
 
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 ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
 
RooCmdArg SelectVars(const RooArgSet &vars)
 
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
 
RooCmdArg AxisLabel(const char *name)
 
RooCmdArg Binning(const RooAbsBinning &binning)
 
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
 
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
 
OwningPtr< T > makeOwningPtr(std::unique_ptr< T > &&ptr)
Internal helper to turn a std::unique_ptr<T> into an OwningPtr.
 
const char * addToHistName
 
RooAbsData::ErrorType etype
 
static uint64_t sum(uint64_t i)