1 #include "../interface/RooSpline1D.h"
6 RooAbsReal(name,title),
7 xvar_(
"xvar",
"Variable", this, xvar),
8 x_(npoints), y_(npoints), type_(algo),
11 for (
unsigned int i = 0;
i < npoints; ++
i) {
18 RooAbsReal(name,title),
19 xvar_(
"xvar",
"Variable", this, xvar),
20 x_(npoints), y_(npoints), type_(algo),
23 for (
unsigned int i = 0;
i < npoints; ++
i) {
43 if (
type_ ==
"CSPLINE")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kCSPLINE);
44 else if (
type_ ==
"LINEAR")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kLINEAR);
45 else if (
type_ ==
"POLYNOMIAL")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kPOLYNOMIAL);
46 else if (
type_ ==
"CSPLINE_PERIODIC")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kCSPLINE_PERIODIC);
47 else if (
type_ ==
"AKIMA")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kAKIMA);
48 else if (
type_ ==
"AKIMA_PERIODIC")
interp_ =
new ROOT::Math::Interpolator(
x_,
y_, ROOT::Math::Interpolation::kAKIMA_PERIODIC);
49 else throw std::invalid_argument(
"Unknown interpolation type '"+
type_+
"'");
Double_t evaluate() const
TObject * clone(const char *newname) const
ROOT::Math::Interpolator * interp_
void init() const
not to be serialized