]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCTransformation.h
Adding general non linear transformation
[u/mrichter/AliRoot.git] / TPC / AliTPCTransformation.h
1 #ifndef ALITPCTRANSFORMATION_H
2 #define ALITPCTRANSFORMATION_H
3
4 #include "TNamed.h"
5 #include "TMatrixD.h"
6 #include "TVectorD.h"
7 #include "TObjArray.h"
8 class TTreeSRedirector;
9 class AliTrackPointArray;
10 class AliTrackPoint;
11 class TFormula;
12 class TBits;
13 class TString;
14
15 class AliTPCTransformation: public TNamed{
16 public:
17   typedef Double_t (*GenFuncG)(const Double_t*,const Double_t*);
18   AliTPCTransformation();
19   AliTPCTransformation(const char *name,TBits *mask, const char *fx, const char *fy, const char  *fz, Int_t coord, Double_t param, Double_t sigma, TVectorD *fixedParams);
20   Bool_t Init();
21   //
22   virtual Double_t GetDeltaXYZ(Int_t coord, Int_t volID, Double_t param, Double_t x, Double_t y, Double_t z);
23   static TBits * BitsSide(Bool_t aside);
24   static TBits * BitsAll();
25
26   static void RegisterFormula(const char * name, GenFuncG formula);
27   static AliTPCTransformation::GenFuncG FindFormula(const char * name);
28   static Double_t Eval(const char * name, const Double_t*x,const Double_t*par);
29 public:
30   //
31   TString  * fNameX;         // x formula
32   TString  * fNameY;         // y formula
33   TString  * fNameZ;         // z formula  
34   //  
35   TBits    * fBitMask;       // bitmaps - transformation only for specified volID
36   Int_t      fCoordSystem;   // coord system of  output deltas 
37   Double_t   fParam;         // free parameter of transformation
38   Double_t   fSigma;         // error of the parameter
39   TVectorD  *fFixedParam;   // fixed parameters of tranformation
40   
41   //
42   // predefined formulas
43   //
44   static  Int_t          BuildBasicFormulas(); //build list of basic formulas
45   static  Double_t       TPCscalingRPol(Double_t *xyz, Double_t * param);
46   static  Double_t       TPCscalingZDr(Double_t *xyz, Double_t * param);
47   static  Double_t       TPCscalingPhiLocal(Double_t *xyz, Double_t * param);
48   //
49   Bool_t    fInit;          // initialization flag
50   GenFuncG  fFormulaX;      //! x formula
51   GenFuncG  fFormulaY;      //! y formula
52   GenFuncG  fFormulaZ;      //! z formula
53   static  GenFuncG    fgFormulas[10000];   //! array of pointers to formula
54   static  TObjArray*  fgFormulasName;      //! array of formalas name
55 private:
56
57   ClassDef(AliTPCTransformation,1);
58 };
59
60 #endif
61