]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCTransformation.h
Coverity fixes (Jens)
[u/mrichter/AliRoot.git] / TPC / AliTPCTransformation.h
CommitLineData
94685752 1#ifndef ALITPCTRANSFORMATION_H
2#define ALITPCTRANSFORMATION_H
3
5a225cbb 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
94685752 15#include "TNamed.h"
16#include "TMatrixD.h"
17#include "TVectorD.h"
18#include "TObjArray.h"
19class TTreeSRedirector;
20class AliTrackPointArray;
21class AliTrackPoint;
22class TFormula;
23class TBits;
24class TString;
25
26class AliTPCTransformation: public TNamed{
27public:
28 typedef Double_t (*GenFuncG)(const Double_t*,const Double_t*);
29 AliTPCTransformation();
6d438146 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 //
e55e5512 34 virtual Double_t GetDeltaXYZ(Int_t coord, Int_t volID, Double_t param, Double_t x, Double_t y, Double_t z);
98a4cc77 35 void SetParams(Double_t param, Double_t sigma, Double_t sigma2Time, const TVectorD *const fixedParams);
94685752 36 Bool_t Init();
0e9efcbe 37 void SetActive(Bool_t flag){ fIsActive = flag;}
98a4cc77 38 Bool_t IsActive() const {return fIsActive;}
94685752 39 //
98a4cc77 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;}
6d438146 45 //
94685752 46 static TBits * BitsSide(Bool_t aside);
47 static TBits * BitsAll();
94685752 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);
98a4cc77 51
52 private:
94685752 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
90a856f9 62 Double_t fSigmaMax; // maximal sigma (Not allowed to increase in propagate time by bigger factor)
6d438146 63 Double_t fSigma2Time; // change of the error in time (per hour) - (For kalman filter)
64 TVectorD *fFixedParam; // fixed parameters of tranformation
0e9efcbe 65 Bool_t fIsActive; // switch - is transformation active
94685752 66 //
67 // predefined formulas
68 //
69 static Int_t BuildBasicFormulas(); //build list of basic formulas
5a225cbb 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);
98a4cc77 75 static Double_t TPClocalRPhiEdge(Double_t *xyz, const Double_t *const param);
0e9efcbe 76 //
77 // TPC Field cage + ROC misalingment induced distortion
78 //
5a225cbb 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
87224220 81 //
82 // TPC field cage + ROC misalignemnt induced distortion
83 //
98a4cc77 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);
87224220 86
94685752 87 //
0e9efcbe 88 // TPC local misalignment
89 //
98a4cc77 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);
3649eec1 96
0e9efcbe 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 //
98a4cc77 105 static Double_t TPCDeltaZ(Double_t *xyz, const Double_t *const param);
0e9efcbe 106 static Double_t TPCDeltaZMediumLong(Double_t *xyz, Double_t * param);
98a4cc77 107 static Double_t TPCTiltingZ(Double_t *xyz, const Double_t *const param);
0e9efcbe 108 //
94685752 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
98a4cc77 115
e55e5512 116 AliTPCTransformation &operator=(const AliTPCTransformation&); // not implemented
94685752 117
90a856f9 118 ClassDef(AliTPCTransformation,2);
94685752 119};
120
121#endif
122