Warning, file /include/root/RooPolynomial.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_POLYNOMIAL
0017 #define ROO_POLYNOMIAL
0018
0019 #include <RooAbsPdf.h>
0020 #include <RooRealProxy.h>
0021 #include <RooListProxy.h>
0022
0023 #include <vector>
0024
0025 class RooPolynomial : public RooAbsPdf {
0026 public:
0027 RooPolynomial() {}
0028 RooPolynomial(const char *name, const char *title, RooAbsReal &x);
0029 RooPolynomial(const char *name, const char *title, RooAbsReal &_x, const RooArgList &_coefList,
0030 Int_t lowestOrder = 1);
0031
0032 RooPolynomial(const RooPolynomial &other, const char *name = nullptr);
0033 TObject *clone(const char *newname) const override { return new RooPolynomial(*this, newname); }
0034
0035 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
0036 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
0037
0038
0039 RooAbsReal const &x() const { return _x.arg(); }
0040
0041
0042 RooArgList const &coefList() const { return _coefList; }
0043
0044
0045 int lowestOrder() const { return _lowestOrder; }
0046
0047
0048
0049 bool isReducerNode() const override { return _coefList.empty(); }
0050
0051 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0052 std::string buildCallToAnalyticIntegral(Int_t code, const char *rangeName,
0053 RooFit::Detail::CodeSquashContext &ctx) const override;
0054
0055 protected:
0056 RooRealProxy _x;
0057 RooListProxy _coefList;
0058 Int_t _lowestOrder = 1;
0059
0060 mutable std::vector<double> _wksp;
0061
0062
0063 double evaluate() const override;
0064 void doEval(RooFit::EvalContext &) const override;
0065
0066
0067 inline bool canComputeBatchWithCuda() const override { return !_coefList.empty(); }
0068
0069 private:
0070 ClassDefOverride(RooPolynomial, 1);
0071 };
0072
0073 #endif