Logo ROOT   6.12/07
Reference Guide
RooRealSumFunc.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
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 
17 //////////////////////////////////////////////////////////////////////////////
18 //
19 // Class RooRealSumFunc implements a PDF constructed from a sum of
20 // functions:
21 //
22 // Sum(i=1,n-1) coef_i * func_i(x) + [ 1 - (Sum(i=1,n-1) coef_i ] * func_n(x)
23 // pdf(x) = ------------------------------------------------------------------------------
24 // Sum(i=1,n-1) coef_i * Int(func_i)dx + [ 1 - (Sum(i=1,n-1) coef_i ] * Int(func_n)dx
25 //
26 //
27 // where coef_i and func_i are RooAbsReal objects, and x is the collection of dependents.
28 // In the present version coef_i may not depend on x, but this limitation may be removed in the future
29 //
30 
31 #include "RooFit.h"
32 #include "Riostream.h"
33 
34 #include "TIterator.h"
35 #include "TList.h"
36 #include "RooRealSumFunc.h"
37 #include "RooRealProxy.h"
38 #include "RooPlot.h"
39 #include "RooRealVar.h"
40 #include "RooAddGenContext.h"
41 #include "RooRealConstant.h"
42 #include "RooRealIntegral.h"
43 #include "RooMsgService.h"
44 #include "RooNameReg.h"
45 #include "RooTrace.h"
46 #include <memory>
47 #include <algorithm>
48 
49 using namespace std;
50 
52 
54 
55 //_____________________________________________________________________________
57 {
58  // Default constructor
59  // coverity[UNINIT_CTOR]
60  _funcIter = _funcList.createIterator();
61  _coefIter = _coefList.createIterator();
62  _doFloor = kFALSE;
64 }
65 
66 //_____________________________________________________________________________
67 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title)
68  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
69  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
70  _doFloor(kFALSE)
71 {
72  // Constructor with name and title
76 }
77 
78 //_____________________________________________________________________________
79 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title, RooAbsReal &func1, RooAbsReal &func2,
80  RooAbsReal &coef1)
81  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
82  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
84 {
85  // Construct p.d.f consisting of coef1*func1 + (1-coef1)*func2
86  // The input coefficients and functions are allowed to be negative
87  // but the resulting sum is not, which is enforced at runtime
88 
89  // Special constructor with two functions and one coefficient
92 
93  _funcList.add(func1);
94  _funcList.add(func2);
95  _coefList.add(coef1);
97 }
98 
99 //_____________________________________________________________________________
100 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title, const RooArgList &inFuncList,
101  const RooArgList &inCoefList)
102  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
103  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
105 {
106  // Constructor p.d.f implementing sum_i [ coef_i * func_i ], if N_coef==N_func
107  // or sum_i [ coef_i * func_i ] + (1 - sum_i [ coef_i ] )* func_N if Ncoef==N_func-1
108  //
109  // All coefficients and functions are allowed to be negative
110  // but the sum is not, which is enforced at runtime.
111 
112  if (!(inFuncList.getSize() == inCoefList.getSize() + 1 || inFuncList.getSize() == inCoefList.getSize())) {
113  coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName()
114  << ") number of pdfs and coefficients inconsistent, must have Nfunc=Ncoef or Nfunc=Ncoef+1"
115  << endl;
116  assert(0);
117  }
118 
121 
122  // Constructor with N functions and N or N-1 coefs
123  TIterator *funcIter = inFuncList.createIterator();
124  TIterator *coefIter = inCoefList.createIterator();
125  RooAbsArg *func;
126  RooAbsArg *coef;
127 
128  while ((coef = (RooAbsArg *)coefIter->Next())) {
129  func = (RooAbsArg *)funcIter->Next();
130 
131  if (!dynamic_cast<RooAbsReal *>(coef)) {
132  coutW(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") coefficient " << coef->GetName()
133  << " is not of type RooAbsReal, ignored" << endl;
134  continue;
135  }
136  if (!dynamic_cast<RooAbsReal *>(func)) {
137  coutW(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") func " << func->GetName()
138  << " is not of type RooAbsReal, ignored" << endl;
139  continue;
140  }
141  _funcList.add(*func);
142  _coefList.add(*coef);
143  }
144 
145  func = (RooAbsReal *)funcIter->Next();
146  if (func) {
147  if (!dynamic_cast<RooAbsReal *>(func)) {
148  coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") last func " << coef->GetName()
149  << " is not of type RooAbsReal, fatal error" << endl;
150  assert(0);
151  }
152  _funcList.add(*func);
153  } else {
155  }
156 
157  delete funcIter;
158  delete coefIter;
160 }
161 
162 //_____________________________________________________________________________
164  : RooAbsReal(other, name), _normIntMgr(other._normIntMgr, this), _haveLastCoef(other._haveLastCoef),
165  _funcList("!funcList", this, other._funcList), _coefList("!coefList", this, other._coefList),
166  _doFloor(other._doFloor)
167 {
168  // Copy constructor
169 
173 }
174 
175 //_____________________________________________________________________________
177 {
178  // Destructor
179  delete _funcIter;
180  delete _coefIter;
181 
183 }
184 
185 //_____________________________________________________________________________
187 {
188  // Calculate the current value
189 
190  Double_t value(0);
191 
192  // Do running sum of coef/func pairs, calculate lastCoef.
193  RooFIter funcIter = _funcList.fwdIterator();
194  RooFIter coefIter = _coefList.fwdIterator();
195  RooAbsReal *coef;
196  RooAbsReal *func;
197 
198  // N funcs, N-1 coefficients
199  Double_t lastCoef(1);
200  while ((coef = (RooAbsReal *)coefIter.next())) {
201  func = (RooAbsReal *)funcIter.next();
202  Double_t coefVal = coef->getVal();
203  if (coefVal) {
204  cxcoutD(Eval) << "RooRealSumFunc::eval(" << GetName() << ") coefVal = " << coefVal
205  << " funcVal = " << func->IsA()->GetName() << "::" << func->GetName() << " = " << func->getVal()
206  << endl;
207  if (func->isSelectedComp()) {
208  value += func->getVal() * coefVal;
209  }
210  lastCoef -= coef->getVal();
211  }
212  }
213 
214  if (!_haveLastCoef) {
215  // Add last func with correct coefficient
216  func = (RooAbsReal *)funcIter.next();
217  if (func->isSelectedComp()) {
218  value += func->getVal() * lastCoef;
219  }
220 
221  cxcoutD(Eval) << "RooRealSumFunc::eval(" << GetName() << ") lastCoef = " << lastCoef
222  << " funcVal = " << func->getVal() << endl;
223 
224  // Warn about coefficient degeneration
225  if (lastCoef < 0 || lastCoef > 1) {
226  coutW(Eval) << "RooRealSumFunc::evaluate(" << GetName()
227  << " WARNING: sum of FUNC coefficients not in range [0-1], value=" << 1 - lastCoef << endl;
228  }
229  }
230 
231  // Introduce floor if so requested
232  if (value < 0 && (_doFloor || _doFloorGlobal)) {
233  value = 0;
234  }
235 
236  return value;
237 }
238 
239 //_____________________________________________________________________________
241 {
242  // Check if FUNC is valid for given normalization set.
243  // Coeffient and FUNC must be non-overlapping, but func-coefficient
244  // pairs may overlap each other
245  //
246  // In the present implementation, coefficients may not be observables or derive
247  // from observables
248 
249  Bool_t ret(kFALSE);
250 
251  _funcIter->Reset();
252  _coefIter->Reset();
253  RooAbsReal *coef;
254  RooAbsReal *func;
255  while ((coef = (RooAbsReal *)_coefIter->Next())) {
256  func = (RooAbsReal *)_funcIter->Next();
257  if (func->observableOverlaps(nset, *coef)) {
258  coutE(InputArguments) << "RooRealSumFunc::checkObservables(" << GetName() << "): ERROR: coefficient "
259  << coef->GetName() << " and FUNC " << func->GetName()
260  << " have one or more observables in common" << endl;
261  ret = kTRUE;
262  }
263  if (coef->dependsOn(*nset)) {
264  coutE(InputArguments) << "RooRealPdf::checkObservables(" << GetName() << "): ERROR coefficient "
265  << coef->GetName() << " depends on one or more of the following observables";
266  nset->Print("1");
267  ret = kTRUE;
268  }
269  }
270 
271  return ret;
272 }
273 
274 //_____________________________________________________________________________
276  const char *rangeName) const
277 {
278  // cout <<
279  // "RooRealSumFunc::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<",analVars,"<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
280  // << endl;
281  // Advertise that all integrals can be handled internally.
282 
283  // Handle trivial no-integration scenario
284  if (allVars.getSize() == 0)
285  return 0;
286  if (_forceNumInt)
287  return 0;
288 
289  // Select subset of allVars that are actual dependents
290  analVars.add(allVars);
291  RooArgSet *normSet = normSet2 ? getObservables(normSet2) : 0;
292 
293  // Check if this configuration was created before
294  Int_t sterileIdx(-1);
295  CacheElem *cache = (CacheElem *)_normIntMgr.getObj(normSet, &analVars, &sterileIdx, RooNameReg::ptr(rangeName));
296  if (cache) {
297  // cout <<
298  // "RooRealSumFunc("<<this<<")::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<","<<analVars<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
299  // << " -> " << _normIntMgr.lastIndex()+1 << " (cached)" << endl;
300  return _normIntMgr.lastIndex() + 1;
301  }
302 
303  // Create new cache element
304  cache = new CacheElem;
305 
306  // Make list of function projection and normalization integrals
307  _funcIter->Reset();
308  RooAbsReal *func;
309  while ((func = (RooAbsReal *)_funcIter->Next())) {
310  RooAbsReal *funcInt = func->createIntegral(analVars, rangeName);
311  cache->_funcIntList.addOwned(*funcInt);
312  if (normSet && normSet->getSize() > 0) {
313  RooAbsReal *funcNorm = func->createIntegral(*normSet);
314  cache->_funcNormList.addOwned(*funcNorm);
315  }
316  }
317 
318  // Store cache element
319  Int_t code = _normIntMgr.setObj(normSet, &analVars, (RooAbsCacheElement *)cache, RooNameReg::ptr(rangeName));
320 
321  if (normSet) {
322  delete normSet;
323  }
324 
325  // cout <<
326  // "RooRealSumFunc("<<this<<")::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<","<<analVars<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
327  // << " -> " << code+1 << endl;
328  return code + 1;
329 }
330 
331 //_____________________________________________________________________________
332 Double_t RooRealSumFunc::analyticalIntegralWN(Int_t code, const RooArgSet *normSet2, const char *rangeName) const
333 {
334  // cout <<
335  // "RooRealSumFunc::analyticalIntegralWN:"<<GetName()<<"("<<code<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
336  // << endl;
337  // Implement analytical integrations by deferring integration of component
338  // functions to integrators of components
339 
340  // Handle trivial passthrough scenario
341  if (code == 0)
342  return getVal(normSet2);
343 
344  // WVE needs adaptation for rangeName feature
345  CacheElem *cache = (CacheElem *)_normIntMgr.getObjByIndex(code - 1);
346  if (cache == 0) { // revive the (sterilized) cache
347  // cout <<
348  // "RooRealSumFunc("<<this<<")::analyticalIntegralWN:"<<GetName()<<"("<<code<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
349  // << ": reviving cache "<< endl;
350  std::unique_ptr<RooArgSet> vars(getParameters(RooArgSet()));
351  std::unique_ptr<RooArgSet> iset(_normIntMgr.nameSet2ByIndex(code - 1)->select(*vars));
352  std::unique_ptr<RooArgSet> nset(_normIntMgr.nameSet1ByIndex(code - 1)->select(*vars));
354  Int_t code2 = getAnalyticalIntegralWN(*iset, dummy, nset.get(), rangeName);
355  assert(code == code2); // must have revived the right (sterilized) slot...
356  (void)code2;
357  cache = (CacheElem *)_normIntMgr.getObjByIndex(code - 1);
358  assert(cache != 0);
359  }
360 
361  RooFIter funcIntIter = cache->_funcIntList.fwdIterator();
362  RooFIter coefIter = _coefList.fwdIterator();
363  RooFIter funcIter = _funcList.fwdIterator();
364  RooAbsReal *coef(0), *funcInt(0), *func(0);
365  Double_t value(0);
366 
367  // N funcs, N-1 coefficients
368  Double_t lastCoef(1);
369  while ((coef = (RooAbsReal *)coefIter.next())) {
370  funcInt = (RooAbsReal *)funcIntIter.next();
371  func = (RooAbsReal *)funcIter.next();
372  Double_t coefVal = coef->getVal(normSet2);
373  if (coefVal) {
374  assert(func);
375  if (normSet2 == 0 || func->isSelectedComp()) {
376  assert(funcInt);
377  value += funcInt->getVal() * coefVal;
378  }
379  lastCoef -= coef->getVal(normSet2);
380  }
381  }
382 
383  if (!_haveLastCoef) {
384  // Add last func with correct coefficient
385  funcInt = (RooAbsReal *)funcIntIter.next();
386  if (normSet2 == 0 || func->isSelectedComp()) {
387  assert(funcInt);
388  value += funcInt->getVal() * lastCoef;
389  }
390 
391  // Warn about coefficient degeneration
392  if (lastCoef < 0 || lastCoef > 1) {
393  coutW(Eval) << "RooRealSumFunc::evaluate(" << GetName()
394  << " WARNING: sum of FUNC coefficients not in range [0-1], value=" << 1 - lastCoef << endl;
395  }
396  }
397 
398  Double_t normVal(1);
399  if (normSet2 && normSet2->getSize() > 0) {
400  normVal = 0;
401 
402  // N funcs, N-1 coefficients
403  RooAbsReal *funcNorm;
404  RooFIter funcNormIter = cache->_funcNormList.fwdIterator();
405  RooFIter coefIter2 = _coefList.fwdIterator();
406  while ((coef = (RooAbsReal *)coefIter2.next())) {
407  funcNorm = (RooAbsReal *)funcNormIter.next();
408  Double_t coefVal = coef->getVal(normSet2);
409  if (coefVal) {
410  assert(funcNorm);
411  normVal += funcNorm->getVal() * coefVal;
412  }
413  }
414 
415  // Add last func with correct coefficient
416  if (!_haveLastCoef) {
417  funcNorm = (RooAbsReal *)funcNormIter.next();
418  assert(funcNorm);
419  normVal += funcNorm->getVal() * lastCoef;
420  }
421  }
422 
423  return value / normVal;
424 }
425 
426 //_____________________________________________________________________________
427 std::list<Double_t> *RooRealSumFunc::binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
428 {
429  list<Double_t> *sumBinB = 0;
430  Bool_t needClean(kFALSE);
431 
432  RooFIter iter = _funcList.fwdIterator();
433  RooAbsReal *func;
434  // Loop over components pdf
435  while ((func = (RooAbsReal *)iter.next())) {
436 
437  list<Double_t> *funcBinB = func->binBoundaries(obs, xlo, xhi);
438 
439  // Process hint
440  if (funcBinB) {
441  if (!sumBinB) {
442  // If this is the first hint, then just save it
443  sumBinB = funcBinB;
444  } else {
445 
446  list<Double_t> *newSumBinB = new list<Double_t>(sumBinB->size() + funcBinB->size());
447 
448  // Merge hints into temporary array
449  merge(funcBinB->begin(), funcBinB->end(), sumBinB->begin(), sumBinB->end(), newSumBinB->begin());
450 
451  // Copy merged array without duplicates to new sumBinBArrau
452  delete sumBinB;
453  delete funcBinB;
454  sumBinB = newSumBinB;
455  needClean = kTRUE;
456  }
457  }
458  }
459 
460  // Remove consecutive duplicates
461  if (needClean) {
462  list<Double_t>::iterator new_end = unique(sumBinB->begin(), sumBinB->end());
463  sumBinB->erase(new_end, sumBinB->end());
464  }
465 
466  return sumBinB;
467 }
468 
469 //_____________________________________________________________________________B
471 {
472  // If all components that depend on obs are binned that so is the product
473 
474  RooFIter iter = _funcList.fwdIterator();
475  RooAbsReal *func;
476  while ((func = (RooAbsReal *)iter.next())) {
477  if (func->dependsOn(obs) && !func->isBinnedDistribution(obs)) {
478  return kFALSE;
479  }
480  }
481 
482  return kTRUE;
483 }
484 
485 //_____________________________________________________________________________
486 std::list<Double_t> *RooRealSumFunc::plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
487 {
488  list<Double_t> *sumHint = 0;
489  Bool_t needClean(kFALSE);
490 
491  RooFIter iter = _funcList.fwdIterator();
492  RooAbsReal *func;
493  // Loop over components pdf
494  while ((func = (RooAbsReal *)iter.next())) {
495 
496  list<Double_t> *funcHint = func->plotSamplingHint(obs, xlo, xhi);
497 
498  // Process hint
499  if (funcHint) {
500  if (!sumHint) {
501 
502  // If this is the first hint, then just save it
503  sumHint = funcHint;
504 
505  } else {
506 
507  list<Double_t> *newSumHint = new list<Double_t>(sumHint->size() + funcHint->size());
508 
509  // Merge hints into temporary array
510  merge(funcHint->begin(), funcHint->end(), sumHint->begin(), sumHint->end(), newSumHint->begin());
511 
512  // Copy merged array without duplicates to new sumHintArrau
513  delete sumHint;
514  sumHint = newSumHint;
515  needClean = kTRUE;
516  }
517  }
518  }
519 
520  // Remove consecutive duplicates
521  if (needClean) {
522  list<Double_t>::iterator new_end = unique(sumHint->begin(), sumHint->end());
523  sumHint->erase(new_end, sumHint->end());
524  }
525 
526  return sumHint;
527 }
528 
529 //_____________________________________________________________________________
531 {
532  // Label OK'ed components of a RooRealSumFunc with cache-and-track
533  RooFIter siter = funcList().fwdIterator();
534  RooAbsArg *sarg;
535  while ((sarg = siter.next())) {
536  if (sarg->canNodeBeCached() == Always) {
537  trackNodes.add(*sarg);
538  // cout << "tracking node RealSumFunc component " << sarg->IsA()->GetName() << "::" << sarg->GetName() << endl
539  // ;
540  }
541  }
542 }
543 
544 //_____________________________________________________________________________
545 void RooRealSumFunc::printMetaArgs(ostream &os) const
546 {
547  // Customized printing of arguments of a RooRealSumFuncy to more intuitively reflect the contents of the
548  // product operator construction
549 
550  _funcIter->Reset();
551  _coefIter->Reset();
552 
553  Bool_t first(kTRUE);
554 
555  RooAbsArg *coef, *func;
556  if (_coefList.getSize() != 0) {
557  while ((coef = (RooAbsArg *)_coefIter->Next())) {
558  if (!first) {
559  os << " + ";
560  } else {
561  first = kFALSE;
562  }
563  func = (RooAbsArg *)_funcIter->Next();
564  os << coef->GetName() << " * " << func->GetName();
565  }
566  func = (RooAbsArg *)_funcIter->Next();
567  if (func) {
568  os << " + [%] * " << func->GetName();
569  }
570  } else {
571 
572  while ((func = (RooAbsArg *)_funcIter->Next())) {
573  if (!first) {
574  os << " + ";
575  } else {
576  first = kFALSE;
577  }
578  os << func->GetName();
579  }
580  }
581 
582  os << " ";
583 }
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TIterator * createIterator(Bool_t dir=kIterForward) const
#define coutE(a)
Definition: RooMsgService.h:34
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Definition: RooArgSet.h:86
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
Definition: RooAbsArg.cxx:740
virtual void Reset()=0
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Definition: RooAbsArg.h:194
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
void printMetaArgs(std::ostream &os) const
Double_t getVal(const RooArgSet *set=0) const
Definition: RooAbsReal.h:64
#define cxcoutD(a)
Definition: RooMsgService.h:79
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Definition: RooAbsReal.h:278
Bool_t _doFloor
Iterator over coefficient list.
T * getObjByIndex(Int_t index) const
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
STL namespace.
#define coutW(a)
Definition: RooMsgService.h:33
const RooArgList & funcList() const
virtual ~RooRealSumFunc()
Bool_t isBinnedDistribution(const RooArgSet &obs) const
Iterator abstract base class.
Definition: TIterator.h:30
const RooNameSet * nameSet1ByIndex(Int_t index) const
#define TRACE_CREATE
Definition: RooTrace.h:22
Bool_t observableOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Test if any of the dependents of the arg tree (as determined by getObservables) overlaps with those o...
Definition: RooAbsArg.cxx:813
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
friend class RooArgSet
Definition: RooAbsArg.h:471
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
RooListProxy _coefList
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables...
Int_t getSize() const
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:501
Bool_t _forceNumInt
Definition: RooAbsReal.h:392
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
Definition: RooNameReg.cxx:125
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
Int_t lastIndex() const
virtual void setCacheAndTrackHints(RooArgSet &)
Double_t evaluate() const
RooAbsArg * next()
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
Definition: RooAbsReal.h:277
const RooNameSet * nameSet2ByIndex(Int_t index) const
#define ClassImp(name)
Definition: Rtypes.h:359
TIterator * _coefIter
Iterator over FUNC list.
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooFIter fwdIterator() const
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don&#39;t match any of...
Definition: RooAbsArg.cxx:537
static RooMathCoreReg dummy
#define TRACE_DESTROY
Definition: RooTrace.h:23
RooListProxy _funcList
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input &#39;list&#39; whose names match to those in the internal name list...
Definition: RooNameSet.cxx:189
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
Definition: RooAbsReal.h:279
typedef void((*Func_t)())
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual TObject * Next()=0
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &numVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
RooObjCacheManager _normIntMgr
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Definition: first.py:1
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
Bool_t _haveLastCoef
static Bool_t _doFloorGlobal
TIterator * _funcIter
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:317