Warning, file /include/root/RooNumConvPdf.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_CONV_PDF
0017 #define ROO_NUM_CONV_PDF
0018
0019 #include "RooAbsPdf.h"
0020 #include "RooNumConvolution.h"
0021
0022 class TH2 ;
0023 class RooArgSet ;
0024 class RooDataSet ;
0025
0026 class RooNumConvPdf : public RooAbsPdf {
0027 public:
0028
0029 RooNumConvPdf() ;
0030
0031 RooNumConvPdf(const char *name, const char *title,
0032 RooRealVar& convVar, RooAbsPdf& pdf, RooAbsPdf& resmodel) ;
0033
0034 RooNumConvPdf(const RooNumConvPdf& other, const char* name=nullptr) ;
0035
0036 TObject* clone(const char* newname) const override { return new RooNumConvPdf(*this,newname) ; }
0037 ~RooNumConvPdf() override ;
0038
0039 double evaluate() const override ;
0040
0041
0042 inline RooNumIntConfig& convIntConfig() { return conv().convIntConfig() ; }
0043 inline void clearConvolutionWindow() { conv().clearConvolutionWindow() ; }
0044 inline void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, double widthScaleFactor=1)
0045 { conv().setConvolutionWindow(centerParam,widthParam,widthScaleFactor) ; }
0046 inline void setCallWarning(Int_t threshold=2000) { conv().setCallWarning(threshold) ; }
0047 inline void setCallProfiling(bool flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000)
0048 { conv().setCallProfiling(flag,nbinX,nbinCall,nCallHigh) ; }
0049 inline const TH2* profileData() const { return conv().profileData() ; }
0050
0051
0052 RooRealVar& var() const { return (RooRealVar&)(const_cast<RooAbsReal&>(_origVar.arg())) ; }
0053 RooAbsReal& pdf() const { return const_cast<RooAbsReal&>(_origPdf.arg()) ; }
0054 RooAbsReal& model() const { return const_cast<RooAbsReal&>(_origModel.arg()) ; }
0055
0056 void printMetaArgs(std::ostream& os) const override ;
0057
0058 protected:
0059
0060
0061
0062
0063 RooNumConvolution& conv() const { if (!_init) initialize() ; return *_conv ; }
0064
0065 mutable bool _init = false;
0066 void initialize() const ;
0067 mutable std::unique_ptr<RooNumConvolution> _conv ;
0068
0069 RooRealProxy _origVar ;
0070 RooRealProxy _origPdf ;
0071 RooRealProxy _origModel ;
0072
0073 RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr,
0074 const RooArgSet* auxProto=nullptr, bool verbose= false) const override ;
0075
0076 friend class RooConvGenContext ;
0077
0078 ClassDefOverride(RooNumConvPdf,1)
0079 };
0080
0081 #endif