40 TSpline() : fDelta(-1), fXmin(0), fXmax(0),
41 fNp(0), fKstep(
kFALSE), fHistogram(0), fGraph(0), fNpx(100) {}
45 fDelta(delta), fXmin(xmin),
46 fXmax(xmax), fNp(np), fKstep(step),
47 fHistogram(0), fGraph(0), fNpx(100) {}
114 fB(0), fC(0), fD(0) {}
125 return (
fY+dx*(fB+dx*(fC+dx*fD)));
129 return (fB+dx*(2*fC+3*fD*dx));
157 fB(0), fC(0), fD(0), fE(0), fF(0) {}
160 TSplinePoly(x,y), fB(b), fC(c), fD(d), fE(e), fF(f) {}
171 return (
fY+dx*(fB+dx*(fC+dx*(fD+dx*(fE+dx*fF)))));
175 return (fB+dx*(2*fC+dx*(3*fD+dx*(4*fE+dx*(5*fF)))));
186 TSplinePoly(other), fB(0), fC(0), fD(0), fE(0), fF(0)
207 fBegCond(-1), fEndCond(-1) {}
223 const TGraph *
g,
const char *opt=0,
235 b=fPoly[i].
B();c=fPoly[i].
C();d=fPoly[i].
D();}
237 {x=fPoly[i].
X(); y=fPoly[i].
Y();}
256 const char *&cb1,
const char *&ce1,
const char *&cb2,
259 const char *cb1,
const char *ce1,
const char *cb2,
296 {x=fPoly[i].
X();y=fPoly[i].
Y();b=fPoly[i].
B();
297 c=fPoly[i].
C();d=fPoly[i].
D();
298 e=fPoly[i].
E();f=fPoly[i].
F();}
300 {x=fPoly[i].
X(); y=fPoly[i].
Y();}
virtual Double_t GetXmax() const
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
set point number i.
TSplinePoly3(Double_t x, Double_t y, Double_t b, Double_t c, Double_t d)
virtual void SaveAs(const char *, Option_t *) const
Save this object in the file specified by filename.
void GetKnot(Double_t &x, Double_t &y) const
TSplinePoly3 & operator=(TSplinePoly3 const &other)
assignment operator
TSplinePoly & operator=(TSplinePoly const &other)
assignment operator
static void Test()
Test method for TSpline5.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TSplinePoly(Double_t x, Double_t y)
virtual Int_t GetNpx() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a spline.
Double_t Eval(Double_t x) const
void BoundaryConditions(const char *opt, Int_t &beg, Int_t &end, const char *&cb1, const char *&ce1, const char *&cb2, const char *&ce2)
Check the boundary conditions and the amount of extra double knots needed.
Base class for spline implementation containing the Draw/Paint methods //.
Double_t Eval(Double_t x) const
Eval this spline at x.
Double_t Derivative(Double_t x) const
void CopyPoly(TSplinePoly3 const &other)
utility called by the copy constructors and = operator
static const char * filename()
virtual Double_t GetDelta() const
1-D histogram with a float per channel (see TH1 documentation)}
Int_t FindX(Double_t x) const
Find X.
TH1F * GetHistogram() const
static void Test()
Test method for TSpline5.
TSplinePoly5(Double_t x, Double_t y, Double_t b, Double_t c, Double_t d, Double_t e, Double_t f)
Fill Area Attributes class.
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
void GetKnot(Int_t i, Double_t &x, Double_t &y) const
Double_t Eval(Double_t x) const
Eval this spline at x.
void CopyPoly(TSplinePoly const &other)
utility called by the copy constructors and = operator
TSpline & operator=(const TSpline &)
assignment operator
virtual Double_t Eval(Double_t) const
TSpline5 & operator=(const TSpline5 &)
assignment operator
TSplinePoly5 & operator=(TSplinePoly5 const &other)
assignment operator
Double_t Derivative(Double_t x) const
Derivative.
Double_t Derivative(Double_t x) const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Int_t FindX(Double_t x) const
Find X.
virtual Double_t GetXmin() const
void SetCond(const char *opt)
Check the boundary conditions.
virtual void SetPointCoeff(Int_t i, Double_t b, Double_t c, Double_t d)
set point coefficient number i
virtual Double_t Eval(Double_t x) const =0
void BuildCoeff()
subroutine cubspl ( tau, c, n, ibcbeg, ibcend ) from * a practical guide to splines * by c...
TSpline3 & operator=(const TSpline3 &)
assignment operator
void SetBoundaries(Double_t b1, Double_t e1, Double_t b2, Double_t e2, const char *cb1, const char *ce1, const char *cb2, const char *ce2)
Set the boundary conditions at double/triple knots.
virtual void GetKnot(Int_t i, Double_t &x, Double_t &y) const =0
virtual ~TSpline()
destructor
TSpline(const char *title, Double_t delta, Double_t xmin, Double_t xmax, Int_t np, Bool_t step)
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
set point number i.
virtual void SaveAs(const char *filename, Option_t *option="") const
write this spline as a C++ function that can be executed without ROOT the name of the function is the...
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
Double_t Eval(Double_t x) const
double func(double *x, double *p)
virtual void SetPointCoeff(Int_t i, Double_t b, Double_t c, Double_t d, Double_t e, Double_t f)
set point coefficient number i
Mother of all ROOT objects.
void GetCoeff(Int_t i, Double_t &x, Double_t &y, Double_t &b, Double_t &c, Double_t &d, Double_t &e, Double_t &f)
void GetCoeff(Int_t i, Double_t &x, Double_t &y, Double_t &b, Double_t &c, Double_t &d)
void BuildCoeff()
algorithm 600, collected algorithms from acm.
A Graph is a graphics object made of two arrays X and Y with npoints each.
void GetKnot(Int_t i, Double_t &x, Double_t &y) const
virtual void Paint(Option_t *option="")
Paint this function with its current attributes.
virtual void SaveAs(const char *filename, Option_t *option="") const
write this spline as a C++ function that can be executed without ROOT the name of the function is the...
void CopyPoly(TSplinePoly5 const &other)
utility called by the copy constructors and = operator
virtual Int_t GetNp() const
Double_t Derivative(Double_t x) const
Derivative.
virtual void BuildCoeff()=0