From: abercuci Date: Mon, 10 Sep 2007 09:55:40 +0000 (+0000) Subject: Small interface modification X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=e0b38166ff87ab8cadad0f4b31af06254829bdc2;p=u%2Fmrichter%2FAliRoot.git Small interface modification --- diff --git a/STAT/TKDInterpolator.h b/STAT/TKDInterpolator.h index d1e73d2185a..e1d0ab31153 100644 --- a/STAT/TKDInterpolator.h +++ b/STAT/TKDInterpolator.h @@ -14,16 +14,18 @@ public: TKDInterpolator(TTree *t, const Char_t *var, const Char_t *cut = 0, UInt_t bsize = 100); TKDInterpolator(Int_t npoints, Int_t ndim, UInt_t bsize, Float_t **data); ~TKDInterpolator(); - - inline Bool_t GetEstimate(Int_t node, Float_t *coord, Float_t &val, Float_t &error) const ; - Double_t Eval(Float_t *point); - void DrawNodes(Int_t depth = -1, Int_t ax1 = 0, Int_t ax2 = 1); - void DrawNode(Int_t node, Int_t ax1 = 0, Int_t ax2 = 1); + + TKDTreeIF* GetHelper() {return fKDhelper;} + inline Bool_t GetCOGPoint(Int_t node, Float_t *coord, Float_t &val, Float_t &error) const ; + inline Bool_t GetDataPoint(Int_t n, Float_t *p) const; + Double_t Eval(const Double_t *point, Int_t npoints = 12); + void DrawNodes(UInt_t ax1 = 0, UInt_t ax2 = 1, Int_t depth = -1); + void DrawNode(Int_t tnode, UInt_t ax1 = 0, UInt_t ax2 = 1); private: TKDInterpolator(const TKDInterpolator &); TKDInterpolator& operator=(const TKDInterpolator &); - void Build(); + void Build(); protected: Int_t fNTNodes; //Number of evaluation data points @@ -40,9 +42,9 @@ private: }; //__________________________________________________________________ -Bool_t TKDInterpolator::GetEstimate(Int_t node, Float_t *coord, Float_t &val, Float_t &error) const +Bool_t TKDInterpolator::GetCOGPoint(Int_t node, Float_t *coord, Float_t &val, Float_t &error) const { - if(node < 0 || node > GetNTerminalNodes()) return kFALSE; + if(node < 0 || node > fNTNodes) return kFALSE; for(int idim=0; idim= fNpoints) return kFALSE; + + for(int i=0; i