Warning, file /include/root/RooNumConvolution.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_NUM_CONVOLUTION
0017 #define ROO_NUM_CONVOLUTION
0018
0019 #include "RooAbsPdf.h"
0020 #include "RooRealProxy.h"
0021 #include "RooSetProxy.h"
0022 #include "RooListProxy.h"
0023 #include "RooNumIntConfig.h"
0024
0025 class RooConvIntegrandBinding ;
0026 class RooAbsIntegrator ;
0027 class TH2 ;
0028
0029 class RooNumConvolution : public RooAbsReal {
0030 public:
0031
0032 RooNumConvolution() ;
0033
0034 RooNumConvolution(const char *name, const char *title,
0035 RooRealVar& convVar, RooAbsReal& pdf, RooAbsReal& resmodel, const RooNumConvolution* proto=nullptr) ;
0036
0037 RooNumConvolution(const RooNumConvolution& other, const char* name=nullptr) ;
0038
0039 TObject* clone(const char* newname) const override { return new RooNumConvolution(*this,newname) ; }
0040 ~RooNumConvolution() override ;
0041
0042 double evaluate() const override ;
0043
0044 RooNumIntConfig& convIntConfig() { _init = false ; return _convIntConfig ; }
0045 const RooNumIntConfig& convIntConfig() const { _init = false ; return _convIntConfig ; }
0046
0047 void clearConvolutionWindow() ;
0048 void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, double widthScaleFactor=1) ;
0049
0050 void setCallWarning(Int_t threshold=2000) ;
0051 void setCallProfiling(bool flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000) ;
0052 const TH2* profileData() const { return _doProf ? _callHist : nullptr ; }
0053
0054
0055 RooRealVar& var() const { return (RooRealVar&) _origVar.arg() ; }
0056 RooAbsReal& pdf() const { return (RooAbsReal&) _origPdf.arg() ; }
0057 RooAbsReal& model() const { return (RooAbsReal&) _origModel.arg() ; }
0058
0059 protected:
0060
0061 friend class RooNumConvPdf ;
0062
0063 mutable bool _init ;
0064 void initialize() const ;
0065 bool redirectServersHook(const RooAbsCollection& newServerList, bool mustReplaceAll, bool nameChange, bool isRecursive) override ;
0066
0067 void printCompactTreeHook(std::ostream& os, const char* indent="") override ;
0068
0069 RooNumIntConfig _convIntConfig ;
0070 mutable RooConvIntegrandBinding* _integrand ;
0071 mutable std::unique_ptr<RooAbsIntegrator> _integrator ;
0072
0073 RooRealProxy _origVar ;
0074 RooRealProxy _origPdf ;
0075 RooRealProxy _origModel ;
0076
0077 mutable RooArgSet _ownedClonedPdfSet ;
0078 mutable RooArgSet _ownedClonedModelSet ;
0079
0080 mutable RooAbsReal* _cloneVar ;
0081 mutable RooAbsReal* _clonePdf ;
0082 mutable RooAbsReal* _cloneModel ;
0083
0084 friend class RooConvGenContext ;
0085 RooRealVar& cloneVar() const { if (!_init) initialize() ; return (RooRealVar&) *_cloneVar ; }
0086 RooAbsReal& clonePdf() const { if (!_init) initialize() ; return (RooAbsReal&) *_clonePdf ; }
0087 RooAbsReal& cloneModel() const { if (!_init) initialize() ; return (RooAbsReal&) *_cloneModel ; }
0088
0089 bool _useWindow ;
0090 double _windowScale ;
0091 RooListProxy _windowParam ;
0092
0093 Int_t _verboseThresh ;
0094 bool _doProf ;
0095 TH2* _callHist ;
0096
0097 ClassDefOverride(RooNumConvolution,1)
0098 };
0099
0100 #endif