//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // BiCubic spline on 2 B-Spline bases // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Felix Boehmer TUM (original author) // // //----------------------------------------------------------- #ifndef BICUBSPLINE_HH #define BICUBSPLINE_HH // Base Class Headers ---------------- // Collaborating Class Headers ------- #include "BSpline.h" #include #include "TObject.h" #include "TMatrixT.h" #include "TClonesArray.h" // Collaborating Class Declarations -- class TF2; class SplineTF2Interface; class BiCubSpline : public TObject { friend class BiCubSplineFitter; public: // Constructors/Destructors --------- BiCubSpline(); BiCubSpline(const std::vector& kx, const std::vector& ky, const std::vector*>* coeffs = NULL); BiCubSpline(const TMatrixT* knots, //colums: x coords, rows: y coords const TMatrixT* coeffs = NULL); virtual ~BiCubSpline(); // Accessors ----------------------- const std::vector* getKx() {return &_kx;} const std::vector* getKy() {return &_ky;} TMatrixT* getCoeffs() {return &_coeffs;} // returns TF2 for area specified. Has to be inside Spline area! TF2* getTF2(double xMin, double xMax, double yMin, double yMax); // Modifiers ----------------------- void setKx(const std::vector& kx) {_kx = kx;} void setKy(const std::vector& ky) {_ky = ky;} void setCoeffs(const std::vector*>& c) ; //for ROOT interface: //comment: beware there is no possible consistency check since I need //to follow TF2's interface restrictions! //user is responsible for supplying the right array format void setCoeffsByArray(double*); // Operations ---------------------- double eval(double x, double y); private: // Private Data Members ------------ std::vector _kx; // knots in x and y direction std::vector _ky; TMatrixT _coeffs; int _xLength, _yLength; TClonesArray* _M; // -> M(x) TClonesArray* _N; // -> N(y) bool _xoutofrange; // flag for out of range bool _youtofrange; TF2* _func; //! SplineTF2Interface* _ifc; //! public: ClassDef(BiCubSpline,1) }; #endif //-------------------------------------------------------------- // $Log$ //--------------------------------------------------------------