Logo ROOT  
Reference Guide
RooAbsData.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooAbsData.h,v 1.33 2007/07/16 21:04:28 wouter Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_ABS_DATA
17 #define ROO_ABS_DATA
18 
19 #include "TNamed.h"
20 #include "RooPrintable.h"
21 #include "RooArgSet.h"
22 #include "RooArgList.h"
23 #include "RooSpan.h"
24 #include <map>
25 #include <string>
26 
27 class RooAbsArg;
28 class RooAbsReal ;
29 class RooRealVar;
30 class RooAbsRealLValue;
31 class RooAbsCategory ;
33 class Roo1DTable ;
34 class RooPlot;
35 class RooArgList;
36 class TH1;
37 class TH2F;
38 class RooAbsBinning ;
39 class Roo1DTable ;
40 class RooAbsDataStore ;
41 template<typename T> class TMatrixTSym;
43 class RooFormulaVar;
44 namespace RooBatchCompute{
45 struct RunContext;
46 }
47 
48 
49 class RooAbsData : public TNamed, public RooPrintable {
50 public:
51 
52  // Constructors, factory methods etc.
53  RooAbsData() ;
54  RooAbsData(const char *name, const char *title, const RooArgSet& vars, RooAbsDataStore* store=0) ;
55  RooAbsData(const RooAbsData& other, const char* newname = 0) ;
56  RooAbsData& operator=(const RooAbsData& other);
57  virtual ~RooAbsData() ;
58  virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitle=0, const RooArgSet* vars=0, const char* wgtVarName=0) const = 0 ;
59 
60  // Reduction methods
61  RooAbsData* reduce(const RooCmdArg& arg1,const RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg(),const RooCmdArg& arg4=RooCmdArg(),
62  const RooCmdArg& arg5=RooCmdArg(),const RooCmdArg& arg6=RooCmdArg(),const RooCmdArg& arg7=RooCmdArg(),const RooCmdArg& arg8=RooCmdArg()) ;
63  RooAbsData* reduce(const char* cut) ;
64  RooAbsData* reduce(const RooFormulaVar& cutVar) ;
65  RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ;
66  RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVar) ;
67 
68  RooAbsDataStore* store() { return _dstore ; }
69  const RooAbsDataStore* store() const { return _dstore ; }
70  const TTree* tree() const ;
71  TTree *GetClonedTree() const;
72 
73  void convertToVectorStore() ;
74  virtual void convertToTreeStore();
75 
76  void attachBuffers(const RooArgSet& extObs) ;
77  void resetBuffers() ;
78 
79 
80  virtual void Draw(Option_t* option = "") ;
81 
82  void checkInit() const ;
83 
84  // Change name of observable
85  virtual Bool_t changeObservableName(const char* from, const char* to) ;
86 
87  // Add one ore more rows of data
88  virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weightError=0) = 0 ; // DERIVED
89  virtual void fill() ;
90 
91  // Load a given row of data
92  virtual inline const RooArgSet* get() const {
93  // Return current row of dataset
94  return &_vars ;
95  }
96  virtual Double_t weight() const = 0 ; // DERIVED
97  virtual Double_t weightSquared() const = 0 ; // DERIVED
98  virtual Bool_t valid() const { return kTRUE ; }
100  virtual Double_t weightError(ErrorType etype=Poisson) const ;
101  virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Poisson) const ;
102  virtual const RooArgSet* get(Int_t index) const ;
103 
104  /// Retrieve batches of data for each real-valued variable in this dataset.
105  /// \param[out] evalData Store references to all data batches in this struct.
106  /// \param first Index of first event that ends up in the batch.
107  /// \param len Number of events in each batch.
108  /// Needs to be overridden by derived classes. This implementation returns an empty RunContext.
109  virtual void getBatches(RooBatchCompute::RunContext& evalData,
110  std::size_t first = 0, std::size_t len = std::numeric_limits<std::size_t>::max()) const = 0;
111 
112  ////////////////////////////////////////////////////////////////////////////////
113  /// Return event weights of all events in range [first, first+len).
114  /// If no contiguous structure of weights is stored, an empty batch can be returned.
115  /// This indicates that the weight is constant. Use weight() to retrieve it.
116  virtual RooSpan<const double> getWeightBatch(std::size_t first, std::size_t len) const = 0;
117 
118  /// Return number of entries in dataset, *i.e.*, count unweighted entries.
119  virtual Int_t numEntries() const ;
120  /// Return effective number of entries in dataset, *i.e.*, sum all weights.
121  virtual Double_t sumEntries() const = 0 ;
122  /// Return effective number of entries in dataset inside range or after cuts, *i.e.*, sum certain weights.
123  /// \param[in] cutSpec Apply given cut when counting (*e.g.* `0 < x && x < 5`). Passing `"1"` selects all events.
124  /// \param[in] cutRange If the observables have a range with this name, only count events inside this range.
125  virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0) const = 0 ; // DERIVED
126  virtual Bool_t isWeighted() const {
127  // Do events in dataset have weights?
128  return kFALSE ;
129  }
130  virtual Bool_t isNonPoissonWeighted() const {
131  // Do events in dataset have non-integer weights?
132  return kFALSE ;
133  }
134  virtual void reset() ;
135 
136 
137  Bool_t getRange(const RooAbsRealLValue& var, Double_t& lowest, Double_t& highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const ;
138 
139  // Plot the distribution of a real valued arg
140  virtual Roo1DTable* table(const RooArgSet& catSet, const char* cuts="", const char* opts="") const ;
141  virtual Roo1DTable* table(const RooAbsCategory& cat, const char* cuts="", const char* opts="") const ;
142  /// \see RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const
143  virtual RooPlot* plotOn(RooPlot* frame,
144  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
145  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
146  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
147  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
148 
149  virtual RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const ;
150 
151  // WVE --- This needs to be public to avoid CINT problems
152  struct PlotOpt {
155  scaleFactor(1.) {} ;
156  const char* cuts ;
160  const char* cutRange ;
161  const char* histName ;
163  const char* addToHistName ;
170  } ;
171 
172  // Split a dataset by a category
173  virtual TList* split(const RooAbsCategory& splitCat, Bool_t createEmptyDataSets=kFALSE) const ;
174 
175  // Fast splitting for SimMaster setData
176  Bool_t canSplitFast() const ;
177  RooAbsData* getSimData(const char* idxstate) ;
178 
179  /// Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) const
180  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
181  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
182  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
183  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
184  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
185  /// Create and fill a ROOT histogram TH1,TH2 or TH3 with the values of this dataset.
186  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) const ;
187  TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const ;
188 
189  // Fill an existing histogram
190  virtual TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cuts= "", const char* cutRange=0) const;
191 
192  // Printing interface (human readable)
193  inline virtual void Print(Option_t *options= 0) const {
194  // Print contents on stdout
196  }
197 
198  virtual void printName(std::ostream& os) const ;
199  virtual void printTitle(std::ostream& os) const ;
200  virtual void printClassName(std::ostream& os) const ;
201  void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
202 
203  virtual Int_t defaultPrintContents(Option_t* opt) const ;
204 
205  void setDirtyProp(Bool_t flag) ;
206 
207  Double_t moment(const RooRealVar& var, Double_t order, const char* cutSpec=0, const char* cutRange=0) const ;
208  Double_t moment(const RooRealVar& var, Double_t order, Double_t offset, const char* cutSpec=0, const char* cutRange=0) const ;
209  Double_t standMoment(const RooRealVar& var, Double_t order, const char* cutSpec=0, const char* cutRange=0) const ;
210 
211  Double_t mean(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return moment(var,1,0,cutSpec,cutRange) ; }
212  Double_t sigma(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return sqrt(moment(var,2,cutSpec,cutRange)) ; }
213  Double_t skewness(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return standMoment(var,3,cutSpec,cutRange) ; }
214  Double_t kurtosis(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return standMoment(var,4,cutSpec,cutRange) ; }
215 
216  Double_t covariance(RooRealVar &x,RooRealVar &y, const char* cutSpec=0, const char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kFALSE) ; }
217  Double_t correlation(RooRealVar &x,RooRealVar &y, const char* cutSpec=0, const char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kTRUE) ; }
218 
219  TMatrixDSym* covarianceMatrix(const char* cutSpec=0, const char* cutRange=0) const { return covarianceMatrix(*get(),cutSpec,cutRange) ; }
220  TMatrixDSym* correlationMatrix(const char* cutSpec=0, const char* cutRange=0) const { return correlationMatrix(*get(),cutSpec,cutRange) ; }
221  TMatrixDSym* covarianceMatrix(const RooArgList& vars, const char* cutSpec=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutRange,kFALSE) ; }
222  TMatrixDSym* correlationMatrix(const RooArgList& vars, const char* cutSpec=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutRange,kTRUE) ; }
223 
224  RooRealVar* meanVar(const RooRealVar &var, const char* cutSpec=0, const char* cutRange=0) const ;
225  RooRealVar* rmsVar(const RooRealVar &var, const char* cutSpec=0, const char* cutRange=0) const ;
226 
227  virtual RooPlot* statOn(RooPlot* frame,
228  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
229  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
230  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
231  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
232 
233  virtual RooPlot* statOn(RooPlot* frame, const char *what,
234  const char *label= "", Int_t sigDigits= 2,
235  Option_t *options= "NELU", Double_t xmin=0.15,
236  Double_t xmax= 0.65,Double_t ymax=0.85,
237  const char* cutSpec=0, const char* cutRange=0,
238  const RooCmdArg* formatCmd=0);
239 
240  virtual void RecursiveRemove(TObject *obj);
241 
242  Bool_t hasFilledCache() const ;
243 
244  void addOwnedComponent(const char* idxlabel, RooAbsData& data) ;
245  static void claimVars(RooAbsData*) ;
246  static Bool_t releaseVars(RooAbsData*) ;
247 
249 
250  static void setDefaultStorageType(StorageType s) ;
251 
253 
254 protected:
255 
257 
259 
260  Double_t corrcov(const RooRealVar& x, const RooRealVar& y, const char* cutSpec, const char* cutRange, Bool_t corr) const ;
261  TMatrixDSym* corrcovMatrix(const RooArgList& vars, const char* cutSpec, const char* cutRange, Bool_t corr) const ;
262 
263  virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& cacheList, const RooArgSet& keepObsList) ;
265 
266 
267  // PlotOn implementation
268  virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ;
269  virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& asymCat, PlotOpt o) const ;
270  virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& effCat, PlotOpt o) const ;
271 
272 
273  // Constant term optimizer interface
274  friend class RooAbsArg ;
275  friend class RooAbsReal ;
276  friend class RooAbsOptTestStatistic ;
277  friend class RooAbsCachedPdf ;
278 
279  virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const RooArgSet* nset=0, Bool_t skipZeroWeights=kFALSE) ;
280  virtual void resetCache() ;
281  virtual void setArgStatus(const RooArgSet& set, Bool_t active) ;
282  virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars) ;
283 
284  virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooArgSet* newCacheVars, const char* newName=0) = 0 ; // DERIVED
285  virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange=0,
286  std::size_t nStart = 0, std::size_t = std::numeric_limits<std::size_t>::max(), Bool_t copyCache=kTRUE) = 0 ; // DERIVED
287 
288  RooRealVar* dataRealVar(const char* methodname, const RooRealVar& extVar) const ;
289 
290  // Column structure definition
291  RooArgSet _vars; // Dimensions of this data set
292  RooArgSet _cachedVars ; //! External variables cached with this data set
293 
294  RooAbsDataStore* _dstore ; // Data storage implementation
295 
296  std::map<std::string,RooAbsData*> _ownedComponents ; // Owned external components
297 
298 private:
299  ClassDef(RooAbsData, 5) // Abstract data collection
300 };
301 
302 #endif
RooAbsData::PlotOpt::scaleFactor
Double_t scaleFactor
Definition: RooAbsData.h:169
RooAbsData::Tree
@ Tree
Definition: RooAbsData.h:248
RooAbsData::correlationMatrix
TMatrixDSym * correlationMatrix(const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:220
RooAbsData::getBatches
virtual void getBatches(RooBatchCompute::RunContext &evalData, std::size_t first=0, std::size_t len=std::numeric_limits< std::size_t >::max()) const =0
Retrieve batches of data for each real-valued variable in this dataset.
RooAbsReal::copyCache
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
Definition: RooAbsReal.cxx:3217
RooCmdArg
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition: RooCmdArg.h:27
first
Definition: first.py:1
RooAbsData::printName
virtual void printName(std::ostream &os) const
Print name of dataset.
Definition: RooAbsData.cxx:779
ymax
float ymax
Definition: THbookFile.cxx:95
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooAbsData::PlotOpt
Definition: RooAbsData.h:152
RooAbsData::plotEffOn
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...
Definition: RooAbsData.cxx:1974
Option_t
const char Option_t
Definition: RtypesCore.h:66
RooAbsData::correlationMatrix
TMatrixDSym * correlationMatrix(const RooArgList &vars, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:222
RooAbsData::isNonPoissonWeighted
virtual Bool_t isNonPoissonWeighted() const
Definition: RooAbsData.h:130
RooAbsData::PlotOpt::cutRange
const char * cutRange
Definition: RooAbsData.h:160
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:49
RooAbsData::cacheArgs
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.
Definition: RooAbsData.cxx:327
RooAbsData::SumW2
@ SumW2
Definition: RooAbsData.h:99
Roo1DTable
Roo1DTable implements a one-dimensional table.
Definition: Roo1DTable.h:23
RooAbsData::weightError
virtual Double_t weightError(ErrorType etype=Poisson) const
Return error on current weight (dummy implementation returning zero)
Definition: RooAbsData.cxx:530
RooAbsData::printMultiline
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
Definition: RooAbsData.cxx:802
TH2F
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
RooArgSet.h
RooAbsData::skewness
Double_t skewness(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:213
RooAbsData::isWeighted
virtual Bool_t isWeighted() const
Definition: RooAbsData.h:126
RooAbsData::_ownedComponents
std::map< std::string, RooAbsData * > _ownedComponents
Definition: RooAbsData.h:296
RooAbsData::meanVar
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.
Definition: RooAbsData.cxx:1072
RooAbsData::PlotOpt::refreshFrameNorm
Bool_t refreshFrameNorm
Definition: RooAbsData.h:167
RooAbsData::canSplitFast
Bool_t canSplitFast() const
Definition: RooAbsData.cxx:2287
RooAbsData::GetClonedTree
TTree * GetClonedTree() const
Return a clone of the TTree which stores the data or create such a tree if vector storage is used.
Definition: RooAbsData.cxx:2371
xmax
float xmax
Definition: THbookFile.cxx:95
RooAbsData::_dstore
RooAbsDataStore * _dstore
External variables cached with this data set.
Definition: RooAbsData.h:294
RooAbsData::fill
virtual void fill()
Definition: RooAbsData.cxx:297
TNamed.h
RooArgList
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooAbsData::mean
Double_t mean(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:211
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsData::Composite
@ Composite
Definition: RooAbsData.h:248
RooAbsData::Auto
@ Auto
Definition: RooAbsData.h:99
RooAbsData::sigma
Double_t sigma(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:212
RooAbsData::weight
virtual Double_t weight() const =0
RooAbsData::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
Definition: RooAbsData.cxx:2399
RooAbsData::resetBuffers
void resetBuffers()
Definition: RooAbsData.cxx:2280
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
RooAbsData::getDefaultStorageType
static StorageType getDefaultStorageType()
Definition: RooAbsData.cxx:90
RooPrintable.h
RooAbsData::defaultStorageType
static StorageType defaultStorageType
Definition: RooAbsData.h:256
RooAbsData::PlotOpt::correctForBinWidth
Bool_t correctForBinWidth
Definition: RooAbsData.h:168
RooAbsData::Print
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition: RooAbsData.h:193
RooAbsData::valid
virtual Bool_t valid() const
Definition: RooAbsData.h:98
RooAbsData::claimVars
static void claimVars(RooAbsData *)
Definition: RooAbsData.cxx:97
x
Double_t x[n]
Definition: legend1.C:17
RooAbsData::store
RooAbsDataStore * store()
Definition: RooAbsData.h:68
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooAbsData::store
const RooAbsDataStore * store() const
Definition: RooAbsData.h:69
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
TMatrixTSym
TMatrixTSym.
Definition: TMatrixTSym.h:34
RooAbsData::fillHistogram
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.
Definition: RooAbsData.cxx:1289
RooAbsData::releaseVars
static Bool_t releaseVars(RooAbsData *)
If return value is true variables can be deleted.
Definition: RooAbsData.cxx:106
RooAbsData::checkInit
void checkInit() const
Definition: RooAbsData.cxx:2331
RooAbsData::cacheClone
virtual RooAbsData * cacheClone(const RooAbsArg *newCacheOwner, const RooArgSet *newCacheVars, const char *newName=0)=0
RooAbsData::printClassName
virtual void printClassName(std::ostream &os) const
Print class name of dataset.
Definition: RooAbsData.cxx:795
RooAbsData::PlotOpt::cuts
const char * cuts
Definition: RooAbsData.h:155
TString
Basic string class.
Definition: TString.h:136
RooPrintable
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
RooCmdArg::none
static const RooCmdArg & none()
Return reference to null argument.
Definition: RooCmdArg.cxx:52
RooAbsData::ErrorType
ErrorType
Definition: RooAbsData.h:99
RooAbsData::sumEntries
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
bool
RooAbsCategory
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
Definition: RooAbsCategory.h:37
RooAbsData::tree
const TTree * tree() const
Return a pointer to the TTree which stores the data.
Definition: RooAbsData.cxx:2356
RooAbsData::standMoment
Double_t standMoment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate standardized moment.
Definition: RooAbsData.cxx:824
hi
float type_of_call hi(const int &, const int &)
RooAbsData::covarianceMatrix
TMatrixDSym * covarianceMatrix(const RooArgList &vars, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:221
RooAbsData::allClientsCached
Bool_t allClientsCached(RooAbsArg *, const RooArgSet &)
Utility function that determines if all clients of object 'var' appear in given list of cached nodes.
Definition: RooAbsData.cxx:2256
RooAbsData::getRange
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...
Definition: RooAbsData.cxx:2124
RooAbsData::sumEntries
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.
RooAbsData::getSimData
RooAbsData * getSimData(const char *idxstate)
Definition: RooAbsData.cxx:2297
RooAbsData::split
virtual TList * split(const RooAbsCategory &splitCat, Bool_t createEmptyDataSets=kFALSE) const
Split dataset into subsets based on states of given splitCat in this dataset.
Definition: RooAbsData.cxx:1479
RooAbsData::Expected
@ Expected
Definition: RooAbsData.h:99
RooAbsData::_vars
RooArgSet _vars
Definition: RooAbsData.h:291
RooAbsData::table
virtual Roo1DTable * table(const RooArgSet &catSet, const char *cuts="", const char *opts="") const
Construct table for product of categories in catSet.
Definition: RooAbsData.cxx:749
RooAbsData::PlotOpt::addToWgtSelf
Double_t addToWgtSelf
Definition: RooAbsData.h:164
RooFormulaVar
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
Definition: RooFormulaVar.h:30
RooAbsData::moment
Double_t moment(const RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
Definition: RooAbsData.cxx:843
RooAbsData::reduceEng
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
xmin
float xmin
Definition: THbookFile.cxx:95
RooAbsData::Vector
@ Vector
Definition: RooAbsData.h:248
RooAbsData::optimizeReadingWithCaching
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'.
Definition: RooAbsData.cxx:2189
RooPrintable::defaultPrintStream
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
Definition: RooPrintable.cxx:272
RooAbsData::plotOn
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
Definition: RooAbsData.cxx:544
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
RooAbsData::setDirtyProp
void setDirtyProp(Bool_t flag)
Control propagation of dirty flags from observables in dataset.
Definition: RooAbsData.cxx:359
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
RooAbsData::PlotOpt::xErrorSize
Double_t xErrorSize
Definition: RooAbsData.h:166
RooAbsData::get
virtual const RooArgSet * get() const
Definition: RooAbsData.h:92
RooAbsData::storageType
StorageType storageType
Definition: RooAbsData.h:258
RooAbsData::createHistogram
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...
Definition: RooAbsData.cxx:626
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
RooAbsBinning
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
Definition: RooAbsBinning.h:26
RooAbsData::PlotOpt::histInvisible
Bool_t histInvisible
Definition: RooAbsData.h:162
RooAbsData::setDefaultStorageType
static void setDefaultStorageType(StorageType s)
Definition: RooAbsData.cxx:79
RooAbsData::rmsVar
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.
Definition: RooAbsData.cxx:1108
RooPlot
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition: RooPlot.h:44
what
static const char * what
Definition: stlLoader.cc:6
RooAbsData::convertToVectorStore
void convertToVectorStore()
Convert tree-based storage to vector-based storage.
Definition: RooAbsData.cxx:272
RooAbsData::numEntries
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
Definition: RooAbsData.cxx:304
y
Double_t y[n]
Definition: legend1.C:17
sqrt
double sqrt(double)
RooAbsData::corrcovMatrix
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.
Definition: RooAbsData.cxx:976
RooAbsData::operator=
RooAbsData & operator=(const RooAbsData &other)
Definition: RooAbsData.cxx:208
RooAbsCachedPdf
RooAbsCachedPdf is the abstract base class for p.d.f.s that need or want to cache their evaluate() ou...
Definition: RooAbsCachedPdf.h:25
RooAbsData::kurtosis
Double_t kurtosis(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:214
RooAbsData::Poisson
@ Poisson
Definition: RooAbsData.h:99
RooAbsData::hasFilledCache
Bool_t hasFilledCache() const
Definition: RooAbsData.cxx:2346
RooAbsData::PlotOpt::bins
RooAbsBinning * bins
Definition: RooAbsData.h:158
RooAbsData::addOwnedComponent
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
Definition: RooAbsData.cxx:2306
RooAbsData::dataRealVar
RooRealVar * dataRealVar(const char *methodname, const RooRealVar &extVar) const
Internal method to check if given RooRealVar maps to a RooRealVar in this dataset.
Definition: RooAbsData.cxx:901
RooAbsData::None
@ None
Definition: RooAbsData.h:99
RooAbsData::PlotOpt::PlotOpt
PlotOpt()
Definition: RooAbsData.h:153
RooAbsData::emptyClone
virtual RooAbsData * emptyClone(const char *newName=0, const char *newTitle=0, const RooArgSet *vars=0, const char *wgtVarName=0) const =0
Double_t
double Double_t
Definition: RtypesCore.h:59
RooAbsData::PlotOpt::addToHistName
const char * addToHistName
Definition: RooAbsData.h:163
RooAbsData::Draw
virtual void Draw(Option_t *option="")
Forward draw command to data store.
Definition: RooAbsData.cxx:2339
RooAbsData::plotAsymOn
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...
Definition: RooAbsData.cxx:1880
RooAbsData::~RooAbsData
virtual ~RooAbsData()
Destructor.
Definition: RooAbsData.cxx:250
RooAbsData::reduce
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.
Definition: RooAbsData.cxx:379
RooAbsData::weightSquared
virtual Double_t weightSquared() const =0
RooAbsOptTestStatistic
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
Definition: RooAbsOptTestStatistic.h:28
RooAbsData::getWeightBatch
virtual RooSpan< const double > getWeightBatch(std::size_t first, std::size_t len) const =0
Return event weights of all events in range [first, first+len).
RooAbsData::PlotOpt::addToWgtOther
Double_t addToWgtOther
Definition: RooAbsData.h:165
RooAbsData::changeObservableName
virtual Bool_t changeObservableName(const char *from, const char *to)
Definition: RooAbsData.cxx:284
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsData::resetCache
virtual void resetCache()
Internal method – Remove cached function values.
Definition: RooAbsData.cxx:335
TH1
TH1 is the base class of all histogram classes in ROOT.
Definition: TH1.h:58
RooAbsData::RooAbsData
RooAbsData()
Default constructor.
Definition: RooAbsData.cxx:119
name
char name[80]
Definition: TGX11.cxx:110
RooAbsData::covariance
Double_t covariance(RooRealVar &x, RooRealVar &y, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:216
RooBatchCompute
Namespace for dispatching RooFit computations to various backends.
Definition: BracketAdapter.h:24
RooAbsData::StorageType
StorageType
Definition: RooAbsData.h:248
RooPrintable::printStream
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,...
Definition: RooPrintable.cxx:75
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooAbsData::PlotOpt::etype
RooAbsData::ErrorType etype
Definition: RooAbsData.h:159
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooAbsData::covarianceMatrix
TMatrixDSym * covarianceMatrix(const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:219
RooAbsData::attachBuffers
void attachBuffers(const RooArgSet &extObs)
Definition: RooAbsData.cxx:2273
RooSpan.h
RooAbsData::convertToTreeStore
virtual void convertToTreeStore()
Convert vector-based storage to tree-based storage.
Definition: RooAbsData.cxx:2385
RooAbsData::add
virtual void add(const RooArgSet &row, Double_t weight=1, Double_t weightError=0)=0
RooAbsDataStore
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
Definition: RooAbsDataStore.h:34
RooAbsData::attachCache
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
Definition: RooAbsData.cxx:344
RooAbsCategoryLValue
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
Definition: RooAbsCategoryLValue.h:25
RooPrintable::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooPrintable.cxx:241
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
RooAbsData::statOn
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.
Definition: RooAbsData.cxx:1165
RooAbsData::corrcov
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.
Definition: RooAbsData.cxx:920
RooAbsRealLValue
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Definition: RooAbsRealLValue.h:31
RooArgList.h
RooAbsData::correlation
Double_t correlation(RooRealVar &x, RooRealVar &y, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:217
RooBatchCompute::RunContext
This struct enables passing computation data around between elements of a computation graph.
Definition: RunContext.h:31
RooAbsData::PlotOpt::histName
const char * histName
Definition: RooAbsData.h:161
RooAbsData::defaultPrintContents
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default print options, for a given print style.
Definition: RooAbsData.cxx:810
TList
A doubly linked list.
Definition: TList.h:44
RooSpan
A simple container to hold a batch of data values.
Definition: RooSpan.h:34
RooAbsData::_cachedVars
RooArgSet _cachedVars
Definition: RooAbsData.h:292
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
fw3dlego::xbins
const double xbins[xbins_n]
Definition: collection_proxies.C:48
RooAbsData::PlotOpt::drawOptions
Option_t * drawOptions
Definition: RooAbsData.h:157
int
RooAbsData::setArgStatus
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
Definition: RooAbsData.cxx:351
RooAbsData::reset
virtual void reset()
Definition: RooAbsData.cxx:311
RooAbsData::printTitle
virtual void printTitle(std::ostream &os) const
Print title of dataset.
Definition: RooAbsData.cxx:787