Corrected UInt_t <-> Int_t conversion
[u/mrichter/AliRoot.git] / TPC / AliTPCkalmanFit.h
CommitLineData
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"
10class TTreeSRedirector;
11class AliTrackPointArray;
12class AliTrackPoint;
13class TFormula;
14class TBits;
15class THnSparse;
16//
17
18class AliTPCkalmanFit: public TNamed{
19public:
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);
f9f69968 55 void MakeTreeTrans(TTreeSRedirector *debug, const char *treeName="all");
7dfa0700 56
0bfb86a0 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
c64c82db 70 THnSparse *fLinearTrackDelta[12]; // linear tracks matching residuals - delta
71 THnSparse *fLinearTrackPull[12]; // linear tracks matching residuals - pull
0bfb86a0 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
e55e5512 83 AliTPCkalmanFit& operator=(const AliTPCkalmanFit&);// not implemented
0cd8bb8d 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);
0bfb86a0 97};
98
99
100
101#endif
102