54namespace TestStatistics {
66#if (__cplusplus >= 201700L) && !defined(_MSC_VER) && (!defined(__clang_major__) || __clang_major__ > 5)
67#define WRITE_TSTRING_COMPATIBLE_CONSTRUCTOR(Class_t)
69#define WRITE_TSTRING_COMPATIBLE_CONSTRUCTOR(Class_t) \
70 template<typename ...Args_t> \
71 Class_t(ROOT::Internal::TStringView name, ROOT::Internal::TStringView title, Args_t &&... args) \
72 : Class_t(std::string_view(name), std::string_view(title), std::forward<Args_t>(args)...) {} \
73 template<typename ...Args_t> \
74 Class_t(ROOT::Internal::TStringView name, std::string_view title, Args_t &&... args) \
75 : Class_t(std::string_view(name), title, std::forward<Args_t>(args)...) {} \
76 template<typename ...Args_t> \
77 Class_t(std::string_view name, ROOT::Internal::TStringView title, Args_t &&... args) \
78 : Class_t(name, std::string_view(title), std::forward<Args_t>(args)...) {}
125 virtual void fill() ;
159 using RealSpans = std::map<RooFit::Detail::DataKey, RooSpan<const double>>;
160 using CategorySpans = std::map<RooFit::Detail::DataKey, RooSpan<const RooAbsCategory::value_type>>;
188 virtual void reset() ;
255 virtual void printName(std::ostream& os)
const ;
256 virtual void printTitle(std::ostream& os)
const ;
291 const char *label=
"",
Int_t sigDigits= 2,
294 const char* cutSpec=0,
const char* cutRange=0,
367 std::size_t nStart = 0, std::size_t = std::numeric_limits<std::size_t>::max(),
Bool_t copyCache=
kTRUE) = 0 ;
#define WRITE_TSTRING_COMPATIBLE_CONSTRUCTOR(Class_t)
#define ClassDef(name, id)
static void indent(ostringstream &buf, int indent_level)
Roo1DTable implements a one-dimensional table.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
RooAbsCachedPdf is the abstract base class for p.d.f.s that need or want to cache their evaluate() ou...
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
Storage_t const & get() const
Const access to the underlying stl container.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooRealVar * meanVar(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Create a RooRealVar containing the mean of observable 'var' in this dataset.
virtual const RooArgSet * get() const
const RooAbsDataStore * store() const
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
void SetName(const char *name)
Set the name of the TNamed.
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)
CategorySpans getCategoryBatches(std::size_t first=0, std::size_t len=std::numeric_limits< std::size_t >::max()) const
Double_t skewness(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
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
Double_t sigma(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
virtual RooAbsData * cacheClone(const RooAbsArg *newCacheOwner, const RooArgSet *newCacheVars, const char *newName=0)=0
TMatrixDSym * covarianceMatrix(const RooArgList &vars, const char *cutSpec=0, const char *cutRange=0) const
static Bool_t releaseVars(RooAbsData *)
If return value is true variables can be deleted.
TMatrixDSym * correlationMatrix(const char *cutSpec=0, const char *cutRange=0) const
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
TMatrixDSym * correlationMatrix(const RooArgList &vars, const char *cutSpec=0, const char *cutRange=0) const
Double_t kurtosis(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
virtual Double_t sumEntries(const char *cutSpec, const char *cutRange=0) const =0
Return effective number of entries in dataset inside range or after cuts, i.e.
virtual TList * split(const RooAbsCategory &splitCat, Bool_t createEmptyDataSets=kFALSE) const
Split dataset into subsets based on states of given splitCat in this dataset.
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual double weightError(ErrorType=Poisson) const
Return the symmetric error on the current weight.
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
virtual TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cuts="", const char *cutRange=0) const
Loop over columns of our tree data and fill the input histogram.
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.
virtual Bool_t valid() const
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 void claimVars(RooAbsData *)
virtual Double_t weight() const =0
static StorageType defaultStorageType
virtual Double_t weightSquared() const =0
Double_t standMoment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate standardized moment.
TMatrixDSym * covarianceMatrix(const char *cutSpec=0, const char *cutRange=0) const
virtual Bool_t isWeighted() const
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
virtual void printName(std::ostream &os) const
Print name of dataset.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
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 RooAbsData * reduceEng(const RooArgSet &varSubset, const RooFormulaVar *cutVar, const char *cutRange=0, std::size_t nStart=0, std::size_t=std::numeric_limits< std::size_t >::max(), Bool_t copyCache=kTRUE)=0
void copyGlobalObservables(const RooAbsData &other)
De-duplicated name pointer. This will be equal for all objects with the same name.
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_t correlation(RooRealVar &x, RooRealVar &y, const char *cutSpec=0, const char *cutRange=0) 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.
std::map< RooFit::Detail::DataKey, RooSpan< const RooAbsCategory::value_type > > CategorySpans
Double_t corrcov(const RooRealVar &x, const RooRealVar &y, const char *cutSpec, const char *cutRange, Bool_t corr) const
Internal method to calculate single correlation and covariance elements.
void convertToVectorStore()
Convert tree-based storage to vector-based storage.
virtual 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).
const TNamed * namePtr() const
De-duplicated pointer to this object's name.
virtual void add(const RooArgSet &row, Double_t weight=1, Double_t weightError=0)=0
Bool_t getRange(const RooAbsRealLValue &var, Double_t &lowest, Double_t &highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
virtual void convertToTreeStore()
Convert vector-based storage to tree-based storage.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default print options, for a given print style.
RooArgSet const * getGlobalObservables() const
Returns snapshot of global observables stored in this data.
RooAbsData & operator=(const RooAbsData &other)
Double_t moment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
Double_t covariance(RooRealVar &x, RooRealVar &y, const char *cutSpec=0, const char *cutRange=0) const
virtual void resetCache()
Internal method – Remove cached function values.
std::unique_ptr< RooArgSet > _globalObservables
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.
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.
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)
Double_t mean(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
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
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()
Bool_t canSplitFast() const
virtual void printTitle(std::ostream &os) const
Print title of dataset.
RooAbsDataStore * _dstore
External variables cached with this data set.
const TTree * tree() const
Return a pointer to the TTree which stores the data.
Bool_t allClientsCached(RooAbsArg *, const RooArgSet &)
Utility function that determines if all clients of object 'var' appear in given list of cached nodes.
void setDirtyProp(Bool_t flag)
Control propagation of dirty flags from observables in dataset.
virtual ~RooAbsData()
Destructor.
virtual void weightError(double &lo, double &hi, ErrorType=Poisson) const
Return the asymmetric errors on the current weight.
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
static const RooCmdArg & none()
Return reference to null argument.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
RooRealVar represents a variable that can be changed from the outside.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
A simple container to hold a batch of data values.
TH1 is the base class of all histogram classes in ROOT.
2-D histogram with a float per channel (see TH1 documentation)}
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
Namespace for dispatching RooFit computations to various backends.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
const char * addToHistName
RooAbsData::ErrorType etype
Bool_t correctForBinWidth
Analyzes a function given a dataset/observables for constant terms and caches those in the dataset.