16 #ifndef ROO_NUM_CONVOLUTION
17 #define ROO_NUM_CONVOLUTION
25 class RooConvIntegrandBinding ;
26 class RooAbsIntegrator ;
29 class RooNumConvolution :
public RooAbsReal {
34 RooNumConvolution(
const char *name,
const char *title,
35 RooRealVar& convVar, RooAbsReal& pdf, RooAbsReal& resmodel,
const RooNumConvolution* proto=0) ;
37 RooNumConvolution(
const RooNumConvolution& other,
const char* name=0) ;
39 virtual TObject* clone(
const char* newname)
const {
return new RooNumConvolution(*
this,newname) ; }
40 virtual ~RooNumConvolution() ;
42 Double_t evaluate()
const ;
44 RooNumIntConfig& convIntConfig() { _init = kFALSE ;
return _convIntConfig ; }
45 const RooNumIntConfig& convIntConfig()
const { _init = kFALSE ;
return _convIntConfig ; }
47 void clearConvolutionWindow() ;
48 void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, Double_t widthScaleFactor=1) ;
50 void setCallWarning(Int_t threshold=2000) ;
51 void setCallProfiling(Bool_t flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000) ;
52 const TH2* profileData()
const {
return _doProf ? _callHist : 0 ; }
55 RooRealVar& var()
const {
return (RooRealVar&) _origVar.arg() ; }
56 RooAbsReal& pdf()
const {
return (RooAbsReal&) _origPdf.arg() ; }
57 RooAbsReal& model()
const {
return (RooAbsReal&) _origModel.arg() ; }
61 friend class RooNumConvPdf ;
63 mutable Bool_t _init ;
64 void initialize()
const ;
65 Bool_t redirectServersHook(
const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
67 virtual void printCompactTreeHook(std::ostream& os,
const char* indent=
"") ;
69 RooNumIntConfig _convIntConfig ;
70 mutable RooConvIntegrandBinding* _integrand ;
71 mutable RooAbsIntegrator* _integrator ;
73 RooRealProxy _origVar ;
74 RooRealProxy _origPdf ;
75 RooRealProxy _origModel ;
77 mutable RooArgSet _ownedClonedPdfSet ;
78 mutable RooArgSet _ownedClonedModelSet ;
80 mutable RooAbsReal* _cloneVar ;
81 mutable RooAbsReal* _clonePdf ;
82 mutable RooAbsReal* _cloneModel ;
84 friend class RooConvGenContext ;
85 RooRealVar& cloneVar()
const {
if (!_init) initialize() ;
return (RooRealVar&) *_cloneVar ; }
86 RooAbsReal& clonePdf()
const {
if (!_init) initialize() ;
return (RooAbsReal&) *_clonePdf ; }
87 RooAbsReal& cloneModel()
const {
if (!_init) initialize() ;
return (RooAbsReal&) *_cloneModel ; }
90 Double_t _windowScale ;
91 RooListProxy _windowParam ;
93 Int_t _verboseThresh ;
97 ClassDef(RooNumConvolution,1)