ROOT  6.06/09
Reference Guide
RooAddition.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooAddition.h,v 1.3 2007/05/11 09:11:30 verkerke 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_ADDITION
17 #define ROO_ADDITION
18 
19 #include "RooAbsReal.h"
20 #include "RooListProxy.h"
21 #include "RooObjCacheManager.h"
22 
23 class RooRealVar;
24 class RooArgList ;
25 
26 class RooAddition : public RooAbsReal {
27 public:
28 
29  RooAddition() ;
30  RooAddition(const char *name, const char *title, const RooArgList& sumSet, Bool_t takeOwnerShip=kFALSE) ;
31  RooAddition(const char *name, const char *title, const RooArgList& sumSet1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ;
32  virtual ~RooAddition() ;
33 
34  RooAddition(const RooAddition& other, const char* name = 0);
35  virtual TObject* clone(const char* newname) const { return new RooAddition(*this, newname); }
36 
37  virtual Double_t defaultErrorLevel() const ;
38 
39  void printMetaArgs(std::ostream& os) const ;
40 
41  const RooArgList& list1() const { return _set ; }
42  const RooArgList& list() const { return _set ; }
43 
44  virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const {
45  // Force RooRealIntegral to offer all observables for internal integration
46  return kTRUE ;
47  }
48  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& numVars, const char* rangeName=0) const;
49  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
50 
51  Bool_t setData(RooAbsData& data, Bool_t cloneData=kTRUE) ;
52 
53  virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
54  virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
55  Bool_t isBinnedDistribution(const RooArgSet& obs) const ;
56 
57  virtual void enableOffsetting(Bool_t) ;
58 
59 protected:
60 
61  RooArgList _ownedList ; // List of owned components
62  RooListProxy _set ; // set of terms to be summed
63  mutable TIterator* _setIter ; //! Iterator over set
64 
65  class CacheElem : public RooAbsCacheElement {
66  public:
67  virtual ~CacheElem();
68  // Payload
71  };
72  mutable RooObjCacheManager _cacheMgr ; // The cache manager
73 
74  Double_t evaluate() const;
75 
76  ClassDef(RooAddition,2) // Sum of RooAbsReal objects
77 };
78 
79 #endif
virtual Double_t defaultErrorLevel() const
Return the default error level for MINUIT error analysis If the addition contains one or more RooNLLV...
TIterator * _setIter
Definition: RooAddition.h:63
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Bool_t isBinnedDistribution(const RooArgSet &obs) const
void printMetaArgs(std::ostream &os) const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &numVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
virtual RooArgList containedArgs(Action)
Return list of all RooAbsArgs in cache element.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Iterator abstract base class.
Definition: TIterator.h:32
const RooArgList & list1() const
Definition: RooAddition.h:41
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooAddition.h:44
virtual TObject * clone(const char *newname) const
Definition: RooAddition.h:35
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Calculate integral internally from appropriate integral cache.
RooArgList _ownedList
Definition: RooAddition.h:61
Bool_t setData(RooAbsData &data, Bool_t cloneData=kTRUE)
RooListProxy _set
Definition: RooAddition.h:62
Iterator over set.
Definition: RooAddition.h:65
Double_t evaluate() const
Calculate and return current value of self.
RooObjCacheManager _cacheMgr
Definition: RooAddition.h:72
virtual void enableOffsetting(Bool_t)
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
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
const RooArgList & list() const
Definition: RooAddition.h:42
virtual ~RooAddition()
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
const Bool_t kTRUE
Definition: Rtypes.h:91