]>
Commit | Line | Data |
---|---|---|
0bfb86a0 | 1 | #ifndef ALITPCKALMANFIT_H |
2 | #define ALITPCKALMANFIT_H | |
3 | ||
4 | ||
5 | ||
6 | #include "TNamed.h" | |
7 | #include "TMatrixD.h" | |
8 | #include "TVectorD.h" | |
9 | #include "TObjArray.h" | |
10 | class TTreeSRedirector; | |
11 | class AliTrackPointArray; | |
12 | class AliTrackPoint; | |
13 | class TFormula; | |
14 | class TBits; | |
15 | class THnSparse; | |
16 | // | |
17 | ||
18 | class AliTPCkalmanFit: public TNamed{ | |
19 | public: | |
20 | AliTPCkalmanFit(); | |
21 | void Init(); | |
22 | void InitTransformation(); | |
0e9efcbe | 23 | void Add(const AliTPCkalmanFit * kalman); |
24 | ||
0bfb86a0 | 25 | void AddCalibration(AliTPCTransformation * calib); |
0e9efcbe | 26 | AliTPCTransformation * GetTransformation(Int_t i){return (fCalibration)? (AliTPCTransformation *)fCalibration->At(i):0;} |
7dfa0700 | 27 | Int_t GetTransformationIndex(const char * trName); |
0e9efcbe | 28 | // |
29 | void SetStatus(const char * name, Bool_t setOn, Bool_t isOr=kTRUE); | |
0bfb86a0 | 30 | // |
2497be21 | 31 | void FitTrackLinear(AliTrackPointArray& points, TTreeSRedirector *debug=0, Float_t scalingRMSY=1., Float_t scalingRMSZ=1.); |
0bfb86a0 | 32 | void DumpTrackLinear(AliTrackPointArray& points, TTreeSRedirector *debug); |
33 | void UpdateLinear(AliTrackPoint &point, TTreeSRedirector *debug=0); | |
34 | ||
35 | void Propagate(TTreeSRedirector *debug=0); | |
36 | void PropagateTime(Int_t time); | |
2497be21 | 37 | void AddCovariance(const char * varName, Double_t sigma); |
0e9efcbe | 38 | void Update(const AliTPCkalmanFit * kalman); |
0bfb86a0 | 39 | |
ddf81107 | 40 | static AliTrackPointArray * SortPoints(AliTrackPointArray &points); |
0bfb86a0 | 41 | static AliTrackPointArray * MakePointArrayLinear(Double_t alpha, Double_t y0, Double_t z0, Double_t ky, Double_t kz, Double_t err=0.02); |
42 | void ApplyCalibration(AliTrackPointArray *array, Double_t csign); | |
43 | Bool_t CheckCovariance(TMatrixD &covar, Float_t maxEl); | |
0e9efcbe | 44 | |
c64c82db | 45 | Bool_t DumpCorelation(Double_t threshold, const char *mask0=0, const char *mask1=0); |
2497be21 | 46 | Bool_t DumpCalib(const char *mask=0, Float_t correlationCut=-1); |
0bfb86a0 | 47 | // |
7dfa0700 | 48 | //Double_t GetTPCDeltaXYZ(Int_t coord, Int_t volID, Double_t x, Double_t y, Double_t z); |
49 | //static Double_t SGetTPCDeltaXYZ(Int_t coord, Int_t volID, Double_t x, Double_t y, Double_t z); | |
50 | ||
51 | Double_t GetTPCDeltaXYZ(Int_t coord, Int_t volID, Int_t icoordsys, Double_t x, Double_t y, Double_t z); | |
52 | static Double_t SGetTPCDeltaXYZ(Int_t coord, Int_t volID, Int_t icoordsys, Double_t x, Double_t y, Double_t z); | |
53 | Double_t GetTPCtransXYZ(Int_t coord, Int_t volID, Int_t calibID, Int_t icoordsys, Double_t x, Double_t y, Double_t z); | |
54 | static Double_t SGetTPCtransXYZ(Int_t coord, Int_t volID, Int_t calibID, Int_t icoordsys, Double_t x, Double_t y, Double_t z); | |
55 | ||
0bfb86a0 | 56 | AliTPCkalmanFit *Test(Int_t ntracks); |
57 | public: | |
58 | // | |
59 | // Calibration parameters | |
60 | // | |
61 | TObjArray *fCalibration; // array of calibrations | |
62 | TMatrixD *fCalibParam; // calibration parameters | |
63 | TMatrixD *fCalibCovar; // calibration parameters | |
64 | // | |
65 | // Linear track | |
66 | // | |
67 | TMatrixD *fLinearParam; // linear parameters | |
68 | TMatrixD *fLinearCovar; // linear covariance | |
c64c82db | 69 | THnSparse *fLinearTrackDelta[12]; // linear tracks matching residuals - delta |
70 | THnSparse *fLinearTrackPull[12]; // linear tracks matching residuals - pull | |
0bfb86a0 | 71 | // |
72 | // | |
73 | // | |
74 | Int_t fLastTimeStamp; // last time stamp - used for propagation of parameters | |
75 | //static AliTPCkalmanFit* Instance(); | |
76 | void SetInstance(AliTPCkalmanFit*param){fgInstance = param;} | |
77 | static AliTPCkalmanFit* fgInstance; //! Instance of this class (singleton implementation) | |
78 | private: | |
79 | Double_t fCurrentAlpha; //! current rotation frame | |
80 | Double_t fCA; //! cosine of current angle | |
81 | Double_t fSA; //! sinus of current angle | |
e55e5512 | 82 | AliTPCkalmanFit& operator=(const AliTPCkalmanFit&);// not implemented |
0cd8bb8d | 83 | AliTPCkalmanFit(const AliTPCkalmanFit&):TNamed(), |
84 | fCalibration(0), | |
85 | fCalibParam(0), | |
86 | fCalibCovar(0), | |
87 | fLinearParam(0), | |
88 | fLinearCovar(0), | |
89 | fLastTimeStamp(-1), | |
90 | fCurrentAlpha(0), //! current rotation frame | |
91 | fCA(0), //! cosine of current angle | |
92 | fSA(0) //! sinus of current angle | |
93 | ||
94 | {;} //not implemented | |
95 | ClassDef(AliTPCkalmanFit,3); | |
0bfb86a0 | 96 | }; |
97 | ||
98 | ||
99 | ||
100 | #endif | |
101 |