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