File indexing completed on 2025-01-18 10:11:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef RooFit_RooPowerSum_h
0012 #define RooFit_RooPowerSum_h
0013
0014 #include <RooAbsPdf.h>
0015 #include <RooRealProxy.h>
0016 #include <RooListProxy.h>
0017
0018 #include <vector>
0019
0020 class RooPowerSum : public RooAbsPdf {
0021 public:
0022 RooPowerSum() {}
0023 RooPowerSum(const char *name, const char *title, RooAbsReal &x, const RooArgList &coefList, const RooArgList &expList);
0024
0025 RooPowerSum(const RooPowerSum &other, const char *name = nullptr);
0026 TObject *clone(const char *newname) const override { return new RooPowerSum(*this, newname); }
0027
0028
0029 RooAbsReal const &base() const { return *_x; }
0030
0031
0032 RooArgList const &coefList() const { return _coefList; }
0033
0034
0035 RooArgList const &expList() const { return _expList; }
0036
0037 std::string getFormulaExpression(bool expand) const;
0038
0039 int getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
0040 double analyticalIntegral(int code, const char *rangeName = nullptr) const override;
0041
0042 protected:
0043 RooRealProxy _x;
0044 RooListProxy _coefList;
0045 RooListProxy _expList;
0046
0047 mutable std::vector<double> _wksp;
0048
0049
0050 void doEval(RooFit::EvalContext &) const override;
0051 inline bool canComputeBatchWithCuda() const override { return true; }
0052
0053
0054 double evaluate() const override;
0055
0056 ClassDefOverride(RooPowerSum, 1)
0057 };
0058
0059 #endif