#ifndef ROO_EXTEND_PDF
#define ROO_EXTEND_PDF
#include "RooAbsPdf.h"
#include "RooRealProxy.h"
class RooExtendPdf : public RooAbsPdf {
public:
RooExtendPdf() ;
RooExtendPdf(const char *name, const char *title, const RooAbsPdf& pdf,
const RooAbsReal& norm, const char* rangeName=0) ;
RooExtendPdf(const RooExtendPdf& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooExtendPdf(*this,newname) ; }
virtual ~RooExtendPdf() ;
Double_t evaluate() const { return _pdf ; }
Bool_t forceAnalyticalInt(const RooAbsArg& ) const { return kTRUE ; }
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet, const char* rangeName=0) const {
return ((RooAbsPdf&)_pdf.arg()).getAnalyticalIntegralWN(allVars, analVars, normSet, rangeName) ;
}
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const {
return ((RooAbsPdf&)_pdf.arg()).analyticalIntegralWN(code, normSet, rangeName) ;
}
virtual Bool_t selfNormalized() const { return kTRUE ; }
virtual ExtendMode extendMode() const { return CanBeExtended ; }
virtual Double_t expectedEvents(const RooArgSet* nset) const ;
virtual Double_t expectedEvents(const RooArgSet& nset) const { return expectedEvents(&nset) ; }
protected:
RooRealProxy _pdf ;
RooRealProxy _n ;
const TNamed* _rangeName ;
ClassDef(RooExtendPdf,1)
};
#endif