#ifndef ROO_REAL_SUM_PDF
#define ROO_REAL_SUM_PDF
#include "RooAbsPdf.h"
#include "RooListProxy.h"
#include "RooAICRegistry.h"
#include "RooObjCacheManager.h"
class RooRealSumPdf : public RooAbsPdf {
public:
RooRealSumPdf() ;
RooRealSumPdf(const char *name, const char *title);
RooRealSumPdf(const char *name, const char *title, const RooArgList& funcList, const RooArgList& coefList, Bool_t extended=kFALSE) ;
RooRealSumPdf(const char *name, const char *title,
RooAbsReal& func1, RooAbsReal& func2, RooAbsReal& coef1) ;
RooRealSumPdf(const RooRealSumPdf& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooRealSumPdf(*this,newname) ; }
virtual ~RooRealSumPdf() ;
Double_t evaluate() const ;
virtual Bool_t checkObservables(const RooArgSet* nset) const ;
virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; }
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName=0) const ;
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
const RooArgList& funcList() const { return _funcList ; }
const RooArgList& coefList() const { return _coefList ; }
virtual ExtendMode extendMode() const ;
virtual Double_t expectedEvents(const RooArgSet* nset) const ;
virtual Double_t expectedEvents(const RooArgSet& nset) const {
return expectedEvents(&nset) ;
}
void printMetaArgs(ostream& os) const ;
protected:
class CacheElem : public RooAbsCacheElement {
public:
CacheElem() {} ;
virtual ~CacheElem() {} ;
virtual RooArgList containedArgs(Action) { RooArgList ret(_funcIntList) ; ret.add(_funcNormList) ; return ret ; }
RooArgList _funcIntList ;
RooArgList _funcNormList ;
} ;
mutable RooObjCacheManager _normIntMgr ;
Bool_t _haveLastCoef ;
RooListProxy _funcList ;
RooListProxy _coefList ;
TIterator* _funcIter ;
TIterator* _coefIter ;
Bool_t _extended ;
private:
ClassDef(RooRealSumPdf,2)
};
#endif