Logo ROOT   6.14/05
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 
47 #include <algorithm>
48 #include <memory>
49 
50 using namespace std;
51 
53 
55 
56 //_____________________________________________________________________________
58 {
59  // Default constructor
60  // coverity[UNINIT_CTOR]
61  _funcIter = _funcList.createIterator();
62  _coefIter = _coefList.createIterator();
63  _doFloor = kFALSE;
65 }
66 
67 //_____________________________________________________________________________
68 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title)
69  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
70  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
71  _doFloor(kFALSE)
72 {
73  // Constructor with name and title
77 }
78 
79 //_____________________________________________________________________________
80 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title, RooAbsReal &func1, RooAbsReal &func2,
81  RooAbsReal &coef1)
82  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
83  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
85 {
86  // Construct p.d.f consisting of coef1*func1 + (1-coef1)*func2
87  // The input coefficients and functions are allowed to be negative
88  // but the resulting sum is not, which is enforced at runtime
89 
90  // Special constructor with two functions and one coefficient
93 
94  _funcList.add(func1);
95  _funcList.add(func2);
96  _coefList.add(coef1);
98 }
99 
100 //_____________________________________________________________________________
101 RooRealSumFunc::RooRealSumFunc(const char *name, const char *title, const RooArgList &inFuncList,
102  const RooArgList &inCoefList)
103  : RooAbsReal(name, title), _normIntMgr(this, 10), _haveLastCoef(kFALSE),
104  _funcList("!funcList", "List of functions", this), _coefList("!coefList", "List of coefficients", this),
106 {
107  // Constructor p.d.f implementing sum_i [ coef_i * func_i ], if N_coef==N_func
108  // or sum_i [ coef_i * func_i ] + (1 - sum_i [ coef_i ] )* func_N if Ncoef==N_func-1
109  //
110  // All coefficients and functions are allowed to be negative
111  // but the sum is not, which is enforced at runtime.
112 
113  if (!(inFuncList.getSize() == inCoefList.getSize() + 1 || inFuncList.getSize() == inCoefList.getSize())) {
114  coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName()
115  << ") number of pdfs and coefficients inconsistent, must have Nfunc=Ncoef or Nfunc=Ncoef+1"
116  << endl;
117  assert(0);
118  }
119 
122 
123  // Constructor with N functions and N or N-1 coefs
124  TIterator *funcIter = inFuncList.createIterator();
125  TIterator *coefIter = inCoefList.createIterator();
126  RooAbsArg *func;
127  RooAbsArg *coef;
128 
129  while ((coef = (RooAbsArg *)coefIter->Next())) {
130  func = (RooAbsArg *)funcIter->Next();
131 
132  if (!dynamic_cast<RooAbsReal *>(coef)) {
133  coutW(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") coefficient " << coef->GetName()
134  << " is not of type RooAbsReal, ignored" << endl;
135  continue;
136  }
137  if (!dynamic_cast<RooAbsReal *>(func)) {
138  coutW(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") func " << func->GetName()
139  << " is not of type RooAbsReal, ignored" << endl;
140  continue;
141  }
142  _funcList.add(*func);
143  _coefList.add(*coef);
144  }
145 
146  func = (RooAbsReal *)funcIter->Next();
147  if (func) {
148  if (!dynamic_cast<RooAbsReal *>(func)) {
149  coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") last func " << coef->GetName()
150  << " is not of type RooAbsReal, fatal error" << endl;
151  assert(0);
152  }
153  _funcList.add(*func);
154  } else {
156  }
157 
158  delete funcIter;
159  delete coefIter;
161 }
162 
163 //_____________________________________________________________________________
165  : RooAbsReal(other, name), _normIntMgr(other._normIntMgr, this), _haveLastCoef(other._haveLastCoef),
166  _funcList("!funcList", this, other._funcList), _coefList("!coefList", this, other._coefList),
167  _doFloor(other._doFloor)
168 {
169  // Copy constructor
170 
174 }
175 
176 //_____________________________________________________________________________
178 {
179  // Destructor
180  delete _funcIter;
181  delete _coefIter;
182 
184 }
185 
186 //_____________________________________________________________________________
188 {
189  // Calculate the current value
190 
191  Double_t value(0);
192 
193  // Do running sum of coef/func pairs, calculate lastCoef.
194  RooFIter funcIter = _funcList.fwdIterator();
195  RooFIter coefIter = _coefList.fwdIterator();
196  RooAbsReal *coef;
197  RooAbsReal *func;
198 
199  // N funcs, N-1 coefficients
200  Double_t lastCoef(1);
201  while ((coef = (RooAbsReal *)coefIter.next())) {
202  func = (RooAbsReal *)funcIter.next();
203  Double_t coefVal = coef->getVal();
204  if (coefVal) {
205  cxcoutD(Eval) << "RooRealSumFunc::eval(" << GetName() << ") coefVal = " << coefVal
206  << " funcVal = " << func->IsA()->GetName() << "::" << func->GetName() << " = " << func->getVal()
207  << endl;
208  if (func->isSelectedComp()) {
209  value += func->getVal() * coefVal;
210  }
211  lastCoef -= coef->getVal();
212  }
213  }
214 
215  if (!_haveLastCoef) {
216  // Add last func with correct coefficient
217  func = (RooAbsReal *)funcIter.next();
218  if (func->isSelectedComp()) {
219  value += func->getVal() * lastCoef;
220  }
221 
222  cxcoutD(Eval) << "RooRealSumFunc::eval(" << GetName() << ") lastCoef = " << lastCoef
223  << " funcVal = " << func->getVal() << endl;
224 
225  // Warn about coefficient degeneration
226  if (lastCoef < 0 || lastCoef > 1) {
227  coutW(Eval) << "RooRealSumFunc::evaluate(" << GetName()
228  << " WARNING: sum of FUNC coefficients not in range [0-1], value=" << 1 - lastCoef << endl;
229  }
230  }
231 
232  // Introduce floor if so requested
233  if (value < 0 && (_doFloor || _doFloorGlobal)) {
234  value = 0;
235  }
236 
237  return value;
238 }
239 
240 //_____________________________________________________________________________
242 {
243  // Check if FUNC is valid for given normalization set.
244  // Coeffient and FUNC must be non-overlapping, but func-coefficient
245  // pairs may overlap each other
246  //
247  // In the present implementation, coefficients may not be observables or derive
248  // from observables
249 
250  Bool_t ret(kFALSE);
251 
252  _funcIter->Reset();
253  _coefIter->Reset();
254  RooAbsReal *coef;
255  RooAbsReal *func;
256  while ((coef = (RooAbsReal *)_coefIter->Next())) {
257  func = (RooAbsReal *)_funcIter->Next();
258  if (func->observableOverlaps(nset, *coef)) {
259  coutE(InputArguments) << "RooRealSumFunc::checkObservables(" << GetName() << "): ERROR: coefficient "
260  << coef->GetName() << " and FUNC " << func->GetName()
261  << " have one or more observables in common" << endl;
262  ret = kTRUE;
263  }
264  if (coef->dependsOn(*nset)) {
265  coutE(InputArguments) << "RooRealPdf::checkObservables(" << GetName() << "): ERROR coefficient "
266  << coef->GetName() << " depends on one or more of the following observables";
267  nset->Print("1");
268  ret = kTRUE;
269  }
270  }
271 
272  return ret;
273 }
274 
275 //_____________________________________________________________________________
277  const char *rangeName) const
278 {
279  // cout <<
280  // "RooRealSumFunc::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<",analVars,"<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
281  // << endl;
282  // Advertise that all integrals can be handled internally.
283 
284  // Handle trivial no-integration scenario
285  if (allVars.getSize() == 0)
286  return 0;
287  if (_forceNumInt)
288  return 0;
289 
290  // Select subset of allVars that are actual dependents
291  analVars.add(allVars);
292  RooArgSet *normSet = normSet2 ? getObservables(normSet2) : 0;
293 
294  // Check if this configuration was created before
295  Int_t sterileIdx(-1);
296  CacheElem *cache = (CacheElem *)_normIntMgr.getObj(normSet, &analVars, &sterileIdx, RooNameReg::ptr(rangeName));
297  if (cache) {
298  // cout <<
299  // "RooRealSumFunc("<<this<<")::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<","<<analVars<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
300  // << " -> " << _normIntMgr.lastIndex()+1 << " (cached)" << endl;
301  return _normIntMgr.lastIndex() + 1;
302  }
303 
304  // Create new cache element
305  cache = new CacheElem;
306 
307  // Make list of function projection and normalization integrals
308  _funcIter->Reset();
309  RooAbsReal *func;
310  while ((func = (RooAbsReal *)_funcIter->Next())) {
311  RooAbsReal *funcInt = func->createIntegral(analVars, rangeName);
312  if(funcInt->InheritsFrom(RooRealIntegral::Class())) ((RooRealIntegral*)funcInt)->setAllowComponentSelection(true);
313  cache->_funcIntList.addOwned(*funcInt);
314  if (normSet && normSet->getSize() > 0) {
315  RooAbsReal *funcNorm = func->createIntegral(*normSet);
316  cache->_funcNormList.addOwned(*funcNorm);
317  }
318  }
319 
320  // Store cache element
321  Int_t code = _normIntMgr.setObj(normSet, &analVars, (RooAbsCacheElement *)cache, RooNameReg::ptr(rangeName));
322 
323  if (normSet) {
324  delete normSet;
325  }
326 
327  // cout <<
328  // "RooRealSumFunc("<<this<<")::getAnalyticalIntegralWN:"<<GetName()<<"("<<allVars<<","<<analVars<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
329  // << " -> " << code+1 << endl;
330  return code + 1;
331 }
332 
333 //_____________________________________________________________________________
334 Double_t RooRealSumFunc::analyticalIntegralWN(Int_t code, const RooArgSet *normSet2, const char *rangeName) const
335 {
336  // cout <<
337  // "RooRealSumFunc::analyticalIntegralWN:"<<GetName()<<"("<<code<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
338  // << endl;
339  // Implement analytical integrations by deferring integration of component
340  // functions to integrators of components
341 
342  // Handle trivial passthrough scenario
343  if (code == 0)
344  return getVal(normSet2);
345 
346  // WVE needs adaptation for rangeName feature
347  CacheElem *cache = (CacheElem *)_normIntMgr.getObjByIndex(code - 1);
348  if (cache == 0) { // revive the (sterilized) cache
349  // cout <<
350  // "RooRealSumFunc("<<this<<")::analyticalIntegralWN:"<<GetName()<<"("<<code<<","<<(normSet2?*normSet2:RooArgSet())<<","<<(rangeName?rangeName:"<none>")
351  // << ": reviving cache "<< endl;
352  std::unique_ptr<RooArgSet> vars(getParameters(RooArgSet()));
353  std::unique_ptr<RooArgSet> iset(_normIntMgr.nameSet2ByIndex(code - 1)->select(*vars));
354  std::unique_ptr<RooArgSet> nset(_normIntMgr.nameSet1ByIndex(code - 1)->select(*vars));
356  Int_t code2 = getAnalyticalIntegralWN(*iset, dummy, nset.get(), rangeName);
357  assert(code == code2); // must have revived the right (sterilized) slot...
358  (void)code2;
359  cache = (CacheElem *)_normIntMgr.getObjByIndex(code - 1);
360  assert(cache != 0);
361  }
362 
363  RooFIter funcIntIter = cache->_funcIntList.fwdIterator();
364  RooFIter coefIter = _coefList.fwdIterator();
365  RooFIter funcIter = _funcList.fwdIterator();
366  RooAbsReal *coef(0), *funcInt(0), *func(0);
367  Double_t value(0);
368 
369  // N funcs, N-1 coefficients
370  Double_t lastCoef(1);
371  while ((coef = (RooAbsReal *)coefIter.next())) {
372  funcInt = (RooAbsReal *)funcIntIter.next();
373  func = (RooAbsReal *)funcIter.next();
374  Double_t coefVal = coef->getVal(normSet2);
375  if (coefVal) {
376  assert(func);
377  if (normSet2 == 0 || func->isSelectedComp()) {
378  assert(funcInt);
379  value += funcInt->getVal() * coefVal;
380  }
381  lastCoef -= coef->getVal(normSet2);
382  }
383  }
384 
385  if (!_haveLastCoef) {
386  // Add last func with correct coefficient
387  funcInt = (RooAbsReal *)funcIntIter.next();
388  if (normSet2 == 0 || func->isSelectedComp()) {
389  assert(funcInt);
390  value += funcInt->getVal() * lastCoef;
391  }
392 
393  // Warn about coefficient degeneration
394  if (lastCoef < 0 || lastCoef > 1) {
395  coutW(Eval) << "RooRealSumFunc::evaluate(" << GetName()
396  << " WARNING: sum of FUNC coefficients not in range [0-1], value=" << 1 - lastCoef << endl;
397  }
398  }
399 
400  Double_t normVal(1);
401  if (normSet2 && normSet2->getSize() > 0) {
402  normVal = 0;
403 
404  // N funcs, N-1 coefficients
405  RooAbsReal *funcNorm;
406  RooFIter funcNormIter = cache->_funcNormList.fwdIterator();
407  RooFIter coefIter2 = _coefList.fwdIterator();
408  while ((coef = (RooAbsReal *)coefIter2.next())) {
409  funcNorm = (RooAbsReal *)funcNormIter.next();
410  Double_t coefVal = coef->getVal(normSet2);
411  if (coefVal) {
412  assert(funcNorm);
413  normVal += funcNorm->getVal() * coefVal;
414  }
415  }
416 
417  // Add last func with correct coefficient
418  if (!_haveLastCoef) {
419  funcNorm = (RooAbsReal *)funcNormIter.next();
420  assert(funcNorm);
421  normVal += funcNorm->getVal() * lastCoef;
422  }
423  }
424 
425  return value / normVal;
426 }
427 
428 //_____________________________________________________________________________
429 std::list<Double_t> *RooRealSumFunc::binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
430 {
431  list<Double_t> *sumBinB = 0;
432  Bool_t needClean(kFALSE);
433 
434  RooFIter iter = _funcList.fwdIterator();
435  RooAbsReal *func;
436  // Loop over components pdf
437  while ((func = (RooAbsReal *)iter.next())) {
438 
439  list<Double_t> *funcBinB = func->binBoundaries(obs, xlo, xhi);
440 
441  // Process hint
442  if (funcBinB) {
443  if (!sumBinB) {
444  // If this is the first hint, then just save it
445  sumBinB = funcBinB;
446  } else {
447 
448  list<Double_t> *newSumBinB = new list<Double_t>(sumBinB->size() + funcBinB->size());
449 
450  // Merge hints into temporary array
451  merge(funcBinB->begin(), funcBinB->end(), sumBinB->begin(), sumBinB->end(), newSumBinB->begin());
452 
453  // Copy merged array without duplicates to new sumBinBArrau
454  delete sumBinB;
455  delete funcBinB;
456  sumBinB = newSumBinB;
457  needClean = kTRUE;
458  }
459  }
460  }
461 
462  // Remove consecutive duplicates
463  if (needClean) {
464  list<Double_t>::iterator new_end = unique(sumBinB->begin(), sumBinB->end());
465  sumBinB->erase(new_end, sumBinB->end());
466  }
467 
468  return sumBinB;
469 }
470 
471 //_____________________________________________________________________________B
473 {
474  // If all components that depend on obs are binned that so is the product
475 
476  RooFIter iter = _funcList.fwdIterator();
477  RooAbsReal *func;
478  while ((func = (RooAbsReal *)iter.next())) {
479  if (func->dependsOn(obs) && !func->isBinnedDistribution(obs)) {
480  return kFALSE;
481  }
482  }
483 
484  return kTRUE;
485 }
486 
487 //_____________________________________________________________________________
488 std::list<Double_t> *RooRealSumFunc::plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
489 {
490  list<Double_t> *sumHint = 0;
491  Bool_t needClean(kFALSE);
492 
493  RooFIter iter = _funcList.fwdIterator();
494  RooAbsReal *func;
495  // Loop over components pdf
496  while ((func = (RooAbsReal *)iter.next())) {
497 
498  list<Double_t> *funcHint = func->plotSamplingHint(obs, xlo, xhi);
499 
500  // Process hint
501  if (funcHint) {
502  if (!sumHint) {
503 
504  // If this is the first hint, then just save it
505  sumHint = funcHint;
506 
507  } else {
508 
509  list<Double_t> *newSumHint = new list<Double_t>(sumHint->size() + funcHint->size());
510 
511  // Merge hints into temporary array
512  merge(funcHint->begin(), funcHint->end(), sumHint->begin(), sumHint->end(), newSumHint->begin());
513 
514  // Copy merged array without duplicates to new sumHintArrau
515  delete sumHint;
516  sumHint = newSumHint;
517  needClean = kTRUE;
518  }
519  }
520  }
521 
522  // Remove consecutive duplicates
523  if (needClean) {
524  list<Double_t>::iterator new_end = unique(sumHint->begin(), sumHint->end());
525  sumHint->erase(new_end, sumHint->end());
526  }
527 
528  return sumHint;
529 }
530 
531 //_____________________________________________________________________________
533 {
534  // Label OK'ed components of a RooRealSumFunc with cache-and-track
535  RooFIter siter = funcList().fwdIterator();
536  RooAbsArg *sarg;
537  while ((sarg = siter.next())) {
538  if (sarg->canNodeBeCached() == Always) {
539  trackNodes.add(*sarg);
540  // cout << "tracking node RealSumFunc component " << sarg->IsA()->GetName() << "::" << sarg->GetName() << endl
541  // ;
542  }
543  }
544 }
545 
546 //_____________________________________________________________________________
547 void RooRealSumFunc::printMetaArgs(ostream &os) const
548 {
549  // Customized printing of arguments of a RooRealSumFuncy to more intuitively reflect the contents of the
550  // product operator construction
551 
552  _funcIter->Reset();
553  _coefIter->Reset();
554 
555  Bool_t first(kTRUE);
556 
557  RooAbsArg *coef, *func;
558  if (_coefList.getSize() != 0) {
559  while ((coef = (RooAbsArg *)_coefIter->Next())) {
560  if (!first) {
561  os << " + ";
562  } else {
563  first = kFALSE;
564  }
565  func = (RooAbsArg *)_funcIter->Next();
566  os << coef->GetName() << " * " << func->GetName();
567  }
568  func = (RooAbsArg *)_funcIter->Next();
569  if (func) {
570  os << " + [%] * " << func->GetName();
571  }
572  } else {
573 
574  while ((func = (RooAbsArg *)_funcIter->Next())) {
575  if (!first) {
576  os << " + ";
577  } else {
578  first = kFALSE;
579  }
580  os << func->GetName();
581  }
582  }
583 
584  os << " ";
585 }
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:735
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
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
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:808
void Class()
Definition: Class.C:29
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
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
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:532
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:187
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