]>
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); | |
edc97986 | 24 | virtual ~AliStrLine(); // destructor |
25 | void PrintStatus() const; | |
26 | void SetP0(Double_t *point) {for(Int_t i=0;i<3;i++)fP0[i]=point[i];} | |
28dc94e2 | 27 | void SetSigma2P0(Double_t *sigsq) {for(Int_t i=0;i<3;i++)fSigma2P0[i]=sigsq[i];} |
146c29df | 28 | void SetWMatrix(Double_t *wmat) {for(Int_t i=0;i<9;i++)fWMatrix[i]=wmat[i];} |
edc97986 | 29 | void SetCd(Double_t *cd) {for(Int_t i=0;i<3;i++)fCd[i]=cd[i];} |
30 | void SetDebug(Int_t dbfl = 0){fDebug = dbfl; } | |
31 | void GetP0(Double_t *point) const {for(Int_t i=0;i<3;i++)point[i]=fP0[i];} | |
28dc94e2 | 32 | void GetSigma2P0(Double_t *sigsq) const {for(Int_t i=0;i<3;i++)sigsq[i]=fSigma2P0[i];} |
146c29df | 33 | void GetWMatrix(Double_t *wmat) const {for(Int_t i=0;i<9;i++)wmat[i]=fWMatrix[i];} |
edc97986 | 34 | void GetCd(Double_t *cd) const {for(Int_t i=0;i<3;i++)cd[i]=fCd[i];} |
35 | void GetCurrentPoint(Double_t *point) const; | |
36 | Int_t IsParallelTo(AliStrLine *line) const; | |
37 | Int_t Crossrphi(AliStrLine *line); | |
38 | Int_t CrossPoints(AliStrLine *line, Double_t *point1, Double_t *point2); | |
39 | Int_t Cross(AliStrLine *line, Double_t *point); | |
2c9641ee | 40 | Double_t GetDCA(AliStrLine *line) const; |
41 | Double_t GetDistFromPoint(Double_t *point) const; | |
edc97986 | 42 | protected: |
24a0c65f | 43 | void InitDirection(Double_t *point, Double_t *cd); |
44 | void InitTwoPoints(Double_t *pA, Double_t *pB); | |
edc97986 | 45 | Double_t fP0[3]; // given point |
28dc94e2 | 46 | Double_t fSigma2P0[3]; // errors on coordinates of given point |
146c29df | 47 | Double_t fWMatrix[9]; // weighting matrix |
edc97986 | 48 | Double_t fCd[3]; // direction cosines |
49 | Double_t fTpar; //! parameter | |
50 | Int_t fDebug; //! debug flag - verbose printing if >0 | |
51 | private: | |
52 | void SetPar(Double_t par){fTpar = par;} | |
53 | ||
146c29df | 54 | ClassDef(AliStrLine,3); |
edc97986 | 55 | }; |
56 | ||
57 | #endif |