]>
Commit | Line | Data |
---|---|---|
edc97986 | 1 | #ifndef ALISTRLINE_H |
2 | #define ALISTRLINE_H | |
3 | /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /////////////////////////////////////////////////////////////////// | |
7 | // // | |
8 | // A straight line is coded as a point (3 Double_t) and // | |
9 | // 3 direction cosines // | |
10 | // // | |
11 | /////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
14 | class AliStrLine : public TObject { | |
15 | ||
16 | public: | |
17 | AliStrLine(); // default constructor | |
24a0c65f | 18 | AliStrLine(Double_t *point, Double_t *cd, Bool_t twopoints=kFALSE); // standard constructor |
2c9641ee | 19 | AliStrLine(Float_t *pointf, Float_t *cdf, Bool_t twopoints=kFALSE); |
28dc94e2 | 20 | AliStrLine(Double_t *point, Double_t *sig2point, Double_t *cd, Bool_t twopoints=kFALSE); |
21 | AliStrLine(Float_t *pointf, Float_t *sig2point, Float_t *cdf, Bool_t twopoints=kFALSE); | |
146c29df | 22 | AliStrLine(Double_t *point, Double_t *sig2point, Double_t *wmat, Double_t *cd, Bool_t twopoints=kFALSE); |
23 | AliStrLine(Float_t *pointf, Float_t *sig2point, Float_t *wmat, Float_t *cdf, Bool_t twopoints=kFALSE); | |
c48f9ca2 | 24 | AliStrLine(const AliStrLine& source); |
25 | AliStrLine& operator=(const AliStrLine& source); | |
edc97986 | 26 | virtual ~AliStrLine(); // destructor |
c48f9ca2 | 27 | virtual void Clear(Option_t*){if(fWMatrix)delete[] fWMatrix; fWMatrix = 0;} |
edc97986 | 28 | void PrintStatus() const; |
c48f9ca2 | 29 | void SetP0(const Double_t *point) {for(Int_t i=0;i<3;i++)fP0[i]=point[i];} |
30 | void SetSigma2P0(const Double_t *sigsq) {for(Int_t i=0;i<3;i++)fSigma2P0[i]=sigsq[i];} | |
31 | void SetWMatrix(const Double_t *wmat); | |
32 | void SetCd(const Double_t *cd) {for(Int_t i=0;i<3;i++)fCd[i]=cd[i];} | |
edc97986 | 33 | void GetP0(Double_t *point) const {for(Int_t i=0;i<3;i++)point[i]=fP0[i];} |
28dc94e2 | 34 | void GetSigma2P0(Double_t *sigsq) const {for(Int_t i=0;i<3;i++)sigsq[i]=fSigma2P0[i];} |
c48f9ca2 | 35 | void GetWMatrix(Double_t *wmat) const; |
edc97986 | 36 | void GetCd(Double_t *cd) const {for(Int_t i=0;i<3;i++)cd[i]=fCd[i];} |
37 | void GetCurrentPoint(Double_t *point) const; | |
38 | Int_t IsParallelTo(AliStrLine *line) const; | |
39 | Int_t Crossrphi(AliStrLine *line); | |
40 | Int_t CrossPoints(AliStrLine *line, Double_t *point1, Double_t *point2); | |
41 | Int_t Cross(AliStrLine *line, Double_t *point); | |
2c9641ee | 42 | Double_t GetDCA(AliStrLine *line) const; |
43 | Double_t GetDistFromPoint(Double_t *point) const; | |
edc97986 | 44 | protected: |
24a0c65f | 45 | void InitDirection(Double_t *point, Double_t *cd); |
46 | void InitTwoPoints(Double_t *pA, Double_t *pB); | |
edc97986 | 47 | Double_t fP0[3]; // given point |
28dc94e2 | 48 | Double_t fSigma2P0[3]; // errors on coordinates of given point |
c48f9ca2 | 49 | Double_t *fWMatrix; //[6] weighting matrix |
50 | /* fWMatrix is a symmetric matrix internally stored as | |
51 | 0 --> row = 0, col = 0 | |
52 | 1 --> 0,1 | |
53 | 2 --> 0,2 | |
54 | 3 --> 1,1 | |
55 | 4 --> 1,2 | |
56 | 5 --> 2,2 | |
57 | The external interface (constructor, getter and setter) is: | |
58 | 0 --> row = 0, col = 0 | |
59 | 1 --> 0,1 | |
60 | 2 --> 0,2 | |
61 | 3 --> 1,0 | |
62 | 4 --> 1,1 | |
63 | 5 --> 1,2 | |
64 | 6 --> 2,0 | |
65 | 7 --> 2,1 | |
66 | 8 --> 2,2 */ | |
edc97986 | 67 | Double_t fCd[3]; // direction cosines |
68 | Double_t fTpar; //! parameter | |
edc97986 | 69 | private: |
c48f9ca2 | 70 | void SetPar(const Double_t par){fTpar = par;} |
edc97986 | 71 | |
c48f9ca2 | 72 | ClassDef(AliStrLine,4); |
edc97986 | 73 | }; |
74 | ||
75 | #endif |