]>
Commit | Line | Data |
---|---|---|
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(); | |
23 | void Add(const AliTPCkalmanFit * kalman); | |
24 | ||
25 | void AddCalibration(AliTPCTransformation * calib); | |
26 | AliTPCTransformation * GetTransformation(Int_t i){return (fCalibration)? (AliTPCTransformation *)fCalibration->At(i):0;} | |
27 | Int_t GetTransformationIndex(const char * trName); | |
28 | // | |
29 | void SetStatus(const char * name, Bool_t setOn, Bool_t isOr=kTRUE); | |
30 | // | |
31 | void FitTrackLinear(AliTrackPointArray& points, TTreeSRedirector *debug=0, Float_t scalingRMSY=1., Float_t scalingRMSZ=1.); | |
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); | |
37 | void AddCovariance(const char * varName, Double_t sigma); | |
38 | void Update(const AliTPCkalmanFit * kalman); | |
39 | ||
40 | static AliTrackPointArray * SortPoints(AliTrackPointArray &points); | |
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); | |
44 | ||
45 | Bool_t DumpCorelation(Double_t threshold, const char *mask0=0, const char *mask1=0); | |
46 | Bool_t DumpCalib(const char *mask=0, Float_t correlationCut=-1); | |
47 | // | |
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 | void MakeTreeTrans(TTreeSRedirector *debug, const char *treeName="all"); | |
56 | ||
57 | AliTPCkalmanFit *Test(Int_t ntracks); | |
58 | public: | |
59 | // | |
60 | // Calibration parameters | |
61 | // | |
62 | TObjArray *fCalibration; // array of calibrations | |
63 | TMatrixD *fCalibParam; // calibration parameters | |
64 | TMatrixD *fCalibCovar; // calibration parameters | |
65 | // | |
66 | // Linear track | |
67 | // | |
68 | TMatrixD *fLinearParam; // linear parameters | |
69 | TMatrixD *fLinearCovar; // linear covariance | |
70 | THnSparse *fLinearTrackDelta[12]; // linear tracks matching residuals - delta | |
71 | THnSparse *fLinearTrackPull[12]; // linear tracks matching residuals - pull | |
72 | // | |
73 | // | |
74 | // | |
75 | Int_t fLastTimeStamp; // last time stamp - used for propagation of parameters | |
76 | //static AliTPCkalmanFit* Instance(); | |
77 | void SetInstance(AliTPCkalmanFit*param){fgInstance = param;} | |
78 | static AliTPCkalmanFit* fgInstance; //! Instance of this class (singleton implementation) | |
79 | private: | |
80 | Double_t fCurrentAlpha; //! current rotation frame | |
81 | Double_t fCA; //! cosine of current angle | |
82 | Double_t fSA; //! sinus of current angle | |
83 | AliTPCkalmanFit& operator=(const AliTPCkalmanFit&);// not implemented | |
84 | AliTPCkalmanFit(const AliTPCkalmanFit&):TNamed(), | |
85 | fCalibration(0), | |
86 | fCalibParam(0), | |
87 | fCalibCovar(0), | |
88 | fLinearParam(0), | |
89 | fLinearCovar(0), | |
90 | fLastTimeStamp(-1), | |
91 | fCurrentAlpha(0), //! current rotation frame | |
92 | fCA(0), //! cosine of current angle | |
93 | fSA(0) //! sinus of current angle | |
94 | ||
95 | {;} //not implemented | |
96 | ClassDef(AliTPCkalmanFit,3); | |
97 | }; | |
98 | ||
99 | ||
100 | ||
101 | #endif | |
102 |