#ifndef ROO_ADDITION
#define ROO_ADDITION
#include "RooAbsReal.h"
#include "RooListProxy.h"
#include "RooObjCacheManager.h"
class RooRealVar;
class RooArgList ;
class RooAddition : public RooAbsReal {
public:
RooAddition() ;
RooAddition(const char *name, const char *title, const RooArgList& sumSet, Bool_t takeOwnerShip=kFALSE) ;
RooAddition(const char *name, const char *title, const RooArgList& sumSet1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ;
virtual ~RooAddition() ;
RooAddition(const RooAddition& other, const char* name = 0);
virtual TObject* clone(const char* newname) const { return new RooAddition(*this, newname); }
virtual Double_t defaultErrorLevel() const ;
void printMetaArgs(std::ostream& os) const ;
const RooArgList& list1() const { return _set ; }
const RooArgList& list() const { return _set ; }
virtual Bool_t forceAnalyticalInt(const RooAbsArg& ) const {
return kTRUE ;
}
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& numVars, const char* rangeName=0) const;
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
Bool_t setData(RooAbsData& data, Bool_t cloneData=kTRUE) ;
virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& , Double_t , Double_t ) const ;
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& , Double_t , Double_t ) const ;
Bool_t isBinnedDistribution(const RooArgSet& obs) const ;
virtual void enableOffsetting(Bool_t) ;
protected:
RooArgList _ownedList ;
RooListProxy _set ;
mutable TIterator* _setIter ;
class CacheElem : public RooAbsCacheElement {
public:
virtual ~CacheElem();
RooArgList _I ;
virtual RooArgList containedArgs(Action) ;
};
mutable RooObjCacheManager _cacheMgr ;
Double_t evaluate() const;
ClassDef(RooAddition,2)
};
#endif