File indexing completed on 2025-01-18 10:11:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_GAUSSIAN
0017 #define ROO_GAUSSIAN
0018
0019 #include "RooAbsPdf.h"
0020 #include "RooRealProxy.h"
0021
0022 class RooAbsReal;
0023
0024 class RooGaussian : public RooAbsPdf {
0025 public:
0026 RooGaussian() { };
0027
0028 inline RooGaussian(const char *name, const char *title,
0029 RooAbsReal& _x, RooAbsReal& _mean, RooAbsReal& _sigma)
0030 : RooGaussian{name, title, RooAbsReal::Ref{_x}, RooAbsReal::Ref{_mean}, RooAbsReal::Ref{_sigma}} {}
0031 RooGaussian(const char *name, const char *title,
0032 RooAbsReal::Ref _x, RooAbsReal::Ref _mean, RooAbsReal::Ref _sigma);
0033 RooGaussian(const RooGaussian& other, const char* name=nullptr);
0034 TObject* clone(const char* newname) const override {
0035 return new RooGaussian(*this,newname);
0036 }
0037
0038 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override;
0039 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override;
0040
0041 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0042 void generateEvent(Int_t code) override;
0043
0044
0045 RooAbsReal const& getX() const { return x.arg(); }
0046
0047
0048 RooAbsReal const& getMean() const { return mean.arg(); }
0049
0050
0051 RooAbsReal const& getSigma() const { return sigma.arg(); }
0052
0053 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0054 std::string
0055 buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override;
0056
0057 protected:
0058
0059 RooRealProxy x ;
0060 RooRealProxy mean ;
0061 RooRealProxy sigma ;
0062
0063 double evaluate() const override;
0064 void doEval(RooFit::EvalContext &) const override;
0065 inline bool canComputeBatchWithCuda() const override { return true; }
0066
0067 private:
0068
0069 ClassDefOverride(RooGaussian,1)
0070 };
0071
0072 #endif