File indexing completed on 2025-01-18 10:11:27
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 protected:
0041 double evaluate() const override;
0042
0043 private:
0044 std::unique_ptr<TSpline> _spline;
0045 RooRealProxy _x;
0046 bool _logx = false;
0047 bool _logy = false;
0048
0049 ClassDefOverride(RooSpline, 1);
0050 };
0051 #endif