00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ROO_NUM_CONV_PDF
00017 #define ROO_NUM_CONV_PDF
00018
00019 #include "RooAbsPdf.h"
00020 #include "RooNumConvolution.h"
00021
00022 class TH2 ;
00023 class RooArgSet ;
00024 class RooDataSet ;
00025
00026 class RooNumConvPdf : public RooAbsPdf {
00027 public:
00028
00029 RooNumConvPdf() ;
00030
00031 RooNumConvPdf(const char *name, const char *title,
00032 RooRealVar& convVar, RooAbsPdf& pdf, RooAbsPdf& resmodel) ;
00033
00034 RooNumConvPdf(const RooNumConvPdf& other, const char* name=0) ;
00035
00036 virtual TObject* clone(const char* newname) const { return new RooNumConvPdf(*this,newname) ; }
00037 virtual ~RooNumConvPdf() ;
00038
00039 virtual Double_t evaluate() const ;
00040
00041
00042 inline RooNumIntConfig& convIntConfig() { return conv().convIntConfig() ; }
00043 inline void clearConvolutionWindow() { conv().clearConvolutionWindow() ; }
00044 inline void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, Double_t widthScaleFactor=1)
00045 { conv().setConvolutionWindow(centerParam,widthParam,widthScaleFactor) ; }
00046 inline void setCallWarning(Int_t threshold=2000) { conv().setCallWarning(threshold) ; }
00047 inline void setCallProfiling(Bool_t flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000)
00048 { conv().setCallProfiling(flag,nbinX,nbinCall,nCallHigh) ; }
00049 inline const TH2* profileData() const { return conv().profileData() ; }
00050
00051
00052 RooRealVar& var() const { return (RooRealVar&)(const_cast<RooAbsReal&>(_origVar.arg())) ; }
00053 RooAbsReal& pdf() const { return const_cast<RooAbsReal&>(_origPdf.arg()) ; }
00054 RooAbsReal& model() const { return const_cast<RooAbsReal&>(_origModel.arg()) ; }
00055
00056 void printMetaArgs(ostream& os) const ;
00057
00058 protected:
00059
00060
00061
00062
00063 RooNumConvolution& conv() const { if (!_init) initialize() ; return *_conv ; }
00064
00065 mutable Bool_t _init ;
00066 void initialize() const ;
00067 mutable RooNumConvolution* _conv ;
00068
00069 RooRealProxy _origVar ;
00070 RooRealProxy _origPdf ;
00071 RooRealProxy _origModel ;
00072
00073 virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=0,
00074 const RooArgSet* auxProto=0, Bool_t verbose= kFALSE) const ;
00075
00076 friend class RooConvGenContext ;
00077
00078 ClassDef(RooNumConvPdf,1)
00079 };
00080
00081 #endif