Warning, file /include/root/RooSpline.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 #ifndef RooFit_RooSpline_h
0014 #define RooFit_RooSpline_h
0015
0016 #include <RooAbsReal.h>
0017 #include <RooRealProxy.h>
0018
0019 #include <TSpline.h>
0020
0021 #include <ROOT/RSpan.hxx>
0022
0023 #include <vector>
0024
0025 class TGraph;
0026
0027 class RooSpline : public RooAbsReal {
0028 public:
0029 RooSpline() = default;
0030 RooSpline(const char *name, const char *title, RooAbsReal &x, std::span<const double> x0, std::span<const double> y0,
0031 int order = 3, bool logx = false, bool logy = false);
0032 RooSpline(const char *name, const char *title, RooAbsReal &x, const TGraph &gr, int order = 3, bool logx = false,
0033 bool logy = false);
0034 RooSpline(const RooSpline &other, const char *name = nullptr);
0035
0036
0037
0038 TObject *clone(const char *newname) const override { return new RooSpline(*this, newname); }
0039
0040 RooAbsReal const &x() const { return static_cast<RooAbsReal const &>(*_x.absArg()); }
0041 int order() const;
0042 TSpline const &spline() const { return *_spline; }
0043 bool logx() const { return _logx; }
0044 bool logy() const { return _logy; }
0045
0046 protected:
0047 double evaluate() const override;
0048
0049 private:
0050 std::unique_ptr<TSpline> _spline;
0051 RooRealProxy _x;
0052 bool _logx = false;
0053 bool _logy = false;
0054
0055 ClassDefOverride(RooSpline, 1);
0056 };
0057 #endif