16 #ifndef ROO_NUM_CONV_PDF
17 #define ROO_NUM_CONV_PDF
26 class RooNumConvPdf :
public RooAbsPdf {
31 RooNumConvPdf(
const char *name,
const char *title,
32 RooRealVar& convVar, RooAbsPdf& pdf, RooAbsPdf& resmodel) ;
34 RooNumConvPdf(
const RooNumConvPdf& other,
const char* name=0) ;
36 virtual TObject* clone(
const char* newname)
const {
return new RooNumConvPdf(*
this,newname) ; }
37 virtual ~RooNumConvPdf() ;
39 virtual Double_t evaluate()
const ;
42 inline RooNumIntConfig& convIntConfig() {
return conv().convIntConfig() ; }
43 inline void clearConvolutionWindow() { conv().clearConvolutionWindow() ; }
44 inline void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, Double_t widthScaleFactor=1)
45 { conv().setConvolutionWindow(centerParam,widthParam,widthScaleFactor) ; }
46 inline void setCallWarning(Int_t threshold=2000) { conv().setCallWarning(threshold) ; }
47 inline void setCallProfiling(Bool_t flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000)
48 { conv().setCallProfiling(flag,nbinX,nbinCall,nCallHigh) ; }
49 inline const TH2* profileData()
const {
return conv().profileData() ; }
52 RooRealVar& var()
const {
return (RooRealVar&)(
const_cast<RooAbsReal&
>(_origVar.arg())) ; }
53 RooAbsReal& pdf()
const {
return const_cast<RooAbsReal&
>(_origPdf.arg()) ; }
54 RooAbsReal& model()
const {
return const_cast<RooAbsReal&
>(_origModel.arg()) ; }
56 void printMetaArgs(std::ostream& os)
const ;
63 RooNumConvolution& conv()
const {
if (!_init) initialize() ;
return *_conv ; }
65 mutable Bool_t _init ;
66 void initialize()
const ;
67 mutable RooNumConvolution* _conv ;
69 RooRealProxy _origVar ;
70 RooRealProxy _origPdf ;
71 RooRealProxy _origModel ;
73 virtual RooAbsGenContext* genContext(
const RooArgSet &vars,
const RooDataSet *prototype=0,
74 const RooArgSet* auxProto=0, Bool_t verbose= kFALSE)
const ;
76 friend class RooConvGenContext ;
78 ClassDef(RooNumConvPdf,1)