File indexing completed on 2024-11-15 09:56:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_EXPONENTIAL
0017 #define ROO_EXPONENTIAL
0018
0019 #include <RooAbsPdf.h>
0020 #include <RooRealProxy.h>
0021
0022 class RooExponential : public RooAbsPdf {
0023 public:
0024 RooExponential() {}
0025 RooExponential(const char *name, const char *title, RooAbsReal &variable, RooAbsReal &coefficient,
0026 bool negateCoefficient = false);
0027 RooExponential(const RooExponential &other, const char *name = nullptr);
0028 TObject *clone(const char *newname) const override { return new RooExponential(*this, newname); }
0029
0030 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
0031 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
0032
0033
0034 RooAbsReal const &variable() const { return x.arg(); }
0035
0036
0037 RooAbsReal const &coefficient() const { return c.arg(); }
0038
0039 bool negateCoefficient() const { return _negateCoefficient; }
0040
0041 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0042 std::string buildCallToAnalyticIntegral(Int_t code, const char *rangeName,
0043 RooFit::Detail::CodeSquashContext &ctx) const override;
0044
0045 protected:
0046 RooRealProxy x;
0047 RooRealProxy c;
0048 bool _negateCoefficient = false;
0049
0050 double evaluate() const override;
0051 void computeBatch(double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override;
0052 inline bool canComputeBatchWithCuda() const override { return true; }
0053
0054 private:
0055 ClassDefOverride(RooExponential, 2)
0056 };
0057
0058 #endif