]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCTransformation.h
Added switch in recoparam for HLTPreSeeding
[u/mrichter/AliRoot.git] / TPC / AliTPCTransformation.h
1 #ifndef ALITPCTRANSFORMATION_H
2 #define ALITPCTRANSFORMATION_H
3
4 //-------------------------------------------------------
5 //                       TPC transformations
6 //   
7 //
8 //   Origin: marian.ivanov@cern.ch
9 //           Code is not used anymore for the TPC corrections
10 //           Obsolete - will be removed soon 
11 // 
12 //-------------------------------------------------------
13
14
15 #include "TNamed.h"
16 #include "TMatrixD.h"
17 #include "TVectorD.h"
18 #include "TObjArray.h"
19 class TTreeSRedirector;
20 class AliTrackPointArray;
21 class AliTrackPoint;
22 class TFormula;
23 class TBits;
24 class TString;
25
26 class AliTPCTransformation: public TNamed{
27 public:
28   typedef Double_t (*GenFuncG)(const Double_t*,const Double_t*);
29   AliTPCTransformation();
30   AliTPCTransformation(const char *name,TBits *mask, const char *fx, const char *fy, const char  *fz, Int_t coord);
31   AliTPCTransformation(const AliTPCTransformation&trafo);
32   ~AliTPCTransformation();
33   //
34   virtual Double_t GetDeltaXYZ(Int_t coord, Int_t volID, Double_t param, Double_t x, Double_t y, Double_t z);
35   void SetParams(Double_t param, Double_t sigma, Double_t sigma2Time, const TVectorD *const fixedParams);
36   Bool_t Init();
37   void   SetActive(Bool_t flag){ fIsActive = flag;}
38   Bool_t IsActive() const {return fIsActive;}
39   //
40   Double_t GetParam() const {return fParam;}
41   void SetParam(Double_t param) {fParam=param;}
42   Double_t GetSigma() const {return fSigma;}
43   Double_t GetSigmaMax() const {return fSigmaMax;}
44   Double_t GetSigma2Time() const {return fSigma2Time;}
45   //
46   static TBits * BitsSide(Bool_t aside);
47   static TBits * BitsAll();
48   static void RegisterFormula(const char * name, GenFuncG formula);
49   static AliTPCTransformation::GenFuncG FindFormula(const char * name);
50   static Double_t Eval(const char * name, const Double_t*x,const Double_t*par);
51
52  private:
53   //
54   TString  * fNameX;         // x formula
55   TString  * fNameY;         // y formula
56   TString  * fNameZ;         // z formula  
57   //  
58   TBits    * fBitMask;       // bitmaps - transformation only for specified volID
59   Int_t      fCoordSystem;   // coord system of  output deltas 
60   Double_t   fParam;         // free parameter of transformation
61   Double_t   fSigma;         // error of the parameter
62   Double_t   fSigmaMax;      // maximal sigma (Not allowed to increase in propagate time by bigger factor)
63   Double_t   fSigma2Time;    // change of the error in time (per hour) - (For kalman filter) 
64   TVectorD  *fFixedParam;    // fixed parameters of tranformation
65   Bool_t     fIsActive;      // switch - is transformation active
66   //
67   // predefined formulas
68   //
69   static  Int_t          BuildBasicFormulas(); //build list of basic formulas
70   static  Double_t       TPCscalingRPol(Double_t *xyz, const Double_t * const param);
71   static  Double_t       TPCscalingZDrift(Double_t *xyz, const Double_t * const param);
72   static  Double_t       TPCscalingZDriftGy(Double_t *xyz, const Double_t * const param);
73   static  Double_t       TPCscalingZDriftT0(Double_t *xyz, const Double_t * const param);
74   static  Double_t       TPCscalingPhiLocal(Double_t *xyz, const Double_t * const param);
75   static  Double_t       TPClocalRPhiEdge(Double_t *xyz, const Double_t *const param);
76   //
77   // TPC Field cage + ROC misalingment induced distortion
78   //
79   static  Double_t       TPCscalingRIFC(Double_t *xyz, const Double_t * const param); // inner field cage r distorion
80   static  Double_t       TPCscalingROFC(Double_t *xyz, const Double_t * const param); // outer field cage r distorion
81   //
82   // TPC field cage + ROC misalignemnt induced distortion
83   //
84   static  Double_t       TPCdeltaFCROC(Double_t *xyz, const Double_t *const param); 
85   static  Double_t       TPCdeltaFCCE(Double_t *xyz, const Double_t *const param); 
86
87   //
88   // TPC local misalignment
89   //
90   static  Double_t       TPClocaldLxdGX(Double_t *xyz, const Double_t *const param);
91   static  Double_t       TPClocaldLxdGY(Double_t *xyz, const Double_t *const param);
92   static  Double_t       TPClocaldLydGX(Double_t *xyz, const Double_t *const param);
93   static  Double_t       TPClocaldLydGY(Double_t *xyz, const Double_t *const param);
94   static  Double_t       TPClocaldRzdGX(Double_t *xyz, const Double_t *const param);
95   static  Double_t       TPClocaldRzdGY(Double_t *xyz, const Double_t *const param);
96
97   //
98   // TPC  quadrant misalignment
99   //
100   //  static  Double_t       TPCQuadrantDr(Double_t *xyz, Double_t * param){return 0;}
101   //static  Double_t       TPCQuadrantDrphi(Double_t *xyz, Double_t * param){return 0;}
102   //
103   // Z shift -
104   //
105   static  Double_t       TPCDeltaZ(Double_t *xyz, const Double_t *const param);
106   static  Double_t       TPCDeltaZMediumLong(Double_t *xyz, Double_t * param);
107   static  Double_t       TPCTiltingZ(Double_t *xyz, const Double_t *const param);
108   //
109   Bool_t    fInit;          // initialization flag
110   GenFuncG  fFormulaX;      //! x formula
111   GenFuncG  fFormulaY;      //! y formula
112   GenFuncG  fFormulaZ;      //! z formula
113   static  GenFuncG    fgFormulas[10000];   //! array of pointers to formula
114   static  TObjArray*  fgFormulasName;      //! array of formalas name
115
116   AliTPCTransformation &operator=(const AliTPCTransformation&);    // not implemented
117
118   ClassDef(AliTPCTransformation,2);
119 };
120
121 #endif
122