00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ROO_REAL_SUM_PDF
00017 #define ROO_REAL_SUM_PDF
00018
00019 #include "RooAbsPdf.h"
00020 #include "RooListProxy.h"
00021 #include "RooAICRegistry.h"
00022 #include "RooObjCacheManager.h"
00023
00024 class RooRealSumPdf : public RooAbsPdf {
00025 public:
00026
00027 RooRealSumPdf() ;
00028 RooRealSumPdf(const char *name, const char *title);
00029 RooRealSumPdf(const char *name, const char *title, const RooArgList& funcList, const RooArgList& coefList, Bool_t extended=kFALSE) ;
00030 RooRealSumPdf(const char *name, const char *title,
00031 RooAbsReal& func1, RooAbsReal& func2, RooAbsReal& coef1) ;
00032 RooRealSumPdf(const RooRealSumPdf& other, const char* name=0) ;
00033 virtual TObject* clone(const char* newname) const { return new RooRealSumPdf(*this,newname) ; }
00034 virtual ~RooRealSumPdf() ;
00035
00036 Double_t evaluate() const ;
00037 virtual Bool_t checkObservables(const RooArgSet* nset) const ;
00038
00039 virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; }
00040 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName=0) const ;
00041 Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
00042
00043 const RooArgList& funcList() const { return _funcList ; }
00044 const RooArgList& coefList() const { return _coefList ; }
00045
00046 virtual ExtendMode extendMode() const ;
00047
00048 virtual Double_t expectedEvents(const RooArgSet* nset) const ;
00049 virtual Double_t expectedEvents(const RooArgSet& nset) const {
00050
00051
00052 return expectedEvents(&nset) ;
00053 }
00054
00055 void printMetaArgs(ostream& os) const ;
00056
00057 protected:
00058
00059 class CacheElem : public RooAbsCacheElement {
00060 public:
00061 CacheElem() {} ;
00062 virtual ~CacheElem() {} ;
00063 virtual RooArgList containedArgs(Action) { RooArgList ret(_funcIntList) ; ret.add(_funcNormList) ; return ret ; }
00064 RooArgList _funcIntList ;
00065 RooArgList _funcNormList ;
00066 } ;
00067 mutable RooObjCacheManager _normIntMgr ;
00068
00069 Bool_t _haveLastCoef ;
00070
00071 RooListProxy _funcList ;
00072 RooListProxy _coefList ;
00073 TIterator* _funcIter ;
00074 TIterator* _coefIter ;
00075 Bool_t _extended ;
00076
00077 private:
00078
00079 ClassDef(RooRealSumPdf,2)
00080 };
00081
00082 #endif