StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StThinPlateSpline.h
1 
6 /***************************************************************************
7  *
8  * $Id: StThinPlateSpline.h,v 1.3 2014/08/06 11:43:35 jeromel Exp $
9  *
10  * Author: Qiu Hao, March 2013
11  ***************************************************************************
12  *
13  * Description:
14  * Thin plate spline function to describe the surface profile of a pxl sensor
15  * More information at
16  * https://www.star.bnl.gov/protected/heavy/qiuh/HFT/software/PXL_software.pdf
17  *
18  ***************************************************************************
19  *
20  * $Log: StThinPlateSpline.h,v $
21  * Revision 1.3 2014/08/06 11:43:35 jeromel
22  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
23  *
24  * Revision 1.2 2014/01/28 19:29:47 qiuh
25  * *** empty log message ***
26  *
27  *
28  **************************************************************************/
29 #ifndef StThinPlateSpline_hh
30 #define StThinPlateSpline_hh
31 
32 #include "TMatrixT.h"
33 
35 {
36 public:
37  StThinPlateSpline(Int_t nMeasurements = 200);
38  StThinPlateSpline(Int_t nMeasurements, Double_t *X, Double_t *Y, Double_t *W, Double_t *A);
39  StThinPlateSpline(Int_t nMeasurements, Float_t *X, Float_t *Y, Float_t *W, Float_t *A);
42  void fit(Int_t nMeasurements, Double_t *xMeasurement, Double_t *yMeasurement, Double_t *zMeasurement, Double_t lambda = 0);
43  Double_t ur(Double_t r2) const;
44  Double_t z(Double_t x, Double_t y) const;
45 
46  virtual const char *GetCVS() const {
47  static const char cvs[] = "Tag $Name: $ $Id: StThinPlateSpline.h,v 1.3 2014/08/06 11:43:35 jeromel Exp $ built " __DATE__ " " __TIME__ ;
48  return cvs;
49  }
50 
51 protected:
52  TMatrixT<double> *mX;
53  TMatrixT<double> *mY;
54  TMatrixT<double> *mW;
55  TMatrixT<double> *mA;
56 
57 };
58 
59 #endif
Double_t z(Double_t x, Double_t y) const
calculate z on the profile at (x,y)
void fit(Int_t nMeasurements, Double_t *xMeasurement, Double_t *yMeasurement, Double_t *zMeasurement, Double_t lambda=0)
fit measurements on a profile with tps to get mX, mY, mW, mA matrix