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 "RunContext.h"
25 #include <map>
26 #include <string>
27 
28 class RooAbsArg;
29 class RooAbsReal ;
30 class RooRealVar;
31 class RooAbsRealLValue;
32 class RooAbsCategory ;
34 class Roo1DTable ;
35 class RooPlot;
36 class RooArgList;
37 class TH1;
38 class TH2F;
39 class RooAbsBinning ;
40 class Roo1DTable ;
41 class RooAbsDataStore ;
42 template<typename T> class TMatrixTSym;
44 class RooFormulaVar;
45 
46 
47 class RooAbsData : public TNamed, public RooPrintable {
48 public:
49 
50  // Constructors, factory methods etc.
51  RooAbsData() ;
52  RooAbsData(const char *name, const char *title, const RooArgSet& vars, RooAbsDataStore* store=0) ;
53  RooAbsData(const RooAbsData& other, const char* newname = 0) ;
54  RooAbsData& operator=(const RooAbsData& other);
55  virtual ~RooAbsData() ;
56  virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitle=0, const RooArgSet* vars=0, const char* wgtVarName=0) const = 0 ;
57 
58  // Reduction methods
59  RooAbsData* reduce(const RooCmdArg& arg1,const RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg(),const RooCmdArg& arg4=RooCmdArg(),
60  const RooCmdArg& arg5=RooCmdArg(),const RooCmdArg& arg6=RooCmdArg(),const RooCmdArg& arg7=RooCmdArg(),const RooCmdArg& arg8=RooCmdArg()) ;
61  RooAbsData* reduce(const char* cut) ;
62  RooAbsData* reduce(const RooFormulaVar& cutVar) ;
63  RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ;
64  RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVar) ;
65 
66  RooAbsDataStore* store() { return _dstore ; }
67  const RooAbsDataStore* store() const { return _dstore ; }
68  const TTree* tree() const ;
69  TTree *GetClonedTree() const;
70 
71  void convertToVectorStore() ;
72  virtual void convertToTreeStore();
73 
74  void attachBuffers(const RooArgSet& extObs) ;
75  void resetBuffers() ;
76 
77 
78  virtual void Draw(Option_t* option = "") ;
79 
80  void checkInit() const ;
81 
82  // Change name of observable
83  virtual Bool_t changeObservableName(const char* from, const char* to) ;
84 
85  // Add one ore more rows of data
86  virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weightError=0) = 0 ; // DERIVED
87  virtual void fill() ;
88 
89  // Load a given row of data
90  virtual inline const RooArgSet* get() const {
91  // Return current row of dataset
92  return &_vars ;
93  }
94  virtual Double_t weight() const = 0 ; // DERIVED
95  virtual Double_t weightSquared() const = 0 ; // DERIVED
96  virtual Bool_t valid() const { return kTRUE ; }
98  virtual Double_t weightError(ErrorType etype=Poisson) const ;
99  virtual void weightError(Double_t& lo, Double_t& hi, ErrorType etype=Poisson) const ;
100  virtual const RooArgSet* get(Int_t index) const ;
101 
102  /// Retrieve batches of data for each real-valued variable in this dataset.
103  /// \param[out] evalData Store references to all data batches in this struct.
104  /// \param first Index of first event that ends up in the batch.
105  /// \param len Number of events in each batch.
106  /// Needs to be overridden by derived classes. This implementation returns an empty RunContext.
107  virtual void getBatches(BatchHelpers::RunContext& evalData,
108  std::size_t first = 0, std::size_t len = std::numeric_limits<std::size_t>::max()) const = 0;
109 
110  ////////////////////////////////////////////////////////////////////////////////
111  /// Return event weights of all events in range [first, first+len).
112  /// If no contiguous structure of weights is stored, an empty batch can be returned.
113  /// This indicates that the weight is constant. Use weight() to retrieve it.
114  virtual RooSpan<const double> getWeightBatch(std::size_t first, std::size_t len) const = 0;
115 
116  /// Return number of entries in dataset, *i.e.*, count unweighted entries.
117  virtual Int_t numEntries() const ;
118  /// Return effective number of entries in dataset, *i.e.*, sum all weights.
119  virtual Double_t sumEntries() const = 0 ;
120  /// Return effective number of entries in dataset inside range or after cuts, *i.e.*, sum certain weights.
121  /// \param[in] cutSpec Apply given cut when counting (*e.g.* `0 < x && x < 5`). Passing `"1"` selects all events.
122  /// \param[in] cutRange If the observables have a range with this name, only count events inside this range.
123  virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0) const = 0 ; // DERIVED
124  virtual Bool_t isWeighted() const {
125  // Do events in dataset have weights?
126  return kFALSE ;
127  }
128  virtual Bool_t isNonPoissonWeighted() const {
129  // Do events in dataset have non-integer weights?
130  return kFALSE ;
131  }
132  virtual void reset() ;
133 
134 
135  Bool_t getRange(const RooAbsRealLValue& var, Double_t& lowest, Double_t& highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const ;
136 
137  // Plot the distribution of a real valued arg
138  virtual Roo1DTable* table(const RooArgSet& catSet, const char* cuts="", const char* opts="") const ;
139  virtual Roo1DTable* table(const RooAbsCategory& cat, const char* cuts="", const char* opts="") const ;
140  /// \see RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const
141  virtual RooPlot* plotOn(RooPlot* frame,
142  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
143  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
144  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
145  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
146 
147  virtual RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const ;
148 
149  // WVE --- This needs to be public to avoid CINT problems
150  struct PlotOpt {
153  scaleFactor(1.) {} ;
154  const char* cuts ;
158  const char* cutRange ;
159  const char* histName ;
161  const char* addToHistName ;
168  } ;
169 
170  // Split a dataset by a category
171  virtual TList* split(const RooAbsCategory& splitCat, Bool_t createEmptyDataSets=kFALSE) const ;
172 
173  // Fast splitting for SimMaster setData
174  Bool_t canSplitFast() const ;
175  RooAbsData* getSimData(const char* idxstate) ;
176 
177  /// Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) const
178  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
179  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
180  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
181  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
182  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
183  /// Create and fill a ROOT histogram TH1,TH2 or TH3 with the values of this dataset.
184  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) const ;
185  TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const ;
186 
187  // Fill an existing histogram
188  virtual TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, const char *cuts= "", const char* cutRange=0) const;
189 
190  // Printing interface (human readable)
191  inline virtual void Print(Option_t *options= 0) const {
192  // Print contents on stdout
194  }
195 
196  virtual void printName(std::ostream& os) const ;
197  virtual void printTitle(std::ostream& os) const ;
198  virtual void printClassName(std::ostream& os) const ;
199  void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
200 
201  virtual Int_t defaultPrintContents(Option_t* opt) const ;
202 
203  void setDirtyProp(Bool_t flag) ;
204 
205  Double_t moment(const RooRealVar& var, Double_t order, const char* cutSpec=0, const char* cutRange=0) const ;
206  Double_t moment(const RooRealVar& var, Double_t order, Double_t offset, const char* cutSpec=0, const char* cutRange=0) const ;
207  Double_t standMoment(const RooRealVar& var, Double_t order, const char* cutSpec=0, const char* cutRange=0) const ;
208 
209  Double_t mean(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return moment(var,1,0,cutSpec,cutRange) ; }
210  Double_t sigma(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return sqrt(moment(var,2,cutSpec,cutRange)) ; }
211  Double_t skewness(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return standMoment(var,3,cutSpec,cutRange) ; }
212  Double_t kurtosis(const RooRealVar& var, const char* cutSpec=0, const char* cutRange=0) const { return standMoment(var,4,cutSpec,cutRange) ; }
213 
214  Double_t covariance(RooRealVar &x,RooRealVar &y, const char* cutSpec=0, const char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kFALSE) ; }
215  Double_t correlation(RooRealVar &x,RooRealVar &y, const char* cutSpec=0, const char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kTRUE) ; }
216 
217  TMatrixDSym* covarianceMatrix(const char* cutSpec=0, const char* cutRange=0) const { return covarianceMatrix(*get(),cutSpec,cutRange) ; }
218  TMatrixDSym* correlationMatrix(const char* cutSpec=0, const char* cutRange=0) const { return correlationMatrix(*get(),cutSpec,cutRange) ; }
219  TMatrixDSym* covarianceMatrix(const RooArgList& vars, const char* cutSpec=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutRange,kFALSE) ; }
220  TMatrixDSym* correlationMatrix(const RooArgList& vars, const char* cutSpec=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutRange,kTRUE) ; }
221 
222  RooRealVar* meanVar(const RooRealVar &var, const char* cutSpec=0, const char* cutRange=0) const ;
223  RooRealVar* rmsVar(const RooRealVar &var, const char* cutSpec=0, const char* cutRange=0) const ;
224 
225  virtual RooPlot* statOn(RooPlot* frame,
226  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
227  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
228  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
229  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
230 
231  virtual RooPlot* statOn(RooPlot* frame, const char *what,
232  const char *label= "", Int_t sigDigits= 2,
233  Option_t *options= "NELU", Double_t xmin=0.15,
234  Double_t xmax= 0.65,Double_t ymax=0.85,
235  const char* cutSpec=0, const char* cutRange=0,
236  const RooCmdArg* formatCmd=0);
237 
238  virtual void RecursiveRemove(TObject *obj);
239 
240  Bool_t hasFilledCache() const ;
241 
242  void addOwnedComponent(const char* idxlabel, RooAbsData& data) ;
243  static void claimVars(RooAbsData*) ;
244  static Bool_t releaseVars(RooAbsData*) ;
245 
247 
248  static void setDefaultStorageType(StorageType s) ;
249 
251 
252 protected:
253 
255 
257 
258  Double_t corrcov(const RooRealVar& x, const RooRealVar& y, const char* cutSpec, const char* cutRange, Bool_t corr) const ;
259  TMatrixDSym* corrcovMatrix(const RooArgList& vars, const char* cutSpec, const char* cutRange, Bool_t corr) const ;
260 
261  virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& cacheList, const RooArgSet& keepObsList) ;
263 
264 
265  // PlotOn implementation
266  virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ;
267  virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& asymCat, PlotOpt o) const ;
268  virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& effCat, PlotOpt o) const ;
269 
270 
271  // Constant term optimizer interface
272  friend class RooAbsArg ;
273  friend class RooAbsReal ;
274  friend class RooAbsOptTestStatistic ;
275  friend class RooAbsCachedPdf ;
276 
277  virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const RooArgSet* nset=0, Bool_t skipZeroWeights=kFALSE) ;
278  virtual void resetCache() ;
279  virtual void setArgStatus(const RooArgSet& set, Bool_t active) ;
280  virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars) ;
281 
282  virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooArgSet* newCacheVars, const char* newName=0) = 0 ; // DERIVED
283  virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cutVar, const char* cutRange=0,
284  std::size_t nStart = 0, std::size_t = std::numeric_limits<std::size_t>::max(), Bool_t copyCache=kTRUE) = 0 ; // DERIVED
285 
286  RooRealVar* dataRealVar(const char* methodname, const RooRealVar& extVar) const ;
287 
288  // Column structure definition
289  RooArgSet _vars; // Dimensions of this data set
290  RooArgSet _cachedVars ; //! External variables cached with this data set
291 
292  RooAbsDataStore* _dstore ; // Data storage implementation
293 
294  std::map<std::string,RooAbsData*> _ownedComponents ; // Owned external components
295 
296 private:
297  ClassDef(RooAbsData, 5) // Abstract data collection
298 };
299 
300 #endif
RooAbsData::PlotOpt::scaleFactor
Double_t scaleFactor
Definition: RooAbsData.h:167
RooAbsData::Tree
@ Tree
Definition: RooAbsData.h:246
RooAbsData::correlationMatrix
TMatrixDSym * correlationMatrix(const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:218
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:3257
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:91
RooAbsData::PlotOpt
Definition: RooAbsData.h:150
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:220
RooAbsData::isNonPoissonWeighted
virtual Bool_t isNonPoissonWeighted() const
Definition: RooAbsData.h:128
RooAbsData::PlotOpt::cutRange
const char * cutRange
Definition: RooAbsData.h:158
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:47
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:330
RooAbsData::SumW2
@ SumW2
Definition: RooAbsData.h:97
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:533
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:211
RooAbsData::isWeighted
virtual Bool_t isWeighted() const
Definition: RooAbsData.h:124
RooAbsData::_ownedComponents
std::map< std::string, RooAbsData * > _ownedComponents
Definition: RooAbsData.h:294
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:165
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:292
RooAbsData::fill
virtual void fill()
Definition: RooAbsData.cxx:300
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:209
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsData::Composite
@ Composite
Definition: RooAbsData.h:246
RooAbsData::Auto
@ Auto
Definition: RooAbsData.h:97
RooAbsData::sigma
Double_t sigma(const RooRealVar &var, const char *cutSpec=0, const char *cutRange=0) const
Definition: RooAbsData.h:210
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:89
RooPrintable.h
RooAbsData::defaultStorageType
static StorageType defaultStorageType
Definition: RooAbsData.h:254
RooAbsData::PlotOpt::correctForBinWidth
Bool_t correctForBinWidth
Definition: RooAbsData.h:166
RooAbsData::Print
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition: RooAbsData.h:191
RooAbsData::valid
virtual Bool_t valid() const
Definition: RooAbsData.h:96
RooAbsData::claimVars
static void claimVars(RooAbsData *)
Definition: RooAbsData.cxx:96
x
Double_t x[n]
Definition: legend1.C:17
RooAbsData::store
RooAbsDataStore * store()
Definition: RooAbsData.h:66
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooAbsData::store
const RooAbsDataStore * store() const
Definition: RooAbsData.h:67
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
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:105
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:153
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:97
RooAbsData::sumEntries
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
bool
BatchHelpers::RunContext
Data that has to be passed around when evaluating functions / PDFs.
Definition: RunContext.h:32
RooAbsCategory
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
Definition: RooAbsCategory.h:38
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:219
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:97
RooAbsData::_vars
RooArgSet _vars
Definition: RooAbsData.h:289
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:162
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:246
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:547
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:362
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsData::PlotOpt::xErrorSize
Double_t xErrorSize
Definition: RooAbsData.h:164
RooAbsData::get
virtual const RooArgSet * get() const
Definition: RooAbsData.h:90
RooAbsData::storageType
StorageType storageType
Definition: RooAbsData.h:256
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:629
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:160
RooAbsData::setDefaultStorageType
static void setDefaultStorageType(StorageType s)
Definition: RooAbsData.cxx:78
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:275
RooAbsData::numEntries
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
Definition: RooAbsData.cxx:307
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:211
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:212
RooAbsData::Poisson
@ Poisson
Definition: RooAbsData.h:97
RooAbsData::hasFilledCache
Bool_t hasFilledCache() const
Definition: RooAbsData.cxx:2346
RooAbsData::PlotOpt::bins
RooAbsBinning * bins
Definition: RooAbsData.h:156
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:97
RooAbsData::PlotOpt::PlotOpt
PlotOpt()
Definition: RooAbsData.h:151
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:161
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:253
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:382
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:163
RooAbsData::changeObservableName
virtual Bool_t changeObservableName(const char *from, const char *to)
Definition: RooAbsData.cxx:287
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:338
TH1
TH1 is the base class of all histogramm classes in ROOT.
Definition: TH1.h:58
RooAbsData::RooAbsData
RooAbsData()
Default constructor.
Definition: RooAbsData.cxx:118
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:214
RooAbsData::StorageType
StorageType
Definition: RooAbsData.h:246
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:157
RunContext.h
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:217
RooAbsData::getBatches
virtual void getBatches(BatchHelpers::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.
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:347
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:37
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:215
RooAbsData::PlotOpt::histName
const char * histName
Definition: RooAbsData.h:159
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:290
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
RooAbsData::PlotOpt::drawOptions
Option_t * drawOptions
Definition: RooAbsData.h:155
int
RooAbsData::setArgStatus
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
Definition: RooAbsData.cxx:354
RooAbsData::reset
virtual void reset()
Definition: RooAbsData.cxx:314
RooAbsData::printTitle
virtual void printTitle(std::ostream &os) const
Print title of dataset.
Definition: RooAbsData.cxx:787