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 <map>
27 
28 class RooArgList ;
29 class RooDataSet ;
30 class RooPlot;
31 class RooRealVar;
32 class RooAbsFunc;
34 class RooCategory ;
35 class RooLinkedList ;
36 class RooNumIntConfig ;
37 class RooDataHist ;
38 class RooFunctor ;
39 class RooGenFunction ;
40 class RooMultiGenFunction ;
41 class RooFitResult ;
42 class RooAbsMoment ;
43 class RooDerivative ;
44 class RooVectorDataStore ;
45 namespace RooBatchCompute{
47 struct RunContext;
48 }
49 struct TreeReadBuffer; /// A space to attach TBranches
50 
51 class TH1;
52 class TH1F;
53 class TH2F;
54 class TH3F;
55 
56 #include <list>
57 #include <string>
58 #include <iostream>
59 #include <sstream>
60 
61 class RooAbsReal : public RooAbsArg {
62 public:
63  using value_type = double;
64 
65  // Constructors, assignment etc
66  RooAbsReal() ;
67  RooAbsReal(const char *name, const char *title, const char *unit= "") ;
68  RooAbsReal(const char *name, const char *title, Double_t minVal, Double_t maxVal,
69  const char *unit= "") ;
70  RooAbsReal(const RooAbsReal& other, const char* name=0);
71  RooAbsReal& operator=(const RooAbsReal& other);
72  virtual ~RooAbsReal();
73 
74 
75 
76 
77  //////////////////////////////////////////////////////////////////////////////////
78  /// Evaluate object. Returns either cached value or triggers a recalculation.
79  /// The recalculation happens by calling getValV(), which in the end calls the
80  /// virtual evaluate() functions of the respective PDFs.
81  /// \param[in] normalisationSet getValV() reacts differently depending on the value of the normalisation set.
82  /// If the set is `nullptr`, an unnormalised value is returned.
83  /// \note The normalisation is arbitrary, because it is up to the implementation
84  /// of the PDF to e.g. leave out normalisation constants for speed reasons. The range
85  /// of the variables is also ignored.
86  ///
87  /// To normalise the result properly, a RooArgSet has to be passed, which contains
88  /// the variables to normalise over.
89  /// These are integrated over their current ranges to compute the normalisation constant,
90  /// and the unnormalised result is divided by this value.
91  inline Double_t getVal(const RooArgSet* normalisationSet = nullptr) const {
92 #ifdef ROOFIT_CHECK_CACHED_VALUES
93  return _DEBUG_getVal(normalisationSet);
94 #else
95 
96 #ifndef _WIN32
97  return (_fast && !_inhibitDirty) ? _value : getValV(normalisationSet) ;
98 #else
99  return (_fast && !inhibitDirty()) ? _value : getValV(normalisationSet) ;
100 #endif
101 
102 #endif
103  }
104 
105  /// Like getVal(const RooArgSet*), but always requires an argument for normalisation.
106  inline Double_t getVal(const RooArgSet& normalisationSet) const { return _fast ? _value : getValV(&normalisationSet) ; }
107 
108  virtual Double_t getValV(const RooArgSet* normalisationSet = nullptr) const ;
109 
110  /// \deprecated getValBatch() has been removed in favour of the faster getValues(). If your code is affected
111  /// by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition.
112  /// https://root.cern/doc/v624/release-notes.html
113 #ifndef R__MACOSX
114  virtual RooSpan<const double> getValBatch(std::size_t /*begin*/, std::size_t /*maxSize*/, const RooArgSet* /*normSet*/ = nullptr) = delete;
115 #else
116  //AppleClang in MacOS10.14 has a linker bug and fails to link programs that create objects of classes containing virtual deleted methods.
117  //This can be safely deleted when MacOS10.14 is no longer supported by ROOT. See https://reviews.llvm.org/D37830
118  virtual RooSpan<const double> getValBatch(std::size_t /*begin*/, std::size_t /*maxSize*/, const RooArgSet* /*normSet*/ = nullptr) final {
119  throw std::logic_error("Deprecated getValBatch() has been removed in favour of the faster getValues(). If your code is affected by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition. https://root.cern/doc/v624/release-notes.html");
120  }
121 #endif
122  /// by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition.
123  virtual RooSpan<const double> getValues(RooBatchCompute::RunContext& evalData, const RooArgSet* normSet = nullptr) const;
124 
125  Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset = RooArgSet()) const;
126 
127  Bool_t operator==(Double_t value) const ;
128  virtual Bool_t operator==(const RooAbsArg& other) const;
129  virtual Bool_t isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const;
130 
131 
132  inline const Text_t *getUnit() const {
133  // Return string with unit description
134  return _unit.Data();
135  }
136  inline void setUnit(const char *unit) {
137  // Set unit description to given string
138  _unit= unit;
139  }
140  TString getTitle(Bool_t appendUnit= kFALSE) const;
141 
142  // Lightweight interface adaptors (caller takes ownership)
143  RooAbsFunc *bindVars(const RooArgSet &vars, const RooArgSet* nset=0, Bool_t clipInvalid=kFALSE) const;
144 
145  // Create a fundamental-type object that can hold our value.
146  RooAbsArg *createFundamental(const char* newname=0) const;
147 
148  // Analytical integration support
149  virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const ;
150  virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
151  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
152  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
153  virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const {
154  // Interface to force RooRealIntegral to offer given observable for internal integration
155  // even if this is deemed unsafe. This default implementation returns always flase
156  return kFALSE ;
157  }
158  virtual void forceNumInt(Bool_t flag=kTRUE) {
159  // If flag is true, all advertised analytical integrals will be ignored
160  // and all integrals are calculated numerically
161  _forceNumInt = flag ;
162  }
163  Bool_t getForceNumInt() const { return _forceNumInt ; }
164 
165  // Chi^2 fits to histograms
166  virtual RooFitResult* chi2FitTo(RooDataHist& data, 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(RooDataHist& data, const RooLinkedList& cmdList) ;
170 
171  virtual RooAbsReal* createChi2(RooDataHist& data, const RooLinkedList& cmdList) ;
172  virtual RooAbsReal* createChi2(RooDataHist& 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  // Chi^2 fits to X-Y datasets
177  virtual RooFitResult* chi2FitTo(RooDataSet& xydata, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
178  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
179  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
180  virtual RooFitResult* chi2FitTo(RooDataSet& xydata, const RooLinkedList& cmdList) ;
181 
182  virtual RooAbsReal* createChi2(RooDataSet& data, const RooLinkedList& cmdList) ;
183  virtual RooAbsReal* createChi2(RooDataSet& data, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
184  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),
185  const RooCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
186 
187 
188  virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
189 
190 
191  RooAbsReal* createIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::none(),
192  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
193  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
194  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
195 
196  /// Create integral over observables in iset in range named rangeName.
197  RooAbsReal* createIntegral(const RooArgSet& iset, const char* rangeName) const {
198  return createIntegral(iset,0,0,rangeName) ;
199  }
200  /// Create integral over observables in iset in range named rangeName with integrand normalized over observables in nset
201  RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet& nset, const char* rangeName=0) const {
202  return createIntegral(iset,&nset,0,rangeName) ;
203  }
204  /// Create integral over observables in iset in range named rangeName with integrand normalized over observables in nset while
205  /// using specified configuration for any numeric integration.
206  RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet& nset, const RooNumIntConfig& cfg, const char* rangeName=0) const {
207  return createIntegral(iset,&nset,&cfg,rangeName) ;
208  }
209  /// Create integral over observables in iset in range named rangeName using specified configuration for any numeric integration.
210  RooAbsReal* createIntegral(const RooArgSet& iset, const RooNumIntConfig& cfg, const char* rangeName=0) const {
211  return createIntegral(iset,0,&cfg,rangeName) ;
212  }
213  virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet* nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ;
214 
215 
216  void setParameterizeIntegral(const RooArgSet& paramVars) ;
217 
218  // Create running integrals
219  RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooArgSet& nset=RooArgSet()) ;
220  RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg::none(),
221  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
222  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
223  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) ;
224  RooAbsReal* createIntRI(const RooArgSet& iset, const RooArgSet& nset=RooArgSet()) ;
225  RooAbsReal* createScanRI(const RooArgSet& iset, const RooArgSet& nset, Int_t numScanBins, Int_t intOrder) ;
226 
227 
228  // Optimized accept/reject generator support
229  virtual Int_t getMaxVal(const RooArgSet& vars) const ;
230  virtual Double_t maxVal(Int_t code) const ;
231  virtual Int_t minTrialSamples(const RooArgSet& /*arGenObs*/) const { return 0 ; }
232 
233 
234  // Plotting options
235  void setPlotLabel(const char *label);
236  const char *getPlotLabel() const;
237 
238  virtual Double_t defaultErrorLevel() const {
239  // Return default level for MINUIT error analysis
240  return 1.0 ;
241  }
242 
243  const RooNumIntConfig* getIntegratorConfig() const ;
248  void setIntegratorConfig() ;
249  void setIntegratorConfig(const RooNumIntConfig& config) ;
250 
251  virtual void fixAddCoefNormalization(const RooArgSet& addNormSet=RooArgSet(),Bool_t force=kTRUE) ;
252  virtual void fixAddCoefRange(const char* rangeName=0,Bool_t force=kTRUE) ;
253 
254  virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet& orderedObs) const ;
255 
256  // User entry point for plotting
257  virtual RooPlot* plotOn(RooPlot* frame,
258  const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(),
259  const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
260  const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
261  const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg(),
262  const RooCmdArg& arg9=RooCmdArg(), const RooCmdArg& arg10=RooCmdArg()
263  ) const ;
264 
265 
267 
268  // Forwarder function for backward compatibility
269  virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, Option_t* drawOptions="L",
270  Double_t scaleFactor=1.0, ScaleType stype=Relative, const RooAbsData* projData=0) const;
271 
272  // Fill an existing histogram
273  TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars,
274  Double_t scaleFactor= 1, const RooArgSet *projectedVars= 0, Bool_t scaling=kTRUE,
275  const RooArgSet* condObs=0, Bool_t setError=kTRUE) const;
276 
277  // Create 1,2, and 3D histograms from and fill it
278  TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const ;
279  TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooLinkedList& argList) const ;
280  TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
281  const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
282  const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg4=RooCmdArg::none(),
283  const RooCmdArg& arg5=RooCmdArg::none(), const RooCmdArg& arg6=RooCmdArg::none(),
284  const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none()) const ;
285 
286  // Fill a RooDataHist
287  RooDataHist* fillDataHist(RooDataHist *hist, const RooArgSet* nset, Double_t scaleFactor,
288  Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const ;
289 
290  // I/O streaming interface (machine readable)
291  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
292  virtual void writeToStream(std::ostream& os, Bool_t compact) const ;
293 
294  // Printing interface (human readable)
295  virtual void printValue(std::ostream& os) const ;
296  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
297 
298  static void setCacheCheck(Bool_t flag) ;
299 
300  // Evaluation error logging
301  class EvalError {
302  public:
303  EvalError() { }
304  EvalError(const EvalError& other) : _msg(other._msg), _srvval(other._srvval) { }
305  void setMessage(const char* tmp) { std::string s(tmp); s.swap(_msg); }
306  void setServerValues(const char* tmp) { std::string s(tmp); s.swap(_srvval); }
307  std::string _msg;
308  std::string _srvval;
309  } ;
310 
314  void logEvalError(const char* message, const char* serverValueString=0) const ;
315  static void logEvalError(const RooAbsReal* originator, const char* origName, const char* message, const char* serverValueString=0) ;
316  static void printEvalErrors(std::ostream&os=std::cout, Int_t maxPerNode=10000000) ;
317  static Int_t numEvalErrors() ;
318  static Int_t numEvalErrorItems() ;
319 
320 
321  typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > >::const_iterator EvalErrorIter ;
322  static EvalErrorIter evalErrorIter() ;
323 
324  static void clearEvalErrorLog() ;
325 
326  /// Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
327  virtual Bool_t isBinnedDistribution(const RooArgSet& /*obs*/) const { return kFALSE ; }
328  virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const;
329  virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const;
330 
332  RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const RooArgSet& nset=RooArgSet()) ;
333 
334  RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgList(), const RooArgSet& nset=RooArgSet()) const ;
335  TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), const RooArgSet& nset=RooArgSet()) const ;
336 
337  RooDerivative* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0.001) ;
338  RooDerivative* derivative(RooRealVar& obs, const RooArgSet& normSet, Int_t order, Double_t eps=0.001) ;
339 
340  RooAbsMoment* moment(RooRealVar& obs, Int_t order, Bool_t central, Bool_t takeRoot) ;
341  RooAbsMoment* moment(RooRealVar& obs, const RooArgSet& normObs, Int_t order, Bool_t central, Bool_t takeRoot, Bool_t intNormObs) ;
342 
343  RooAbsMoment* mean(RooRealVar& obs) { return moment(obs,1,kFALSE,kFALSE) ; }
344  RooAbsMoment* mean(RooRealVar& obs, const RooArgSet& nset) { return moment(obs,nset,1,kFALSE,kFALSE,kTRUE) ; }
345  RooAbsMoment* sigma(RooRealVar& obs) { return moment(obs,2,kTRUE,kTRUE) ; }
346  RooAbsMoment* sigma(RooRealVar& obs, const RooArgSet& nset) { return moment(obs,nset,2,kTRUE,kTRUE,kTRUE) ; }
347 
349 
350 
351  virtual Bool_t setData(RooAbsData& /*data*/, Bool_t /*cloneData*/=kTRUE) { return kTRUE ; }
352 
353  virtual void enableOffsetting(Bool_t) {} ;
354  virtual Bool_t isOffsetting() const { return kFALSE ; }
355  virtual Double_t offset() const { return 0 ; }
356 
357  static void setHideOffset(Bool_t flag);
358  static Bool_t hideOffset() ;
359 
360 protected:
361  // Hook for objects with normalization-dependent parameters interperetation
362  virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force=kFALSE) ;
363  virtual void selectNormalizationRange(const char* rangeName=0, Bool_t force=kFALSE) ;
364 
365  // Helper functions for plotting
366  Bool_t plotSanityChecks(RooPlot* frame) const ;
367  void makeProjectionSet(const RooAbsArg* plotVar, const RooArgSet* allVars,
368  RooArgSet& projectedVars, Bool_t silent) const ;
369 
370  TString integralNameSuffix(const RooArgSet& iset, const RooArgSet* nset=0, const char* rangeName=0, Bool_t omitEmpty=kFALSE) const ;
371 
372 
373  Bool_t isSelectedComp() const ;
374 
375 
376  public:
377  const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const RooArgSet& projVars) const ;
378  const RooAbsReal* createPlotProjection(const RooArgSet& depVars, const RooArgSet& projVars, RooArgSet*& cloneSet) const ;
379  const RooAbsReal *createPlotProjection(const RooArgSet &dependentVars, const RooArgSet *projectedVars,
380  RooArgSet *&cloneSet, const char* rangeName=0, const RooArgSet* condObs=0) const;
381  protected:
382 
384 
385  void plotOnCompSelect(RooArgSet* selNodes) const ;
386  RooPlot* plotOnWithErrorBand(RooPlot* frame,const RooFitResult& fr, Double_t Z, const RooArgSet* params, const RooLinkedList& argList, Bool_t method1) const ;
387 
388  // Support interface for subclasses to advertise their analytic integration
389  // and generator capabilities in their analyticalIntegral() and generateEvent()
390  // implementations.
391  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
392  const RooArgProxy& a) const ;
393  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
394  const RooArgProxy& a, const RooArgProxy& b) const ;
395  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
396  const RooArgProxy& a, const RooArgProxy& b, const RooArgProxy& c) const ;
397  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
398  const RooArgProxy& a, const RooArgProxy& b,
399  const RooArgProxy& c, const RooArgProxy& d) const ;
400 
401  Bool_t matchArgs(const RooArgSet& allDeps, RooArgSet& numDeps,
402  const RooArgSet& set) const ;
403 
404 
405  RooAbsReal* createIntObj(const RooArgSet& iset, const RooArgSet* nset, const RooNumIntConfig* cfg, const char* rangeName) const ;
406  void findInnerMostIntegration(const RooArgSet& allObs, RooArgSet& innerObs, const char* rangeName) const ;
407 
408 
409  // Internal consistency checking (needed by RooDataSet)
410  /// Check if current value is valid.
411  virtual bool isValid() const { return isValidReal(_value); }
412  /// Interface function to check if given value is a valid value for this object. Returns true unless overridden.
413  virtual bool isValidReal(double /*value*/, bool printError = false) const { (void)printError; return true; }
414 
415 
416  // Function evaluation and error tracing
417  Double_t traceEval(const RooArgSet* set) const ;
418 
419  /// Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
420  virtual Double_t evaluate() const = 0;
421 
422  /// \deprecated evaluateBatch() has been removed in favour of the faster evaluateSpan(). If your code is affected
423  /// by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition.
424  /// https://root.cern/doc/v624/release-notes.html
425 #ifndef R__MACOSX
426  virtual RooSpan<double> evaluateBatch(std::size_t /*begin*/, std::size_t /*maxSize*/) = delete;
427 #else
428  //AppleClang in MacOS10.14 has a linker bug and fails to link programs that create objects of classes containing virtual deleted methods.
429  //This can be safely deleted when MacOS10.14 is no longer supported by ROOT. See https://reviews.llvm.org/D37830
430  virtual RooSpan<double> evaluateBatch(std::size_t /*begin*/, std::size_t /*maxSize*/) final {
431  throw std::logic_error("Deprecated evaluatedBatch() has been removed in favour of the faster evaluateSpan(). If your code is affected by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition. https://root.cern/doc/v624/release-notes.html");
432  }
433 #endif
434 
435  virtual RooSpan<double> evaluateSpan(RooBatchCompute::RunContext& evalData, const RooArgSet* normSet) const;
436 
437  //---------- Interface to access batch data ---------------------------
438  //
440 
441  private:
442  void checkBatchComputation(const RooBatchCompute::RunContext& evalData, std::size_t evtNo, const RooArgSet* normSet = nullptr, double relAccuracy = 1.E-13) const;
443 
444  /// Debug version of getVal(), which is slow and does error checking.
445  Double_t _DEBUG_getVal(const RooArgSet* normalisationSet) const;
446 
447  //--------------------------------------------------------------------
448 
449  protected:
450  // Hooks for RooDataSet interface
451  friend class RooRealIntegral ;
452  friend class RooVectorDataStore ;
453  virtual void syncCache(const RooArgSet* set=0) { getVal(set) ; }
454  virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) ;
455  virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
456  virtual void attachToVStore(RooVectorDataStore& vstore) ;
457  virtual void setTreeBranchStatus(TTree& t, Bool_t active) ;
458  virtual void fillTreeBranch(TTree& t) ;
459 
460  friend class RooRealBinding ;
461  Double_t _plotMin ; // Minimum of plot range
462  Double_t _plotMax ; // Maximum of plot range
463  Int_t _plotBins ; // Number of plot bins
464  mutable Double_t _value ; // Cache for current value of object
465  TString _unit ; // Unit for objects value
466  TString _label ; // Plot label for objects value
467  Bool_t _forceNumInt ; // Force numerical integration if flag set
468 
469  friend class RooAbsPdf ;
470  friend class RooAbsAnaConvPdf ;
471 
472  RooNumIntConfig* _specIntegratorConfig ; // Numeric integrator configuration specific for this object
473 
474  friend class RooDataProjBinding ;
475  friend class RooAbsOptGoodnessOfFit ;
476 
477  struct PlotOpt {
491  const char* normRangeName ;
496  const char* projectionRangeName ;
498  const char* curveName ;
499  const char* addToCurveName ;
504  const char* curveNameSuffix ;
510  } ;
511 
512  // Plot implementation functions
513  virtual RooPlot *plotOn(RooPlot* frame, PlotOpt o) const;
514 
515 public:
516  // PlotOn with command list
517  virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ;
518 
519  protected:
520  virtual RooPlot *plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue& asymCat, PlotOpt o) const;
521 
522 
523 private:
524 
526  static std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > > _evalErrorList ;
528 
529  Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const;
530 
531  std::unique_ptr<TreeReadBuffer> _treeReadBuffer; //! A buffer for reading values from trees
532 
533 protected:
534 
535 
536  friend class RooRealSumPdf ;
537  friend class RooRealSumFunc;
538  friend class RooAddPdf ;
539  friend class RooAddModel ;
540  void selectComp(Bool_t flag) {
541  // If flag is true, only selected component will be included in evaluates of RooAddPdf components
542  _selectComp = flag ;
543  }
544  static void globalSelectComp(Bool_t flag) ;
545  Bool_t _selectComp ; //! Component selection flag for RooAbsPdf::plotCompOn
546  static Bool_t _globalSelectComp ; // Global activation switch for component selection
547  // This struct can be used to flip the global switch to select components.
548  // Doing this with RAII prevents forgetting to reset the state.
552  if (state != RooAbsReal::_globalSelectComp)
554  }
555 
559  }
560 
561  bool _oldState;
562  };
563 
564 
565  mutable RooArgSet* _lastNSet ; //!
566  static Bool_t _hideOffset ; // Offset hiding flag
567 
568  ClassDef(RooAbsReal,2) // Abstract real-valued variable
569 };
570 
571 
572 /// Helper class to access a batch-related part of RooAbsReal's interface, which should not leak to the outside world.
574  public:
575  static void checkBatchComputation(const RooAbsReal& theReal, const RooBatchCompute::RunContext& evalData, std::size_t evtNo,
576  const RooArgSet* normSet = nullptr, double relAccuracy = 1.E-13) {
577  theReal.checkBatchComputation(evalData, evtNo, normSet, relAccuracy);
578  }
579 };
580 
581 
582 #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:429
c
#define c(i)
Definition: RSha256.hxx:101
RooAbsReal::EvalError
Definition: RooAbsReal.h:301
RooAbsReal::setData
virtual Bool_t setData(RooAbsData &, Bool_t=kTRUE)
Definition: RooAbsReal.h:351
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:3217
RooAbsReal::EvalError::_srvval
std::string _srvval
Definition: RooAbsReal.h:308
RooAbsReal::evaluateSpan
virtual RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Evaluate this object for a batch/span of data points.
Definition: RooAbsReal.cxx:4898
RooAbsReal::NumEvent
@ NumEvent
Definition: RooAbsReal.h:266
RooAbsReal::~RooAbsReal
virtual ~RooAbsReal()
Destructor.
Definition: RooAbsReal.cxx:213
RooAbsReal::CountErrors
@ CountErrors
Definition: RooAbsReal.h:311
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:3614
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:504
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
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:3834
e
#define e(i)
Definition: RSha256.hxx:103
RooAbsReal::isValid
virtual bool isValid() const
Check if current value is valid.
Definition: RooAbsReal.h:411
RooAbsReal::PlotOpt::doeeval
Bool_t doeeval
Definition: RooAbsReal.h:507
RooAbsReal::setEvalErrorLoggingMode
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
Definition: RooAbsReal.cxx:4849
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:2694
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:3823
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:201
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:3717
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:49
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:525
RooDerivative
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
Definition: RooDerivative.h:30
RooAbsReal::GlobalSelectComponentRAII::GlobalSelectComponentRAII
GlobalSelectComponentRAII(bool state)
Definition: RooAbsReal.h:550
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:4157
RooAbsReal::syncCache
virtual void syncCache(const RooArgSet *set=0)
Definition: RooAbsReal.h:453
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:327
RooAbsReal::writeToStream
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
Definition: RooAbsReal.cxx:471
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:210
RooAbsReal::sigma
RooAbsMoment * sigma(RooRealVar &obs)
Definition: RooAbsReal.h:345
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:548
RooAbsReal::getValV
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
Definition: RooAbsReal.cxx:276
RooAbsReal::operator==
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
Definition: RooAbsReal.cxx:223
xmax
float xmax
Definition: THbookFile.cxx:95
RooAbsReal::PlotOpt::projectionRangeName
const char * projectionRangeName
Definition: RooAbsReal.h:496
RooAbsReal::CollectErrors
@ CollectErrors
Definition: RooAbsReal.h:311
RooAbsReal::evaluateBatch
virtual RooSpan< double > evaluateBatch(std::size_t, std::size_t)=delete
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:3812
RooAbsReal::getPlotLabel
const char * getPlotLabel() const
Get the label associated with the variable.
Definition: RooAbsReal.cxx:441
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:3274
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsReal::defaultErrorLevel
virtual Double_t defaultErrorLevel() const
Definition: RooAbsReal.h:238
RooAbsReal::EvalError::setServerValues
void setServerValues(const char *tmp)
Definition: RooAbsReal.h:306
RooAbsReal::PlotOpt::numCPU
Int_t numCPU
Definition: RooAbsReal.h:502
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:3066
BatchInterfaceAccessor::checkBatchComputation
static void checkBatchComputation(const RooAbsReal &theReal, const RooBatchCompute::RunContext &evalData, std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13)
Definition: RooAbsReal.h:575
RooAbsReal::getVal
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition: RooAbsReal.h:91
RooAbsReal::PlotOpt::projDataSet
const RooArgSet * projDataSet
Definition: RooAbsReal.h:490
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
RooAbsArg.h
RooAbsReal::_unit
TString _unit
Definition: RooAbsReal.h:465
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:3169
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:3109
RooAbsReal::getVal
Double_t getVal(const RooArgSet &normalisationSet) const
Like getVal(const RooArgSet*), but always requires an argument for normalisation.
Definition: RooAbsReal.h:106
RooCurve.h
x
Double_t x[n]
Definition: legend1.C:17
RooAbsReal::_forceNumInt
Bool_t _forceNumInt
Definition: RooAbsReal.h:467
RooAbsReal::setPlotLabel
void setPlotLabel(const char *label)
Set the label associated with this variable.
Definition: RooAbsReal.cxx:451
RooAbsReal::_treeReadBuffer
std::unique_ptr< TreeReadBuffer > _treeReadBuffer
Definition: RooAbsReal.h:531
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:61
RooAbsReal::getIntegratorConfig
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
Definition: RooAbsReal.cxx:3557
RooAbsReal::evalErrorLoggingMode
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
Definition: RooAbsReal.cxx:4835
RooAbsReal::getValBatch
virtual RooSpan< const double > getValBatch(std::size_t, std::size_t, const RooArgSet *=nullptr)=delete
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:497
RooAbsArg::inhibitDirty
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:117
RooAbsReal::isOffsetting
virtual Bool_t isOffsetting() const
Definition: RooAbsReal.h:354
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:2819
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:3627
RooAbsReal::mean
RooAbsMoment * mean(RooRealVar &obs)
Definition: RooAbsReal.h:343
TString
Basic string class.
Definition: TString.h:136
RooAbsReal::printValue
virtual void printValue(std::ostream &os) const
Print object value.
Definition: RooAbsReal.cxx:480
RooAbsArg::_fast
Bool_t _fast
Definition: RooAbsArg.h:668
RooAbsReal::_globalSelectComp
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
Definition: RooAbsReal.h:546
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:3902
RooAbsReal::PlotOpt::projData
const RooAbsData * projData
Definition: RooAbsReal.h:485
b
#define b(i)
Definition: RSha256.hxx:100
RooAbsReal::clearEvalErrorLog
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
Definition: RooAbsReal.cxx:3794
RooAbsReal::RooAbsReal
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
Definition: RooAbsReal.cxx:134
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:266
RooAbsReal::PlotOpt::wmode
RooCurve::WingMode wmode
Definition: RooAbsReal.h:495
RooAbsReal::PlotOpt::scaleFactor
Double_t scaleFactor
Definition: RooAbsReal.h:483
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:549
RooAbsReal::numEvalErrorItems
static Int_t numEvalErrorItems()
Definition: RooAbsReal.cxx:337
RooAbsReal::fillTreeBranch
virtual void fillTreeBranch(TTree &t)
Fill the tree branch that associated with this object with its current value.
Definition: RooAbsReal.cxx:3342
RooAbsReal::PlotOpt::addToWgtOther
Double_t addToWgtOther
Definition: RooAbsReal.h:501
RooAbsReal::createIntegral
RooAbsReal * createIntegral(const RooArgSet &iset, const char *rangeName) const
Create integral over observables in iset in range named rangeName.
Definition: RooAbsReal.h:197
RooAbsReal::EvalError::setMessage
void setMessage(const char *tmp)
Definition: RooAbsReal.h:305
RooRealIntegral
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
Definition: RooRealIntegral.h:34
RooAbsReal::_selectComp
Bool_t _selectComp
Definition: RooAbsReal.h:545
RooAbsReal::forceAnalyticalInt
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooAbsReal.h:153
RooAbsReal::value_type
double value_type
Definition: RooAbsReal.h:63
RooAbsReal::_plotMax
Double_t _plotMax
Definition: RooAbsReal.h:462
RooAbsReal::PlotOpt::numee
Int_t numee
Definition: RooAbsReal.h:505
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:4289
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:619
RooAbsReal::_evalErrorList
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
Definition: RooAbsReal.h:526
RooAbsReal::plotAsymOn
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
Definition: RooAbsReal.cxx:2397
RooAbsReal::PlotOpt::addToCurveName
const char * addToCurveName
Definition: RooAbsReal.h:499
RooAbsReal::_label
TString _label
Definition: RooAbsReal.h:466
RooAbsReal::PlotOpt
Definition: RooAbsReal.h:477
RooDataHist
The RooDataHist is a container class to hold N-dimensional binned data.
Definition: RooDataHist.h:37
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:231
RooAbsReal::PlotOpt::PlotOpt
PlotOpt()
Definition: RooAbsReal.h:478
RooAbsReal::EvalError::_msg
std::string _msg
Definition: RooAbsReal.h:307
RooAbsReal::ErrorLoggingMode
ErrorLoggingMode
Definition: RooAbsReal.h:311
RooAbsReal::selectComp
void selectComp(Bool_t flag)
Definition: RooAbsReal.h:540
RooAbsReal::GlobalSelectComponentRAII::~GlobalSelectComponentRAII
~GlobalSelectComponentRAII()
Definition: RooAbsReal.h:556
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:461
RooAbsReal::PlotOpt::rangeLo
Double_t rangeLo
Definition: RooAbsReal.h:492
xmin
float xmin
Definition: THbookFile.cxx:95
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:3487
RooFit::Interleave
@ Interleave
Definition: RooGlobalFunc.h:70
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:3359
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:4183
RooAbsReal::evalErrorIter
static EvalErrorIter evalErrorIter()
Definition: RooAbsReal.cxx:345
RooAbsReal::isValidReal
virtual bool isValidReal(double, bool printError=false) const
Interface function to check if given value is a valid value for this object. Returns true unless over...
Definition: RooAbsReal.h:413
RooAbsReal::setHideOffset
static void setHideOffset(Bool_t flag)
Definition: RooAbsReal.cxx:122
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:795
RooAbsReal::getUnit
const Text_t * getUnit() const
Definition: RooAbsReal.h:132
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:415
a
auto * a
Definition: textangle.C:12
RooAbsReal::PlotOpt::drawOptions
Option_t * drawOptions
Definition: RooAbsReal.h:481
RooAbsReal::createChi2
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Create a variable from a histogram and this function.
Definition: RooAbsReal.cxx:4460
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
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:4261
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:3193
RooAbsReal::getTitle
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
Definition: RooAbsReal.cxx:258
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:304
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:1216
RooAbsReal::chi2FitDriver
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
Definition: RooAbsReal.cxx:4620
RooAbsReal::PlotOpt::stype
ScaleType stype
Definition: RooAbsReal.h:484
RooAbsReal::Ignore
@ Ignore
Definition: RooAbsReal.h:311
RooAbsReal::createIntRI
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
Definition: RooAbsReal.cxx:4091
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:3640
RooAbsReal::_plotBins
Int_t _plotBins
Definition: RooAbsReal.h:463
RooAbsReal::setParameterizeIntegral
void setParameterizeIntegral(const RooArgSet &paramVars)
Definition: RooAbsReal.cxx:4857
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::checkBatchComputation
void checkBatchComputation(const RooBatchCompute::RunContext &evalData, std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13) const
Walk through expression tree headed by the this object, and check a batch computation.
Definition: RooAbsReal.cxx:5032
RooAbsReal::mean
RooAbsMoment * mean(RooRealVar &obs, const RooArgSet &nset)
Definition: RooAbsReal.h:344
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:403
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:4391
RooAbsReal::_value
Double_t _value
Definition: RooAbsReal.h:464
RooAbsReal::enableOffsetting
virtual void enableOffsetting(Bool_t)
Definition: RooAbsReal.h:353
RooAbsReal::RooAbsOptGoodnessOfFit
friend class RooAbsOptGoodnessOfFit
Definition: RooAbsReal.h:475
RooAbsReal::plotOnCompSelect
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
Definition: RooAbsReal.cxx:1537
RooAbsReal::forceNumInt
virtual void forceNumInt(Bool_t flag=kTRUE)
Definition: RooAbsReal.h:158
RooAbsReal::offset
virtual Double_t offset() const
Definition: RooAbsReal.h:355
RooAbsReal::createRunningIntegral
RooAbsReal * createRunningIntegral(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Calls createRunningIntegral(const RooArgSet&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&,...
Definition: RooAbsReal.cxx:3968
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:4325
RooAbsReal::_plotMin
Double_t _plotMin
Definition: RooAbsReal.h:461
void
typedef void((*Func_t)())
RooCmdArg.h
RooAbsReal::setIntegratorConfig
void setIntegratorConfig()
Remove the specialized numeric integration configuration associated with this object.
Definition: RooAbsReal.cxx:3597
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:206
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:1704
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:506
RooAbsReal::_specIntegratorConfig
RooNumIntConfig * _specIntegratorConfig
Definition: RooAbsReal.h:472
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:3651
RooAbsReal::Raw
@ Raw
Definition: RooAbsReal.h:266
RooAbsReal::PlotOpt::normRangeName
const char * normRangeName
Definition: RooAbsReal.h:491
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:740
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:354
RooAbsReal::defaultIntegratorConfig
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
Definition: RooAbsReal.cxx:3520
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:1278
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:386
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:3530
RooAbsReal::setUnit
void setUnit(const char *unit)
Definition: RooAbsReal.h:136
RooAbsReal::operator=
RooAbsReal & operator=(const RooAbsReal &other)
Assign values, name and configs from another RooAbsReal.
Definition: RooAbsReal.cxx:186
RooAbsReal::PlotOpt::curveName
const char * curveName
Definition: RooAbsReal.h:498
RooAbsReal::EvalErrorIter
std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
Definition: RooAbsReal.h:321
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:303
RooAbsReal::_evalErrorCount
static Int_t _evalErrorCount
Definition: RooAbsReal.h:527
RooAbsReal::iGenFunction
RooGenFunction * iGenFunction(RooRealVar &x, const RooArgSet &nset=RooArgSet())
Definition: RooAbsReal.cxx:4337
RooAbsReal::PlotOpt::postRangeFracScale
Bool_t postRangeFracScale
Definition: RooAbsReal.h:494
RooCategory
RooCategory is an object to represent discrete states.
Definition: RooCategory.h:27
RooAbsReal::PlotOpt::precision
Double_t precision
Definition: RooAbsReal.h:488
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:27
RooAbsReal::GlobalSelectComponentRAII::_oldState
bool _oldState
Definition: RooAbsReal.h:561
RooVectorDataStore
RooVectorDataStore uses std::vectors to store data columns.
Definition: RooVectorDataStore.h:37
RooAbsReal::isIdentical
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const
Definition: RooAbsReal.cxx:243
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:4074
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsReal::PlotOpt::errorFR
const RooFitResult * errorFR
Definition: RooAbsReal.h:509
RooAbsReal::getForceNumInt
Bool_t getForceNumInt() const
Definition: RooAbsReal.h:163
TH1
TH1 is the base class of all histogram 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:3373
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:2363
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:874
name
char name[80]
Definition: TGX11.cxx:110
RooAbsReal::hideOffset
static Bool_t hideOffset()
Definition: RooAbsReal.cxx:123
RooBatchCompute
Namespace for dispatching RooFit computations to various backends.
Definition: BracketAdapter.h:24
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:490
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:3956
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooAbsReal::getValues
virtual RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this trans...
Definition: RooAbsReal.cxx:312
RooAbsReal::PlotOpt::addToWgtSelf
Double_t addToWgtSelf
Definition: RooAbsReal.h:500
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:4982
RooAbsReal::matchArgs
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
Definition: RooAbsReal.cxx:3389
RooAbsReal::globalSelectComp
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
Definition: RooAbsReal.cxx:3179
RooAbsPdf
Definition: RooAbsPdf.h:43
RooAbsReal::PlotOpt::interleave
RooFit::MPSplit interleave
Definition: RooAbsReal.h:503
RooAbsReal::PlotOpt::eeval
Double_t eeval
Definition: RooAbsReal.h:506
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:3932
RooSpan.h
RooAbsReal::sigma
RooAbsMoment * sigma(RooRealVar &obs, const RooArgSet &nset)
Definition: RooAbsReal.h:346
RooAbsReal::Relative
@ Relative
Definition: RooAbsReal.h:266
RooAbsReal::numEvalErrors
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
Definition: RooAbsReal.cxx:3876
Text_t
char Text_t
Definition: RtypesCore.h:62
TF1
1-Dim function class
Definition: TF1.h:213
RooAbsReal::PrintErrors
@ PrintErrors
Definition: RooAbsReal.h:311
RooAbsReal::PlotOpt::binProjData
Bool_t binProjData
Definition: RooAbsReal.h:486
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:39
RooAbsRealLValue
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Definition: RooAbsRealLValue.h:31
RooArgList.h
BatchInterfaceAccessor
Helper class to access a batch-related part of RooAbsReal's interface, which should not leak to the o...
Definition: RooAbsReal.h:573
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:487
RooBatchCompute::RunContext
This struct enables passing computation data around between elements of a computation graph.
Definition: RunContext.h:31
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:1039
RooAbsReal::_hideOffset
static Bool_t _hideOffset
Definition: RooAbsReal.h:566
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:489
RooAbsReal::PlotOpt::progress
Bool_t progress
Definition: RooAbsReal.h:508
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
fw3dlego::xbins
const double xbins[xbins_n]
Definition: collection_proxies.C:48
RooAbsReal::_lastNSet
RooArgSet * _lastNSet
Definition: RooAbsReal.h:565
RooAbsReal::RelativeExpected
@ RelativeExpected
Definition: RooAbsReal.h:266
int
RooAbsReal::PlotOpt::rangeHi
Double_t rangeHi
Definition: RooAbsReal.h:493
RooAbsReal::attachToVStore
virtual void attachToVStore(RooVectorDataStore &vstore)
Definition: RooAbsReal.cxx:3233
RooFit::Extended
RooCmdArg Extended(Bool_t flag=kTRUE)
Definition: RooGlobalFunc.cxx:156