Logo ROOT  
Reference Guide
RooAbsReal.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooAbsReal.h,v 1.75 2007/07/13 21:50:24 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_REAL
17 #define ROO_ABS_REAL
18 
19 #include "RooAbsArg.h"
20 #include "RooCmdArg.h"
21 #include "RooCurve.h"
22 #include "RooArgSet.h"
23 #include "RooArgList.h"
24 #include "RooGlobalFunc.h"
25 #include "RooSpan.h"
26 #include "BatchData.h"
27 #include <map>
28 
29 class RooArgList ;
30 class RooDataSet ;
31 class RooPlot;
32 class RooRealVar;
33 class RooAbsFunc;
35 class RooCategory ;
36 class RooLinkedList ;
37 class RooNumIntConfig ;
38 class RooDataHist ;
39 class RooFunctor ;
40 class RooGenFunction ;
41 class RooMultiGenFunction ;
42 class RooFitResult ;
43 class RooAbsMoment ;
44 class RooDerivative ;
45 class RooVectorDataStore ;
46 namespace BatchHelpers {
47 class BatchInterfaceAccessor;
48 struct RunContext;
49 }
50 struct TreeReadBuffer; /// A space to attach TBranches
51 
52 class TH1;
53 class TH1F;
54 class TH2F;
55 class TH3F;
56 
57 #include <list>
58 #include <string>
59 #include <iostream>
60 #include <sstream>
61 
62 class RooAbsReal : public RooAbsArg {
63 public:
64  using value_type = double;
65 
66  // Constructors, assignment etc
67  RooAbsReal() ;
68  RooAbsReal(const char *name, const char *title, const char *unit= "") ;
69  RooAbsReal(const char *name, const char *title, Double_t minVal, Double_t maxVal,
70  const char *unit= "") ;
71  RooAbsReal(const RooAbsReal& other, const char* name=0);
72  RooAbsReal& operator=(const RooAbsReal& other);
73  virtual ~RooAbsReal();
74 
75 
76 
77 
78  //////////////////////////////////////////////////////////////////////////////////
79  /// Evaluate object. Returns either cached value or triggers a recalculation.
80  /// The recalculation happens by calling getValV(), which in the end calls the
81  /// virtual evaluate() functions of the respective PDFs.
82  /// \param[in] normalisationSet getValV() reacts differently depending on the value of the normalisation set.
83  /// If the set is `nullptr`, an unnormalised value is returned.
84  /// \note The normalisation is arbitrary, because it is up to the implementation
85  /// of the PDF to e.g. leave out normalisation constants for speed reasons. The range
86  /// of the variables is also ignored.
87  ///
88  /// To normalise the result properly, a RooArgSet has to be passed, which contains
89  /// the variables to normalise over.
90  /// These are integrated over their current ranges to compute the normalisation constant,
91  /// and the unnormalised result is divided by this value.
92  inline Double_t getVal(const RooArgSet* normalisationSet = nullptr) const {
93 #ifdef ROOFIT_CHECK_CACHED_VALUES
94  return _DEBUG_getVal(normalisationSet);
95 #else
96 
97 #ifndef _WIN32
98  return (_fast && !_inhibitDirty) ? _value : getValV(normalisationSet) ;
99 #else
100  return (_fast && !inhibitDirty()) ? _value : getValV(normalisationSet) ;
101 #endif
102 
103 #endif
104  }
105 
106  /// Like getVal(const RooArgSet*), but always requires an argument for normalisation.
107  inline Double_t getVal(const RooArgSet& normalisationSet) const { return _fast ? _value : getValV(&normalisationSet) ; }
108 
109  virtual Double_t getValV(const RooArgSet* normalisationSet = nullptr) const ;
110 
111  virtual RooSpan<const double> getValBatch(std::size_t begin, std::size_t maxSize, const RooArgSet* normSet = nullptr) const;
112  virtual RooSpan<const double> getValues(BatchHelpers::RunContext& evalData, const RooArgSet* normSet = nullptr) const;
113 
114  Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset = RooArgSet()) const;
115 
116  Bool_t operator==(Double_t value) const ;
117  virtual Bool_t operator==(const RooAbsArg& other) const;
118  virtual Bool_t isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const;
119 
120 
121  inline const Text_t *getUnit() const {
122  // Return string with unit description
123  return _unit.Data();
124  }
125  inline void setUnit(const char *unit) {
126  // Set unit description to given string
127  _unit= unit;
128  }
129  TString getTitle(Bool_t appendUnit= kFALSE) const;
130 
131  // Lightweight interface adaptors (caller takes ownership)
132  RooAbsFunc *bindVars(const RooArgSet &vars, const RooArgSet* nset=0, Bool_t clipInvalid=kFALSE) const;
133 
134  // Create a fundamental-type object that can hold our value.
135  RooAbsArg *createFundamental(const char* newname=0) const;
136 
137  // Analytical integration support
138  virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const ;
139  virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
140  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
141  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
142  virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const {
143  // Interface to force RooRealIntegral to offer given observable for internal integration
144  // even if this is deemed unsafe. This default implementation returns always flase
145  return kFALSE ;
146  }
147  virtual void forceNumInt(Bool_t flag=kTRUE) {
148  // If flag is true, all advertised analytical integrals will be ignored
149  // and all integrals are calculated numerically
150  _forceNumInt = flag ;
151  }
152  Bool_t getForceNumInt() const { return _forceNumInt ; }
153 
154  // Chi^2 fits to histograms
155  virtual RooFitResult* chi2FitTo(RooDataHist& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
156  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
157  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
158  virtual RooFitResult* chi2FitTo(RooDataHist& data, const RooLinkedList& cmdList) ;
159 
160  virtual RooAbsReal* createChi2(RooDataHist& data, const RooLinkedList& cmdList) ;
161  virtual RooAbsReal* createChi2(RooDataHist& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
162  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
163  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
164 
165  // Chi^2 fits to X-Y datasets
166  virtual RooFitResult* chi2FitTo(RooDataSet& xydata, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
167  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
168  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
169  virtual RooFitResult* chi2FitTo(RooDataSet& xydata, const RooLinkedList& cmdList) ;
170 
171  virtual RooAbsReal* createChi2(RooDataSet& data, const RooLinkedList& cmdList) ;
172  virtual RooAbsReal* createChi2(RooDataSet& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
173  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
174  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
175 
176 
177  virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
178 
179 
180  RooAbsReal* createIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::none(),
181  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
182  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
183  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
184 
185  /// Create integral over observables in iset in range named rangeName.
186  RooAbsReal* createIntegral(const RooArgSet& iset, const char* rangeName) const {
187  return createIntegral(iset,0,0,rangeName) ;
188  }
189  /// Create integral over observables in iset in range named rangeName with integrand normalized over observables in nset
190  RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet& nset, const char* rangeName=0) const {
191  return createIntegral(iset,&nset,0,rangeName) ;
192  }
193  /// Create integral over observables in iset in range named rangeName with integrand normalized over observables in nset while
194  /// using specified configuration for any numeric integration.
195  RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet& nset, const RooNumIntConfig& cfg, const char* rangeName=0) const {
196  return createIntegral(iset,&nset,&cfg,rangeName) ;
197  }
198  /// Create integral over observables in iset in range named rangeName using specified configuration for any numeric integration.
199  RooAbsReal* createIntegral(const RooArgSet& iset, const RooNumIntConfig& cfg, const char* rangeName=0) const {
200  return createIntegral(iset,0,&cfg,rangeName) ;
201  }
202  virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet* nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ;
203 
204 
205  void setParameterizeIntegral(const RooArgSet& paramVars) ;
206 
207  // Create running integrals
208  RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooArgSet& nset=RooArgSet()) ;
209  RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::none(),
210  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
211  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
212  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
213  RooAbsReal* createIntRI(const RooArgSet& iset, const RooArgSet& nset=RooArgSet()) ;
214  RooAbsReal* createScanRI(const RooArgSet& iset, const RooArgSet& nset, Int_t numScanBins, Int_t intOrder) ;
215 
216 
217  // Optimized accept/reject generator support
218  virtual Int_t getMaxVal(const RooArgSet& vars) const ;
219  virtual Double_t maxVal(Int_t code) const ;
220  virtual Int_t minTrialSamples(const RooArgSet& /*arGenObs*/) const { return 0 ; }
221 
222 
223  // Plotting options
224  void setPlotLabel(const char *label);
225  const char *getPlotLabel() const;
226 
227  virtual Double_t defaultErrorLevel() const {
228  // Return default level for MINUIT error analysis
229  return 1.0 ;
230  }
231 
232  const RooNumIntConfig* getIntegratorConfig() const ;
237  void setIntegratorConfig() ;
238  void setIntegratorConfig(const RooNumIntConfig& config) ;
239 
240  virtual void fixAddCoefNormalization(const RooArgSet& addNormSet=RooArgSet(),Bool_t force=kTRUE) ;
241  virtual void fixAddCoefRange(const char* rangeName=0,Bool_t force=kTRUE) ;
242 
243  virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet& orderedObs) const ;
244 
245  // User entry point for plotting
246  virtual RooPlot* plotOn(RooPlot* frame,
247  const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(),
248  const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
249  const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
250  const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg(),
251  const RooCmdArg& arg9=RooCmdArg(), const RooCmdArg& arg10=RooCmdArg()
252  ) const ;
253 
254 
256 
257  // Forwarder function for backward compatibility
258  virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, Option_t* drawOptions="L",
259  Double_t scaleFactor=1.0, ScaleType stype=Relative, const RooAbsData* projData=0) const;
260 
261  // Fill an existing histogram
262  TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars,
263  Double_t scaleFactor= 1, const RooArgSet *projectedVars= 0, Bool_t scaling=kTRUE,
264  const RooArgSet* condObs=0, Bool_t setError=kTRUE) const;
265 
266  // Create 1,2, and 3D histograms from and fill it
267  TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const ;
268  TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooLinkedList& argList) const ;
269  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
270  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
271  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
272  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
273  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
274 
275  // Fill a RooDataHist
276  RooDataHist* fillDataHist(RooDataHist *hist, const RooArgSet* nset, Double_t scaleFactor,
277  Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const ;
278 
279  // I/O streaming interface (machine readable)
280  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
281  virtual void writeToStream(std::ostream& os, Bool_t compact) const ;
282 
283  // Printing interface (human readable)
284  virtual void printValue(std::ostream& os) const ;
285  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
286 
287  static void setCacheCheck(Bool_t flag) ;
288 
289  // Evaluation error logging
290  class EvalError {
291  public:
292  EvalError() { }
293  EvalError(const EvalError& other) : _msg(other._msg), _srvval(other._srvval) { }
294  void setMessage(const char* tmp) { std::string s(tmp); s.swap(_msg); }
295  void setServerValues(const char* tmp) { std::string s(tmp); s.swap(_srvval); }
296  std::string _msg;
297  std::string _srvval;
298  } ;
299 
303  void logEvalError(const char* message, const char* serverValueString=0) const ;
304  static void logEvalError(const RooAbsReal* originator, const char* origName, const char* message, const char* serverValueString=0) ;
305  static void printEvalErrors(std::ostream&os=std::cout, Int_t maxPerNode=10000000) ;
306  static Int_t numEvalErrors() ;
307  static Int_t numEvalErrorItems() ;
308 
309 
310  typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > >::const_iterator EvalErrorIter ;
311  static EvalErrorIter evalErrorIter() ;
312 
313  static void clearEvalErrorLog() ;
314 
315  /// Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
316  virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const { return kFALSE ; }
317  virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const;
318  virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const;
319 
321  RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const RooArgSet& nset=RooArgSet()) ;
322 
323  RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgList(), const RooArgSet& nset=RooArgSet()) const ;
324  TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), const RooArgSet& nset=RooArgSet()) const ;
325 
326  RooDerivative* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0.001) ;
327  RooDerivative* derivative(RooRealVar& obs, const RooArgSet& normSet, Int_t order, Double_t eps=0.001) ;
328 
329  RooAbsMoment* moment(RooRealVar& obs, Int_t order, Bool_t central, Bool_t takeRoot) ;
330  RooAbsMoment* moment(RooRealVar& obs, const RooArgSet& normObs, Int_t order, Bool_t central, Bool_t takeRoot, Bool_t intNormObs) ;
331 
332  RooAbsMoment* mean(RooRealVar& obs) { return moment(obs,1,kFALSE,kFALSE) ; }
333  RooAbsMoment* mean(RooRealVar& obs, const RooArgSet& nset) { return moment(obs,nset,1,kFALSE,kFALSE,kTRUE) ; }
334  RooAbsMoment* sigma(RooRealVar& obs) { return moment(obs,2,kTRUE,kTRUE) ; }
335  RooAbsMoment* sigma(RooRealVar& obs, const RooArgSet& nset) { return moment(obs,nset,2,kTRUE,kTRUE,kTRUE) ; }
336 
338 
339 
340  virtual Bool_t setData(RooAbsData& /*data*/, Bool_t /*cloneData*/=kTRUE) { return kTRUE ; }
341 
342  virtual void enableOffsetting(Bool_t) {} ;
343  virtual Bool_t isOffsetting() const { return kFALSE ; }
344  virtual Double_t offset() const { return 0 ; }
345 
346  static void setHideOffset(Bool_t flag);
347  static Bool_t hideOffset() ;
348 
349 protected:
350  // Hook for objects with normalization-dependent parameters interperetation
351  virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force=kFALSE) ;
352  virtual void selectNormalizationRange(const char* rangeName=0, Bool_t force=kFALSE) ;
353 
354  // Helper functions for plotting
355  Bool_t plotSanityChecks(RooPlot* frame) const ;
356  void makeProjectionSet(const RooAbsArg* plotVar, const RooArgSet* allVars,
357  RooArgSet& projectedVars, Bool_t silent) const ;
358 
359  TString integralNameSuffix(const RooArgSet& iset, const RooArgSet* nset=0, const char* rangeName=0, Bool_t omitEmpty=kFALSE) const ;
360 
361 
362  Bool_t isSelectedComp() const ;
363 
364 
365  public:
366  const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const RooArgSet& projVars) const ;
367  const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const RooArgSet& projVars, RooArgSet*& cloneSet) const ;
368  const RooAbsReal *createPlotProjection(const RooArgSet &dependentVars, const RooArgSet *projectedVars,
369  RooArgSet *&cloneSet, const char* rangeName=0, const RooArgSet* condObs=0) const;
370  protected:
371 
373 
374  void plotOnCompSelect(RooArgSet* selNodes) const ;
375  RooPlot* plotOnWithErrorBand(RooPlot* frame,const RooFitResult& fr, Double_t Z, const RooArgSet* params, const RooLinkedList& argList, Bool_t method1) const ;
376 
377  // Support interface for subclasses to advertise their analytic integration
378  // and generator capabilities in their analticalIntegral() and generateEvent()
379  // implementations.
380  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
381  const RooArgProxy& a) const ;
382  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
383  const RooArgProxy& a, const RooArgProxy& b) const ;
384  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
385  const RooArgProxy& a, const RooArgProxy& b, const RooArgProxy& c) const ;
386  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
387  const RooArgProxy& a, const RooArgProxy& b,
388  const RooArgProxy& c, const RooArgProxy& d) const ;
389 
390  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
391  const RooArgSet& set) const ;
392 
393 
394  RooAbsReal* createIntObj(const RooArgSet& iset, const RooArgSet* nset, const RooNumIntConfig* cfg, const char* rangeName) const ;
395  void findInnerMostIntegration(const RooArgSet& allObs, RooArgSet& innerObs, const char* rangeName) const ;
396 
397 
398  // Internal consistency checking (needed by RooDataSet)
399  virtual Bool_t isValid() const ;
400  virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const ;
401 
402  // Function evaluation and error tracing
403  Double_t traceEval(const RooArgSet* set) const ;
404 
405  /// Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
406  virtual Double_t evaluate() const = 0;
407  virtual RooSpan<double> evaluateBatch(std::size_t begin, std::size_t maxSize) const;
408  virtual RooSpan<double> evaluateSpan(BatchHelpers::RunContext& evalData, const RooArgSet* normSet) const;
409 
410  //---------- Interface to access batch data ---------------------------
411  //
414  _batchData.clear();
415  for (auto arg : _serverList) {
416  //TODO get rid of this cast?
417  auto absReal = dynamic_cast<RooAbsReal*>(arg);
418  if (absReal)
419  absReal->clearBatchMemory();
420  }
421  }
422 
423  private:
424  void checkBatchComputation(std::size_t evtNo, const RooArgSet* normSet = nullptr, double relAccuracy = 1.E-13) const;
425  void checkBatchComputation(const BatchHelpers::RunContext& evalData, std::size_t evtNo, const RooArgSet* normSet = nullptr, double relAccuracy = 1.E-13) const;
426 
428  return _batchData;
429  }
430 
431  /// Debug version of getVal(), which is slow and does error checking.
432  Double_t _DEBUG_getVal(const RooArgSet* normalisationSet) const;
433 
434  //--------------------------------------------------------------------
435 
436  protected:
437  // Hooks for RooDataSet interface
438  friend class RooRealIntegral ;
439  friend class RooVectorDataStore ;
440  virtual void syncCache(const RooArgSet* set=0) { getVal(set) ; }
441  virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) ;
442  virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
443  virtual void attachToVStore(RooVectorDataStore& vstore) ;
444  virtual void setTreeBranchStatus(TTree& t, Bool_t active) ;
445  virtual void fillTreeBranch(TTree& t) ;
446 
447  friend class RooRealBinding ;
448  Double_t _plotMin ; // Minimum of plot range
449  Double_t _plotMax ; // Maximum of plot range
450  Int_t _plotBins ; // Number of plot bins
451  mutable Double_t _value ; // Cache for current value of object
452  mutable BatchHelpers::BatchData _batchData; //! Value storage for batches of events
453  TString _unit ; // Unit for objects value
454  TString _label ; // Plot label for objects value
455  Bool_t _forceNumInt ; // Force numerical integration if flag set
456 
457  friend class RooAbsPdf ;
458  friend class RooAbsAnaConvPdf ;
459 
460  RooNumIntConfig* _specIntegratorConfig ; // Numeric integrator configuration specific for this object
461 
462  friend class RooDataProjBinding ;
463  friend class RooAbsOptGoodnessOfFit ;
464 
465  struct PlotOpt {
479  const char* normRangeName ;
484  const char* projectionRangeName ;
486  const char* curveName ;
487  const char* addToCurveName ;
492  const char* curveNameSuffix ;
498  } ;
499 
500  // Plot implementation functions
501  virtual RooPlot *plotOn(RooPlot* frame, PlotOpt o) const;
502 
503 public:
504  // PlotOn with command list
505  virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ;
506 
507  protected:
508  virtual RooPlot *plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue& asymCat, PlotOpt o) const;
509 
510 
511 private:
512 
514  static std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > > _evalErrorList ;
516 
517  Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const;
518 
519  std::unique_ptr<TreeReadBuffer> _treeReadBuffer; //! A buffer for reading values from trees
520 
521 protected:
522 
523 
524  friend class RooRealSumPdf ;
525  friend class RooRealSumFunc;
526  friend class RooAddPdf ;
527  friend class RooAddModel ;
528  void selectComp(Bool_t flag) {
529  // If flag is true, only selected component will be included in evaluates of RooAddPdf components
530  _selectComp = flag ;
531  }
532  static void globalSelectComp(Bool_t flag) ;
533  Bool_t _selectComp ; //! Component selection flag for RooAbsPdf::plotCompOn
534  static Bool_t _globalSelectComp ; // Global activation switch for component selection
535  // This struct can be used to flip the global switch to select components.
536  // Doing this with RAII prevents forgetting to reset the state.
540  if (state != RooAbsReal::_globalSelectComp)
542  }
543 
547  }
548 
549  bool _oldState;
550  };
551 
552 
553  mutable RooArgSet* _lastNSet ; //!
554  static Bool_t _hideOffset ; // Offset hiding flag
555 
556  ClassDef(RooAbsReal,2) // Abstract real-valued variable
557 };
558 
559 #endif
RooAbsReal::analyticalIntegral
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition: RooAbsReal.cxx:450
c
#define c(i)
Definition: RSha256.hxx:101
RooAbsReal::EvalError
Definition: RooAbsReal.h:290
RooAbsReal::setData
virtual Bool_t setData(RooAbsData &, Bool_t=kTRUE)
Definition: RooAbsReal.h:340
m
auto * m
Definition: textangle.C:8
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
RooAbsReal::EvalError::_srvval
std::string _srvval
Definition: RooAbsReal.h:297
RooAbsReal::NumEvent
@ NumEvent
Definition: RooAbsReal.h:255
RooAbsReal::~RooAbsReal
virtual ~RooAbsReal()
Destructor.
Definition: RooAbsReal.cxx:214
RooAbsReal::CountErrors
@ CountErrors
Definition: RooAbsReal.h:300
RooMultiGenFunction
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
Definition: RooMultiGenFunction.h:27
RooAbsReal::selectNormalization
virtual void selectNormalization(const RooArgSet *depSet=0, Bool_t force=kFALSE)
Interface function to force use of a given set of observables to interpret function value.
Definition: RooAbsReal.cxx:3656
RooCmdArg
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition: RooCmdArg.h:27
RooAbsArg::_inhibitDirty
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:652
RooAbsReal::PlotOpt::curveNameSuffix
const char * curveNameSuffix
Definition: RooAbsReal.h:492
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooAbsReal::printEvalErrors
static void printEvalErrors(std::ostream &os=std::cout, Int_t maxPerNode=10000000)
Print all outstanding logged evaluation error on the given ostream.
Definition: RooAbsReal.cxx:3876
e
#define e(i)
Definition: RSha256.hxx:103
RooAbsReal::PlotOpt::doeeval
Bool_t doeeval
Definition: RooAbsReal.h:495
RooAbsReal::setEvalErrorLoggingMode
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
Definition: RooAbsReal.cxx:4891
RooAddPdf
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddPdf.h:32
RooAbsReal::getPropagatedError
Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset=RooArgSet()) const
Calculate error on self by linearly propagating errors on parameters using the covariance matrix from...
Definition: RooAbsReal.cxx:2734
RooAbsReal::plotSamplingHint
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
Definition: RooAbsReal.cxx:3865
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const RooArgSet &nset, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName with integrand normalized over obse...
Definition: RooAbsReal.h:190
Option_t
const char Option_t
Definition: RtypesCore.h:66
RooAbsReal::logEvalError
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
Definition: RooAbsReal.cxx:3759
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:47
RooGenFunction
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
Definition: RooGenFunction.h:22
RooAbsReal::_evalErrorMode
static ErrorLoggingMode _evalErrorMode
Definition: RooAbsReal.h:513
RooDerivative
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
Definition: RooDerivative.h:31
RooAbsReal::GlobalSelectComponentRAII::GlobalSelectComponentRAII
GlobalSelectComponentRAII(bool state)
Definition: RooAbsReal.h:538
RooAbsReal::functor
RooFunctor * functor(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a RooFunctor object bound to this RooAbsReal with given definition of observables and paramete...
Definition: RooAbsReal.cxx:4199
RooAbsReal::syncCache
virtual void syncCache(const RooArgSet *set=0)
Definition: RooAbsReal.h:440
TH2F
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
RooArgSet.h
RooAbsReal::isBinnedDistribution
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
Definition: RooAbsReal.h:316
RooAbsReal::writeToStream
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
Definition: RooAbsReal.cxx:492
TString::Data
const char * Data() const
Definition: TString.h:369
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const RooNumIntConfig &cfg, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName using specified configuration for a...
Definition: RooAbsReal.h:199
RooAbsReal::sigma
RooAbsMoment * sigma(RooRealVar &obs)
Definition: RooAbsReal.h:334
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, 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
Create an object that represents the integral of the function over one or more observables listed in ...
Definition: RooAbsReal.cxx:596
RooAbsReal::getValV
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
Definition: RooAbsReal.cxx:277
RooAbsReal::operator==
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
Definition: RooAbsReal.cxx:224
xmax
float xmax
Definition: THbookFile.cxx:95
RooAbsReal::PlotOpt::projectionRangeName
const char * projectionRangeName
Definition: RooAbsReal.h:484
RooAbsArg::_serverList
RefCountList_t _serverList
Definition: RooAbsArg.h:594
RooAbsReal::CollectErrors
@ CollectErrors
Definition: RooAbsReal.h:300
RooAbsReal::binBoundaries
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
Definition: RooAbsReal.cxx:3854
RooAbsReal::getPlotLabel
const char * getPlotLabel() const
Get the label associated with the variable.
Definition: RooAbsReal.cxx:462
RooArgList
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooAbsReal::attachToTree
virtual void attachToTree(TTree &t, Int_t bufSize=32000)
Attach object to a branch of given TTree.
Definition: RooAbsReal.cxx:3316
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsReal::defaultErrorLevel
virtual Double_t defaultErrorLevel() const
Definition: RooAbsReal.h:227
RooAbsReal::EvalError::setServerValues
void setServerValues(const char *tmp)
Definition: RooAbsReal.h:295
RooAbsReal::PlotOpt::numCPU
Int_t numCPU
Definition: RooAbsReal.h:490
RooAbsReal::plotSanityChecks
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
Definition: RooAbsReal.cxx:3106
RooAbsReal::getVal
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition: RooAbsReal.h:92
RooAbsReal::PlotOpt::projDataSet
const RooArgSet * projDataSet
Definition: RooAbsReal.h:478
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
RooAbsArg.h
RooAbsReal::_unit
TString _unit
Value storage for batches of events.
Definition: RooAbsReal.h:453
RooFit::MPSplit
MPSplit
Definition: RooGlobalFunc.h:70
RooAbsReal::isSelectedComp
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
Definition: RooAbsReal.cxx:3209
RooAbsReal::makeProjectionSet
void makeProjectionSet(const RooAbsArg *plotVar, const RooArgSet *allVars, RooArgSet &projectedVars, Bool_t silent) const
Utility function for plotOn() that constructs the set of observables to project when plotting ourselv...
Definition: RooAbsReal.cxx:3149
RooAbsReal::getVal
Double_t getVal(const RooArgSet &normalisationSet) const
Like getVal(const RooArgSet*), but always requires an argument for normalisation.
Definition: RooAbsReal.h:107
RooCurve.h
x
Double_t x[n]
Definition: legend1.C:17
RooAbsReal::_forceNumInt
Bool_t _forceNumInt
Definition: RooAbsReal.h:455
RooAbsReal::setPlotLabel
void setPlotLabel(const char *label)
Set the label associated with this variable.
Definition: RooAbsReal.cxx:472
RooAbsReal::_treeReadBuffer
std::unique_ptr< TreeReadBuffer > _treeReadBuffer
Definition: RooAbsReal.h:519
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooAbsReal::getIntegratorConfig
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
Definition: RooAbsReal.cxx:3599
RooAbsReal::evalErrorLoggingMode
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
Definition: RooAbsReal.cxx:4877
RooAbsMoment
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
Definition: RooAbsMoment.h:27
RooAbsReal::PlotOpt::curveInvisible
Bool_t curveInvisible
Definition: RooAbsReal.h:485
RooAbsReal::isValidReal
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Interface function to check if given value is a valid value for this object.
Definition: RooAbsReal.cxx:538
RooAbsArg::inhibitDirty
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:116
RooAbsReal::isOffsetting
virtual Bool_t isOffsetting() const
Definition: RooAbsReal.h:343
RooAbsReal::plotOnWithErrorBand
RooPlot * plotOnWithErrorBand(RooPlot *frame, const RooFitResult &fr, Double_t Z, const RooArgSet *params, const RooLinkedList &argList, Bool_t method1) const
Plot function or PDF on frame with support for visualization of the uncertainty encoded in the given ...
Definition: RooAbsReal.cxx:2859
RooAbsReal::selectNormalizationRange
virtual void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function to force use of a given normalization range to interpret function value.
Definition: RooAbsReal.cxx:3669
RooAbsReal::mean
RooAbsMoment * mean(RooRealVar &obs)
Definition: RooAbsReal.h:332
TString
Basic string class.
Definition: TString.h:136
RooAbsReal::clearBatchMemory
void clearBatchMemory()
Definition: RooAbsReal.h:413
RooAbsReal::printValue
virtual void printValue(std::ostream &os) const
Print object value.
Definition: RooAbsReal.cxx:501
RooAbsArg::_fast
Bool_t _fast
Definition: RooAbsArg.h:668
RooAbsReal::_globalSelectComp
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
Definition: RooAbsReal.h:534
RooCmdArg::none
static const RooCmdArg & none()
Return reference to null argument.
Definition: RooCmdArg.cxx:52
RooAbsReal::fixAddCoefNormalization
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
Definition: RooAbsReal.cxx:3944
RooAbsReal::PlotOpt::projData
const RooAbsData * projData
Definition: RooAbsReal.h:473
b
#define b(i)
Definition: RSha256.hxx:100
RooAbsReal::clearEvalErrorLog
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
Definition: RooAbsReal.cxx:3836
RooAbsReal::RooAbsReal
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
Definition: RooAbsReal.cxx:135
bool
RooFitResult
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
RooAbsReal::ScaleType
ScaleType
Definition: RooAbsReal.h:255
RooAbsReal::PlotOpt::wmode
RooCurve::WingMode wmode
Definition: RooAbsReal.h:483
BatchHelpers::RunContext
Data that has to be passed around when evaluating functions / PDFs.
Definition: RunContext.h:32
RooAbsReal::PlotOpt::scaleFactor
Double_t scaleFactor
Definition: RooAbsReal.h:471
RooAbsFunc
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooAbsReal::GlobalSelectComponentRAII
Definition: RooAbsReal.h:537
RooAbsReal::numEvalErrorItems
static Int_t numEvalErrorItems()
Definition: RooAbsReal.cxx:358
RooAbsReal::getValBatch
virtual RooSpan< const double > getValBatch(std::size_t begin, std::size_t maxSize, const RooArgSet *normSet=nullptr) const
Return value of object for all data events in the batch.
Definition: RooAbsReal.cxx:301
RooAbsReal::fillTreeBranch
virtual void fillTreeBranch(TTree &t)
Fill the tree branch that associated with this object with its current value.
Definition: RooAbsReal.cxx:3384
RooAbsReal::PlotOpt::addToWgtOther
Double_t addToWgtOther
Definition: RooAbsReal.h:489
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const char *rangeName) const
Create integral over observables in iset in range named rangeName.
Definition: RooAbsReal.h:186
RooAbsReal::EvalError::setMessage
void setMessage(const char *tmp)
Definition: RooAbsReal.h:294
RooRealIntegral
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
Definition: RooRealIntegral.h:34
RooAbsReal::_selectComp
Bool_t _selectComp
Definition: RooAbsReal.h:533
RooAbsReal::forceAnalyticalInt
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooAbsReal.h:142
RooAbsReal::value_type
double value_type
Definition: RooAbsReal.h:64
RooAbsReal::_plotMax
Double_t _plotMax
Definition: RooAbsReal.h:449
RooAbsReal::PlotOpt::numee
Int_t numee
Definition: RooAbsReal.h:493
RooAbsReal::moment
RooAbsMoment * moment(RooRealVar &obs, Int_t order, Bool_t central, Bool_t takeRoot)
Return function representing moment of function of given order.
Definition: RooAbsReal.cxx:4331
RooAbsReal::createIntObj
RooAbsReal * createIntObj(const RooArgSet &iset, const RooArgSet *nset, const RooNumIntConfig *cfg, const char *rangeName) const
Internal utility function for createIntegral() that creates the actual integral object.
Definition: RooAbsReal.cxx:667
BatchHelpers
Definition: BatchData.h:31
RooAbsReal::_evalErrorList
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
Definition: RooAbsReal.h:514
RooAbsReal::plotAsymOn
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
Definition: RooAbsReal.cxx:2441
RooAbsReal::PlotOpt::addToCurveName
const char * addToCurveName
Definition: RooAbsReal.h:487
RooAbsReal::_label
TString _label
Definition: RooAbsReal.h:454
RooAbsReal::PlotOpt
Definition: RooAbsReal.h:465
RooAbsReal::isValid
virtual Bool_t isValid() const
Check if current value is valid.
Definition: RooAbsReal.cxx:527
RooDataHist
The RooDataHist is a container class to hold N-dimensional binned data.
Definition: RooDataHist.h:39
RooRealBinding
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
Definition: RooRealBinding.h:29
RooAbsReal::minTrialSamples
virtual Int_t minTrialSamples(const RooArgSet &) const
Definition: RooAbsReal.h:220
RooAbsReal::PlotOpt::PlotOpt
PlotOpt()
Definition: RooAbsReal.h:466
RooAbsReal::EvalError::_msg
std::string _msg
Definition: RooAbsReal.h:296
BatchHelpers::BatchData
A class to store batches of data points that can be accessed via RooSpan.
Definition: BatchData.h:34
RooAbsReal::ErrorLoggingMode
ErrorLoggingMode
Definition: RooAbsReal.h:300
RooAbsReal::selectComp
void selectComp(Bool_t flag)
Definition: RooAbsReal.h:528
RooAbsReal::GlobalSelectComponentRAII::~GlobalSelectComponentRAII
~GlobalSelectComponentRAII()
Definition: RooAbsReal.h:544
RooRealSumFunc
Definition: RooRealSumFunc.h:25
RooAbsReal::readFromStream
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from stream (dummy for now)
Definition: RooAbsReal.cxx:482
RooAbsReal::PlotOpt::rangeLo
Double_t rangeLo
Definition: RooAbsReal.h:480
xmin
float xmin
Definition: THbookFile.cxx:95
RooAbsReal::batchData
const BatchHelpers::BatchData & batchData() const
Definition: RooAbsReal.h:427
RooCurve::WingMode
WingMode
Definition: RooCurve.h:35
RooArgProxy
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
RooAbsReal::matchArgsByName
Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const
Check if allArgs contains matching elements for each name in nameList.
Definition: RooAbsReal.cxx:3529
RooFit::Interleave
@ Interleave
Definition: RooGlobalFunc.h:70
BatchHelpers::BatchInterfaceAccessor
Helper class to access a batch-related part of RooAbsReal's interface, which should not leak to the o...
Definition: BatchHelpers.h:136
RooFit
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition: RooCFunction1Binding.h:29
RooAbsReal::setTreeBranchStatus
virtual void setTreeBranchStatus(TTree &t, Bool_t active)
(De)Activate associated tree branch
Definition: RooAbsReal.cxx:3401
RooAbsReal::asTF
TF1 * asTF(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a ROOT TF1,2,3 object bound to this RooAbsReal with given definition of observables and parame...
Definition: RooAbsReal.cxx:4225
RooAbsReal::evalErrorIter
static EvalErrorIter evalErrorIter()
Definition: RooAbsReal.cxx:366
RooAbsReal::checkBatchComputation
void checkBatchComputation(std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13) const
Definition: RooAbsReal.cxx:5095
RooAbsReal::setHideOffset
static void setHideOffset(Bool_t flag)
Definition: RooAbsReal.cxx:123
RooAbsReal::integralNameSuffix
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=0, const char *rangeName=0, Bool_t omitEmpty=kFALSE) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
Definition: RooAbsReal.cxx:843
RooAbsReal::getUnit
const Text_t * getUnit() const
Definition: RooAbsReal.h:121
RooAbsReal::analyticalIntegralWN
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Definition: RooAbsReal.cxx:436
a
auto * a
Definition: textangle.C:12
RooAbsReal::PlotOpt::drawOptions
Option_t * drawOptions
Definition: RooAbsReal.h:469
RooAbsReal::createChi2
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Create a variable from a histogram and this function.
Definition: RooAbsReal.cxx:4502
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsReal::derivative
RooDerivative * derivative(RooRealVar &obs, Int_t order=1, Double_t eps=0.001)
Return function representing first, second or third order derivative of this function.
Definition: RooAbsReal.cxx:4303
RooAbsReal::bindVars
RooAbsFunc * bindVars(const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE) const
Create an interface adaptor f(vars) that binds us to the specified variables (in arbitrary order).
Definition: RooAbsReal.cxx:3233
RooAbsReal::getTitle
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
Definition: RooAbsReal.cxx:259
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
RooAbsReal::EvalError::EvalError
EvalError(const EvalError &other)
Definition: RooAbsReal.h:293
RooAbsReal::evaluate
virtual Double_t evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooAbsReal::fillDataHist
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
Fill a RooDataHist with values sampled from this function at the bin centers.
Definition: RooAbsReal.cxx:1264
RooAbsReal::chi2FitDriver
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
Definition: RooAbsReal.cxx:4662
RooAbsReal::getValues
virtual RooSpan< const double > getValues(BatchHelpers::RunContext &evalData, const RooArgSet *normSet=nullptr) const
Compute batch of values for given input data, store result in evalData, and return a span pointing to...
Definition: RooAbsReal.cxx:334
RooAbsReal::PlotOpt::stype
ScaleType stype
Definition: RooAbsReal.h:472
RooAbsReal::Ignore
@ Ignore
Definition: RooAbsReal.h:300
RooAbsReal::createIntRI
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
Definition: RooAbsReal.cxx:4133
RooAbsReal::getMaxVal
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
Definition: RooAbsReal.cxx:3682
RooAbsReal::_plotBins
Int_t _plotBins
Definition: RooAbsReal.h:450
RooAbsReal::setParameterizeIntegral
void setParameterizeIntegral(const RooArgSet &paramVars)
Definition: RooAbsReal.cxx:4899
RooPlot
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition: RooPlot.h:44
RooAbsArg::RooArgSet
friend class RooArgSet
Definition: RooAbsArg.h:586
RooAbsReal::mean
RooAbsMoment * mean(RooRealVar &obs, const RooArgSet &nset)
Definition: RooAbsReal.h:333
RooAbsReal::getAnalyticalIntegral
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Definition: RooAbsReal.cxx:424
RooCurve
A RooCurve is a one-dimensional graphical representation of a real-valued function.
Definition: RooCurve.h:32
double
double
Definition: Converters.cxx:921
RooAbsReal::chi2FitTo
virtual RooFitResult * chi2FitTo(RooDataHist &data, 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())
Perform a fit to given histogram.
Definition: RooAbsReal.cxx:4433
RooAbsReal::_value
Double_t _value
Definition: RooAbsReal.h:451
RooAbsReal::enableOffsetting
virtual void enableOffsetting(Bool_t)
Definition: RooAbsReal.h:342
RooAbsReal::RooAbsOptGoodnessOfFit
friend class RooAbsOptGoodnessOfFit
Definition: RooAbsReal.h:463
RooAbsReal::plotOnCompSelect
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
Definition: RooAbsReal.cxx:1585
RooAbsReal::forceNumInt
virtual void forceNumInt(Bool_t flag=kTRUE)
Definition: RooAbsReal.h:147
RooAbsReal::offset
virtual Double_t offset() const
Definition: RooAbsReal.h:344
RooAbsReal::createRunningIntegral
RooAbsReal * createRunningIntegral(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Calls createRunningIntegral(const RooArgSet&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&,...
Definition: RooAbsReal.cxx:4010
RooAbsReal::findRoot
Double_t findRoot(RooRealVar &x, Double_t xmin, Double_t xmax, Double_t yval)
Return value of x (in range xmin,xmax) at which function equals yval.
Definition: RooAbsReal.cxx:4367
RooAbsReal::_plotMin
Double_t _plotMin
Definition: RooAbsReal.h:448
RooCmdArg.h
RooAbsReal::setIntegratorConfig
void setIntegratorConfig()
Remove the specialized numeric integration configuration associated with this object.
Definition: RooAbsReal.cxx:3639
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const RooArgSet &nset, const RooNumIntConfig &cfg, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName with integrand normalized over obse...
Definition: RooAbsReal.h:195
RooAbsReal::_batchData
BatchHelpers::BatchData _batchData
Definition: RooAbsReal.h:452
RooAbsReal::plotOn
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg(), 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(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
Plot (project) PDF on specified frame.
Definition: RooAbsReal.cxx:1752
TH3F
3-D histogram with a float per channel (see TH1 documentation)}
Definition: TH3.h:268
RooGlobalFunc.h
RooAbsReal::createProfile
virtual RooAbsReal * createProfile(const RooArgSet &paramsOfInterest)
Create a RooProfileLL object that eliminates all nuisance parameters in the present function.
Definition: RooAbsReal.cxx:551
RooAbsReal::_specIntegratorConfig
RooNumIntConfig * _specIntegratorConfig
Definition: RooAbsReal.h:460
RooAbsReal::maxVal
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
Definition: RooAbsReal.cxx:3693
RooAbsReal::Raw
@ Raw
Definition: RooAbsReal.h:255
RooAbsReal::PlotOpt::normRangeName
const char * normRangeName
Definition: RooAbsReal.h:479
RooAbsReal::findInnerMostIntegration
void findInnerMostIntegration(const RooArgSet &allObs, RooArgSet &innerObs, const char *rangeName) const
Utility function for createIntObj() that aids in the construct of recursive integrals over functions ...
Definition: RooAbsReal.cxx:788
RooAbsReal::setCacheCheck
static void setCacheCheck(Bool_t flag)
RooAbsReal::traceEval
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
Definition: RooAbsReal.cxx:375
RooAbsReal::defaultIntegratorConfig
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
Definition: RooAbsReal.cxx:3562
RooAbsReal::createHistogram
TH1 * createHistogram(const char *varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const
Create and fill a ROOT histogram TH1, TH2 or TH3 with the values of this function for the variables w...
Definition: RooAbsReal.cxx:1326
RooAbsReal::getAnalyticalIntegralWN
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
Definition: RooAbsReal.cxx:407
Double_t
double Double_t
Definition: RtypesCore.h:59
RooFunctor
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
Definition: RooFunctor.h:25
RooAbsReal::specialIntegratorConfig
RooNumIntConfig * specialIntegratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
Definition: RooAbsReal.cxx:3572
RooAbsReal::setUnit
void setUnit(const char *unit)
Definition: RooAbsReal.h:125
RooAbsReal::operator=
RooAbsReal & operator=(const RooAbsReal &other)
Assign values, name and configs from another RooAbsReal.
Definition: RooAbsReal.cxx:187
RooAbsReal::PlotOpt::curveName
const char * curveName
Definition: RooAbsReal.h:486
RooAbsReal::EvalErrorIter
std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
Definition: RooAbsReal.h:310
RooDataProjBinding
adaptor that projects a real function via summation of states provided in a dataset.
Definition: RooDataProjBinding.h:25
RooAbsReal::EvalError::EvalError
EvalError()
Definition: RooAbsReal.h:292
RooAbsReal::_evalErrorCount
static Int_t _evalErrorCount
Definition: RooAbsReal.h:515
RooAbsReal::evaluateBatch
virtual RooSpan< double > evaluateBatch(std::size_t begin, std::size_t maxSize) const
Evaluate function for a batch of input data points.
Definition: RooAbsReal.cxx:4924
RooAbsReal::iGenFunction
RooGenFunction * iGenFunction(RooRealVar &x, const RooArgSet &nset=RooArgSet())
Definition: RooAbsReal.cxx:4379
RooAbsReal::PlotOpt::postRangeFracScale
Bool_t postRangeFracScale
Definition: RooAbsReal.h:482
RooCategory
RooCategory is an object to represent discrete states.
Definition: RooCategory.h:27
RooAbsReal::PlotOpt::precision
Double_t precision
Definition: RooAbsReal.h:476
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:575
RooAddModel
RooAddModel is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddModel.h:28
RooAbsReal::GlobalSelectComponentRAII::_oldState
bool _oldState
Definition: RooAbsReal.h:549
RooVectorDataStore
RooVectorDataStore uses std::vectors to store data columns.
Definition: RooVectorDataStore.h:36
RooAbsReal::isIdentical
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const
Definition: RooAbsReal.cxx:244
RooAbsReal::createScanRI
RooAbsReal * createScanRI(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
Utility function for createRunningIntegral that construct an object implementing the numeric scanning...
Definition: RooAbsReal.cxx:4116
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsReal::PlotOpt::errorFR
const RooFitResult * errorFR
Definition: RooAbsReal.h:497
RooAbsReal::getForceNumInt
Bool_t getForceNumInt() const
Definition: RooAbsReal.h:152
TH1
TH1 is the base class of all histogramm classes in ROOT.
Definition: TH1.h:58
RooAbsReal::createFundamental
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
Definition: RooAbsReal.cxx:3415
RooAbsReal::plotSliceOn
virtual RooPlot * plotSliceOn(RooPlot *frame, const RooArgSet &sliceSet, Option_t *drawOptions="L", Double_t scaleFactor=1.0, ScaleType stype=Relative, const RooAbsData *projData=0) const
Definition: RooAbsReal.cxx:2407
RooAbsReal::createPlotProjection
const RooAbsReal * createPlotProjection(const RooArgSet &depVars, const RooArgSet &projVars) const
Utility function for plotOn() that creates a projection of a function or p.d.f to be plotted on a Roo...
Definition: RooAbsReal.cxx:922
name
char name[80]
Definition: TGX11.cxx:110
RooAbsReal::hideOffset
static Bool_t hideOffset()
Definition: RooAbsReal.cxx:124
BatchHelpers::BatchData::clear
void clear()
Discard all storage.
Definition: BatchData.h:49
BatchData.h
d
#define d(i)
Definition: RSha256.hxx:102
RooAbsReal::printMultiline
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Definition: RooAbsReal.cxx:511
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooAbsReal::preferredObservableScanOrder
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their preferred order of observables for scanning t...
Definition: RooAbsReal.cxx:3998
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooAbsReal::PlotOpt::addToWgtSelf
Double_t addToWgtSelf
Definition: RooAbsReal.h:488
RooNumIntConfig
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Definition: RooNumIntConfig.h:25
RooAbsReal::_DEBUG_getVal
Double_t _DEBUG_getVal(const RooArgSet *normalisationSet) const
Debug version of getVal(), which is slow and does error checking.
Definition: RooAbsReal.cxx:5055
RooAbsReal::matchArgs
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
Definition: RooAbsReal.cxx:3431
RooAbsReal::globalSelectComp
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
Definition: RooAbsReal.cxx:3219
RooAbsPdf
Definition: RooAbsPdf.h:43
RooAbsReal::PlotOpt::interleave
RooFit::MPSplit interleave
Definition: RooAbsReal.h:491
RooAbsReal::PlotOpt::eeval
Double_t eeval
Definition: RooAbsReal.h:494
RooAbsReal::fixAddCoefRange
virtual void fixAddCoefRange(const char *rangeName=0, Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
Definition: RooAbsReal.cxx:3974
RooSpan.h
RooAbsReal::sigma
RooAbsMoment * sigma(RooRealVar &obs, const RooArgSet &nset)
Definition: RooAbsReal.h:335
RooAbsReal::Relative
@ Relative
Definition: RooAbsReal.h:255
RooAbsReal::numEvalErrors
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
Definition: RooAbsReal.cxx:3918
Text_t
char Text_t
Definition: RtypesCore.h:62
TF1
1-Dim function class
Definition: TF1.h:213
RooAbsReal::PrintErrors
@ PrintErrors
Definition: RooAbsReal.h:300
RooAbsReal::PlotOpt::binProjData
Bool_t binProjData
Definition: RooAbsReal.h:474
RooAbsCategoryLValue
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
Definition: RooAbsCategoryLValue.h:25
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:37
RooAbsRealLValue
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Definition: RooAbsRealLValue.h:31
RooAbsReal::evaluateSpan
virtual RooSpan< double > evaluateSpan(BatchHelpers::RunContext &evalData, const RooArgSet *normSet) const
Evaluate function for a batch of data points.
Definition: RooAbsReal.cxx:4991
RooArgList.h
RooRealSumPdf
The class RooRealSumPdf implements a PDF constructed from a sum of functions:
Definition: RooRealSumPdf.h:25
RooAbsReal::PlotOpt::projSet
const RooArgSet * projSet
Definition: RooAbsReal.h:475
RooAbsReal::fillHistogram
TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, Double_t scaleFactor=1, const RooArgSet *projectedVars=0, Bool_t scaling=kTRUE, const RooArgSet *condObs=0, Bool_t setError=kTRUE) const
Fill the ROOT histogram 'hist' with values sampled from this function at the bin centers.
Definition: RooAbsReal.cxx:1087
RooAbsReal::_hideOffset
static Bool_t _hideOffset
Definition: RooAbsReal.h:554
RooAbsAnaConvPdf
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
Definition: RooAbsAnaConvPdf.h:34
TList
A doubly linked list.
Definition: TList.h:44
RooSpan
A simple container to hold a batch of data values.
Definition: RooSpan.h:34
RooAbsReal::PlotOpt::shiftToZero
Bool_t shiftToZero
Definition: RooAbsReal.h:477
RooAbsReal::PlotOpt::progress
Bool_t progress
Definition: RooAbsReal.h:496
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
RooAbsReal::_lastNSet
RooArgSet * _lastNSet
Definition: RooAbsReal.h:553
RooAbsReal::RelativeExpected
@ RelativeExpected
Definition: RooAbsReal.h:255
int
RooAbsReal::PlotOpt::rangeHi
Double_t rangeHi
Definition: RooAbsReal.h:481
RooAbsReal::attachToVStore
virtual void attachToVStore(RooVectorDataStore &vstore)
Definition: RooAbsReal.cxx:3273
RooFit::Extended
RooCmdArg Extended(Bool_t flag=kTRUE)
Definition: RooGlobalFunc.cxx:156