]>
Commit | Line | Data |
---|---|---|
98937d93 | 1 | #ifndef ALITRACKPOINTARRAY_H |
2 | #define ALITRACKPOINTARRAY_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ////////////////////////////////////////////////////////////////////////////// | |
7 | // Class AliTrackPoint // | |
8 | // This class represent a single track space-point. // | |
9 | // It is used to access the points array defined in AliTrackPointArray. // | |
10 | // Note that the space point coordinates are given in the global frame. // | |
11 | // // | |
12 | // cvetan.cheshkov@cern.ch 3/11/2005 // | |
13 | ////////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #include <TObject.h> | |
ec9e17f9 | 16 | #include <TMatrixDSym.h> |
98937d93 | 17 | |
082050e1 | 18 | class TGeoRotation; |
19 | ||
98937d93 | 20 | class AliTrackPoint : public TObject { |
21 | ||
22 | public: | |
23 | AliTrackPoint(); | |
cb0800cc | 24 | AliTrackPoint(Float_t x, Float_t y, Float_t z, const Float_t *cov, UShort_t volid, Float_t charge = 0, Float_t drifttime = 0); |
25 | AliTrackPoint(const Float_t *xyz, const Float_t *cov, UShort_t volid, Float_t charge = 0, Float_t drifttime = 0); | |
98937d93 | 26 | AliTrackPoint(const AliTrackPoint &p); |
27 | AliTrackPoint& operator= (const AliTrackPoint& p); | |
28 | virtual ~AliTrackPoint() {} | |
29 | ||
30 | // Multiplication with TGeoMatrix and distance between points (chi2) to be implemented | |
31 | ||
32 | void SetXYZ(Float_t x, Float_t y, Float_t z, const Float_t *cov = 0); | |
33 | void SetXYZ(const Float_t *xyz, const Float_t *cov = 0); | |
34 | void SetVolumeID(UShort_t volid) { fVolumeID = volid; } | |
6d016ab4 | 35 | void SetCharge(Float_t charge) { fCharge = charge; } |
cb0800cc | 36 | void SetDriftTime(Float_t time) { fDriftTime = time; } |
eb2d90b9 | 37 | void SetExtra(Bool_t flag=kTRUE) { fIsExtra = flag; } |
98937d93 | 38 | |
39 | Float_t GetX() const { return fX; } | |
40 | Float_t GetY() const { return fY; } | |
41 | Float_t GetZ() const { return fZ; } | |
42 | void GetXYZ(Float_t *xyz, Float_t *cov = 0) const; | |
43 | const Float_t *GetCov() const { return &fCov[0]; } | |
44 | UShort_t GetVolumeID() const { return fVolumeID; } | |
6d016ab4 | 45 | Float_t GetCharge() const { return fCharge; } |
cb0800cc | 46 | Float_t GetDriftTime() const { return fDriftTime;} |
eb2d90b9 | 47 | Bool_t IsExtra() const { return fIsExtra;} |
98937d93 | 48 | |
46ae650f | 49 | Float_t GetResidual(const AliTrackPoint &p, Bool_t weighted = kFALSE) const; |
4dcdc747 | 50 | Bool_t GetPCA(const AliTrackPoint &p, AliTrackPoint &out) const; |
46ae650f | 51 | |
52 | Float_t GetAngle() const; | |
082050e1 | 53 | Bool_t GetRotMatrix(TGeoRotation& rot) const; |
ec9e17f9 | 54 | void SetAlignCovMatrix(const TMatrixDSym alignparmtrx); |
55 | ||
46ae650f | 56 | AliTrackPoint& Rotate(Float_t alpha) const; |
57 | AliTrackPoint& MasterToLocal() const; | |
58 | ||
59 | void Print(Option_t *) const; | |
60 | ||
98937d93 | 61 | private: |
62 | ||
63 | Float_t fX; // X coordinate | |
64 | Float_t fY; // Y coordinate | |
65 | Float_t fZ; // Z coordinate | |
6d016ab4 | 66 | Float_t fCharge; // Cluster charge in arbitrary units |
cb0800cc | 67 | Float_t fDriftTime;// Drift time in SDD (in ns) |
98937d93 | 68 | Float_t fCov[6]; // Cov matrix |
eb2d90b9 | 69 | Bool_t fIsExtra; // attached by tracker but not used in fit |
98937d93 | 70 | UShort_t fVolumeID; // Volume ID |
71 | ||
eb2d90b9 | 72 | ClassDef(AliTrackPoint,5) |
98937d93 | 73 | }; |
74 | ||
75 | ////////////////////////////////////////////////////////////////////////////// | |
76 | // Class AliTrackPointArray // | |
77 | // This class contains the ESD track space-points which are used during // | |
78 | // the alignment procedures. Each space-point consist of 3 coordinates // | |
79 | // (and their errors) and the index of the sub-detector which contains // | |
80 | // the space-point. // | |
81 | // cvetan.cheshkov@cern.ch 3/11/2005 // | |
82 | ////////////////////////////////////////////////////////////////////////////// | |
83 | ||
84 | class AliTrackPointArray : public TObject { | |
85 | ||
86 | public: | |
87 | ||
88 | AliTrackPointArray(); | |
89 | AliTrackPointArray(Int_t npoints); | |
90 | AliTrackPointArray(const AliTrackPointArray &array); | |
91 | AliTrackPointArray& operator= (const AliTrackPointArray& array); | |
92 | virtual ~AliTrackPointArray(); | |
93 | ||
94 | // Bool_t AddPoint(Int_t i, AliCluster *cl, UShort_t volid); | |
95 | Bool_t AddPoint(Int_t i, const AliTrackPoint *p); | |
96 | ||
97 | Int_t GetNPoints() const { return fNPoints; } | |
98 | Int_t GetCovSize() const { return fSize; } | |
99 | Bool_t GetPoint(AliTrackPoint &p, Int_t i) const; | |
100 | // Getters for fast access to the coordinate arrays | |
101 | const Float_t* GetX() const { return &fX[0]; } | |
102 | const Float_t* GetY() const { return &fY[0]; } | |
103 | const Float_t* GetZ() const { return &fZ[0]; } | |
6d016ab4 | 104 | const Float_t* GetCharge() const { return &fCharge[0]; } |
cb0800cc | 105 | const Float_t* GetDriftTime() const { return &fDriftTime[0]; } |
eb2d90b9 | 106 | const Bool_t* GetExtra() const { return &fIsExtra[0]; } |
98937d93 | 107 | const Float_t* GetCov() const { return &fCov[0]; } |
108 | const UShort_t* GetVolumeID() const { return &fVolumeID[0]; } | |
109 | ||
110 | Bool_t HasVolumeID(UShort_t volid) const; | |
46ae650f | 111 | |
bead9796 | 112 | void Sort(Bool_t down=kTRUE); |
113 | ||
98937d93 | 114 | private: |
bead9796 | 115 | Bool_t fSorted; // Sorted flag |
98937d93 | 116 | |
117 | Int_t fNPoints; // Number of space points | |
118 | Float_t *fX; //[fNPoints] Array with space point X coordinates | |
119 | Float_t *fY; //[fNPoints] Array with space point Y coordinates | |
120 | Float_t *fZ; //[fNPoints] Array with space point Z coordinates | |
6d016ab4 | 121 | Float_t *fCharge; //[fNPoints] Array with clusters charge |
cb0800cc | 122 | Float_t *fDriftTime; //[fNPoints] Array with drift times |
eb2d90b9 | 123 | Bool_t *fIsExtra; //[fNPoints] Array with extra flags |
98937d93 | 124 | Int_t fSize; // Size of array with cov matrices = 6*N of points |
125 | Float_t *fCov; //[fSize] Array with space point coordinates cov matrix | |
126 | UShort_t *fVolumeID; //[fNPoints] Array of space point volume IDs | |
127 | ||
eb2d90b9 | 128 | ClassDef(AliTrackPointArray,5) |
98937d93 | 129 | }; |
130 | ||
131 | #endif | |
eb2d90b9 | 132 |