]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCTransformation.h
1. Adding sorting of the Points in point array
[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);
20   AliTPCTransformation(const AliTPCTransformation&trafo);
21   ~AliTPCTransformation();
22   //
23   virtual Double_t GetDeltaXYZ(Int_t coord, Int_t volID, Double_t param, Double_t x, Double_t y, Double_t z);
24   void SetParams(Double_t param, Double_t sigma, Double_t sigma2Time, TVectorD* fixedParams);
25   Bool_t Init();
26   void   SetActive(Bool_t flag){ fIsActive = flag;}
27   Bool_t IsActive(){return fIsActive;}
28   //
29   //
30   static TBits * BitsSide(Bool_t aside);
31   static TBits * BitsAll();
32   static void RegisterFormula(const char * name, GenFuncG formula);
33   static AliTPCTransformation::GenFuncG FindFormula(const char * name);
34   static Double_t Eval(const char * name, const Double_t*x,const Double_t*par);
35 public:
36   //
37   TString  * fNameX;         // x formula
38   TString  * fNameY;         // y formula
39   TString  * fNameZ;         // z formula  
40   //  
41   TBits    * fBitMask;       // bitmaps - transformation only for specified volID
42   Int_t      fCoordSystem;   // coord system of  output deltas 
43   Double_t   fParam;         // free parameter of transformation
44   Double_t   fSigma;         // error of the parameter
45   Double_t   fSigma2Time;    // change of the error in time (per hour) - (For kalman filter) 
46   TVectorD  *fFixedParam;    // fixed parameters of tranformation
47   Bool_t     fIsActive;      // switch - is transformation active
48   //
49   // predefined formulas
50   //
51   static  Int_t          BuildBasicFormulas(); //build list of basic formulas
52   static  Double_t       TPCscalingRPol(Double_t *xyz, Double_t * param);
53   static  Double_t       TPCscalingZDr(Double_t *xyz, Double_t * param);
54   static  Double_t       TPCscalingZDrGy(Double_t *xyz, Double_t * param);
55   static  Double_t       TPCscalingPhiLocal(Double_t *xyz, Double_t * param);
56   //
57   // TPC Field cage + ROC misalingment induced distortion
58   //
59   static  Double_t       TPCscalingRIFC(Double_t *xyz, Double_t * param); // inner field cage r distorion
60   static  Double_t       TPCscalingROFC(Double_t *xyz, Double_t * param); // outer field cage r distorion
61   //
62   // TPC local misalignment
63   //
64   static  Double_t       TPClocaldLxdGX(Double_t *xyz, Double_t * param);
65   static  Double_t       TPClocaldLxdGY(Double_t *xyz, Double_t * param);
66   static  Double_t       TPClocaldLydGX(Double_t *xyz, Double_t * param);
67   static  Double_t       TPClocaldLydGY(Double_t *xyz, Double_t * param);
68   static  Double_t       TPClocaldRzdGX(Double_t *xyz, Double_t * param);
69   static  Double_t       TPClocaldRzdGY(Double_t *xyz, Double_t * param);
70
71   //
72   // TPC  quadrant misalignment
73   //
74   //  static  Double_t       TPCQuadrantDr(Double_t *xyz, Double_t * param){return 0;}
75   //static  Double_t       TPCQuadrantDrphi(Double_t *xyz, Double_t * param){return 0;}
76   //
77   // Z shift -
78   //
79   static  Double_t       TPCDeltaZ(Double_t *xyz, Double_t * param);
80   static  Double_t       TPCDeltaZMediumLong(Double_t *xyz, Double_t * param);
81   static  Double_t       TPCTiltingZ(Double_t *xyz, Double_t * param);
82   //
83   Bool_t    fInit;          // initialization flag
84   GenFuncG  fFormulaX;      //! x formula
85   GenFuncG  fFormulaY;      //! y formula
86   GenFuncG  fFormulaZ;      //! z formula
87   static  GenFuncG    fgFormulas[10000];   //! array of pointers to formula
88   static  TObjArray*  fgFormulasName;      //! array of formalas name
89 private:
90   AliTPCTransformation &operator=(const AliTPCTransformation&);    // not implemented
91
92   ClassDef(AliTPCTransformation,1);
93 };
94
95 #endif
96